A storage and downloading method for offline form filling

By using the storage and download method of offline form filling in the mine underground safety inspection, and using the HTML5 drag and drop API to generate offline forms and full data packets, the problem of form filling in the underground without network is solved, and an efficient and convenient security inspection process is achieved.

CN118760678BActive Publication Date: 2025-04-11BEIJING FENGRUI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410766297.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-04-11
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

When performing safety inspections underground in a mine, the form needs to be reset, and the network cannot fully cover the underground space, resulting in the inability to obtain the form underground.

Method used

It provides a storage and download method for offline filling of forms. Through the HTML5 drag API, drag the required cell check items in the cell area to the display area to generate offline forms and full data packets. The device uses the downloaded data packets to fill in when there is no network, and uploads data when there is a network.

Benefits of technology

It realizes the filling of safety inspection forms and uploading of data under the conditions of no network underground, improves the efficiency and convenience of underground safety inspections, and meets flexible and personalized customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760678B_ABST
    Figure CN118760678B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of mine safety management, and in particular to a storage and downloading method for filling out a form offline. By storing cell inspection items in advance in a cell area of ​​a server, moving the required cell inspection items from the cell area to a cell display area according to actual conditions, and storing the cells in the cell display area in a database in the form of a document, an offline form is obtained. The setting of the form only requires selecting cell inspection items according to requirements, which is more convenient and quick. When there is a network on the device side, the offline form is downloaded, and when there is no network on the device side, the offline form is opened, and the check is performed according to the offline form. After filling out the offline form, when there is a network on the device side, the filled-in offline form data is uploaded to the server side, and the form can still be obtained when there is no network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of mine safety management. Background Art

[0002] With the rapid development of mine informatization, the needs of mines for underground safety inspections are becoming more and more complex, the functional complexity is increasing, the safety and environmental protection regulations are becoming more and more stringent, and the flexible and personalized customer needs vary greatly. Every time a safety inspection is performed underground, the form must be reset, and the network cannot fully cover the underground space, making it impossible to obtain the form underground. Summary of the invention

[0003] In order to solve the technical problems in the prior art that each time a safety inspection is performed underground, the form must be reset, and the network cannot fully cover the underground space, making it impossible to obtain the form underground, the present invention provides a method for storing and downloading offline form filling.

[0004] The technical solution adopted by the present invention to achieve the above-mentioned purpose is:

[0005] A method for storing and downloading offline form filling includes the following steps:

[0006] S1. The server sets a cell area and a cell display area, where the cell area is used to store cell check items;

[0007] S2. Use the HTML5 drag API to drag the required cell check items in the cell area to the position range of the cell display area to obtain the check item form, store the check item form in the database, and then the server generates an offline form and a full data package corresponding to the form according to the configuration items and cell item contents of the check item form in the database;

[0008] S3. Generate an ID for each full data packet using an ID generator;

[0009] S4. The device determines whether there is a network at present through the ConnectivityManager object provided by the Android system. When the device has a network, the device automatically downloads all full data packets through the network; when the device has no network, the device retrieves the required full data packet through the ID in all the downloaded full data packets according to the demand, and decompresses the full data packet through the compression software;

[0010] S5. Fill in the inspection items in the full data package according to the actual inspection results;

[0011] S6. The device side determines whether there is a network currently through the ConnectivityManager object provided by the Android system. When the device side has a network, the device side automatically uploads the filled-in offline form data to the server side.

[0012] In step S2, the server also sets a cell attribute area, moves the required cell inspection items in the cell area to the position range of the cell display area, identifies the attributes of the cell inspection items, and uses the cell attribute area to adjust the cell attributes. During the adjustment process, the cell inspection items are displayed in real time in the cell display area; the adjusted cell attributes include name, description, height, width, default value, alignment, validation and visible attributes.

