Wood floor production process data web API encapsulation and publishing method based on micro-service architecture

By encapsulating the wood flooring production process data using a microservice architecture-based WebAPI, we have solved the challenges faced by small and medium-sized enterprises in data integration and security management. This approach enables lightweight, low-cost data processing and interaction, thereby improving the flexibility and security of the production process.

CN121349474BActive Publication Date: 2026-04-21INST OF WOOD INDUDTRY CHINESE ACAD OF FORESTRY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF WOOD INDUDTRY CHINESE ACAD OF FORESTRY
Filing Date
2025-12-16
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Small and medium-sized wood flooring manufacturers face difficulties in data integration, system scalability, data interaction efficiency, and security management. Existing technical solutions are insufficient to meet the requirements of lightweight, low cost, and easy operation and maintenance, resulting in high production interruption risk, low data interaction efficiency, and weak security.

Method used

We adopt a microservice architecture-based WebAPI encapsulation method for wood flooring production process data. We establish multiple microservice modules through IIS, and combine them with a data fusion layer and device communication middleware to achieve multi-protocol adaptation and security verification. We use lightweight IIS deployment to reduce hardware costs and technical maintenance thresholds.

Benefits of technology

It achieves deep integration of wood flooring production process data, supports plug-and-play functionality, reduces hardware costs and technical maintenance difficulties for small and medium-sized enterprises, improves data interaction efficiency and security, and adapts to the dynamic adjustment needs of production processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349474B_ABST
    Figure CN121349474B_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial production information data fusion technology, specifically to a method for encapsulating and publishing wood flooring production process data via WebAPI based on a microservice architecture. The method includes a deployment phase: establishing multiple microservice modules for wood flooring production process data fusion based on IIS according to the wood flooring production process; constructing a data fusion layer according to the calling requirements of the multiple microservice modules; and an operation phase: the microservice modules receive data requests from external systems, perform security verification on the data requests through the controller of the WebAPI interface encapsulation layer, obtain the industrial protocol type to call the data fusion layer, generate communication instructions through the corresponding client driver, read the raw data from the target device, encapsulate the raw data into a standardized JSON format, send it to the data layer of the WebAPI interface encapsulation layer for semantic transformation, and output the final JSON response data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial production information data fusion technology, specifically to a method for encapsulating and publishing wood flooring production process data via WebAPI based on a microservice architecture. Background Technology

[0002] With the deepening of the concept of intelligent manufacturing, the wood flooring manufacturing industry is accelerating its digital transformation. The large amount of data generated in the production process (such as equipment operating status, process parameters, and quality inspection results) has become a core resource for optimizing production. Enterprises in the industry, especially the large proportion of small and medium-sized wood flooring manufacturers, urgently need to achieve production monitoring, quality traceability, and cost optimization through data integration. However, there are significant contradictions between existing technical solutions and the actual resource conditions of enterprises, specifically in terms of technical defects and implementation constraints.

[0003] The main shortcomings of existing technologies include the following:

[0004] Insufficient Interface Standardization: In the current wood flooring production process, different brands and models of equipment (such as hot presses, multi-blade saws, and wax sealing machines in the production process of strong wood flooring; and painting lines in the production process of solid wood flooring) and management and testing links generally use multiple communication protocols such as ModbusTCP, OPC UA, and S7Net. This lack of standardized data formats makes integration difficult with internal systems such as Enterprise Resource Planning (ERP) and Manufacturing Execution System (MES), as well as with external partner systems, resulting in "information silos." Small and medium-sized enterprises, lacking professional technical teams, struggle to independently adapt to multiple protocols, leading to low data integration efficiency. Secondly, system scalability is limited: In traditional monolithic architectures, functional modules such as production data processing, equipment monitoring, and quality inspection are tightly coupled. When enterprises add new equipment (such as upgrading automated wax sealing machines) or iterate processes (such as adding a solid wood flooring curing process), the entire system needs to be modified. This not only results in high maintenance costs but also easily leads to production interruptions during the modification process, making risks difficult to control and unable to adapt to the dynamic adjustment needs of wood flooring production processes. Furthermore, the data interaction efficiency is low: a large amount of real-time data is generated every minute during the production process (such as press temperature, motor current, surface defect detection results, etc.). The traditional architecture adopts single-node deployment and lacks standardized release and deployment mechanisms, load balancing design mechanisms, etc.

