Automatic inspection method and system in off-line state based on mobile phone APP

Download the inspection plan information through the online JS program and automatically perform inspection point check-in without network, solving the problem that the existing technology cannot conduct offline inspections in the network-free area, and realizes automatic inspection in the network-free environment and large-capacity data storage and upload functions.

CN119110248APending Publication Date: 2024-12-10BEIJING HUIDA SOFT COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411403602.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Existing mobile apps cannot perform offline patrols, record mobile phone tracks, perform positioning automatic patrols, and collect data at any point in areas without networks or unstable networks. They cannot support large-capacity data storage due to cache size limitations.

Method used

Download the inspection plan information through the online JS program and save it to offline storage variables. Enter the offline inspection mode when there is no network state. Automatically perform inspection point check-in according to the location information, and automatically switch to online mode after connecting to the network to upload data.

Benefits of technology

It realizes the need for offline patrol positioning and punch-in scenarios in areas without networks or unstable networks, supports large-capacity data storage and automated data collection and upload, and meets the patrol requirements in a network-free environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119110248A_ABST
    Figure CN119110248A_ABST
Patent Text Reader

Abstract

The invention discloses an off-line state automatic inspection method and system based on a mobile phone APP. The method comprises the following steps: downloading inspection plan information and storing the inspection plan information in an off-line storage variable; when the mobile phone APP is opened, running an off-line JS program to judge a network state, and entering an on-line or off-line inspection mode according to the network state; when it is detected that the network state changes, switching an inspection mode; in the off-line inspection mode, current position information is obtained in real time based on a browser, card punching is carried out at an inspection point position, off-line data acquisition is carried out at any place, and the off-line data is stored in an off-line storage variable; when the mode is switched to the on-line inspection mode, the on-line JS program obtains data from the off-line storage variables and uploads the data to the server side, and meanwhile the off-line storage variables are emptied. Through the technical scheme of the invention, off-line inspection and automatic positioning card punching can be realized in an area without a network or with an unstable network, and meanwhile, automatic data uploading after networking is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of inspection devices, and in particular to an automatic inspection method in an offline state based on a mobile phone APP and an automatic inspection system in an offline state based on a mobile phone APP. Background Art

[0002] Positioning automatic inspection means that during the inspection process, the location of personnel is obtained and recorded in real time, and the location of each inspection point in the inspection plan is compared based on the real-time location. When the distance from the personnel to a certain inspection point meets the set conditions, the APP automatically marks the inspection point as inspected, and saves the inspection time, inspection personnel, inspection location, inspection point name and other information. If it is an online inspection, the inspection information is uploaded in real time and the inspection point status is updated; if it is an offline inspection, the inspection data is saved on the APP and automatically uploaded after the network is connected.

[0003] At present, most mobile phone-based apps can support online inspections, but do not support offline inspections, such as obtaining the time of arrival at the inspection point, the location when clocking in, and collecting data at the inspection point, such as taking photos, recording short videos, etc. Although some mobile phone apps support online inspections, they do not support running the app in screen saver mode.

[0004] A small number of mobile phone apps support running in offline state, but due to the limitation of cache size (5M-8M for each domain name), they cannot support the storage of large-capacity offline inspection data.

[0005] Some mobile phone apps need to be set to offline mode separately before entering offline state, and offline resources (such as offline maps) must be downloaded in advance, but they cannot be started in offline mode after exiting.

[0006] Most devices that use patrol sticks (non-smartphones, unable to perform interactive operations such as taking photos and scanning codes) support offline inspections. After the inspection is completed, they need to connect to the server through a physical connection and then upload data, or upload data through a 4G SIM card.

[0007] For safety reasons, it is necessary to inspect pipelines, rivers, etc. in areas without network coverage, record personnel trajectories, and collect data at designated points.

[0008] At present, no APP has been found that can perform offline inspections, record mobile phone tracks, perform automatic positioning inspections, and collect data at any point in areas without network or unstable network. Summary of the invention

[0009] In response to the above problems, the present invention provides an automatic inspection method and system in an offline state based on a mobile phone APP. The inspection plan information is downloaded through the online JS program of the mobile phone APP in a networked state, and the offline inspection mode is entered when there is no network. The inspection point punch-in function is automatically executed without human intervention when arriving at the inspection point according to the acquired location information, and it automatically switches to the online inspection mode after connecting to the network, and automatically uploads data, so as to meet the needs of offline inspection positioning and punch-in scenarios in areas without network or unstable network.

