OCS system message query and cross-regional file interaction method, system and device based on springboot framework and medium
The OCS system message query and cross-region file interaction methods built using the Spring Boot framework solve the complexity and security issues of message data management and cross-region file interaction in the OCS system, and realize efficient and secure cross-region file interaction and one-stop process.
Patent Information
- Application Number
- CN202511671584.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2025-12-16
AI Technical Summary
The existing OCS system relies on manual operation for message data management, which is complex and inefficient. Cross-regional file interaction poses security issues and lacks integrated tools.
This paper adopts an OCS system message query method based on the Spring Boot framework, combined with a visual interface, download request processing, message data collection, file download service and specified directory transfer module. It realizes cross-region file interaction through HTTPS protocol encrypted transmission, token bucket algorithm, MD5 and SHA-256 hash algorithm verification, AES-256 encrypted transmission and queue scheduling strategy.
It simplifies the message query process, improves operational efficiency, ensures the security and traceability of cross-regional file interaction, realizes a one-stop process from message query to cross-regional file interaction, and enhances the operating efficiency and data processing capabilities of the OCS system.
Smart Images

Figure CN121151385A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of interactive systems, and in particular to a method, system, device, and medium for message querying and cross-regional file interaction in an OCS system based on the Spring Boot framework. Background Technology
[0002] In power dispatch and control systems, substation message data based on the IEC 104 protocol is the foundational data for front-end acquisition and a crucial support for real-time system monitoring, stable operation, and post-fault analysis. Maintenance personnel often need to thoroughly analyze the raw message data uploaded by substations to diagnose communication anomalies and pinpoint the causes of faults, which places high demands on the speed and ease of message data retrieval.
[0003] Currently widely used open dispatch control systems (OCS), such as NARI Technology's D5000 system, rely primarily on traditional manual operations for message data management. Specifically, raw message data exists only on the front-end acquisition server in Security Zone 1. Maintenance personnel must first log into the server environment in Zone 1 via their maintenance terminal, then manually locate the corresponding plant channel's message file using complex command-line instructions or specialized debugging tools, relying on experience, and then manually export it. This process is not only cumbersome and inefficient but also heavily dependent on the personal experience of the maintenance personnel. Furthermore, power systems have stringent requirements for network security zoning protection. Physical isolation devices are installed between the production control zones (Security Zones 1 and 2) and the management information zones (Security Zones 3 and 4), preventing message files exported from Zone 1 from being directly transmitted over the network to the maintenance office computers in Zones 3 and 4 for in-depth analysis. The current common method is manual copying and transfer using mobile storage devices, which is not only extremely inefficient but also cumbersome, lacks security guarantees, and is impossible to trace or audit.
[0004] Therefore, a one-stop process method and system is proposed, covering message query, download request processing, data collection, and cross-regional file interaction, which comprehensively improves the operating efficiency and data processing capabilities of the OCS system. Summary of the Invention
[0005] In view of the aforementioned problems with existing message data management and cross-regional file interaction, this invention is proposed.
[0006] Therefore, this invention provides a method, system, device, and medium for OCS system message query and cross-zone file interaction based on the Spring Boot framework. This addresses the problems of existing maintenance personnel needing to manually log in to the security zone 1 server and use command lines to search for message files based on experience, which is a complex process highly dependent on individual skills; manual copying and transferring from mobile storage devices, which is not only extremely inefficient but also cumbersome, lacks security, and cannot be traced or audited; and the lack of integrated tools.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for OCS system message query and cross-region file interaction based on the Spring Boot framework, including: The message query request from the visualization interface module is obtained and transmitted to the download request processing module via HTTPS protocol in encrypted form. By combining the download request processing module with the token bucket algorithm, the message query request is sent to the message data acquisition module; Based on the message data acquisition module, a matching algorithm is used to locate the message and package it back to the file download service module; Based on the file download service module, the MD5 and SHA-256 dual hash algorithms are used for verification and a download link is generated and displayed to the visualization interface module. Retrieve user-uploaded files from the visualization interface module and temporarily store them at the specified directory's mapping point in the transfer module; The file_send service is scheduled through the specified directory transfer module, and a queue scheduling strategy is used to transfer user-uploaded files to the specified directory and display the results to the visualization interface module.
[0008] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, the step of combining the download request processing module with the token bucket algorithm includes: Based on the download request module, the token bucket algorithm is used to limit the same request within a unit of time. This includes: creating a token bucket for each subject that needs to be rate-limited, where the subject is the user ID and the client IP address; the token bucket generates tokens at a constant predefined rate and has a maximum token capacity. When a request is received, identify the entity that initiated the request and determine whether there are available tokens in its corresponding token bucket; If available tokens exist, the request is approved and forwarded to the next processing stage, while the corresponding number of tokens are deducted from the bucket. If no available token is found, the request is immediately rejected, and an HTTP 429 status code is returned to the requester, indicating that the request frequency is too high.
[0009] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, the step of locating and packaging messages using a matching algorithm includes: Traverse the target front-end machine's message storage directory, match messages based on their filename characteristics, and output the preset number of file paths with the highest matching degree. The matching degree is obtained by combining the input plant channel code, start time, and end time with a string similarity calculation function.
[0010] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, the file download service module employs a dual hash algorithm of MD5 and SHA-256 for verification, including: Before providing downloads, the file download service module uses MD5 and SHA-256 dual hash algorithms to verify the integrity of the file, and stores the verification results together with the message file. The downloader simultaneously obtains the verification result and compares it with the message file; if the comparison matches, the download is allowed.
[0011] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, wherein: the specified directory transfer module schedules the file_send service, including: Secure file transfer is accomplished by using the enhanced file_send service through the specified directory transfer module; The enhanced file_send service includes encrypted transmission based on the AES-256 algorithm, and the encryption key is dynamically generated by the download request processing module and distributed to both the sending and receiving ends through a secure key exchange mechanism independent of the data channel.
[0012] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, the queue scheduling strategy is a priority-based queue scheduling, including: Each file to be transferred is assigned a priority identifier, which is automatically determined by the request source. File transfer requests triggered by the fault analysis function in the visualization interface module are automatically marked as high priority. All files to be transferred are placed into different scheduling queues according to their priority identifiers, maintaining a high-priority queue and a normal-priority queue; The scheduler prioritizes sending files from the high-priority queue. When the high-priority queue is empty, the scheduler sends files from the normal-priority queue. If a new high-priority file is added to the queue while a normal-priority file is being transmitted and the high-priority queue is empty, the scheduler will immediately interrupt the transmission order of the normal queue after completing the transmission of the current single file, and instead prioritize sending the newly added high-priority file.
[0013] As a preferred embodiment of the OCS system message query and cross-region file interaction method based on the Spring Boot framework described in this invention, the message data acquisition module includes: The message data acquisition module uses an LRU-based caching mechanism to cache the metadata of frequently accessed plant channel messages in memory. It also supports incremental acquisition mode, which records the timestamp of the last retrieval to process only newly generated message data.
[0014] Secondly, this invention provides an OCS system message query and cross-region file interaction system based on the Spring Boot framework, including: The visual interface module is deployed in the fourth security zone, providing a user authentication interface and a graphical operation interface. It receives the plant channel identifier and time interval information input by the user and generates message query requests and file transfer instructions. The download request processing module is deployed in the third security zone. It receives requests from the visual interface module, authenticates the user's identity, parses and verifies the validity of the request parameters, and sends the structured request instructions to the first security zone through a secure one-way isolation device. The message data acquisition module is deployed on the front-end server cluster in the first security zone. It receives instructions from the download request processing module, automatically locates and retrieves target message files scattered on different front-end machines, and packages, compresses, and annotates the files with metadata. The file download service module is deployed in the third security zone to receive data packets transmitted back by the message data acquisition module through the isolation device, provide download links, and synchronize the download status to the visual interface module in real time. The specified directory transfer module is used to provide a shared directory mapping between the first and third security zones, completing the transfer of files between the forward and reverse isolation devices.
[0015] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of message query and cross-region file interaction methods of the OCS system based on the Spring Boot framework.
[0016] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the OCS system message query and cross-region file interaction method based on the Spring Boot framework.
[0017] Compared with existing technologies, the advantages of this invention are as follows: This invention is based on the Spring Boot framework to build a message query and cross-zone file interaction tool, and combines it with Vue3 to create a visual front-end web interface, providing users with a convenient operating platform; by querying the database, the plant channel message information can be obtained in real time, eliminating the professional knowledge and cumbersome steps required for message query; operators can simply select the plant channel message and time period on the web page of the fourth-zone office computer to download, further simplifying the operation process; multiple functional modules such as visual interface, download request processing, file download service, message data collection, and specified directory transfer are integrated into one tool, with each module having a clear division of labor and cooperating with each other, realizing a one-stop process from message query, download request processing, data collection to cross-zone file interaction, comprehensively improving the operating efficiency and data processing capabilities of the OCS system; using file_send to transfer files realizes data transmission between the first and third zone isolation zones, and provides a directory for file upload and download between the first and third zones, solving the problem of cross-zone file interaction caused by forward and reverse isolation devices, and realizing stable and standardized cross-zone file interaction. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.
[0019] Figure 1 This is a schematic diagram illustrating the overall process of a Spring Boot-based OCS system message query and cross-region file interaction method according to an embodiment of the present invention.
[0020] Figure 2 The download request processing module of the OCS system message query and cross-region file interaction method based on the Spring Boot framework, as described in one embodiment of the present invention, processes requests and applies the token bucket algorithm. Detailed Implementation
[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0022] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework is provided, including: S100: Obtain the message query request from the visualization interface module and transmit it to the download request processing module via HTTPS protocol in encrypted form; S200: The download request processing module, combined with the token bucket algorithm, sends the message query request to the message data acquisition module; S300: Based on the message data acquisition module, a matching algorithm is used to locate messages and package them to return to the file download service module; S400: Based on the file download service module, it uses MD5 and SHA-256 dual hash algorithms for verification and generates a download link to be displayed to the visual interface module; S500: Obtain user-uploaded files from the visualization interface module and temporarily store them at the mapping point of the specified directory transfer module; S600: The file_send service is scheduled through the specified directory transfer module. The queue scheduling strategy is used to transfer the user-uploaded file to the specified directory and display it back to the visual interface module.
[0023] It should be noted that in power dispatch and control systems, substation message data based on the IEC 104 protocol is the foundation for system monitoring and fault analysis. This data is distributed across front-end servers in multiple security zones, making unified querying and retrieval of messages extremely difficult. Due to network security zoning regulations, the production control zone and the management information zone are physically isolated, preventing maintenance personnel in zones three and four from directly accessing message files in zone one. Traditional manual querying and mobile data transfer methods are highly inefficient and pose security risks. Furthermore, the sheer volume, complex naming rules, and dispersed distribution of message files make accurate target message location extremely difficult. Traditional command-line operations require a high level of expertise from maintenance personnel and are prone to data loss or errors due to operational mistakes. Therefore, establishing a convenient and secure cross-zone interaction mechanism for message data is crucial.
[0024] Therefore, to address the aforementioned issues with system message querying and cross-region file transfer, steps S100-S600 are used to obtain message query requests or user-uploaded files from the visualization interface module; transmit the message query request to the download request processing module; send it to the message data acquisition module using the token bucket algorithm; send it to the file download service module using a matching algorithm; provide a download link to the visualization interface module using a dual hash algorithm of MD5 and SHA-256 to complete the system message query; and complete cross-region file interaction through the designated directory transfer module, combined with the file_send service and queue scheduling strategy.
[0025] Example 2, refer to Figures 1-2 This is an embodiment of the present invention. Based on the above embodiment, a method for OCS system message query and cross-region file interaction based on the Spring Boot framework is provided.
[0026] In this embodiment of the application, step S100, which involves obtaining the message query request from the visualization interface module and transmitting it to the download request processing module via HTTPS encryption, includes: Specifically, the visualization interface module is built on the Vue3 framework and is used to provide user authentication interface and graphical operation interface. It receives the plant channel identifier and time interval information input by the user and generates message query request or file transfer command. This module communicates with the third zone service through the HTTPS protocol, so that users can submit requests without logging into the first zone server, avoiding the complexity of traditional command line operation.
[0027] It should be noted that the visualization interface module, deployed in the fourth security zone, is built on the Vue3 framework and is used to provide user authentication interface and graphical operation interface. It receives the plant channel identifier and time interval information input by the user and generates message query requests or file transfer instructions.
[0028] In this embodiment of the application, step S200 involves sending a message query request to the message data acquisition module using a download request processing module in conjunction with a token bucket algorithm, including: Specifically, the download request processing module is deployed in the third security zone as a core Spring Boot service. It is used to authenticate user identities, parse and verify the validity of request parameters, and send the structured request instructions to the first security zone through a secure one-way isolation device. This module integrates a request frequency limiting mechanism based on the token bucket algorithm to limit requests from the same user or IP within a unit of time to prevent system overload.
[0029] Furthermore, the process of limiting requests from the same user or IP address within a unit of time based on the token bucket algorithm includes: ① Create a token bucket for each subject that needs rate limiting. The subject can be a user ID or a client IP address. The token bucket generates tokens at a constant predefined rate and has a maximum token capacity. ② When a request is received, identify the entity that initiated the request and determine whether there are available tokens in its corresponding token bucket; ③ If available tokens exist, the request is approved and forwarded to the next processing stage, while the corresponding number of tokens is deducted from the bucket; ④ If no available token is found, the request is immediately rejected, and an HTTP 429 status code is returned to the requester, indicating that the request frequency is too high.
[0030] For example, such as Figure 2 The diagram shows the logical flowchart of the download request processing module in processing requests and applying the token bucket algorithm.
[0031] In an alternative implementation, instead of using the token bucket algorithm to limit requests in step S200, a leaky bucket algorithm can be used: requests are processed at a fixed rate, much like water leaking from the bottom of a leaky bucket at a constant rate. Regardless of how sudden the request flow, the system processes requests at a constant rate, thus smoothing the flow.
[0032] In another optional implementation, the token bucket algorithm used to limit requests in step S200 can also be replaced by a sliding window log algorithm, which records the arrival time of each request. When a new request arrives, the system checks whether the number of requests already existing within the most recent time window has exceeded the limit. This provides more precise control over the number of requests per unit time and avoids the suddenness of token bucket events.
[0033] In this embodiment of the application, step S300, based on the message data acquisition module, uses a matching algorithm to locate the message and packages it for return to the file download service module, including: Specifically, the message data acquisition module is deployed in the front-end server cluster of the first security zone. It is used to receive instructions from the third zone, locate the target file according to the message file matching algorithm, and package, compress and annotate the file with metadata.
[0034] The message data acquisition module adopts a caching mechanism based on the LRU algorithm to cache the metadata of frequently accessed plant channel messages in memory, accelerating the subsequent retrieval process. It also supports incremental acquisition mode, which records the timestamp of the last retrieval and only processes newly generated message data, reducing the amount of data transmission.
[0035] Furthermore, the message file matching algorithm includes: Enter the plant access code Start time End time ; Traverse the target front-end machine's message storage directory and match based on filename characteristics. The formula for calculating the matching degree M is: in, This is a function for calculating string similarity. and The time string formatted according to the system naming rules; Output returns the matching degree The highest front File path.
[0036] In an optional implementation, the message matching algorithm in step S300 can also perform retrieval based on a pre-built index database. For example, a background service can be deployed to automatically extract the metadata of a new message file and write it into an index database when a query command is received, thus enabling a fast query based on a single construction.
[0037] In another alternative implementation, the message matching algorithm in step S300 can also incorporate intelligent prediction, for example, by using historical file query logs and files ultimately downloaded by the user as training data to train a classification or ranking model, which can then quickly filter new queries when they arrive.
[0038] In this embodiment of the application, step S400, based on the file download service module, uses a dual hash algorithm of MD5 and SHA-256 to verify the file and generates a download link to be displayed to the visualization interface module, including: Specifically, the file download service module is deployed in the third security zone. It receives data packets transmitted by the message data acquisition module through the isolation device, provides download links based on the RESTful (Representational State Transfer) API, and synchronizes the download status to the visualization interface module in real time.
[0039] Before providing downloads, the file download service module uses a dual hash algorithm of MD5 and SHA-256 to verify the integrity of the file. The verification formula is as follows: and the verification result The checksum is stored along with the file for verification by the downloading client. The downloading client retrieves the checksum along with the file. After a user requests a download, the client will continuously send requests to the server. Once the server has processed the files, it will return a list of files requested for download to the client, allowing the user to choose which files to download.
[0040] In this embodiment of the application, step S500, which involves obtaining the user-uploaded file from the visualization interface module and temporarily storing it at the mapping point of the specified directory transfer module, includes: Specifically, the specified directory transfer module creates a "file exchange zone" by establishing shared directory mappings in the first and third zones. When files need to be transferred across zones, an enhanced file_send service tool is used. This service acts as a security-enhanced transfer proxy, responsible for monitoring changes to these shared directories and completing the secure file transfer.
[0041] Furthermore, to ensure the confidentiality and integrity of data during transmission, the enhanced file_send service uses encrypted transmission based on the AES-256 algorithm. The encryption key is dynamically generated by the download request processing module and distributed through an independent secure channel.
[0042] It should be noted that the file is automatically encrypted at the sending end before being transferred, and automatically decrypted and stored in the target directory at the receiving end. The entire process requires no manual intervention, which strictly follows the security regulations of "data cannot be directly connected and the transfer must be controlled". Through high-strength encryption and dynamic key management, the security of the file in the high-risk process of cross-regional transfer is ensured, thus realizing the automation and intelligence of file transfer under the premise of compliance.
[0043] In an optional implementation, the dynamically generated key in step S500 can be further determined as a temporary session key. The key is generated when the file transfer task starts and is automatically and immediately destroyed by the system after the file successfully arrives at the target directory and is verified, which can effectively reduce the risk of key leakage.
[0044] In another optional implementation, the distribution via an independent secure channel in step S500 can be further implemented using a digital envelope. For example, the temporary session key can be encrypted using the recipient's (zone 1 service) asymmetric public key to form a "digital envelope," which is then transferred through an isolation device. The recipient can obtain the session key by decrypting it using their own private key.
[0045] In this embodiment of the application, step S600 schedules the file_send service through the specified directory transfer module, uses a queue scheduling strategy to transfer the user-uploaded file to the specified directory, and displays it back to the visualization interface module, including the following steps A1-A4: Specifically, the specified directory transfer module adopts a priority-based queue scheduling strategy: A1: The system assigns a priority identifier to each file to be transferred. This identifier is automatically determined by the request source. File transfer requests triggered by the fault analysis function in the visualization interface module are automatically marked as high priority. A2: All files to be transferred are placed into different scheduling queues according to their priority identifiers. The system maintains a high-priority queue and a normal-priority queue. A3: The scheduler prioritizes sending files in the high-priority queue. When the high-priority queue is empty, the scheduler sends files in the normal-priority queue. A4: If a new high-priority file is added to the queue while a normal-priority file is being transmitted and the high-priority queue is empty, the scheduler will immediately interrupt the transmission order of the normal queue after completing the transmission of the current single file, and instead prioritize sending the newly added high-priority file.
[0046] It should be noted that this queue scheduling strategy can avoid the inefficiency and security risks of traditional mobile storage device transfer methods, and achieve secure and controllable automated file transfer.
[0047] In summary, this invention acquires message query requests or user-uploaded files from the visualization interface module; transmits the message query requests to the download request processing module; sends them to the message data acquisition module using the token bucket algorithm; sends them to the file download service module using a matching algorithm; provides a download link to the visualization interface module using a dual hash algorithm of MD5 and SHA-256 to complete the system message query; and completes cross-region file interaction through the designated directory transfer module, combined with the file_send service and queue scheduling strategy. This integrates multiple functional modules—visual interface, download request processing, file download service, message data acquisition, and designated directory transfer—into a single tool. Each module has a clear division of labor yet collaborates effectively, achieving a one-stop process from message query, download request processing, data acquisition to cross-region file interaction, comprehensively improving the OCS system's operating efficiency and data processing capabilities.
[0048] Example 3 illustrates a schematic scheme for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework. It should be noted that the technical solution of this system for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework is based on the same concept as the technical solution of the aforementioned method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework. Details not described in detail in this embodiment can be found in the description of the technical solution for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework described above.
[0049] This embodiment also provides an OCS system message query and cross-region file interaction system based on the Spring Boot framework, including: The visual interface module is deployed in the fourth security zone, providing a user authentication interface and a graphical operation interface. It receives the plant channel identifier and time interval information input by the user and generates message query requests and file transfer instructions. The download request processing module is deployed in the third security zone. It receives requests from the visual interface module, authenticates the user's identity, parses and verifies the validity of the request parameters, and sends the structured request instructions to the first security zone through a secure one-way isolation device. The message data acquisition module is deployed on the front-end server cluster in the first security zone. It receives instructions from the download request processing module, automatically locates and retrieves target message files scattered on different front-end machines, and packages, compresses, and annotates the files with metadata. The file download service module is deployed in the third security zone to receive data packets transmitted back by the message data acquisition module through the isolation device, provide download links, and synchronize the download status to the visual interface module in real time. The specified directory transfer module is used to provide a shared directory mapping between the first and third security zones, completing the transfer of files between the forward and reverse isolation devices.
[0050] This embodiment also provides an electronic device suitable for OCS system message query and cross-region file interaction based on the Spring Boot framework, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for implementing OCS system message query and cross-region file interaction based on the Spring Boot framework as proposed in the above embodiment.
[0051] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the method for OCS system message query and cross-region file interaction based on the Spring Boot framework as proposed in the above embodiment.
[0052] The storage medium proposed in this embodiment and the method for implementing OCS system message query and cross-region file interaction based on the Spring Boot framework proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0053] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0054] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework, characterized in that, include: The message query request from the visualization interface module is obtained and transmitted to the download request processing module via HTTPS protocol in encrypted form. By combining the download request processing module with the token bucket algorithm, the message query request is sent to the message data acquisition module; Based on the message data acquisition module, a matching algorithm is used to locate the message and package it back to the file download service module; Based on the file download service module, the MD5 and SHA-256 dual hash algorithms are used for verification and a download link is generated and displayed to the visualization interface module. Retrieve user-uploaded files from the visualization interface module and temporarily store them at the specified directory's mapping point in the transfer module; The file_send service is scheduled through the specified directory transfer module, and a queue scheduling strategy is used to transfer user-uploaded files to the specified directory and display the results to the visualization interface module.
2. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 1, characterized in that, The method of combining the download request processing module with the token bucket algorithm includes: Based on the download request module, the token bucket algorithm is used to limit the same request within a unit of time. This includes: creating a token bucket for each subject that needs to be rate-limited, where the subject is the user ID and the client IP address; the token bucket generates tokens at a constant predefined rate and has a maximum token capacity. When a request is received, identify the entity that initiated the request and determine whether there are available tokens in its corresponding token bucket; If available tokens exist, the request is approved and forwarded to the next processing stage, while the corresponding number of tokens are deducted from the bucket. If no available token is found, the request is immediately rejected, and an HTTP 429 status code is returned to the requester, indicating that the request frequency is too high.
3. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 2, characterized in that, The process of locating and packaging messages using a matching algorithm includes: Traverse the target front-end machine's message storage directory, match messages based on their filename characteristics, and output the preset number of file paths with the highest matching degree. The matching degree is obtained by combining the input plant channel code, start time, and end time with a string similarity calculation function.
4. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 3, characterized in that, The file download service module uses a dual hash algorithm of MD5 and SHA-256 for verification, including: Before providing downloads, the file download service module uses MD5 and SHA-256 dual hash algorithms to verify the integrity of the file, and stores the verification results together with the message file. The downloader simultaneously obtains the verification result and compares it with the message file; if the comparison matches, the download is allowed.
5. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 4, characterized in that, The specified directory transfer module schedules the file_send service, including: Secure file transfer is accomplished by using the enhanced file_send service through the specified directory transfer module; The enhanced file_send service includes encrypted transmission based on the AES-256 algorithm, and the encryption key is dynamically generated by the download request processing module and distributed to both the sending and receiving ends through a secure key exchange mechanism independent of the data channel.
6. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 5, characterized in that, The queue scheduling strategy is a priority-based queue scheduling strategy, including: Each file to be transferred is assigned a priority identifier, which is automatically determined by the request source. File transfer requests triggered by the fault analysis function in the visualization interface module are automatically marked as high priority. All files to be transferred are placed into different scheduling queues according to their priority identifiers, maintaining a high-priority queue and a normal-priority queue; The scheduler prioritizes sending files from the high-priority queue. When the high-priority queue is empty, the scheduler sends files from the normal-priority queue. If a new high-priority file is added to the queue while a normal-priority file is being transmitted and the high-priority queue is empty, the scheduler will immediately interrupt the transmission order of the normal queue after completing the transmission of the current single file, and instead prioritize sending the newly added high-priority file.
7. The method for message querying and cross-region file interaction in an OCS system based on the Spring Boot framework as described in claim 6, characterized in that, The message data acquisition module includes: The message data acquisition module uses an LRU-based caching mechanism to cache the metadata of frequently accessed plant channel messages in memory. It also supports incremental acquisition mode, which records the timestamp of the last retrieval to process only newly generated message data.
8. A message query and cross-region file interaction system for an OCS system based on the Spring Boot framework, using the method described in any one of claims 1-7, characterized in that, include: The visual interface module is deployed in the fourth security zone, providing a user authentication interface and a graphical operation interface. It receives the plant channel identifier and time interval information input by the user and generates message query requests and file transfer instructions. The download request processing module is deployed in the third security zone. It receives requests from the visual interface module, authenticates the user's identity, parses and verifies the validity of the request parameters, and sends the structured request instructions to the first security zone through a secure one-way isolation device. The message data acquisition module is deployed on the front-end server cluster in the first security zone. It receives instructions from the download request processing module, automatically locates and retrieves target message files scattered on different front-end machines, and packages, compresses, and annotates the files with metadata. The file download service module is deployed in the third security zone to receive data packets transmitted back by the message data acquisition module through the isolation device, provide download links, and synchronize the download status to the visual interface module in real time. The specified directory transfer module is used to provide a shared directory mapping between the first and third security zones, completing the transfer of files between the forward and reverse isolation devices.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the OCS system message query and cross-region file interaction method based on the Spring Boot framework as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It includes the steps of storing computer-executable instructions, which, when executed by a processor, implement the OCS system message query and cross-region file interaction method based on the Spring Boot framework as described in any one of claims 1 to 7.