A method and system for constructing a safe environmental protection management platform based on a document microservice
By constructing a security and environmental protection management platform based on document microservices, we have solved the problems of high costs, complex operations, and data silos in the security and environmental protection management of small and medium-sized enterprises. This has resulted in a low-cost, easy-to-operate, and dynamically evolving management platform, which has improved management efficiency and standardization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-04-10
AI Technical Summary
Small and medium-sized enterprises face problems such as high costs, complex operations, difficulty in personalization, and data silos in safety and environmental management, resulting in low management efficiency and an inability to meet modern needs.
The security and environmental management platform is built using a document microservice-based approach. By adapting the WPS open programming interface to the document ontology structure, a document structure with a "data-logic-action" three-element binding is constructed and encapsulated as a microservice unit. This supports cross-terminal data synchronization and dynamic updates, enabling flexible combination and automatic supervision of platform functional modules.
It reduces enterprise investment costs, improves operational convenience and management efficiency, enables full participation, ensures smooth data flow, supports dynamic platform evolution, and enhances management standardization and response speed.
Smart Images

Figure CN121300837B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of safety environmental management platform construction, and particularly relates to a safety environmental management platform construction method and system based on document microservices. BACKGROUND
[0002] In the current enterprise safety environmental management work, although auxiliary safety management software has been applied in some large and medium-sized enterprises, small and medium-sized enterprises still generally adopt the traditional paper data management mode due to the cost control demand. Under this mode, safety management personnel need to spend a lot of time repeatedly organizing and recording various safety environmental management data. From the manual registration of hidden danger investigation account book to the page-by-page archiving of employee training archives, and to the classified storage of special equipment detection records, all need manual operation, which not only occupies too much working time, but also is easy to cause data omission or error due to human error. At the same time, the physical properties of paper data make it difficult to realize long-term continuous management. During storage, it is easy to be damaged due to environmental influence. Subsequent statistical analysis needs to manually aggregate data, and it is impossible to quickly generate accurate management reports. More importantly, the sharing and construction of paper data is extremely difficult, and ordinary employees are difficult to conveniently obtain relevant management information, which makes it difficult to effectively implement the whole staff safety production responsibility system, and the participation of the whole staff is always at a low level, which restricts the overall promotion of enterprise safety environmental management work.
[0003] Under the background of the deep integration of 5G network and mobile office, PC and mobile phone synchronous office has become an important direction for enterprises to improve management efficiency. Auxiliary safety management software products also gradually show their advantages, such as improving the work efficiency of safety management personnel, promoting management standardization through sharing and construction characteristics, and urging the implementation of safety responsibility of the whole staff. However, the existing auxiliary safety management software still has obvious limitations. On the one hand, professional safety management software is expensive, and small and medium-sized enterprises are difficult to bear the initial procurement cost and subsequent maintenance fee. Moreover, professional technical personnel are needed to participate in the maintenance process, which further increases the burden of enterprises. On the other hand, the existing software is mostly designed for general use, and is not fully adapted to the existing office resources of enterprises. Most enterprises have widely used basic office software for daily office work, and the existing safety management software cannot be effectively compatible with such basic office software. Therefore, it is necessary to learn the operation logic of the new software, which increases the learning cost of employees, and some employees reduce the willingness to use due to unfamiliarity with the operation process. In addition, the functions of the existing software are fixed. When the safety environmental management needs of enterprises change, such as the addition of solid waste classification management and the adjustment of education and training hour standard, it is necessary to contact the developer for secondary development, which is long in cycle and high in cost, and cannot quickly respond to the dynamic management needs of enterprises.
[0004] From the industry application status, the construction of the existing safety and environmental protection management system depends on the traditional software development mode, which needs to invest a lot of manpower and material resources for bottom architecture design, function module development and cross-terminal adaptation, which not only has a long development cycle, but also is difficult to meet the individual needs of different enterprises. At the same time, the existing system lacks flexible expansion capability, and when new management functions are added, it is easy to affect the stability of the original system, and the data interaction is limited to the internal system, which cannot be seamlessly connected with the commonly used office documents of enterprises, resulting in the disconnection of management data and office data, forming an "information island". For small and medium-sized enterprises, the high threshold of such systems makes it difficult to land, and the traditional paper management mode cannot meet the needs of modern safety and environmental protection management. This contradiction makes many small and medium-sized enterprises in the safety and environmental protection management work always in a passive state, and it is difficult to improve the management standardization and efficiency, and a low-cost, easy-to-operate, and dynamically evolving safety and environmental protection management platform construction scheme is urgently needed. SUMMARY
[0005] The safety and environmental protection management platform construction method and system based on document microservices provided by the application solve the problems mentioned in the prior art.
[0006] In order to achieve the above purpose, the application adopts the following technical scheme: a safety and environmental protection management platform construction method based on document microservices, comprising:
[0007] Step 1: WPS open programming interface and document ontology structure adaptation, select JS macro programming interface, API development interface and template customization interface of WPS software, select the bindable function area of the document ontology structure, reserve the safety and environmental protection data field in the header data area, plan the business logic code embedding area in the text logic area, and set the control instruction trigger button in the footer action area;
[0008] Step 2: Constructing a document structure body with "data-logic-action" ternary binding, importing safety and environmental protection basic data in the header data area, establishing a mapping relationship between data and document cells through the JS macro interface, and updating the cells in real time when the data is modified; embedding business logic code in the text logic area; binding control instructions in the footer action area through the API interface, and associating the instructions with the text logic code, when the logic code determines that the data meets the trigger condition, automatically triggering the action of the corresponding button;
[0009] Step 3: Document structure body microservice encapsulation, encapsulating the document structure body constructed in step 2 into an independent microservice unit, which contains a unique identification code, a function description and a call parameter; registering the microservice unit to the service registration center through the WPS cloud service interface, and the service registration center retrieves according to the function classification, and each microservice unit supports separate version update and historical version backtracking;
[0010] Step four: building a dynamic evolution type safety environmental management platform based on micro-service units, according to the enterprise safety environmental management needs, selecting corresponding micro-service units from the service registration center, and combining to form platform function modules through drag and drop; the interaction channel between modules is established through the shared data field of the document structure body;
[0011] Step five: platform operation and dynamic update, the platform monitors the data flow and logic execution state of each micro-service unit in real time during operation, and generates operation logs; when the enterprise management needs change, directly modify the document structure body of the corresponding micro-service unit, update the header data field, adjust the body logic code or add footer control instructions, and the modified micro-service unit is automatically synchronized to the platform.
[0012] Further, it also includes:
[0013] The document structure body ternary binding validity verification step, after completing the document structure body construction in step two, the ternary binding validity index in the verification period is calculated through the formula , wherein V is the validity index, t0 is the verification start time, t1 is the verification end time, d is the data binding weight, D(t) is the data synchronization rate at time t, l is the logic binding weight, L(t) is the logic execution correctness rate at time t, a is the action binding weight, A(t) is the action trigger success rate at time t, the dynamic performance of data, logic and action in the verification period is accumulated by integration, and when V≥85, it is determined that the document structure body binding is valid, and when it is lower than 85, the interface mapping relationship and instruction binding logic are adjusted again.
[0014] Further, it also includes:
[0015] The safety environmental task pushing priority calculation step, after the platform is built in step four, for hidden danger rectification, training arrangement and other tasks, the task priority is calculated through the formula , wherein P is the task priority, w1 is the emergency weight, E is the task emergency, w2 is the responsibility person load weight, U is the current load of the responsibility person, w3 is the task impact weight, and T is the task impact degree.
[0016] Further, it also includes the platform dynamic update effect evaluation step, after the platform is updated in step five, the update effect index is calculated through the formula , wherein Ue is the update effect index, t0 is the update start time, t1 is the observation time after the update, s is the function adaptation weight, S(t) is the function adaptation degree at time t, f is the running smooth weight, and F(t) is the running smooth degree at time t.
[0017] Further, it further includes a cross-terminal data real-time synchronization step. In the microservice encapsulation process of step three, a data synchronization plug-in is added for each microservice unit. The plug-in calls the cloud synchronization interface of WPS to realize real-time synchronization of data on PC, mobile phone and web page. The synchronization frequency is set differently according to the data type. The synchronization process adopts an incremental synchronization strategy, and only the modified data field is transmitted instead of the full data. After synchronization is completed, a synchronization log is generated. When synchronization fails, the plug-in automatically triggers a retry mechanism. If the retry fails for three consecutive times, a synchronization exception reminder is pushed to the administrator WPS.
[0018] Further, it further includes a safety and environmental protection management automatic supervision step. In the platform building of step four, a supervision sub-microservice is added for each function module. In the document structure body of the supervision sub-microservice, the header data area imports supervision index thresholds. The text logic area embeds supervision judgment code, which real-time grabs platform running data and compares it with the index thresholds. The footer action area binds early warning instructions. When the data exceeds the thresholds, the early warning instructions are automatically triggered, and early warning information is pushed to the corresponding management department. The supervision results are automatically summarized weekly to generate a WPS table format supervision report, which supports export and printing.
[0019] Further, it further includes a platform function module expansion step. When an enterprise adds a safety and environmental protection management demand, a new document structure body is constructed based on the existing programming interface of WPS. The header data area of the new structure body sets corresponding data fields. The text logic area writes business logic code. The footer action area binds control instructions. The new structure body is encapsulated as a microservice unit, registered to the service registration center through the WPS cloud service interface, added to the existing platform through the drag-and-drop method, and associated with the original module.
[0020] Further, a system for implementing a safety and environmental protection management platform construction method based on document microservices includes:
[0021] An interface adaptation module is used to select the JS macro programming interface, API development interface and template customization interface of WPS software, determine the header data area, text logic area and footer action area of the document ontology structure, reserve safety and environmental protection data fields, and set task pushing, overdue reminding and other control instruction trigger button types.
[0022] A document structure body construction module is used to import JSON format safety and environmental protection basic data in the header data area, establish a mapping relationship between data and document cells through the JS macro interface, embed business logic code based on management rules in the text logic area, and bind control instructions through the API interface in the footer action area to realize the ternary binding of "data-logic-action".
[0023] Microservice encapsulation module, for encapsulating the document structure body as an independent microservice unit, assigning a unique identification code, writing a function description, setting data reading, logical modification, action execution authority, and registering the microservice unit to the service registry center of the classification retrieval through the WPS cloud service interface;
[0024] Platform building module, for selecting microservice units from the service registry center according to enterprise management needs, dragging and combining to form hazard management, education and training, cost investment, occupational health, special equipment, environmental management, emergency management, and fire safety modules, and establishing data interaction channels between modules;
[0025] Running update module, for real-time monitoring of data flow and logical execution state of the microservice unit, generating a running log, modifying the document structure body of the corresponding microservice unit when the management needs change, and automatically synchronizing to the platform, recording the update history;
[0026] Effectiveness verification module, for calling the integral formula to calculate the effectiveness index of the three-way binding of the document structure body, determining the binding effectiveness, and outputting the verification result and interface adjustment suggestions;
[0027] Task pushing module, for calculating task priority according to the priority formula, pushing to the PC, mobile phone, or web page WPS of the person in charge according to the priority level, and accompanying the corresponding reminder method;
[0028] Data synchronization module, for adding a data synchronization plug-in to the microservice unit, realizing real-time synchronization of cross-terminal data, setting differential synchronization frequency, generating a synchronization log, handling synchronization exceptions and pushing reminders.
[0029] Further, it further comprises:
[0030] Supervision report module, which includes a supervision index configuration submodule, a real-time judgment submodule, and a report generation submodule. The supervision index configuration submodule is used to import safety and environmental management supervision index thresholds, supports management personnel to visually modify the thresholds and save them to the document structure body header data area, and automatically retains modification records. The real-time judgment submodule is used to embed supervision judgment code, real-time grab platform running data and index threshold comparison, trigger early warning instructions and push to the corresponding department. The report generation submodule is used to automatically summarize supervision results weekly, generate a WPS table format report containing index compliance rate, over-standard reasons, and rectification situation, support export, print and share, and at the same time synchronize report data to the cost investment module, associate cost expenditure data generated in the supervision process.
[0031] Further, it further comprises:
[0032] The function expansion module is used for constructing a document structure body of new management requirements based on a WPS programming interface, encapsulating into a micro-service unit and registering to a service service registration center, supporting being dragged and added to an existing platform, and automatically establishing data association with original modules; and the permission management module is used for assigning micro-service unit operation permissions to different roles, saving the permission settings to a document structure body call parameter, and verifying the permissions through a WPS account system.
[0033] Compared with the prior art, the present application has the following advantages:
[0034] The present application is excellent in cost control and operation adaptability, fully utilizes existing basic office software resources of enterprises, does not need to purchase expensive professional security management software, fundamentally reduces the investment cost of enterprises, and does not need to additionally equip professional technicians for maintenance, greatly reduces the economic burden and operation and maintenance pressure of small and medium-sized enterprises. On the operation level, the employees do not need to master complex computer or network technical knowledge, only need to have the ability to use a smart phone to participate in safety and environmental protection management work, whether it is the reporting of hidden danger information or the checking of training records, can be completed through familiar office software operation, effectively reduces the learning cost, improves the willingness of all employees to participate, and helps enterprises to implement the responsibility system for safety production of all employees. At the same time, the platform supports cross-terminal data synchronization of PC, mobile phone and web pages, smooth data flow, ensures that different post personnel can conveniently obtain management information in different scenes, and breaks the information barrier in the traditional management mode.
[0035] The present application has the following advantages:
[0036] The application has outstanding effects in improving the efficiency and standardization of enterprise safety and environmental protection management. The platform has automatic supervision capability, can compare running data with preset index threshold value in real time, find problems such as hidden danger rectification overdue and training hours insufficient in time and push early warning information to avoid omissions or delays in management work. The task pushing mechanism can reasonably allocate task priorities according to task urgency, responsibility person load and influence degree, ensure important management matters to be handled in priority and improve management response speed. Interactive channels are established between modules through shared data fields, such as waste disposal data of the environmental protection management module can be automatically synchronized to the cost input module without manual secondary input, reducing data redundancy and errors and improving data statistical accuracy. At the same time, the platform can automatically generate standardized supervision reports, support export and printing and provide reliable basis for management decision-making, and overall promote the development of enterprise safety and environmental protection management work to fine, efficient and standardized direction. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 A schematic block diagram of a safety and environmental protection management platform construction system based on a document microservice is provided for the application;
[0038] Figure 2 A schematic block diagram of a safety and environmental protection management platform construction method based on a document microservice is provided for the application;
[0039] Figure 3 A safety and environmental protection management platform core module monthly use frequency column chart of a safety and environmental protection management platform construction method based on a document microservice is provided for the application;
[0040] Figure 4 A comparison line chart of enterprise safety and environmental protection management costs under different management modes of a safety and environmental protection management platform construction method based on a document microservice is provided for the application;
[0041] Figure 5 A non-cross-terminal data synchronization delay comparison scatter plot of a safety and environmental protection management platform construction method based on a document microservice is provided for the application;
[0042] Figure 6 A safety and environmental protection management participation degree monthly change line chart of a safety and environmental protection management platform construction method based on a document microservice is provided for the application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the application will be described clearly and completely in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0044] In the description of the present application, it needs to be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0045] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features referred to. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited. In addition, the terms "mounting", "connecting", "connecting" should be broadly understood, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances, and the present application will be further described in detail below with reference to the drawings.
[0046] Referring to Figures 1 to 6 A method for constructing a safe environmental protection management platform based on document microservices, step one: adapt the WPS open programming interface to the document ontology structure, select the JS macro programming interface, API development interface and template customization interface of WPS software, determine the bindable function area of the document ontology structure, reserve the safety environmental protection data field in the header data area, the field includes hazard number, hazard level, training record ID, training hours, equipment model, detection period, environmental protection cost amount, water quality detection value, hazardous waste disposal amount, emergency drill date, fire equipment number, business logic code embedding area in the text logic area, control instruction trigger button in the footer action area, button type covers task push, overdue reminder, data statistics, process approval, abnormal early warning;
[0047] Step two: build the document structure body of "data-logic-action" ternary binding, import the safety and environmental protection basic data in the header data area, store the data in JSON format, establish the mapping relationship between data and document cells through JS macro interface, update the cells in real time when the data is modified, the basic data includes enterprise existing hidden danger account book, employee training archives, special equipment detection record, environmental protection expense details; embed business logic code in the text logic area, the code is based on safety and environmental protection management rules, the rules include hidden danger investigation and management process (discovery-reporting-assignment rectification-acceptance cancellation), education and training hour requirement (annual safety production training not less than 24 hours, new employee induction training not less than 8 hours), special equipment inspection cycle (elevator every 12 months 1 time, pressure vessel every 6 months 1 time, hoisting machinery every 12 months 1 time), environmental monitoring frequency (water quality sampling 1 time per month, hazardous waste disposal statistics 1 time per month); bind control instructions through API interface in the footer action area, the instructions are associated with the text logic code, when the logic code determines that the data meets the trigger condition (hidden danger overdue more than 7 days without rectification, training hours less than 24 hours, equipment overdue without detection), the corresponding button action is automatically triggered, realizing the ternary binding of data, logic and action;
[0048] Step three: document structure body micro service encapsulation, encapsulate the document structure body built in step two into an independent micro service unit, the micro service unit includes unique identification code, function description and calling parameters, the calling parameters clearly indicate data reading permission (administrators can read all, safety officers can read hidden danger and training data, ordinary employees can only read their own training data), logic modification permission (only administrators and safety officers can modify), action execution permission (administrators can execute all actions, equipment maintenance personnel can only execute equipment detection related actions); register the micro service unit to the service service registration center through the WPS cloud service interface, the service registration center is classified according to function, the classification includes hidden danger management, education and training, expense investment, occupational health, special equipment, environmental management, emergency management and fire safety, each micro service unit supports individual version update and historical version backtracking;
[0049] Step four: based on the micro-service unit, a dynamic evolution type safety and environmental protection management platform is built, according to the enterprise safety and environmental protection management demand, corresponding micro-service units are selected from the service registration center, platform function modules are formed by combining through the drag and drop mode, the hidden danger management module integrates hidden danger investigation account book, rectification task pushing, acceptance result statistics micro-service, the education training module integrates training archives, hour statistics, examination record micro-service, the cost input module integrates safety cost extraction, environmental protection cost use, input analysis micro-service, the professional health module integrates physical examination management, hazard detection, health archives micro-service, the special equipment module integrates elevator maintenance, pressure vessel inspection, hoisting machinery monitoring micro-service, the environmental protection management module integrates water sampling, hazardous waste disposal, dam front floating object cleaning micro-service, the emergency management module integrates exercise record, plan management, emergency material statistics micro-service, the fire safety module integrates equipment detection, control system state monitoring, fire drill record micro-service; the interaction channel is established through the shared data field of the document structure body between the modules, the hazardous waste disposal data of the environmental protection management module is synchronized to the cost input module for cost statistics;
[0050] Step five: platform operation and dynamic update, when the platform runs, the data flow and logic execution state of each micro-service unit are monitored in real time, operation logs are generated, the logs include data modification records, logic execution results, action trigger time; when the enterprise management demand changes (new solid waste management type, adjustment of training hour standard), the document structure body of the corresponding micro-service unit is directly modified, the header data field is updated, the text logic code is adjusted or the footer control instruction is added, the modified micro-service unit is automatically synchronized to the platform, without the need to rebuild the overall platform, the dynamic evolution of the platform is realized.
[0051] In the present application, it also includes:
[0052] The document structure body ternary binding validity verification step, after the document structure body construction in step two is completed, the formula The ternary binding validity index in the calculation verification period is calculated, wherein V is the validity index (dimensionless, the value range is 0-100), t0 is the verification starting time (unit: min), t1 is the verification ending time (unit: min), d is the data binding weight (value 0.35, dimensionless, when the number of data fields is more than 10, it is adjusted to 0.4), D(t) is the data synchronization rate at t (0-1, the proportion of document cell synchronization update after data modification), l is the logic binding weight (value 0.35, dimensionless, when the logic code coverage management rule is more than 80%, it is adjusted to 0.4), L(t) is the logic execution correctness rate at t (0-1, the consistency proportion of logic code judgment result and expected result), a is the action binding weight (value 0.3, dimensionless, when the action trigger response time is less than 1s, it is adjusted to 0.35), A(t) is the action trigger success rate at t (0-1, the proportion of control instruction execution success when the trigger condition is met), the dynamic performance of data, logic and action in the verification period is accumulated by integration, V is greater than or equal to 85, and it is determined that the document structure body binding is valid, and when V is less than 85, the interface mapping relationship and instruction binding logic are re-adjusted.
[0053] In the present application, the following steps are further included:
[0054] The safety and environmental protection task pushing priority calculation step is as follows: after the completion of the step four platform building, for the hidden danger rectification, training arrangement and other tasks, the formula The task priority is calculated, wherein P is the task priority (dimensionless, the value range is 0-10), w1 is the urgency weight (value 0.4, dimensionless, when the task overdue time is less than 24h, it is adjusted to 0.5), E is the task urgency (0-1, the ratio of the task overdue time to the total rectification / execution time, the smaller the ratio, the higher the urgency), w2 is the responsibility person load weight (value 0.3, dimensionless, when the number of tasks not completed by the responsibility person is more than 5, it is adjusted to 0.35), U is the current load of the responsibility person (0-1, the ratio of the number of tasks not completed by the responsibility person to the maximum task carrying capacity), w3 is the task influence weight (value 0.3, dimensionless, when the task involves a major hidden danger or the number of training persons is more than 50, it is adjusted to 0.4), T is the task influence degree (0-1, determined according to the hidden danger level and the number of persons involved, when the hidden danger is major or the number of persons involved is more than 50, it is taken as 1), the tasks are pushed from high to low according to the P value, when P is greater than or equal to 8, the tasks are pushed to the responsibility person's mobile phone WPS end in real time and accompanied by a pop-up window reminder, when 6 is less than P and P is less than 8, the tasks are pushed within 30 minutes, and when P is less than 6, the tasks are pushed within 1 hour.
[0055] In the present application, the following steps are further included: An update effect index Ue is calculated, wherein Ue is the update effect index (dimensionless, range 0-1), t0 is the update start time (unit: h), t1 is the observation time after the update ends (unit: h), s is the function adaptation weight (value 0.55, dimensionless, adjusted to 0.6 when the new function covers more than 90% of the management requirements), S(t) is the function adaptation degree at time t (0-1, the proportion of platform functions meeting enterprise management requirements after the update), f is the running smoothness weight (value 0.45, dimensionless, adjusted to 0.5 when the average response time of the platform is less than 2s), F(t) is the running smoothness at time t (0-1, the ratio of the length of time during which the platform runs without lag and error to the total running time), Ue≥0.8 is determined to be an effective update, and lower than 0.8 is to optimize the code redundancy of the document structure body and the data interaction logic between modules to reduce the platform running delay after the update.
[0056] In the present application, a cross-terminal data real-time synchronization step is also included. In the microservice encapsulation process of step three, a data synchronization plug-in is added for each microservice unit. The plug-in calls the cloud synchronization interface of WPS to realize real-time synchronization of data on PC, mobile phone and web pages. The synchronization frequency is set differently according to the data type. Hazard data and special equipment detection data are synchronized once every 10 minutes, education and training records and environmental protection cost data are synchronized once every 30 minutes, and emergency exercise and fire safety data are synchronized once every 60 minutes. The synchronization process adopts an incremental synchronization strategy, only transmitting modified data fields instead of full data, thereby reducing network bandwidth occupation. After synchronization is completed, a synchronization log is generated, which includes synchronization time, data type, synchronization result (success / failure), terminal device model and IP address. When synchronization fails, the plug-in automatically triggers a retry mechanism with a retry interval of 1 minute, 3 minutes and 5 minutes. After three consecutive retries fail, a synchronization exception prompt is pushed to the administrator WPS end, and the prompt content includes the failed data type, the number of failures, and the recommended troubleshooting direction.
[0057] In the present application, the automatic supervision step of safety and environmental protection management is also included. When the step four platform is built, the supervision sub-micro service is added for each function module. In the document structure body of the supervision sub-micro service, the supervision index threshold value is imported in the header data area, including the hidden danger rectification overdue rate ≤ 5%, the education and training hour reaching rate ≥ 95%, the special equipment detection completion rate ≥ 100%, the environmental protection water quality reaching rate ≥ 90%, and the hazardous waste disposal compliance rate ≥ 100%. The supervision judgment code is embedded in the text logic area. The code real-time grabs the platform running data and compares with the index threshold value. The early warning instruction is bound in the footer action area. When the data exceeds the threshold value (the hidden danger rectification overdue rate reaches 6% and the water quality reaching rate is 85%), the early warning instruction is automatically triggered, the early warning information is pushed to the corresponding management department, and the information includes the exceeding index name, the current value, the threshold standard, the exceeding duration, and the rectification suggestion. The supervision results are automatically summarized by week, the supervision report in WPS table format is generated, the report includes the index weekly reaching rate, the exceeding reason analysis, and the rectification completion situation, and the report supports export and printing.
[0058] In the present application, the platform function module expansion step is also included. When the enterprise adds safety and environmental protection management demand (adding solid waste classification management and noise pollution monitoring), the document structure body of the added demand is constructed based on the existing programming interface of WPS. The corresponding data field is set in the header data area of the new structure body. The solid waste management field includes solid waste type, generation amount, disposal method, and disposal unit. The noise monitoring field includes monitoring point, monitoring time, noise value, and reaching standard. The business logic code is written in the text logic area. The solid waste management code covers the classification standard judgment and the disposal process trigger rule. The noise monitoring code includes the exceeding threshold value judgment (daytime ≤ 70 dB and nighttime ≤ 55 dB) and the abnormal data early warning rule. The control instruction is bound in the footer action area, including the solid waste disposal task pushing and the noise exceeding early warning. The new structure body is packaged as a micro service unit and registered to the service registration center through the WPS cloud service interface. The new structure body is added to the existing platform in a dragging manner and establishes data association with the original module. The solid waste disposal data is synchronized to the cost input module for accounting disposal cost.
[0059] A system for implementing the safety and environmental protection management platform construction method based on the document micro service, comprising:
[0060] The interface adaptation module is used for selecting the JS macro programming interface, the API development interface and the template customization interface of the WPS software, determining the header data area, the text logic area and the footer action area of the document body structure, reserving the safety and environmental protection data field, and setting the task pushing, overdue reminding and other control instruction trigger button types.
[0061] The document structure body construction module is used for importing the safe and environmental protection basic data in the JSON format in the header data area, establishing the mapping relationship between the data and the document cells through the JS macro interface, embedding the business logic code based on the management rules in the text logic area, and binding the control instructions through the API interface in the footer action area, so that the ternary binding of data, logic and action is realized.
[0062] The micro-service encapsulation module is used for encapsulating the document structure body into an independent micro-service unit, assigning a unique identification code, writing a function description, setting data reading, logic modification and action execution permissions, and registering the micro-service unit to the service registration center of the classification retrieval through the WPS cloud service interface.
[0063] The platform building module is used for selecting the micro-service unit from the service registration center according to the enterprise management demand, dragging and combining to form the hidden danger management, education and training, cost investment, professional health, special equipment, environmental protection management, emergency management and fire safety module, and establishing the data interaction channel between the modules.
[0064] The running update module is used for monitoring the data flow and logic execution state of the micro-service unit in real time, generating a running log, modifying the document structure body of the corresponding micro-service unit when the management demand changes, and automatically synchronizing to the platform, and recording the update history.
[0065] The effectiveness verification module is used for calling the integral formula to calculate the effectiveness index of the ternary binding of the document structure body, judging the binding effectiveness, and outputting the verification result and interface adjustment suggestion.
[0066] The task pushing module is used for calculating the task priority according to the priority formula, pushing to the PC end, mobile end or web end WPS of the person in charge according to the priority level, and accompanying the corresponding reminding mode.
[0067] The data synchronization module is used for adding a data synchronization plug-in for the micro-service unit, realizing real-time synchronization of cross-terminal data, setting a differential synchronization frequency, generating a synchronization log, processing synchronization exceptions and pushing a reminder.
[0068] In the application, the following are further included:
[0069] The supervision report module includes a supervision index configuration submodule, a real-time judgment submodule and a report generation submodule. The supervision index configuration submodule is used for importing safety and environmental management supervision index thresholds, supporting management personnel to visually modify the thresholds and save them to the document structure header data area, and automatically retaining the modification records. The real-time judgment submodule is used for embedding supervision judgment code, real-time grabbing platform running data and comparing the index thresholds, triggering early warning instructions and pushing them to the corresponding departments. The report generation submodule is used for automatically summarizing supervision results weekly, generating a WPS table format report containing index compliance rate, over-standard reasons and rectification situation, supporting export, printing and sharing, and synchronizing report data to the cost input module to associate cost expenditure data generated in the supervision process.
[0070] In the present application, the following are also included:
[0071] The function expansion module is used for constructing a new management demand document structure based on the WPS programming interface, encapsulating it as a micro-service unit and registering it to the service registration center, supporting drag-and-drop addition to the existing platform, and automatically establishing data association with the original module. The permission management module is used for assigning micro-service unit operation permissions to different roles. The administrator has full permissions for data reading, logic modification and action execution. The safety officer has logic modification and data reading permissions for hazard management and education and training modules. Ordinary employees only have their own training data entry and viewing permissions. Equipment maintenance personnel have data viewing and detection action triggering permissions for special equipment modules. The permission settings are saved to the document structure call parameters and verified through the WPS account system.
[0072] A specific embodiment of a safety and environmental management platform construction method and system based on document micro-services:
[0073] Embodiment 1
[0074] A safety and environmental management platform construction method and system based on document micro-services suitable for small and medium-sized mechanical manufacturing enterprises
[0075] This embodiment is aimed at a certain provincial XX mechanical manufacturing Co., Ltd. (with 52 employees, mainly producing small machine tool accessories, involving 3 special equipment such as lathes and cranes, with annual revenue of 30 million yuan). The enterprise previously used paper account management for safety and environmental protection work, and had problems such as lagging behind in hidden danger rectification tracking (hidden danger rectification overdue rate of 28% in May 2025), scattered training records (employee training hour compliance rate of only 65%), and missed detection of special equipment (detection completion rate of 70%). The management platform is constructed by applying the method of the present application, and the specific implementation steps are as follows:
[0076] I. Platform construction specific steps
[0077] Step 1: Adapt the WPS open programming interface to the document ontology structure
[0078] The JS macro programming interface of WPS 2023 Professional Edition (supports V8 engine, compatible with ECMAScript6 syntax, can directly call WPS built-in object model), the cloud document API of WPS open platform (interface version V3.0, supports HTTPS encrypted transmission, response time ≤300ms) and the template customization interface (supports.docx,.xlsx format template creation, can save cell format and formula association) are selected; three major functional areas of the document body structure are determined:
[0079] Header data area: reserve 12 safe and environmentally friendly data fields, hazard number (format: YH-year-month-sequence number, such as YH-2025-06-01), hazard level (general / larger / major, divided according to the "Provisional Regulations on the Identification and Control of Enterprise Safety Production Accidents"), training record ID (PX-year-sequence number), training hours (unit: h, new employee induction training ≥8h, old employee annual training ≥24h), equipment model (such as CA6140 ordinary lathe, QD50 bridge crane), detection period (unit: month, lathe 12 months, crane 12 months, pressure vessel 6 months), environmental protection cost amount (unit: yuan, including hazardous waste disposal, water quality detection), water quality detection value (workshop cooling wastewater pH value, standard 6-9), hazardous waste disposal amount (waste engine oil, unit: L), emergency drill date (annual ≥4 times), fire fighting equipment number (XF-area-sequence number, such as XF-workshop 1-01), responsible person's name (associated with enterprise organization structure list);
[0080] Body logic area: plan 3 business logic code embedding areas (corresponding to hazard control, special equipment management and education and training respectively), use WPS built-in VBA editor to write JS macro code, the editor supports code highlighting, breakpoint debugging and syntax checking to ensure code executability;
[0081] Footer action area: set 5 control instruction trigger buttons, use "command button" (style is blue round corner, font size 10) in WPS form control, bind task push (link to employee WPS private message system), overdue reminder (pop up red dialog box + buzzer sound, volume 60dB), data statistics (automatically generate Excel line chart / pie chart), process approval (trigger WPS cloud document editing permission of approver), abnormal warning (send reminder to administrator's mobile phone through WPS SMS interface).
[0082] Step two: build a document structure body of "data-logic-action" ternary binding
[0083] Data import and mapping: Import enterprise 2025 May safety and environmental protection basic data in the header data area, the data is stored in JSON format (example: {"Hidden Number": "YH-2025-05-01", "Hidden Level": "General", "Hidden Description": "Lathe guard loose", "Responsible Person": "Zhang San", "Rectification Deadline": "2025-05-15", "Rectification Status": "Not completed"}), write mapping code through JS macro interface (such as Range("A2").Value = JSON.parse(ThisWorkbook.CustomDocumentProperties("safety and environmental protection basic data"))["Hidden Number"], that is, read the JSON string in the "safety and environmental protection basic data" custom attribute of the current WPS document, parse the JSON string into an operable data object, extract the value of the "Hidden Number" field from the data object, and fill the value into the cell in column A, row 2 of the document.), Real-time synchronization update of cells when data is modified; Basic data covers 5 hidden accounts, 28 employee training archives (8 new employees need to complete 8h job training), 3 special equipment detection records (the latest detection time is November 2024), and 4 environmental protection expense details (safety training cost 8000 yuan, waste oil disposal cost 5000 yuan).
[0084] Logic code embedding: Embed 3 groups of business logic code in the body logic area: hidden danger management logic: If Date>CDate(Range("E2").Value) And Range("F2").Value = "Not completed" Then ThisWorkbook.Sheets("footer button").Shapes("overdue reminder button").OLEFormat.Object.Object.Click (calculate the number of days between "current date" and "F2 cell stored the latest detection date", the result is assigned to the "remaining days" variable, determine if the hidden danger is overdue and not completed, automatically trigger the overdue reminder button);
[0085] Education training logic: Dim total hours As Double: total hours = WorksheetFunction.SumIf(Range("B:B"), Range("A2").Value, Range("D:D")): If total hours < 24 Then Range("E2").Value = "Not up to standard" Else Range("E2").Value = "Up to standard" (First define the "total hours" variable, then find the content consistent with the employee information in A2 cell in column B, and add the training time in column D to get the total training hours of the employee. If the total training hours is less than 24 hours, set E2 cell to "Not up to standard", otherwise set it to "Up to standard", to determine whether the employee's annual training is qualified.);
[0086] Special equipment logic: Dim remaining days As Integer: remaining days = DateDiff("d", CDate(Range("F2").Value), Date): If remaining days < 30 Then Range("G2").Interior.Color = RGB(255, 255, 0) (Define the "remaining days" variable, subtract the date in F2 cell from the current date to calculate the remaining days. If the remaining days is less than 30 days, set the background color of G2 cell to yellow to remind the manager that the equipment is approaching the detection time.)
[0087] Control command binding: Establish the association between the button and the logic code through the WPS cloud document API, for example, the "task push" button binds the code: Dim private message content As String: private message content = "You have 1 hidden danger rectification task to handle: hidden danger number "& Range("A2").Value &", rectification deadline "& Range("E2").Value: Call WPS Cloud API.SendPrivateMsg(Range("F2").Value, private message content) ("Task push" button first defines "private message content", concatenates hidden danger number and rectification deadline, and then calls the interface to send to the responsible person in F2 cell.);
[0088] The "abnormal early warning" button binding code: If Range ("H2"). Value <6 Or Range ("H2"). Value >9 Then Call WPSCloudAPI. SendSMS ("138XXXX1234", "workshop wastewater pH value exceeds the standard, the current value" & Range ("H2"). Value) ("Abnormal early warning" button judges the pH value of cell H2, if less than 6 or greater than 9, it calls the interface to send a short message to the specified mobile phone number).
[0089] Step three: document structure body microservice encapsulation
[0090] The above document structure body is divided into three independent microservice units according to function:
[0091] Hazard management microservice: unique identification code MS-YH-001, function description: hazard identification registration, rectification progress tracking, acceptance and cancellation management, support for uploading hazard site photos (associated through WPS insert picture function);
[0092] Education and training microservice: unique identification code MS-PX-001, function description: employee training file entry, automatic training hour statistics, training examination record upload (support.docx format examination paper attachment);
[0093] Special equipment microservice: unique identification code MS-SB-001, function description: special equipment information filing, detection cycle calculation, maintenance record filling (support for associating maintenance contract PDF file); Call parameters clearly define three levels of permissions: administrator account (admin) can read all three microservice data, modify all logic code, and execute all actions; Safety officer account (aqzy01) can read hazard and training data, modify hazard management logic code; Equipment maintenance account (sbwh01) can only read special equipment data and execute device detection actions; Register the microservice unit to the enterprise internal service registration center through the WPS cloud service interface, and search by "hazard management, education and training, special equipment, cost input, environmental management" classification, each microservice unit supports individual version update (version number format V1.0.0, after updating, the history version is retained, and the modification record since May 2025 can be traced back).
[0094] Step four: build a dynamic evolution type safety and environmental management platform based on microservice units
[0095] From the service service registry, select the above 3 core microservice units, supplement the "cost input" and "environmental management" microservice units (based on the existing WPS template of the enterprise for secondary development), and form 5 function modules through the "insert-object-document component" function of WPS cloud document drag and drop combination. The interfaces of each module are in Excel table format (column width 12, row height 20, font size 10 in SimSun):
[0096] Hidden danger management module: integrate hidden danger management microservice and data statistics sub-function, table column contains hidden danger number, hidden danger level, hidden danger description, responsible person, rectification period, rectification status, click "acceptance number" button to automatically update the status to "completed", and synchronously generate the rectification completion timestamp;
[0097] Education training module: integrate education training microservice and examination record sub-function, use Excel data pivot table to count the training compliance rate of each department, insert "export report" button to generate Word format "monthly training summary" (including training person-time, hour distribution, and compliance rate chart);
[0098] Special equipment module: integrate special equipment microservice and maintenance reminder sub-function, use Gantt chart to display equipment detection period, and automatically mark the cell red when the remaining detection time is less than 1 month. Click the "detection record" button to fill in the detection result and upload the detection report;
[0099] Cost input module: enter safety cost (3,000 yuan extracted in June 2025 for safety training and equipment maintenance), and environmental protection cost (5000 yuan for waste oil disposal in June, and 2000 yuan for water quality detection), and automatically generate pie chart to analyze cost proportion;
[0100] Environmental management module: record the pH value of cooling wastewater in the workshop (detected 3 times in June, 7.2, 7.5, and 7.3), and waste oil disposal amount (200L in June), and bind the "overlimit warning" button to automatically trigger the reminder when the pH value exceeds the limit. The interaction channel is established between the modules through the shared data field: the equipment detection cost of the special equipment module (3000 yuan for lathe detection in June) is automatically synchronized to the cost input module, and the waste oil disposal amount of the environmental management module is synchronized to the hidden danger management module (associated with "dangerous waste storage area hidden danger" rectification verification).
[0101] Step five: platform operation and dynamic update When the platform is running, start data flow monitoring through the WPS "Development Tools - Macro - Run" function, and generate detailed operation logs (log format: time + operation module + operation content + result, example: 2025-06-01 09:00:00 Hidden Danger Governance Module Hidden Danger YH-2025-05-01 Rectification Acceptance Status Updated to Completed; 2025-06-02 14:30:00 Special Equipment Module Crane Detection Reminder Trigger Maintenance Private Message); In mid-June 2025, the enterprise added the demand for "welding operation special training", directly modified the document structure of the education and training microservice: added the "training type" field (options: regular safety / welding operation) in the header data area, added the "welding operation training hours >=4h" judgment code (If Range("C2").Value = "welding operation" And Range("D2").Value<4 Then Range("E2").Value = "special training not up to standard") in the text logic area (first judge whether the training type in cell C2 is "welding operation", and whether the training hours in cell D2 are less than 4 hours, if both conditions are met, set the special training status in cell E2 to "special training not up to standard"), and added the "special training task push" button in the footer. The modified microservice unit is automatically updated to the platform through WPS cloud synchronization function, without the need to rebuild the overall architecture, and the entire update process takes about 15 minutes.
[0102] Step six: key formula application (three-way binding validity verification)
[0103] On June 10, 2025, the "data-logic-action" three-way binding validity of the hidden danger governance microservice was verified, with verification period t0=09:00 (time unit min, 0), t1=11:00 (120):
[0104] Data binding weight d=0.4 (because there are 12 data fields>10, adjust according to the rules), average data synchronization rate D(t) at t time 0.95 (112 times of cell real-time synchronization in 118 times of data modification);
[0105] Logic binding weight l=0.4 (logic code covers 8 management rules, coverage 100%>80%, adjust according to the rules), average logic execution correctness L(t) at t time 0.98 (98 times consistent with the expected result in 100 times of judgment);
[0106] Action binding weight a = 0.35 (action trigger response time average 0.8s < 1s, adjust according to rules), action trigger success rate A(t) average 0.96 (95 times trigger condition met, 91 times successfully executed instruction) at time t; Substituting the formula , calculated (dimensionless conversion to 92.3, value range 0-100), determine that the document structure body ternary binding is valid.
[0107] II. Data representation and effect verification
[0108] Table 1: Comparison of key management indicators of the platform running for 1 month (June 2025) of Example 1
[0109] Management indicators Before implementation (May 2025) After implementation (June 2025) Trend of change Overdue rate of hidden danger rectification 28% 5% Significant decrease Significant increase in staff training hours 65% 96% Special equipment detection completion rate Fully met 70% 100% Data synchronization time Manual statistics > 300 seconds Significant reduction Automatic synchronization <1 second Significant improvement in employee safety and environmental management participation Management indicators 35% 88% Before implementation (May 2025)
[0110] Table 1 clearly shows the actual application effect of the platform in this embodiment: the overdue rate of hidden danger rectification is reduced from 28% to 5%, the core reason is that the platform realizes hidden danger rectification closed-loop management through "logical judgment + automatic reminder", the responsible person can receive WPS private message reminders in real time to avoid missing manual tracking; The training hour compliance rate of employees is increased by 31%, thanks to the platform's automatic statistics of training hours and marking of non-compliant personnel, safety officers can push targeted retraining tasks; The special equipment detection completion rate is 100%, because the platform reminds 30 days in advance, and the red early warning is 10 days in advance, which completely solves the problem of missed detection. The data synchronization time is shortened from more than 300 seconds manually to less than 1 second automatically, and the employee participation is increased by 53%, which reflects the advantages of the platform "easy to operate and low threshold" - ordinary employees do not need to learn new software, and can complete hidden danger reporting, training record viewing and other operations through mobile WPS, which meets the management needs of small and medium-sized enterprises "full participation". Overall, the platform does not increase software procurement costs, but is based on existing WPS resources, effectively solving the core pain points of previous paper management, and realizing the dual improvement of safety and environmental management efficiency and standardization.
[0111] Example 2: Construction of a safety and environmental management platform based on document microservices suitable for small and medium-sized chemical enterprises
[0112] This embodiment is aimed at XX Chemical Co., Ltd. (78 employees, main business of paint production, involving hazardous waste disposal of waste solvents and waste pigments, wastewater discharge monitoring, 32 fire-fighting equipment management, annual revenue of 50 million yuan) in a county, which previously used simple Excel tables to record safety and environmental data, and had problems such as non-standard hazardous waste disposal records (compliance rate of 72% in May 2025), scattered environmental monitoring data (completeness rate of 60%), and no reminders for fire-fighting equipment detection (timeliness rate of 65%), and applied the method of the present application to construct a management platform, the specific implementation steps are as follows:
[0113] I. Specific steps for platform construction
[0114] Step 1: WPS open programming interface and document ontology structure adaptation
[0115] Select WPS 2023 Professional JS macro programming interface (support external API call, such as workshop PLC system interface, environmental protection monitoring equipment data interface), WPS cloud collaboration API (support 10 people online editing at the same time, conflict automatically keep multiple versions) and template customization interface (support custom Excel conditional format, such as data over standard automatically mark red); Document ontology structure function area setting:
[0116] Header data area: reserve 15 safety and environmental protection data fields, dangerous waste number (FW-year-month-number, such as FW-2025-06-01), dangerous waste type (waste solvent / waste pigment / waste resin), production (unit: kg), production workshop (No. 1 / No. 2 / No. 3 workshop), disposal unit (need to have dangerous waste disposal qualification), disposal date, water quality detection value (pH value / COD value, COD unit: mg / L, standard ≤100mg / L), detection time, fire fighting equipment number (XF-workshop-number, such as XF-No. 1 workshop-01), equipment type (dry powder fire extinguisher / carbon dioxide fire extinguisher / fire hydrant), detection period (unit: day, fire extinguisher 90 days, fire hydrant 180 days), emergency exercise theme (such as "dangerous waste leakage disposal" "fire escape"), exercise length (unit: h), environmental protection cost amount (unit: yuan, including dangerous waste disposal, water quality detection), responsible person's name;
[0117] Text logic area: divide 4 business logic code embedding areas (corresponding to dangerous waste management, environmental protection monitoring, fire safety and emergency management respectively), code writing tool is WPS built-in VBA editor, support inserting external API call statement;
[0118] Footer action area: set 6 control instruction trigger buttons (style is green round corner, font size 10), respectively bind dangerous waste disposal task push (to procurement department WPS account), water quality over standard early warning (to environmental protection officer WPS private message + workshop PLC system), fire fighting equipment detection reminder (to fire fighting administrator WPS account), exercise record export (generate Word format report), occupational health examination notice (to administrative department WPS account), environmental protection cost statistics (generate Excel column chart).
[0119] Step 2: Build "data-logic-action" ternary binding document structure body
[0120] Data Import and Mapping: Import the company's basic safety and environmental protection data for May 2025, including hazardous waste ledger (300kg of waste solvent and 150kg of waste pigment, disposed of by a provincial environmental protection technology company, qualification certificate number: HJCZ-2024-089), water quality testing data (pH 7.4, COD 80mg / L, testing date 2025-05-20), fire equipment records (32 fire extinguishers, most recent testing date 2025-02-10), and emergency drill records ("Hazardous Waste Leakage Disposal" drill, duration 2 hours, 45 participants); Mapping code is written using a JS macro interface (e.g., Range("C3").Value = JSON.parse(ThisWorkbook.CustomDocumentProperties("Hazardous Waste Management Data"))["Generation Amount"]), so that when the hazardous waste generation amount is modified, the corresponding cell is updated in real time, and the "Estimated Disposal Cost" column is synchronously linked (calculated at 8 yuan / kg, formula: Range("D3").Value). =Range("C3").Value × 8 (This extracts the "Generation Quantity" from the "Hazardous Waste Management Data" section of the current document and places it in cell C3. When the hazardous waste generation quantity is modified, cell C3 will update in real time, and cell D3 will calculate and display the disposal cost based on the value in C3 at 8 yuan per kilogram.)
[0121] Embedded logic code: Embedded 4 sets of business logic code: Hazardous waste management logic: If DateDiff("d",CDate(Range("F3").Value), Date)>7 Then ThisWorkbook.Sheets("Footer Button").Shapes("Hazardous Waste Disposal Push Button").OLEFormat.Object.Object.Click (Calculates the difference in days between the current date and the hazardous waste-related date in cell F3. If this difference exceeds 7 days, it automatically clicks the "Hazardous Waste Disposal Push Button" in the "Footer Button" worksheet, triggering the push of the disposal task).
[0122] Environmental monitoring logic: If Range("H3").Value>100 Or Range("G3").Value<6.5 Or Range("G3").Value>8.5 Then Call WPSCloudAPI.SendPLCCommand("Workshop 1 Wastewater Pump", "Stop") (When COD>100mg / L or pH exceeds the range of 6.5-8.5, send a stop command to the workshop PLC) (Check the COD value of cell H3 and the pH value of cell G3. If the COD value is greater than 100 or the pH value is not between 6.5 and 8.5, call the interface to send a stop command to the wastewater pump of workshop 1.)
[0123] Fire safety logic: If DateDiff("d", CDate(Range("K3").Value), Date)>80 ThenRange("L3").Interior.Color = RGB(255, 255, 0) (When fire equipment has been inspected for more than 80 days, the cell is highlighted in yellow as a reminder) (Calculate the difference in days between the current date and the last inspection date of the fire equipment in cell K3. If the difference exceeds 80 days, set the background color of cell L3 to yellow to serve as an inspection reminder.)
[0124] Emergency Management Logic: Dim Annual Drill Count As Integer: Annual Drill Count = WorksheetFunction.CountIfs(Range("M:M"), "2025*", Range("N:N"), ">0"): If Annual Drill Count < 4 Then Range("O3").Value = "Requires Supplementary Drill" (When the annual emergency drill count is less than 4, mark it as "Requires Supplementary Drill"). (First define the variable "Annual Drill Count", count the number of emergency drills in column M containing "2025" and the value in column N being greater than 0. If the number is less than 4, set the content of cell O3 to "Requires Supplementary Drill").
[0125] Control instruction binding: Bind the button with the logic code through the WPS cloud collaboration API, for example, the "hazardous waste disposal push" button binds the code: Dim disposal task content As String: disposal task content = "1st workshop produces waste solvent "& Range ("C3"). Value &"kg, needs to contact "& Range ("E3"). Value &" disposal, deadline "& DateAdd ("d", 7, Date) &"" : Call WPSCloudAPI.SendTask ("Purchasing Department-Li Si", disposal task content) (First define the "disposal task content" variable, splice the 1st workshop waste solvent amount, disposal unit, and deadline information, and then call the interface to send the task to Li Si of the purchasing department.)
[0126] The "water quality exceeds the standard warning" button binds the code: Call WPSCloudAPI.SendPrivateMsg ("Environmental Protection Officer-Wang Wu", "Workshop wastewater COD exceeds the standard, current value "& Range ("H3"). Value &"mg / L, has triggered the stop command") (Call the interface to send a private message to Environmental Protection Officer Wang Wu, stating that the current value of the workshop wastewater COD exceeds the standard, and that the wastewater pump stop command has been triggered.)
[0127] Step three: Document structure microservice encapsulation by function
[0128] 4 independent microservice units: Hazardous waste management microservice: unique identification code MS-FW-001, function description: hazardous waste generation registration, storage time limit monitoring, disposal record uploading (supporting association with disposal contract PDF and transfer sheet picture);
[0129] Environmental monitoring microservice: unique identification code MS-HJ-001, function description: water quality pH / COD data entry, over-standard automatic shutdown, monthly monitoring report generation;
[0130] Fire safety microservice: unique identification code MS-XF-001, function description: fire safety equipment information filing, detection period reminder, detection result entry (supporting "pass / fail" option selection);
[0131] Emergency management microservice: unique identification code MS-YJ-001, function description: emergency drill plan development, drill record filling, drill effect evaluation (supporting scoring 1-10 points);
[0132] Permission settings: The administrator account (admin) has full permissions; the environmental protection officer account (hjzy01) can read hazardous waste and environmental data, modify environmental monitoring logic code; the fire safety administrator account (xfgl01) can only read fire safety equipment data and execute detection reminder actions; registered with the enterprise service registration center through the WPS cloud service interface, classified by "environmental management, fire safety, emergency management, occupational health", supports individual version update (update log includes modifier, modification time, modification content).
[0133] Step four: Building a dynamic evolution type safety environmental management platform based on microservice units
[0134] Select the above 4 core microservice units, supplement 2 microservice units of "occupational health" and "cost input", and form 6 function modules through WPS cloud document drag and drop combination. The interface uses Excel table (column width 15, row height 22, font size 10, Microsoft Yahei):
[0135] Hazardous waste management module: records the whole process of hazardous waste generation, storage and disposal, and automatically synchronizes the disposal cost to the cost input module by clicking the "disposal complete" button (300 kg of waste solvent disposal cost 2400 yuan);
[0136] Environmental monitoring module: uses a line chart to show the COD trend of water quality in June 2025 (85 mg / L on June 5, 92 mg / L on June 10, and 88 mg / L on June 15), and the cell is marked red when the pH value exceeds the limit and triggers the stop command;
[0137] Fire safety module: the table column contains equipment number, type, location, detection time, and remaining detection days. When the remaining days are less than 10 days, it is marked red to remind, and the "detection record" button can upload the detection personnel's signature photo;
[0138] Emergency management module: uses a Word template to record the exercise process and inserts a "generate plan" button to automatically generate a "hazardous waste leakage emergency disposal plan" (including steps, responsible person, and material list);
[0139] Occupational health module: statistics of the number of occupational health physical examination in May 2025 (42 people, 100% compliance rate), and detection results of workplace hazard factors (benzene concentration 0.8 mg / m³, in line with national standard ≤1 mg / m³);
[0140] Cost input module: enter the environmental protection cost in June (hazardous waste disposal 21,000 yuan, water quality detection 8,000 yuan, and fire safety equipment maintenance 5,000 yuan), automatically generate a monthly cost column chart, and support export to picture format. Data interaction between modules: water quality detection cost in the environmental monitoring module is synchronized to the cost input module, and the number of physical examination in the occupational health module is synchronized to the emergency management module (used to develop exercise participant number plan).
[0141] Step five: platform operation and dynamic update
[0142] When the platform is running, detailed operation logs are generated (for example: 2025-06-05 10:30:00 Environmental Monitoring Module COD Detection Value 85 mg / L No Warning; 2025-06-10 15:00:00 Fire Safety Module 10 Fire Extinguishers Detection Reminder Pushed to Fire Administrator); In late June 2025, the enterprise added the "noise pollution monitoring" requirement (the noise of the workshop paint mixing equipment needs to be monitored, day ≤70dB, night ≤55dB), and the document structure of the environmental monitoring microservice was modified: the header data area added "noise value (dB)" and "monitoring period (day / night)" fields, the body logic area added "noise exceeding standard judgment" code (If (Range("I3").Value = "day" And Range("J3").Value>70) Or (Range("I3").Value = "night" And Range("J3").Value>55) Then trigger the noise warning button) (first check if the period displayed in cell I3 is "day" or "night": if it is "day" and the noise value in cell J3 is greater than 70, or it is "night" and the noise value in cell J3 is greater than 55, as long as one of the conditions is met, the noise warning button will be automatically triggered), and the footer added a "noise warning" button. The modified microservice is automatically updated to the platform through WPS cloud synchronization, which takes about 10 minutes, and the original module runs normally without interruption.
[0143] Step six: key formula application (platform dynamic update effect evaluation)
[0144] On June 20, 2025, the effect of the "noise pollution monitoring" function update was evaluated, with the evaluation period t0=08:00 (time unit h, counted as 0) and t1=18:00 (counted as 10):
[0145] The function adaptation weight s=0.6 (the newly added noise monitoring function covers 100%>90% of the enterprise's needs, adjusted according to the rules), and the average function adaptation degree S(t) at time t is 0.92 (9 out of 10 function calls meet the noise monitoring requirements);
[0146] The running smoothness weight f=0.5 (the platform average response time is 1.5s<2s, adjusted according to the rules), and the average running smoothness F(t) at time t is 0.96 (9.6 hours out of 10 hours of running have no lag and no error); Substitute the formula , calculate (dimensionless conversion to 0.87, value range 0-1), determine that the update is effective.
[0147] II. Data representation and effect verification
[0148] Table 2: Comparison of key management indicators of Example 2 platform running for 1 month (June 2025)
[0149] After implementation (June 2025) Trend of change Hazardous waste disposal compliance rate Fully met Significant increase in environmental monitoring data integrity 72% 100% Significant increase in fire equipment detection timeliness Significant increase in functional update response time 60% 98% Manual development > 720 minutes Significant reduction 65% 95% Significant improvement in emergency exercise completion rate Figure 3 Figure 4 Document modification < 10 minutes Figure 5 Figure 6 50% 80%
[0150] Table 2 data reflects the targeted effect of the platform in this embodiment on the safety and environmental management of chemical enterprises: the hazardous waste disposal compliance rate increased from 72% to 100%. The core reason is that the platform avoids hazardous waste over-storage through "7-day storage time limit monitoring + automatic disposal task pushing", and the disposal record can be associated with the qualification file to ensure compliance. The completeness rate of environmental monitoring data increased by 38%. Because the platform realizes automatic input and synchronization of water quality and noise data, there is no need for manual sorting of scattered test reports, and automatic shutdown is triggered when the standard is exceeded, reducing environmental risks. The timeliness of fire-fighting equipment detection increased by 30%, thanks to the platform's hierarchical reminders based on detection cycles (yellow at 80 days, red at 90 days), which allow fire safety administrators to schedule detection plans in advance. The response time for functional updates was shortened from 720 minutes (about 12 hours) for manual development to 10 minutes for document modification, reflecting the platform's "dynamic evolution" advantage - enterprises do not need to rely on external developers, and internal personnel can quickly add management functions to meet the needs of chemical enterprises. The completion rate of emergency drills increased by 30%, as the platform can automatically generate drill plans and notifications, reducing organization difficulty and supporting drill effect evaluation to help continuous optimization. Overall, the platform is built based on the existing WPS resources of the enterprise, without increasing software procurement and maintenance costs, effectively solving the core management pain points of hazardous waste, environmental protection, fire safety, and other aspects of chemical enterprises, and promoting the development of safety and environmental management towards refinement and efficiency.
[0151] The actual application heat of each module of the platform is intuitively presented, with the highest frequency of use in hidden danger management and education and training modules, reflecting the high-frequency needs of enterprises in hidden danger tracking and employee training, and the platform's good adaptability to these core management scenarios. Although the cost investment and occupational health modules have slightly lower usage frequency, they cover the entire process of enterprise safety and environmental management, reflecting the completeness of the functions. Through the difference in module usage frequency, enterprises can optimize the layout of the platform interface, place high-frequency modules in more visible positions, further improve the convenience of operation, allow management personnel to quickly access core functions, and reduce the operation path, meeting the actual needs of efficient management of enterprises.
[0152] The chart clearly contrasts the cost difference of the three types of management modes, the traditional paper management needs continuous investment in paper, printing and manual sorting cost, the monthly average cost is about 2000 yuan; the professional software management has high initial procurement cost and needs to pay monthly fee, the long-term investment burden is heavy; the platform of the application relies on the existing office resources of the enterprise, and the whole process is zero cost. This cost advantage can effectively reduce the economic pressure of enterprises, especially small and medium-sized enterprises, without additional budget for safety and environmental protection management, standardized management can be realized, and the core pain points of "high cost and heavy burden" in the traditional mode are solved, which meets the actual demand of enterprises to control operating costs.
[0153] The cross-terminal synchronization efficiency of the quantitative presentation platform is quantified, the synchronization delay of the traditional management system is generally more than 6 seconds, and in some scenes it even reaches 10 seconds, which is easy to cause data lag; the synchronization delay of the platform is controlled within 1.2 seconds, which is much lower than the user acceptable threshold, and the data real-time performance is excellent. This low delay feature ensures that enterprise managers can obtain the latest management data in real time when operating on different terminals (PC, mobile phone, web page), such as reporting hidden dangers on the mobile phone, and the PC can immediately view and arrange rectification, avoiding management omissions caused by different data, and improving the collaborative efficiency of cross-scene office.
[0154] The platform significantly improves the employee participation, before implementation, the employee participation is only 35%, reflecting the difficulties of "few people responsible and most people bystanders" in the traditional management mode; after implementation, the participation rate increases month by month, reaching 88% after 4 months, close to full participation. This change is due to the low operation threshold of the platform, employees do not need to learn professional software, and can participate in management (such as reporting hidden dangers and viewing training records) through daily use of office tools, effectively promoting the implementation of "full staff safety production responsibility system", changing safety and environmental protection management from "management personnel single-handedly" to "full staff collaborative participation", and improving the overall management efficiency of the enterprise.
[0155] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, any person skilled in the art can make equivalent replacement or change according to the technical solution and inventive concept of the application within the technical range disclosed by the application, which should be covered within the protection scope of the application.
Claims
1. A method for constructing a safe and environmentally friendly management platform based on a document microservice, characterized in that, Comprising: Step one: adapt the software open programming interface to the document ontology structure, select the bindable function area of the document ontology structure; Step two: build a ternary bound document structure, import safety and environmental protection basic data in the header data area, establish the mapping relationship between data and document cells through the JS macro interface; embed business logic code in the main text logic area; bind control instructions in the footer action area through the API interface, the instructions are associated with the main text logic code, when the logic code determines that the data meets the trigger condition, the action of the corresponding button is automatically triggered; Step three: encapsulate the document structure microservice, encapsulate the document structure built in step two into an independent microservice unit; register the microservice unit to the service registry center through the software cloud service interface; Step four: build a dynamic evolution type safety and environmental protection management platform based on the microservice unit, select the corresponding microservice unit from the service registry center according to the enterprise safety and environmental protection management needs to form a platform function module; the combination of the platform function module establishes an interaction channel through the shared data field of the document structure; Step five: platform operation and dynamic update, real-time monitoring of data flow and logic execution state of each microservice unit during platform operation; When the enterprise management needs change, directly modify the document structure of the corresponding microservice unit, and the modified microservice unit is automatically synchronized to the platform. 2.The method according to claim 1, wherein, Also comprising: The document structure body ternary binding validity verification step, after the document structure body construction is completed in step two, through formula The ternary binding validity index in the verification period is calculated, wherein V is the validity index, t0 is the verification starting time, t1 is the verification ending time, d is the data binding weight, D(t) is the data synchronization rate at time t, l is the logic binding weight, L(t) is the logic execution correctness rate at time t, a is the action binding weight, A(t) is the action trigger success rate at time t, when V≥preset value, it is judged that the document structure body binding is valid, and when V<preset value, the interface mapping relationship and the instruction binding logic are re-adjusted. 3.The method of claim 1, wherein, Also comprising: The safety and environmental task pushing priority calculation step is to calculate the task priority by the formula P = w1 * E + w2 * U + w3 * T wherein P is the task priority, w1 is the urgency weight, E is the task urgency, w2 is the responsibility person load weight, U is the current load of the responsibility person, w3 is the task influence weight, and T is the task influence degree.
4. The method according to claim 1, wherein, The platform dynamic updating effect evaluation step is also included. After the platform is updated in step five, the updating effect index Ue is calculated by the formula Ue = s * S (t1) - s * S (t0) + f * F (t1) - f * F (t0), wherein t0 is the updating start time, t1 is the observation time after the updating is finished, s is the function adaptation weight, S(t) is the function adaptation degree at time t, f is the running fluency weight, and F(t) is the running fluency at time t.
5. The method according to claim 1, wherein, Also comprising a cross-terminal data real-time synchronization step, during the microservice encapsulation process in step three, add a data synchronization plug-in to each microservice unit, the plug-in calls the cloud synchronization interface of the software to realize real-time synchronization of terminal data; The synchronization process adopts an incremental synchronization strategy; when synchronization fails, the plug-in automatically triggers a retry mechanism, and when continuous retries fail, a synchronization exception reminder is pushed. 6.The method of claim 1, wherein, Also comprising a safety and environmental protection management automatic supervision step, during the platform building in step four, add a supervision sub-microservice to each function module, import supervision index thresholds in the header data area of the document structure of the supervision sub-microservice; embed supervision judgment code in the main text logic area, the code real-time grabs platform running data and compares it with the threshold; bind the early warning instruction in the footer action area, when the platform running data exceeds the threshold, the early warning instruction is automatically triggered, the early warning information is pushed, and a supervision report is generated.
7. The method according to claim 1, wherein, Also comprising a platform function module expansion step, when the enterprise adds safety and environmental protection management needs, build a document structure for the new needs based on the existing programming interface of the software; set the corresponding data field in the header data area of the new structure; use the main text logic area to write business logic code; use the footer action area to bind control instructions; encapsulate the new structure into an updated microservice unit, register it to the service registry center through the software cloud service interface, and add it to the existing platform by dragging and dropping to establish data association with the original module.
8. A system for implementing the method for constructing a document microservice-based safe environmental management platform according to any one of claims 1-7, characterized in that, Comprising: Interface adaptation module, determine the header data area, main text logic area, and footer action area of the document ontology structure, and reserve safety and environmental protection data fields; Document structure construction module, establish the mapping relationship between data and document cells through the JS macro interface, embed business logic code based on management rules in the main text logic area, and bind control instructions in the footer action area through the API interface; Microservice encapsulation module, assign a unique identification code, write a functional description, set data reading, logic modification, action execution authority, register microservice units to the classified retrieval service registry center through the software cloud service interface; Platform building module, drag and drop to form hidden danger management, education and training, cost investment, occupational health, special equipment, environmental management, emergency management, fire safety module, and establish data interaction channels between the above modules; Running update module, generate running log, when the management requirement changes, modify the document structure body of the corresponding microservice unit and automatically synchronize to the platform and record the update history; Effectiveness verification module, determine the binding effectiveness, output the verification result and interface adjustment suggestion; Task push module, push to the PC end, mobile end or web end according to the priority level, accompanied by the corresponding reminding method; Data synchronization module, set differential synchronization frequency, generate synchronization log, handle synchronization exception and push reminder. 9.The system of claim 8, wherein, Also includes: Supervision report module, including supervision index configuration submodule, real-time judgment submodule and report generation submodule, supporting management personnel to modify threshold value visually and save to document structure body header data area, modification record is automatically retained; Real-time judgment submodule is used for embedding supervision judgment code, real-time grabbing platform running data and comparing with index threshold value, triggering early warning instruction and pushing to corresponding department; Report generation submodule is used for automatically summarizing supervision results per week, generating report supporting export, printing and sharing, at the same time, synchronizing report data to cost investment module, associating cost expenditure data generated in supervision process.
10. The system of claim 8, wherein the system is characterized by, Also includes: Function expansion module and permission management module, encapsulated as microservice unit and registered to service registry center, support drag and drop to add to existing platform, automatically establish data association with original module; Permission setting is saved to document structure body call parameter, verify permission through software account system.
Citation Information
Patent Citations
Document system for level-to-level management
CN113840013A
Government affair office automation platform and optimization implementation method thereof
CN114943511A