[0005] Meanwhile, security and access control are weak: core information such as production process parameters and equipment operation data lacks refined access control, which can easily lead to data leakage. Furthermore, the existing solutions do not pay enough attention to security verification during data interaction, and identity authentication relies only on simple usernames and passwords without establishing an effective encryption and verification mechanism.

[0006] The implementation is constrained by three main factors: First, budget: it is difficult to afford the procurement and maintenance costs of large enterprise microservice solutions (such as automated clusters, Consul and other complex middleware); second, hardware: most systems use 2-3 industrial servers to support the entire data processing process, which cannot meet the needs of large-scale cluster deployment; and third, operation and maintenance: there is a lack of operational capabilities for automated operation and maintenance tools (such as container orchestration and automatic registry centers), making it difficult to implement complex solutions.

[0007] In summary, existing technical solutions cannot solve core pain points such as multi-protocol integration and efficient data interaction. Therefore, there is an urgent need for a lightweight, low-cost, and easy-to-maintain technical solution that can adapt to the existing conditions of small and medium-sized enterprises while accurately solving data processing and interaction problems in the wood flooring production process, thus promoting the implementation of digital transformation in the industry. Summary of the Invention

[0008] To address the problems existing in the prior art, this invention provides a method for encapsulating and publishing wood flooring production process data via WebAPI based on a microservice architecture. The method includes a deployment phase: establishing multiple microservice modules for data fusion of the wood flooring production process based on IIS; constructing a data fusion layer according to the calling requirements of the multiple microservice modules; and an operation phase: the microservice modules receive data requests from external systems, perform security verification on the data requests through the controller of the WebAPI interface encapsulation layer, obtain the industrial protocol type to call the data fusion layer, generate communication instructions through the corresponding client driver, read the raw data from the target device, encapsulate the raw data into a standardized JSON format, send it to the data layer of the WebAPI interface encapsulation layer for semantic transformation, and output the final JSON response data.

[0009] This invention specifically adopts the following technical solution: a method for encapsulating and publishing wood flooring production process data via WebAPI based on a microservice architecture, comprising a deployment phase and an operation phase, wherein the deployment phase includes:

[0010] Based on the wood flooring production process, multiple microservice modules for wood flooring production process data fusion are established using IIS; the multiple microservice modules include at least: production progress traceability microservice, process parameter acquisition microservice, equipment operation status monitoring microservice, product quality inspection microservice, environmental quality monitoring microservice, and energy consumption management microservice.

[0011] A data fusion layer is constructed based on the calling requirements of multiple microservice modules; the data fusion layer adopts a client-driven device communication middleware with multiple built-in industrial protocols;

[0012] The operational phase includes:

[0013] The microservice module receives data requests from external systems, and the data requests include at least an access key, device information, and an MD5 digest.

[0014] The controller of the WebAPI interface encapsulation layer performs security verification on the data request; after the security verification is successful, the service layer of the WebAPI interface encapsulation layer obtains the industrial protocol type of the corresponding target equipment in the wood flooring production process based on the data request.

[0015] According to the industrial protocol type, the data fusion layer is invoked to start the corresponding client driver to generate communication instructions, so as to read the raw data of the target device and encapsulate the raw data into a standardized JSON format;

[0016] The data layer of the WebAPI interface encapsulation layer receives raw data in JSON format, performs semantic transformation processing, and outputs the final JSON response data after semantic transformation to external systems through the controller.

[0017] Furthermore, the multiple microservice modules specifically implement the following functions:

[0018] Production progress traceability microservice: used to obtain real-time order data and historical order data, and trace the entire process of wood flooring production from pressing, cutting, curing, shaping to packaging;

[0019] Process parameter acquisition microservice: used to acquire the process parameters corresponding to real-time work orders, including the process parameters of pressing, cutting, forming and packaging operations in the wood flooring production process;