[0013] The step S4 moves the required unmoved cell inspection items in the cell area to the cell display area, adjusts the attributes of the new cell inspection items in the cell display area through the cell attribute area, obtains an incremental data packet and stores it in a database, generates an ID for the incremental data packet through an ID generator, and when the device has a network, the device automatically downloads the incremental data packet and merges it with the original full data packet. When the device has no network, the device retrieves the required full data packet according to the ID and opens the full data packet.

[0014] During the incremental data packet generation process, the CPU core of the server performs multi-thread allocation and concurrent execution of incremental data packet generation. When the number of incremental data packet generation requests to be executed concurrently exceeds the number of CPU cores, the requests are queued and stored in the database, and the requests are persisted.

[0015] In step S4, the device detects the network status through the ConnectivityManager object provided by the Android system. When the network delay is not higher than 200MS and the packet loss rate is less than 0.1%, it is considered that the device has a network.

[0016] The offline forms include a mine environment on-site inspection form, a covered waste rock dump inspection work form and a mine water treatment station work form. Each form corresponds to a safety inspection business, and each cell corresponds to an inspection item. The inspection items include items such as the standardized hanging of blasting warning signs, items such as operators undergoing level three safety education and holding entry cards, items such as standardized storage of pyrotechnics, items such as CO concentration, items such as operators carrying self-rescue devices, items such as sufficient lighting and items such as no damage to lighting lines.

[0017] The offline form supports text type, number type, logic type, drop-down check type, drop-down association type, date type, time type, single-choice type, multi-line type, automatic numbering type, electronic signature type, address type, location type, picture type, attachment type, multi-level association type, association query type, @member type, @department type and @work form type.

[0018] The advantages of the present invention compared with the prior art are:

[0019] Store the cell check items in the cell area of ​​the server in advance, move the required cell check items from the cell area to the cell display area according to the actual situation, store the cells in the cell display area in the database in the form of documents, and obtain the offline form. The form setting only needs to select the cell check items according to the needs, which is more convenient and quick. When the device has a network, download the offline form, open the offline form when the device has no network, check according to the offline form, fill in the offline form, and upload the filled offline form data to the server when the device has a network. The form can still be obtained when there is no network. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The present invention is a schematic diagram of a storage and downloading method for filling out a form offline. DETAILED DESCRIPTION

[0021] The present invention provides a storage and downloading method for filling out a form offline, such as Figure 1 As shown, the following steps are included:

[0022] S1. The visual editing interface of the server is arranged in a left-middle-right layout, with a cell area on the left, a cell display area in the middle. The cell area is used to store cell check items, and a cell attribute area is set on the right. After dragging the required cell check items in the cell area to the position range of the cell display area with the mouse, the attributes of the cell check items are identified, and the cell attributes are adjusted using the cell attribute area. During the adjustment process, the cell check items are displayed in real time in the cell display area; the adjusted cell attributes include name, description, height, width, default value, alignment, validation and visible attributes.

[0023] S2. Use the HTML5 drag API to drag the required cell check items in the cell area to the position range of the cell display area to obtain the check item form, store the check item form in the database, and then the server generates an offline form and a full data package corresponding to the form based on the configuration items and cell item contents of the check item form in the database. After saving the form, the system triggers the logic of generating an offline form (file), reads the form configuration items and cell item contents from the background database, serializes the cell items into a JSON file, and uploads it to the server's file system; Drag solution: mainly based on HTML5's Drag and Drop API, as well as JavaScript's event monitoring and processing mechanism. The following are its basic steps:

[0024] 1. Set the draggable element: Set the draggable attribute of the HTML element to true so that the element can be dragged.

[0025] 2. Listen for drag events: Listen for a series of drag events, including dragstart, drag, dragend, etc. When the user starts dragging an element, the dragstart event is triggered; when the element is being dragged, the drag event is triggered; when the user stops dragging the element, the dragend event is triggered.