[0010] To achieve the above object, the present invention provides an offline automatic inspection method based on a mobile phone APP, comprising:

[0011] Download the inspection plan information through the online JS program and save it to the offline storage variable;

[0012] The HTML file is packaged into a mobile phone APP, and when the mobile phone APP is opened, the offline JS program in the HTML file is first run to determine the network status, and when the network is connected, the online JS program is started to enter the online inspection mode, and when there is no network status, the offline JS program continues to run in the offline inspection mode;

[0013] When a change in the network status is detected during the inspection process, the online JS program is started from the offline inspection mode to enter the online inspection mode, or the offline JS program is started from the online inspection mode to enter the offline inspection mode;

[0014] In the offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in;

[0015] Performing offline data collection at any location in the offline inspection mode and saving the data to the offline storage variable;

[0016] When switching from the offline inspection mode to the online inspection mode, the online JS program obtains data from the offline storage variables and uploads the data to the server, and clears the offline storage variables at the same time.

[0017] In the above technical solution, preferably, when the network is in an online state, starting the online JS program to enter the online inspection mode, the specific process includes:

[0018] When the network is in a connected state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode.

[0019] In the above technical solution, preferably, when a change in the network status is detected during the inspection process, the online JS program is started by the offline inspection mode to enter the online inspection mode, or the offline JS program is started by the online inspection mode to enter the offline inspection mode, and the specific process includes:

[0020] In the offline inspection mode, when the offline JS program detects that the network is in an online state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode;

[0021] In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode;

[0022] If the network status does not change, the existing inspection mode continues to be executed.

[0023] In the above technical solution, preferably, in the offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in. The specific process includes:

[0024] In the offline inspection mode, the location information of the current terminal is obtained in real time based on the browser;

[0025] According to the inspection plan information in the offline storage variable, when the terminal position reaches the preset inspection point position, a clock-in is performed, and a vibration and / or ringing reminder is issued at the same time.

[0026] In the above technical solution, preferably, after the online JS program clears the offline storage variables, the updated inspection plan information is downloaded to the offline storage variables.

[0027] The present invention also proposes an offline automatic inspection system based on a mobile phone APP, which uses the offline automatic inspection method based on a mobile phone APP disclosed in any one of the above technical solutions, including:

[0028] Inspection plan download module, used to download inspection plan information through online JS program and save it to offline storage variables;

[0029] A startup mode judgment module is used to first run the offline JS program in the HTML file to judge the network status when the mobile phone APP is opened, and start the online JS program to enter the online inspection mode when the network is connected, and continue to run the offline JS program in the offline inspection mode when there is no network;

[0030] The inspection mode switching module is used to start the online JS program from the offline inspection mode to enter the online inspection mode, or start the offline JS program from the online inspection mode to enter the offline inspection mode when a change in the network status is detected during the inspection process;

[0031] An automatic positioning punch-in module is used to obtain the current location information in real time based on the browser in the offline inspection mode, and punch in the inspection points that meet the preset conditions;

[0032] An offline data collection module, used to perform offline data collection at any location in the offline inspection mode and save the data to the offline storage variable;

[0033] The inspection data uploading module is used for, when switching from the offline inspection mode to the online inspection mode, the online JS program obtains data from the offline storage variables and uploads it to the server, and clears the offline storage variables at the same time.

[0034] In the above technical solution, preferably, the startup mode determination module is specifically used for:

[0035] When the network is in a connected state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode.

[0036] In the above technical solution, preferably, the inspection mode switching module is specifically used to:

[0037] In the offline inspection mode, when the offline JS program detects that the network is in an online state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode;

[0038] In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode;

[0039] If the network status does not change, the existing inspection mode continues to be executed.

[0040] In the above technical solution, preferably, the automatic positioning punching module is specifically used for:

[0041] In the offline inspection mode, the location information of the current terminal is obtained in real time based on the browser;

[0042] According to the inspection plan information in the offline storage variable, when the terminal position reaches the preset inspection point position, a clock-in is performed, and a vibration and / or ringing reminder is issued at the same time.

[0043] In the above technical solution, preferably, the inspection data uploading module is also used for:

[0044] After the online JS program clears the offline storage variables, the updated inspection plan information is downloaded to the offline storage variables.