[0020] Equipment operation status monitoring microservice: used to obtain the operation status and parameters of equipment in each process of wood flooring production; the operation parameters include motor current, speed, and press temperature.

[0021] Product quality inspection microservice: used to obtain surface quality inspection and grading data for finished wood flooring products;

[0022] Environmental quality monitoring microservice: used to obtain environmental parameters of the wood flooring production workshop, including temperature, humidity, dust concentration, environmental noise, PM2.5 and VOCs parameters;

[0023] Energy management microservice: used to obtain the power consumption of equipment in each process of wood flooring production and to collect power system parameters.

[0024] Furthermore, the controller in the WebAPI interface encapsulation layer performs security verification on the data request, specifically as follows:

[0025] The security verification includes timeliness verification, parameter format verification, access key verification, and MD5 digest verification;

[0026] The timeliness verification includes: calculating the time difference between the timestamp of the current microservice module and the time when the external device sends the data request; the verification is successful when the time difference is less than a set value.

[0027] The parameter format verification includes: verifying the format of device information in the data request; if the format is correct, the verification passes.

[0028] The access key verification includes: comparing the access key sent by the external system with its pre-allocated key; if the comparison matches, the verification is successful.

[0029] The MD5 digest verification includes: sorting the device information in the data request according to ASCII code order and concatenating them into a string; concatenating the string with the access key and performing an MD5 hash operation to generate a verification digest; comparing the verification digest with the MD5 digest sent by the external system; and verifying if they match.

[0030] Furthermore, based on the industrial protocol type, the data fusion layer is invoked to start the corresponding client driver to generate communication instructions in order to read the raw data of the target device, specifically as follows:

[0031] The device communication middleware in the data fusion layer initializes the corresponding client driver according to the industrial protocol.

[0032] Establish a network connection between the client driver and the target device based on the standard port number of the industry protocol and the IP address of the target device;

[0033] Generate communication instructions that conform to the industrial protocol based on the data length, data type, and register address in the industrial protocol;

[0034] By executing this communication command, the raw data is read from the target device.

[0035] The beneficial effects of this invention are as follows: By breaking down the wood flooring production process into six independent business microservices and adopting a standardized WebAPI encapsulation pattern of controller, service layer, and data layer, combined with device communication middleware, this invention enables plug-and-play functionality for multi-protocol industrial equipment. Through the collaborative work of these three layers, deep integration of data across the entire production process is achieved. Simultaneously, this method, through lightweight IIS deployment, ensures independent service deployment, resource isolation, and high-concurrency processing capabilities while significantly reducing hardware costs and technical maintenance barriers for small and medium-sized enterprises. Furthermore, by employing a dual security verification mechanism of access keys and MD5 digests, it effectively addresses the core pain points of traditional architectures, such as inconsistent interfaces, poor system scalability, low data interaction efficiency, and weak security control. This provides a highly adaptable and secure lightweight solution for the digital transformation of wood flooring manufacturers. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a schematic diagram of a method for encapsulating and publishing WebAPI data for wood flooring production process based on a microservice architecture, according to an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of a WebAPI microservice architecture for a wood flooring production process according to an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram of a three-tier architecture for a WebAPI interface according to an embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of a WebAPI security verification process according to an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of a data processing flow according to an embodiment of the present invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] A flowchart illustrating a method for encapsulating and publishing wood flooring production process data using a microservice architecture, according to an embodiment of the present invention, is shown below. Figure 1 As shown, the method includes a deployment phase and an operation phase, wherein the deployment phase includes:

[0044] Based on the wood flooring production process, multiple microservice modules for data fusion of the wood flooring production process are established using IIS. These multiple microservice modules include at least: production progress traceability microservice, process parameter acquisition microservice, equipment operation status monitoring microservice, product quality inspection microservice, environmental quality monitoring microservice, and energy consumption management microservice.

[0045] In this embodiment of the invention, the microservice module is built on ASP.NET Core, and IIS is used as the web server to achieve independent service deployment and resource isolation. At the same time, network load balancing management is configured to improve concurrent processing capabilities, thereby splitting the data fusion of the entire wood flooring production process into 6 independent microservice modules.