[0026] 3. Handle drag events: In the handlers of these events, various drag effects are implemented. For example, in the handler of the dragstart event, the data of the dragged element can be obtained and stored in the DataTransfer object; in the handler of the dragover event, the default behavior can be prevented so that the element can be dropped; in the handler of the drop event, the data in the DataTransfer object can be obtained and applied to the target element.

[0027] 4. Set the drop area: This is achieved by listening to events such as dragenter, dragover, and drop. When the dragged element enters the target area, the dragenter event is triggered; when the dragged element moves on the target area, the dragover event is triggered; when the dragged element is released on the target area, the drop event is triggered.

[0028] Offline forms support text type, number type, logic type, drop-down check type, drop-down association type, date type, time type, single-choice type, multi-line type, automatic numbering type, electronic signature type, address type, location type, image type, attachment type, multi-level association type, association query type, @member type, @department type and @work form type. Offline forms include mine environment on-site inspection forms, covered waste rock dump inspection work forms and mine water treatment station work forms. Each form corresponds to a safety inspection business, and each cell corresponds to an inspection item. The inspection items include the standardized hanging of blasting warning signs, the items that operators have received three-level safety education and hold entry cards, the standardized storage of pyrotechnics, the CO concentration items, the items that operators carry self-rescue devices, the items that lighting is sufficient and the items that lighting lines are not damaged.

[0029] S3. Use UUID as an ID generator to generate an ID for each full data packet;

[0030] S4. The device determines whether there is a network through the ConnectivityManager object provided by the Android system. When the device has a network, the device automatically downloads all full data packets through the network. When the device has no network, the device retrieves the required full data packet from all the downloaded full data packets by ID according to the demand and opens the full data packet.

[0031] By moving the required unmoved cell check items in the cell area to the cell display area, adjusting the properties of the new cell check items in the cell display area through the cell property area, an incremental data packet is obtained and stored in the database, and an ID is generated for the incremental data packet through the ID generator. When the device has a network, the device automatically downloads the incremental data packet and merges it with the full data packet. When the device has no network, the device retrieves the required full data packet according to the ID and opens the full data packet. During the incremental data packet generation process, the CPU core of the server performs multi-thread allocation and concurrent execution of incremental data packet generation. When the number of incremental data packet generation requests to be executed concurrently exceeds the number of CPU cores, the requests are queued and stored in the database, and the requests are persisted to prevent the loss of queue data on the server. In step S4, the device detects the network status through the ConnectivityManager object provided by the Android system. When the network delay is not higher than 200MS and the packet loss rate is <0.1%, it is considered that the device has a network.

[0032] S5. Fill in the inspection items in the full data package according to the actual inspection results;

[0033] S6. The device determines whether there is a network currently. When the device has a network, the device automatically uploads the filled-in offline form data to the server.

[0034] When the device downloads the inspection items, it first downloads the offline full data package. There is an offline operation entry in the device APP. Click Download to download the inspection items. The device APP calls the offline data increment interface to obtain the incremental data according to the timestamp. Then obtain the data package id of the offline incremental update through the server, and download the incremental offline data package according to the id. The device stores the data package in the form of files. The device database stores the name of the offline package. Through the retrieval of the offline data package, the device APP queries the local database according to the offline package name. When the inspection form is opened offline, the offline data package can be quickly located. The device APP queries the local database according to the offline package name. After reading the offline data package file, the inspection item data file is obtained by decompression, which is called by the web page program for filling in the inspection items offline.

[0035] Mine safety on-site inspections include hoist safety inspections, underground main road safety inspections, underground mine site safety inspections, underground excavation face safety inspections, well-building operation inspections, and high-risk operation safety inspections. In general, the network covers the underground main road and hoist. Branch mines, excavation faces, high-risk operation areas, and well-building operation areas are dynamically constructed. The working environment is complex, the line laying is difficult, and the network is difficult to cover. This method solves the problem of the above mine safety inspection site not having network coverage. This solution can be used in the absence of a network layout, and the data submission will be executed after the user reaches the ground environment with a network. Offline data packet compression processing is realized to reduce user traffic. Timely update of inspection items reduces the manual operation of front-line users, and automatically executes method data updates when the network changes, which is user-friendly and more user-friendly.