[0045] Compared with the prior art, the beneficial effects of the present invention are: downloading inspection plan information through the online JS program of the mobile phone APP in the networked state, entering the offline inspection mode when there is no network, and automatically executing the inspection point punch-in function without human intervention when arriving at the inspection point according to the acquired location information, and automatically switching to the online inspection mode after connecting to the network, and automatically uploading data, meeting the needs of offline inspection positioning and punch-in scenarios in areas without network or unstable network. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a data storage process of an offline automatic inspection method based on a mobile phone APP disclosed in an embodiment of the present invention;

[0047] Figure 2 The present invention is a schematic diagram of the workflow of an automatic inspection method in an offline state based on a mobile phone APP disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.

[0049] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0050] like Figure 1 and Figure 2 As shown, according to the present invention, an automatic inspection method based on a mobile phone APP in an offline state includes:

[0051] Download the inspection plan information through the online JS program and save it to the offline storage variable;

[0052] Package the HTML file into the mobile APP, and when the mobile APP is opened, first run the offline JS program in the HTML file to determine the network status, and start the online JS program to enter the online inspection mode when the network is connected, and continue to run the offline JS program in the offline inspection mode when there is no network;

[0053] When a change in the network status is detected during the inspection process, the online JS program is started from the offline inspection mode to enter the online inspection mode, or the offline JS program is started from the online inspection mode to enter the offline inspection mode;

[0054] In offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in;

[0055] Perform offline data collection at any location in offline inspection mode and save it to offline storage variables;

[0056] When switching from offline inspection mode to online inspection mode, the online JS program obtains data from the offline storage variables and uploads it to the server, while clearing the offline storage variables.

[0057] In this implementation, the inspection plan information is downloaded through the online JS program of the mobile phone APP when the network is connected, and the offline inspection mode is entered when there is no network. The inspection point punch-in function is automatically executed without human intervention when arriving at the inspection point based on the acquired location information, and it automatically switches to the online inspection mode after connecting to the network, and automatically uploads data, meeting the needs of offline inspection positioning and punch-in scenarios in areas without network or unstable network.

[0058] Specifically, no matter the mobile phone is online or offline, the offline JS program in the mobile phone APP cannot access the storage variables in the iframe. Therefore, in order to realize the offline inspection function of the mobile phone APP, the inspection plan information must be downloaded through the online JS program and saved to the offline storage variables, so as to prepare for the mobile phone APP to start and enter the offline inspection mode in the offline inspection mode.

[0059] In addition, when packaging and generating a mobile phone APP, an independent HTML file needs to be packaged into the mobile phone APP. In this way, when the mobile phone APP is started, the HTML file in the mobile phone APP can be opened first, and the offline JS program in the HTML file can be run. The network status is judged by the offline JS program, and the online inspection mode or the offline inspection mode is selected according to the network status.

[0060] During the implementation process, users do not need to purchase special handheld devices. They only need to use ordinary smart phones (such as those using the Android system) to perform positioning automatic clocking-in inspections and collect data in a network-free environment, such as in pipe network and reservoir inspections. After the pipeline inspection user sets the positioning automatic clocking-in inspection route, automatically forms the inspection plan information and downloads it to the offline storage variable through the online JS program, the inspection personnel can start the mobile phone APP to directly put the phone into a locked or screen-protected state, or directly disconnect the network manually. When the mobile terminal is in a locked or screen-protected state, the mobile phone APP is in the background running state. In this state, the terminal location information is still obtained in real time and compared with the inspection point location information in the inspection plan information, and the automatic clocking-in is performed when the location information meets the preset conditions.

[0061] After the inspectors arrive at the designated inspection points with their mobile phones, the mobile APP will automatically clock in and vibrate and ring to remind the inspectors that they have successfully clocked in. There is no need for the inspectors to operate the mobile APP to clock in at the inspection points. At the same time, inspectors can collect data at any location at any time in an offline state. The mobile APP can choose to set data collection methods such as taking photos, entering text, and recording short videos.

[0062] According to the personnel trajectory data collected in the offline inspection mode received by the server, the coverage mileage and coverage rate of the planned route by the actual walking path of the inspection personnel can be analyzed and displayed. The data collected offline and uploaded after networking can be used as abnormal point data query on the server, and a work order can be automatically generated. At the same time, the server will separately mark the offline upload point to check its actual arrival (punch-in) time and upload time.

[0063] In the above implementation, preferably, when the network is in an online state, the online JS program is started to enter the online inspection mode, and the specific process includes:

[0064] When the network is connected, access the URL corresponding to the iframe in the HTML file and start the online JS program to enter the online inspection mode.

[0065] In the above implementation, preferably, when a change in the network status is detected during the inspection process, the online JS program is started from the offline inspection mode to enter the online inspection mode, or the offline JS program is started from the online inspection mode to enter the offline inspection mode. The specific process includes:

[0066] In the offline inspection mode, when the offline JS program detects that the network is connected, it accesses the URL corresponding to the iframe in the HTML file and starts the online JS program to enter the online inspection mode;

[0067] In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode;

[0068] If the network status does not change, the existing inspection mode continues to be executed.

[0069] In the above implementation, preferably, in the offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in. The specific process includes:

[0070] In offline inspection mode, the location information of the current terminal is obtained in real time based on the browser (including when the phone is in screen saver mode);

[0071] According to the inspection plan information in the offline storage variables, the terminal will clock in when it reaches the preset inspection point without manual intervention, and vibrate and / or ring to remind the successful clock in.

[0072] In the above implementation, preferably, after the online JS program clears the offline storage variable, if updated inspection plan information is found, the updated inspection plan information is downloaded to the offline storage variable.

[0073] In the above implementation, in order to support the mobile phone to persist data, the present invention adopts a browser-based technology for persisting large-capacity data (IndexedDB). At the same time, after uploading data, the offline storage variable is cleared, so that the mobile phone has sufficient capacity to support the storage of large-capacity offline inspection data.

[0074] The present invention also proposes an offline automatic inspection system based on a mobile phone APP, which applies the offline automatic inspection method based on a mobile phone APP disclosed in any one of the above embodiments, including:

[0075] Inspection plan download module, used to download inspection plan information through online JS program and save it to offline storage variables;

[0076] The startup mode judgment module is used to first run the offline JS program in the HTML file to judge the network status when the mobile phone APP is opened, and start the online JS program to enter the online inspection mode when the network is connected, and continue to run the offline JS program in the offline inspection mode when there is no network;

[0077] The inspection mode switching module is used to start the online JS program from the offline inspection mode to enter the online inspection mode, or start the offline JS program from the online inspection mode to enter the offline inspection mode when a change in the network status is detected during the inspection process;

[0078] The automatic positioning punch-in module is used to obtain the current location information in real time based on the browser in the offline inspection mode, and punch in the inspection points that meet the preset conditions;

[0079] Offline data collection module, used to perform offline data collection at any location in offline inspection mode and save it to offline storage variables;

[0080] The inspection data upload module is used to switch from offline inspection mode to online inspection mode. The online JS program obtains data from offline storage variables and uploads it to the server, while clearing offline storage variables.

[0081] In the above implementation, preferably, the startup mode determination module is specifically used for:

[0082] When the network is connected, access the URL corresponding to the iframe in the HTML file and start the online JS program to enter the online inspection mode.

[0083] In the above implementation, preferably, the inspection mode switching module is specifically used to:

[0084] In the offline inspection mode, when the offline JS program detects that the network is connected, it accesses the URL corresponding to the iframe in the HTML file and starts the online JS program to enter the online inspection mode;

[0085] In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode;

[0086] If the network status does not change, the existing inspection mode continues to be executed.

[0087] In the above implementation, preferably, the automatic positioning punch-in module is specifically used for:

[0088] In offline inspection mode, the location information of the current terminal is obtained in real time based on the browser;

[0089] According to the inspection plan information in the offline storage variables, the terminal will clock in when it reaches the preset inspection point, and a vibration and / or ringing reminder will be issued.

[0090] In the above implementation, preferably, the inspection data uploading module is also used for:

[0091] After the online JS program clears the offline storage variables, it downloads the updated inspection plan information to the offline storage variables.

[0092] According to the automatic inspection system in an offline state based on a mobile phone APP disclosed in the above-mentioned implementation mode, the functions to be implemented by each module thereof correspond to the steps of the automatic inspection method in an offline state based on a mobile phone APP disclosed in the above-mentioned implementation mode. During the implementation process, operations are performed in reference to the above-mentioned implementation mode, which will not be repeated here.