[0046] In one specific embodiment of the present invention, the established microservice modules can achieve the following functions:

[0047] Production progress traceability microservice: used to obtain real-time order data and historical order data, and trace the entire process of wood flooring production from pressing, cutting, curing, shaping to packaging;

[0048] Specifically, when obtaining implementation order data, the request data sent may include the work order scanning node number, WiFi transmission module IP address, device number, timestamp, access key code, and verification digest; the corresponding return data includes: return status, return information, execution time, return work order information, and return work order reporting time.

[0049] When retrieving historical order data, the request data sent can include the work order scanning node number, WiFi transmission module IP address, device number, timestamp, access key code, and verification digest; the corresponding return data includes return status, return information, execution time, return of multiple historical work order information, and return of the reporting time corresponding to the historical work order.

[0050] Process parameter acquisition microservice: used to acquire the process parameters corresponding to real-time work orders. The process parameters corresponding to the real-time work orders include the process parameters of pressing, cutting, forming and packaging operations in the wood flooring production process (taking the laminate wood flooring production process as an example).

[0051] Specifically, when obtaining the process parameters corresponding to a real-time work order, the request data sent can be the work order scanning node number, the WiFi transmission module IP address, the device number, the timestamp, the access key code, and the verification digest; the corresponding return data includes the return status, the return information, the execution time, and the returned process parameter combination string, which is in the form of a combination of parameter number, value, and value type.

[0052] Equipment operation status monitoring microservice: used to obtain the operation status and operation parameters of equipment in each process of wood flooring production; the operation parameters include motor current, speed, press temperature, etc., and are not limited to the parameters listed above;

[0053] Specifically, when obtaining the operating status of equipment in each process of the wood flooring production process, the request data sent can be the equipment model, equipment code, equipment number, timestamp, access key code, and verification digest; the corresponding returned data includes return status, return information, execution time, start status, pause status, fault status, and equipment online status.

[0054] When obtaining the operating parameters of equipment in each process of the wood flooring production process, the request data sent can be the equipment model, equipment code, equipment number, timestamp, access key code, and verification digest; the corresponding returned data includes the return status, return information, execution time, and return data string. The string format is a combination of parameter sequence number and parameter value.

[0055] Product quality inspection microservice: used to obtain surface quality inspection and grading data for finished wood flooring products;

[0056] Specifically, the surface quality inspection and grading data of finished wood flooring refers to the product pass rate of a certain work order in the grading machine. The request data sent can be the equipment model, equipment code, equipment number, timestamp, access key code, and verification digest. The corresponding returned data includes the return status, return information, execution time, and a combined string of returned grading data, which is in the format of grade value and pass rate percentage.

[0057] Environmental quality monitoring microservice: used to obtain environmental parameters of the wood flooring production workshop, including temperature, humidity, dust concentration, environmental noise, PM2.5 and VOCs parameters;

[0058] Specifically, when obtaining environmental parameters from the wood flooring production workshop, the requested data can include the address of the environmental quality monitoring node, the IP address of the WiFi transmission module, the device number, the timestamp, the access key code, and the verification digest. The corresponding returned data includes the return status, the return information, the execution time, and the set of collected values, which must include at least the real-time data of temperature and humidity, dust, PM2.5, VOCs, noise, and carbon dioxide.

[0059] Energy management microservice: used to obtain the power consumption of equipment in each process of wood flooring production and to collect power system parameters.

[0060] Specifically, when acquiring the power consumption of equipment in each process of the wood flooring production process and collecting power system parameters, the request data sent can include the address of the power acquisition data node, the IP address of the WiFi transmission module, the device number, the timestamp, the access key code, and the verification digest; the corresponding returned data includes the return status, the return information, the execution time, and the returned set of collected values, including phase voltage, line voltage, phase current, active power, reactive power, power factor, voltage frequency, and real-time data of power consumption.

[0061] It should be noted that the deployment address of the microservice module can be manually configured and fixed in IIS. Calls between microservices are implemented through hard-coded addresses. The caller directly writes the fixed address of the callee in the code or configuration file, without the need for dynamic discovery. When the service address changes, the configuration files of all associated callers need to be manually updated and the relevant services of the corresponding IIS site need to be restarted.