[0036] The present invention is described by way of embodiments, and those skilled in the art will appreciate that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the protection scope of the present invention.

Claims

1. A method for storing and downloading offline form filling, characterized in that: The following steps are involved: S1. The server sets a cell area and a cell display area, where the cell area is used to store cell check items; S2. Use the HTML5 drag API to drag the required cell check items in the cell area to the position range of the cell display area to obtain the check item form, store the check item form in the database, and then the server generates an offline form and a full data package corresponding to the form according to the configuration items and cell item contents of the check item form in the database; S3. Generate an ID for each full data packet using an ID generator; S4. The network detection device on the device side determines whether there is a network at present. When the device side has a network, the device side automatically downloads all full data packets through the network; when the device side has no network, the device side retrieves the required full data packet from all the downloaded full data packets by ID according to the demand, and decompresses the full data packet through the compression software; S5. Fill in the inspection items in the full data package according to the actual inspection results; S6. The network detection device at the device end determines whether there is a network currently. When the device end has a network, the device end automatically uploads the filled-in offline form data to the server end.

2. A method for storing and downloading offline form filling according to claim 1, characterized in that: In step S2, the server also sets a cell attribute area, moves the required cell inspection items in the cell area to the position range of the cell display area, identifies the attributes of the cell inspection items, and uses the cell attribute area to adjust the cell attributes. During the adjustment process, the cell inspection items are displayed in real time in the cell display area; the adjusted cell attributes include name, description, height, width, default value, alignment, validation and visible attributes.

3. A method for storing and downloading offline form filling according to claim 2, characterized in that: The step S4 moves the required unmoved cell inspection items in the cell area to the cell display area, adjusts the attributes of the new cell inspection items in the cell display area through the cell attribute area, obtains an incremental data packet and stores it in a database, generates an ID for the incremental data packet through an ID generator, and when the device has a network, the device automatically downloads the incremental data packet and merges it with the original full data packet. When the device has no network, the device retrieves the required full data packet according to the ID and opens the full data packet.

4. A method for storing and downloading offline form filling according to claim 3, characterized in that: During the incremental data packet generation process, the CPU core of the server performs multi-thread allocation and concurrent execution of incremental data packet generation. When the number of incremental data packet generation requests to be executed concurrently exceeds the number of CPU cores, the requests are queued and stored in the database, and the requests are persisted.

5. A method for storing and downloading offline form filling according to claim 1, characterized in that: In step S4, the device side detects the network status through a network detection device. When the network delay is not higher than 200MS and the packet loss rate is less than 0.1%, it is considered that there is a network on the device side.

6. A method for storing and downloading offline form filling according to claim 1, characterized in that: The offline forms include a mine environment on-site inspection form, a covered waste rock dump inspection work form and a mine water treatment station work form. Each form corresponds to a safety inspection business, and each cell corresponds to an inspection item. The inspection items include items such as the standardized hanging of blasting warning signs, items such as operators undergoing level three safety education and holding entry cards, items such as standardized storage of pyrotechnics, items such as CO concentration, items such as operators carrying self-rescue devices, items such as sufficient lighting and items such as no damage to lighting lines.

7. A method for storing and downloading offline form filling according to claim 1, characterized in that: The offline form supports text type, number type, logic type, drop-down check type, drop-down association type, date type, time type, single-choice type, multi-line type, automatic numbering type, electronic signature type, address type, location type, picture type, attachment type, multi-level association type, association query type, @member type, @department type and @work form type.

Citation Information

Patent Citations

  • Method and equipment for designing form filling device based on Loongson architecture

    CN112148290A

  • Mobile equipment offline storage method and device based on HTML (Hypertext Markup Language), medium and equipment

    CN116244545A