[0093] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An automatic inspection method based on mobile phone APP in offline state, characterized in that: include: Download the inspection plan information through the online JS program and save it to the offline storage variable; The HTML file is packaged into a mobile phone APP, and when the mobile phone APP is opened, the offline JS program in the HTML file is first run to determine the network status, and when the network is connected, the online JS program is started to enter the online inspection mode, and when there is no network status, the offline JS program continues to run in the offline inspection mode; When a change in the network status is detected during the inspection process, the online JS program is started from the offline inspection mode to enter the online inspection mode, or the offline JS program is started from the online inspection mode to enter the offline inspection mode; In the offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in; Performing offline data collection at any location in the offline inspection mode and saving the data to the offline storage variable; When switching from the offline inspection mode to the online inspection mode, the online JS program obtains data from the offline storage variables and uploads the data to the server, and clears the offline storage variables at the same time.

2. The offline automatic inspection method based on mobile phone APP according to claim 1 is characterized in that: When the network is in the connected state, the online JS program is started to enter the online inspection mode. The specific process includes: When the network is in a connected state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode.

3. The offline automatic inspection method based on mobile phone APP according to claim 1 is characterized in that: When a change in the network status is detected during the inspection process, the online JS program is started from the offline inspection mode to enter the online inspection mode, or the offline JS program is started from the online inspection mode to enter the offline inspection mode. The specific process includes: In the offline inspection mode, when the offline JS program detects that the network is connected to the network, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode; In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode; If the network status does not change, the existing inspection mode continues to be executed.

4. The offline automatic inspection method based on mobile phone APP according to claim 1 is characterized in that: In the offline inspection mode, the current location information is obtained in real time based on the browser, and the inspection points that meet the preset conditions are clocked in. The specific process includes: In the offline inspection mode, the location information of the current terminal is obtained in real time based on the browser; According to the inspection plan information in the offline storage variable, when the terminal position reaches the preset inspection point position, a clock-in is performed, and a vibration and / or ringing reminder is issued at the same time.

5. The offline automatic inspection method based on mobile phone APP according to claim 1 is characterized in that: After the online JS program clears the offline storage variables, the updated inspection plan information is downloaded to the offline storage variables.

6. An offline automatic inspection system based on a mobile phone APP, characterized in that: The automatic inspection method in an offline state based on a mobile phone APP according to any one of claims 1 to 5 is applied, comprising: Inspection plan download module, used to download inspection plan information through online JS program and save it to offline storage variables; A startup mode judgment module is used to first run the offline JS program in the HTML file to judge the network status when the mobile phone APP is opened, and start the online JS program to enter the online inspection mode when the network is connected, and continue to run the offline JS program in the offline inspection mode when there is no network; The inspection mode switching module is used to start the online JS program from the offline inspection mode to enter the online inspection mode, or start the offline JS program from the online inspection mode to enter the offline inspection mode when a change in the network status is detected during the inspection process; An automatic positioning punch-in module is used to obtain the current location information in real time based on the browser in the offline inspection mode, and punch in the inspection points that meet the preset conditions; An offline data collection module, used to perform offline data collection at any location in the offline inspection mode and save the data to the offline storage variable; The inspection data uploading module is used for, when switching from the offline inspection mode to the online inspection mode, the online JS program obtains data from the offline storage variables and uploads it to the server, and clears the offline storage variables at the same time.

7. The offline automatic inspection system based on mobile phone APP according to claim 6 is characterized in that: The startup mode determination module is specifically used for: When the network is in a connected state, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode.

8. The offline automatic inspection system based on mobile phone APP according to claim 6 is characterized in that: The inspection mode switching module is specifically used for: In the offline inspection mode, when the offline JS program detects that the network is connected to the network, the URL corresponding to the iframe in the HTML file is accessed, and the online JS program is started to enter the online inspection mode; In the online inspection mode, when the online JS program detects that there is no network, it jumps to the HTML file and starts the offline JS program to enter the offline inspection mode; If the network status does not change, the existing inspection mode continues to be executed.

9. The offline automatic inspection system based on mobile phone APP according to claim 6 is characterized in that: The automatic positioning punch-in module is specifically used for: In the offline inspection mode, the location information of the current terminal is obtained in real time based on the browser; According to the inspection plan information in the offline storage variable, when the terminal position reaches the preset inspection point position, a clock-in is performed, and a vibration and / or ringing reminder is issued at the same time.

10. The offline automatic inspection system based on mobile phone APP according to claim 6 is characterized in that: The inspection data uploading module is also used for: After the online JS program clears the offline storage variables, the updated inspection plan information is downloaded to the offline storage variables.