[0062] In a specific embodiment of the present invention, when deploying a microservice module, the application pool is first split by microservice to achieve independent service isolation. Specifically, the application pool is split by microservice, an independent application pool is created for each microservice, and independent resources and operating rules are configured for each application pool.

[0063] Then configure independent sites and binding rules to enable independent access to services. Specifically, manually create sites for each of the six microservices in IIS, with site names corresponding to microservice names. Each site points to an independent physical directory, supporting independent updates for each microservice. Binding to each microservice is achieved using an IP address and port number.

[0064] Further configure independent logs and health checks to achieve independent service monitoring. Specifically, this is achieved by configuring an independent log storage path for each microservice site and naming the log files by service name-date.

[0065] Finally, configure the network load balancer to enable concurrent processing of microservices. Specifically, configure the network load balancer cluster in the Windows Server integrated network load balancer, deploy 6 microservice modules on each host according to the aforementioned steps, configure the virtual IP of the cluster as the unified access point for microservices, and set the load balancing mode and configure weights for the network load balancer.

[0066] A data fusion layer is built based on the calling requirements of multiple microservice modules; the data fusion layer adopts a client-driven device communication middleware with multiple built-in industrial protocols;

[0067] In this embodiment of the invention, the data fusion layer is used to solve the compatibility problem of multiple communication protocols. The upper-layer microservice module can achieve complete decoupling of the upper-layer service and the protocol by calling the unified WebAPI. The device communication middleware + protocol-independent process is used to hide the details of the underlying protocol, so that the upper-layer interface does not need to pay attention to the device communication method and can access equipment data of different protocols through the unified WebAPI.

[0068] In one specific embodiment of the present invention, the device communication middleware has built-in client drivers for multiple industrial protocols to encapsulate and isolate protocol adaptation logic. It includes at least client drivers for Modbus (ModbusTCP), OPC UA.NETStandard (OPC UA), and S7NetPlus (S7Net), specifically including:

[0069] ModbusTCP (port 502): Supports reading and writing of data types such as coil and UInt16, and is mapped to the Post_Read / WriteModbus TCPXXVariables (XX: UInt16, Coil, Float) interface for microservice modules to call;

[0070] OPC UA (port 4840): Implements multi-label variable and register read and write, mapped to Post_Read / WriteOpcUa Registers and Post_Read / WriteOpcUaVariables interfaces for microservice modules to call;

[0071] S7Net (port 102): Supports reading and writing data blocks for S7 series PLCs, mapped to the Post_Read / WriteS7NetVariables interface for microservice modules to call.

[0072] In one specific embodiment of the present invention, the microservice module and the data fusion layer are configured using two industrial servers, both equipped with an Intel(R) Xeon(R) Gold 6271 CPU, 32GB of memory, and a 1TB SSD. Each server deploys six microservices and device communication middleware, eliminating the need for additional complex infrastructure such as an automated registry center. This configuration is suitable for the hardware resources of small and medium-sized enterprises. Specifically:

[0073] like Figure 2 The diagram illustrates a WebAPI microservice architecture for a wood flooring production process according to an embodiment of the present invention. Fixed ports are assigned to microservice modules based on their functions to ensure consistent configuration across the two servers. Specifically, the process parameter acquisition microservice uses port 8081; the production progress tracking microservice uses port 8082; the equipment operation status monitoring microservice uses port 8083; the product quality inspection microservice uses port 8084; the environmental quality monitoring microservice uses port 8085; and the energy consumption management microservice uses port 8086. The equipment communication middleware binds to port 8090 on both servers, serving as a unified data interaction entry point. Furthermore, a Windows Server "Network Load Balancing (NLB)" component is installed, creating a cluster with server A as the core node and server B as a backup node. The cluster's virtual IP is configured as the unified external access address for the microservices and middleware.

[0074] In this embodiment of the invention, different weights are assigned to the frequently accessed equipment operation status monitoring microservice (port 8083), device communication middleware (port 8090), and other microservices. For example, the equipment operation status monitoring microservice is assigned a weight of 150, the device communication middleware is assigned a weight of 200, and the other microservices are assigned a total weight of 1100. The load mode is set to round-robin, and TCP port health checks are enabled, checking once every 10 seconds. If there is no response for 3 consecutive times, the node is removed.

[0075] This invention addresses the data interaction and business collaboration needs throughout the entire wood flooring production process by providing a method for encapsulating and publishing wood flooring production process data via a microservice architecture using a WebAPI. This method can achieve the following applications:

[0076] The MES system obtains real-time equipment operation status data from the equipment operation status monitoring microservice by calling a unified WebAPI (supported by device communication middleware); at the same time, the production progress traceability microservice obtains real-time order data of each process node through middleware to support order delivery cycle estimation.

[0077] Quality traceability and control: The product quality inspection microservice calls the device communication middleware to connect with surface defect detection equipment to obtain wood flooring product quality data; it can combine the process parameter acquisition microservice and the equipment operation status monitoring microservice to establish an analysis model of "process parameters-real-time data-quality results", quickly locate the cause of non-conforming products and reduce the product error rate.

[0078] Energy consumption and cost optimization: The energy management microservice collects power consumption data of each piece of equipment through middleware and calculates the energy consumption ratio by process (such as pressing, cutting and packaging in the laminate flooring production line); the ERP system calls the microservice interface and optimizes resource allocation in combination with production order volume, helping small and medium-sized enterprises reduce the unit product energy cost.

[0079] Environmental safety management: The environmental quality monitoring microservice obtains data such as workshop temperature and humidity, dust concentration, environmental noise, PM2.5, and VOCs through middleware, and triggers an alarm when the levels exceed the standards.

[0080] A flowchart illustrating a method for encapsulating and publishing wood flooring production process data using a microservice architecture, according to an embodiment of the present invention, is shown below. Figure 1 As shown, the operation phase includes:

[0081] The microservice module receives data requests from external systems. The data requests include at least the access key, device information, and MD5 digest.

[0082] In this embodiment of the invention, the external system is an MES system, specifically taking the process of the MES system calling the equipment operation status monitoring microservice to obtain the operating status of the hot press in the laminate flooring pressing process as an example. The MES system, according to the "Interface Security and Access Control Layer" specification, initiates a POST request carrying an access key and an MD5 digest. The request address is the microservice interface corresponding to the cluster virtual IP. The data request specifically includes: device model: equipmentType; device code: equipmentOrder; device number: deviceID; timestamp: timestamp; access key code: requestToken; MD5 digest: sign. The MD5 digest is generated by concatenating the device information in the data request into a string after sorting it according to ASCII code order, for example, deviceID->equipmentOrder. The timestamp of ->equipmentType->requestToken->timestamp can be concatenated to SN330335R01T01a797722d46024ac4afc5b921d9150e861750256640, where a797722d46024ac4afc5b921d9150e86 is the pre-allocated key of the external device. Then, the string is encoded in UTF-8 and a 32-bit lowercase digest is generated using the MD5 algorithm, such as 70ae2e8080af0bc959a031c2b8ae5dde, which gives the MD5 digest sign value mentioned above.

[0083] The controller in the WebAPI interface encapsulation layer performs security verification on the data request; once the security verification is successful, the service layer of the WebAPI interface encapsulation layer obtains the industrial protocol type of the corresponding target equipment in the wood flooring production process based on the data request.

[0084] In this embodiment of the invention, after receiving a request, the equipment operation status monitoring microservice implements a full-process call between the microservice module and the data fusion layer through a three-tier architecture of the WebAPI interface encapsulation layer, such as... Figure 3 As shown, it includes a controller, a service layer, and a data layer, specifically:

[0085] First, the controller in the WebAPI interface encapsulation layer performs dual security verification, which includes timeliness verification, parameter format verification, access key verification, and MD5 digest verification. Specifically:

[0086] Timeliness verification refers to calculating the time difference between the timestamp of the current microservice module and the time when the external device sends the data request. When the time difference is less than a set value, the verification is successful. This embodiment of the invention provides a set value of 300 seconds to avoid request expiration.

[0087] Parameter format verification refers to verifying the format of device information in the data request; verification passes when the format is correct.

[0088] Access key verification refers to comparing the access key sent by the external system with its pre-allocated key; verification is successful when the comparison matches.

[0089] The MD5 digest verification process is as follows: Figure 4 As shown, this refers to sorting the device information in the data request according to ASCII code order and concatenating it into a string. This string is then concatenated with the access key and subjected to an MD5 hash operation to generate a verification digest. The verification digest is then compared with the MD5 digest sent by the external system. If the comparison matches, the verification is successful.

[0090] In this embodiment of the invention, after the security verification is passed, the service layer of the WebAPI interface encapsulation layer uses the GetDeviceIDRunningStatus method to perform business logic encapsulation and device communication middleware call operations. At the same time, by reading and obtaining the industrial protocol of the device as Bus: ModbusTCP, the industrial protocol type of the target device in the wood flooring production process is obtained.

[0091] According to the industrial protocol type, the data fusion layer is invoked to generate communication instructions through the corresponding client driver in order to read the raw data of the target device and encapsulate the raw data into a standardized JSON format;

[0092] In this embodiment of the invention, the service layer of the WebAPI interface encapsulation layer obtains the request address of the device communication middleware in the data fusion layer, and then calls the device communication middleware in the data fusion layer to initialize the corresponding client driver according to the industrial protocol; establishes a network connection between the client driver and the target device according to the standard port number of the industrial protocol and the IP address of the target device; generates a communication instruction conforming to the industrial protocol based on the data length, data type and register address in the industrial protocol; and executes the industrial instruction to read the original data from the target device, including the device's IP address: 192.168.1.X, the read register address: 10201 / 10002 / 10004 / 5001, the read data type: bool / bool / bool / bool, and the corresponding function of the register: device start / device pause / device fault / device online.

[0093] In one specific embodiment of the present invention, after the device communication middleware receives the call from the service layer, it executes as follows: Figure 5 The data processing procedure shown is as follows:

[0094] First, request parsing and verification are performed. This operation is similar to the dual security verification performed by the controller in the WebAPI interface encapsulation layer, and will not be elaborated further here. Then, protocol adaptation and instruction generation are performed. Specifically, taking ModbusTCP as an example of an industrial protocol, the corresponding client driver is initialized, and a TCP connection is created to generate communication instructions for the underlying server, such as: reading the device start flag coil register (10201): ModbusTcpSession.ReadCoil(10201); reading the device pause flag coil register (10002): ModbusTcpSession. ReadCoil(10002); Read the device fault flag coil register (10004): ModbusTcpSession.ReadCoil(10004); Read the device online flag coil register (5001): ModbusTcpSession.ReadCoil(5001); Next, data interaction and standardization operations are performed, that is, by sending the generated communication instructions to the target device, receiving the returned raw data, performing standardization encapsulation operations, and encapsulating the converted data into a predefined JSON object, thereby realizing the encapsulation of the raw data into a standardized JSON format.

[0095] The data layer of the WebAPI interface encapsulation layer receives raw data in JSON format, performs semantic transformation processing, and outputs the final JSON response data after semantic transformation to external systems through the controller.

[0096] In this embodiment of the invention, after the data layer of the WebAPI interface encapsulation layer receives the raw data in JSON format, it converts the raw data into semantic values ​​that the business system can directly understand. For example, if the read coil value is False, it is converted into the business semantic representation No; if the coil value is True, it is converted into the business semantic representation Yes. Other business fields are added to generate a standardized JSON object, which includes the return status Status, return information Message, execution time executionTime, start status Start, pause status Halt, fault status Fault, equipment online status Online, etc. The final JSON response data is generated and returned to the MES system through the controller layer. At the same time, the information transmitted in each stage is recorded and saved through the configured Serilog log monitoring.

[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for encapsulating and publishing WebAPI data of wood flooring production process based on microservice architecture, characterized in that, It includes a deployment phase and an operation phase, wherein the deployment phase includes: Based on the wood flooring production process, multiple microservice modules for data fusion in the wood flooring production process are established using IIS. The deployment addresses of these microservice modules are manually configured and fixed in IIS, and inter-service calls are implemented through hard-coded addresses. Specifically, six sites are manually created for each microservice in IIS, with site names corresponding to microservice names. Each site points to an independent physical directory, supporting independent updates for each microservice. These multiple microservice modules include at least: a production progress tracking microservice, a process parameter acquisition microservice, an equipment operation status monitoring microservice, a product quality inspection microservice, an environmental quality monitoring microservice, and an energy consumption management microservice. The multiple microservice modules specifically implement the following functions: Production progress traceability microservice: used to obtain real-time order data and historical order data, and trace the entire process of wood flooring production from pressing, cutting, curing, shaping to packaging; Process parameter acquisition microservice: used to acquire the process parameters corresponding to real-time work orders, including the process parameters of pressing, cutting, forming and packaging operations in the wood flooring production process; Equipment operation status monitoring microservice: used to obtain the operation status and parameters of equipment in each process of wood flooring production; the operation parameters include motor current, speed, and press temperature. Product quality inspection microservice: used to obtain surface quality inspection and grading data for finished wood flooring products; Environmental quality monitoring microservice: used to obtain environmental parameters of the wood flooring production workshop, including temperature, humidity, dust concentration, environmental noise, PM2.5 and VOCs parameters; Energy management microservice: used to obtain the power consumption of equipment in each process of wood flooring production and to collect power system parameters; A data fusion layer is constructed based on the calling requirements of multiple microservice modules; the data fusion layer adopts a client-driven device communication middleware with multiple built-in industrial protocols; The operational phase includes: The microservice module receives data requests from external systems, and the data requests include at least an access key, device information, and an MD5 digest. The controller of the WebAPI interface encapsulation layer performs security verification on the data request; after the security verification is successful, the service layer of the WebAPI interface encapsulation layer obtains the industrial protocol type of the corresponding target equipment in the wood flooring production process based on the data request. According to the industrial protocol type, the data fusion layer is invoked to start the corresponding client driver to generate communication instructions, so as to read the raw data of the target device and encapsulate the raw data into a standardized JSON format; The data layer of the WebAPI interface encapsulation layer receives raw data in JSON format, performs semantic transformation processing, and outputs the final JSON response data after semantic transformation to external systems through the controller.

2. The method for encapsulating and publishing wood flooring production process data using a microservice architecture as described in claim 1, characterized in that: The controller in the WebAPI interface encapsulation layer performs security verification on the data request, specifically as follows: The security verification includes timeliness verification, parameter format verification, access key verification, and MD5 digest verification; The timeliness verification includes: calculating the time difference between the timestamp of the current microservice module and the time when the external device sends the data request; the verification is successful when the time difference is less than a set value. The parameter format verification includes: verifying the format of device information in the data request; if the format is correct, the verification passes. The access key verification includes: comparing the access key sent by the external system with its pre-allocated key; if the comparison matches, the verification is successful. The MD5 digest verification includes: sorting the device information in the data request according to ASCII code order and concatenating them into a string; concatenating the string with the access key and performing an MD5 hash operation to generate a verification digest; comparing the verification digest with the MD5 digest sent by the external system; and verifying if they match.

3. The method for encapsulating and publishing wood flooring production process data using a microservice architecture as described in claim 1, characterized in that: According to the industrial protocol type, the data fusion layer is invoked to start the corresponding client driver to generate communication instructions in order to read the raw data of the target device, specifically: The device communication middleware in the data fusion layer initializes the corresponding client driver according to the industrial protocol. Establish a network connection between the client driver and the target device based on the standard port number of the industry protocol and the IP address of the target device; Generate communication instructions that conform to the industrial protocol based on the data length, data type, and register address in the industrial protocol; By executing this communication command, the raw data is read from the target device.

Citation Information

Patent Citations

  • Business process customization and distributed process scheduling method based on micro-service architecture

    CN113268319A

  • Hyper-converged micro-service system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control

    CN119676102A

  • Micro-service security communication method and system, electronic equipment and storage medium

    CN120546901A