Water curtain equipment distributed real-time computing method and device, equipment and storage medium

By employing distributed computing methods and load balancing mechanisms, the problems of real-time data entry for water curtain equipment and resource constraints and process lock-ups in multi-hydraulic test processes were solved, achieving system stability and real-time data performance, and ensuring the continuity and efficiency of the test process.

CN121193749BActive Publication Date: 2026-02-27POWERCHINA ZHONGNAN ENG
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511749456.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-27
Estimated Expiration
2045-11-26

AI Technical Summary

Technical Problem

Existing technologies are prone to system resource shortages, performance degradation, or process lock-up when processing large amounts of real-time data from water curtain equipment and multiple hydraulic test processes due to excessive tasks, making it difficult to guarantee the real-time nature and continuity of data.

Method used

A distributed computing approach is adopted, adding multiple servers to the server list, initializing the current weight and total weight, scheduling the transmission control protocol connection task and the hydraulic test task through a load balancing mechanism, decomposing them into multiple sub-tasks, and releasing resources when the task is completed, and updating the server weight to ensure the reasonable allocation of system resources and the coherent execution of tasks.

Benefits of technology

This effectively avoids system resource shortages and process lock-ups, ensures data real-time performance and continuity, and improves resource utilization efficiency and experimental process stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121193749B_ABST
    Figure CN121193749B_ABST
Patent Text Reader

Abstract

The application discloses a water curtain equipment distributed real-time calculation method and device, equipment and storage medium, relates to the technical field of distributed computing and load balancing, and the method comprises the steps of adding a plurality of servers to a server list and initializing a current weight; creating a transmission control protocol connection task according to the number of enabled water curtain holes, and executing the task through a load balancing scheduling server; recording the water curtain hole name, the corresponding task and the execution server to a first hash table and a second hash table respectively; decomposing a hydraulics test task into a plurality of subtasks, and scheduling the server to execute in combination with the two hash tables; releasing the server resources, restoring the weight, and determining whether to start a subsequent task according to the execution result after the task is completed, so that when a large amount of water curtain equipment data is processed in real time, the interface is refreshed, and a plurality of hydraulics test processes, the system resource is avoided to be nervous, the performance is reduced or the process is locked due to too many tasks, and the real-time performance and continuity of the data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed computing and load balancing, and particularly relates to a water curtain device distributed real-time computing method, device, equipment and storage medium. BACKGROUND

[0002] In an underground water-sealed oil cavern project, in order to ensure the water sealing effect, the water curtain system needs to be monitored and hydraulically tested for a long time. The water curtain system is composed of multiple water curtain holes, each of which is equipped with sensors such as pressure gauges and flow meters and PLC controllers, and data is uploaded to the upper computer software through the Modbus-TCP protocol (Modbus communication protocol based on TCP / IP). The upper computer needs to complete a large amount of water curtain device data collection, unit conversion, storage and interface refresh in real time, and also needs to support users to concurrently open multiple hydraulics tests, and automatically perform data recording, valve control, interruption recovery and other operations in each stage of the test. These tasks put high requirements on the real-time performance, stability and concurrent processing capacity of the system.

[0003] At present, for such a multi-task concurrent processing scene, the conventional method is to use multi-threading technology to allocate independent threads for each TCP connection or test task in a single upper computer process for processing. Through multi-threading, parallel execution of data reading, instruction issuing and test process control is realized to improve system response speed and resource utilization.

[0004] However, when the number of water curtain holes is large and multiple hydraulics tests are running at the same time, the number of threads increases sharply, which easily exceeds the system carrying capacity. Too many threads not only occupy a large amount of memory and CPU resources, but also may cause thread scheduling overhead to increase dramatically, context switching to occur frequently, and other problems, resulting in system lag, response delay, and even process lock in severe cases, affecting the real-time performance of data collection and the continuity of the test process. In addition, the traditional multi-threading scheme lacks a dynamic scheduling of computing resources and a balanced allocation mechanism for task load, and is difficult to adapt to high-concurrency and long-time running industrial control scenes. Therefore, how to avoid system resource shortage, performance degradation or process lock due to too many tasks when processing a large amount of water curtain device data real-time storage, interface refresh and multiple hydraulics test processes, while ensuring the real-time performance and continuity of the data, has become a problem to be solved. SUMMARY

[0005] The present application aims to provide a water curtain device distributed real-time computing method, device, equipment and storage medium, which aims to solve the technical problem of how to avoid system resource shortage, performance degradation or process lock due to too many tasks when processing a large amount of water curtain device data real-time storage, interface refresh and multiple hydraulics test processes, while ensuring the real-time performance and continuity of the data.

[0006] To achieve the above object, the application provides a water curtain equipment distributed real-time calculation method, which comprises the following steps:

[0007] adding a plurality of servers to a server list and initializing current weights of the servers in the server list, determining a total weight of the servers and a number of the servers;

[0008] based on the number of the servers, starting a transmission control protocol connection task corresponding to an enabled water curtain hole and scheduling the servers to execute the transmission control protocol connection task through a load balancing mechanism;

[0009] recording a water curtain hole name and the transmission control protocol connection task to a first hash table and recording the water curtain hole name and the servers executing the transmission control protocol connection task to a second hash table;

[0010] decomposing a hydraulics test task into a plurality of subtasks and scheduling the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism;

[0011] when the transmission control protocol connection task or the subtask is executed, releasing corresponding server resources and updating the current weights of the corresponding servers, and controlling the start of a subsequent task according to a task execution result fed back by each of the servers.

[0012] In an embodiment, the step of decomposing the hydraulics test task into a plurality of subtasks and scheduling the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism comprises the following steps:

[0013] decomposing the hydraulics test task into a plurality of subtasks and determining execution requirements of the subtasks;

[0014] extracting transmission control protocol connection task information corresponding to each water curtain hole from the first hash table and extracting execution server information corresponding to the transmission control protocol connection task information from the second hash table;

[0015] based on the execution requirements, the transmission control protocol connection task information and the execution server information, matching an execution server for each of the subtasks through a load balancing mechanism;

[0016] downloading each of the subtasks to the execution server in a test execution order, so that the execution server executes the subtask based on the transmission control protocol connection task information.

[0017] In an embodiment, the execution requirement comprises an execution duration requirement, a data collection frequency, a valve control rule, and a pressure monitoring requirement, and the sub-tasks comprise a still water observation sub-task, a water injection stage sub-task, a back-off stage sub-task, a full-closing stage sub-task, an odd-opening and even-closing stage sub-task, and an odd-closing and even-opening stage sub-task.

[0018] The step of decomposing the hydraulics test task into a plurality of sub-tasks and determining execution requirements of the sub-tasks comprises:

[0019] receiving a hydraulics test opening instruction sent by the upper computer and analyzing the hydraulics test opening instruction to obtain a hydraulics test type;

[0020] when the hydraulics test type is a single-hole water injection and back-off test, decomposing the single-hole water injection and back-off test into a still water observation sub-task, a water injection stage sub-task, and a back-off stage sub-task, and determining an execution duration requirement and a data collection frequency of each sub-task;

[0021] when the hydraulics test type is a water curtain effectiveness test, decomposing the water curtain effectiveness test into a full-closing stage sub-task, an odd-opening and even-closing stage sub-task, and an odd-closing and even-opening stage sub-task, and determining a valve control rule and a pressure monitoring requirement of each sub-task.

[0022] In an embodiment, the step of releasing corresponding server resources and updating a current weight of the corresponding server when the transmission control protocol connection task or the sub-task is executed, and controlling a start of a subsequent task according to a task execution result fed back by each server comprises:

[0023] receiving a task execution completion signal sent by each server when the transmission control protocol connection task or the sub-task is executed;

[0024] determining a target server for executing the transmission control protocol connection task or the sub-task according to the task execution completion signal, and releasing related hardware resources in the target server, the hardware resources comprising processor occupation resources, memory occupation resources, and network connection resources;

[0025] finding the target server from the server list, and incrementing a current weight of the target server;

[0026] receiving a task execution result fed back by each server, the task execution result comprising an execution success result and an execution failure result, and the execution failure result being accompanied by a failure cause;

[0027] if the task execution result is an execution success and a currently executed task is not the last task in a series of tasks, starting a next task of the series of tasks.

[0028] if the task execution result is execution success and the current executed task is the last task in the series task, then terminate the series task;

[0029] if the task execution result is execution failure, then directly terminate the corresponding series task and feedback failure information.

[0030] In an embodiment, the step of starting the transmission control protocol connection task corresponding to the enabled water curtain hole based on the number of servers and scheduling the servers to execute the transmission control protocol connection task through a load balancing mechanism comprises:

[0031] obtaining the total number of currently enabled water curtain holes, denoted as the target water curtain hole number;

[0032] for each enabled water curtain hole, creating a corresponding transmission control protocol connection task, the transmission control protocol connection task including creating a transmission control protocol connection with the programmable logic controller to which the water curtain hole belongs, reading the register data corresponding to the sensor data in the programmable logic controller, and writing a device control command to the programmable logic controller;

[0033] initializing the water curtain hole index and the server index according to a preset starting value;

[0034] when the water curtain hole index is greater than the target water curtain hole number, ending the scheduling of all the transmission control protocol connection tasks;

[0035] when the water curtain hole index is less than or equal to the target water curtain hole number, scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list.

[0036] In an embodiment, the step of scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list when the water curtain hole index is less than or equal to the target water curtain hole number comprises:

[0037] when the water curtain hole index is less than or equal to the target water curtain hole number, determining whether the server index exceeds the number of servers;

[0038] when the server index is greater than the number of servers, resetting the server index to the preset starting value and calling a corresponding target server from the server list according to the server index;

[0039] when the server index is less than or equal to the server number, calling a corresponding target server from the server list according to the server index;

[0040] when the current weight of the target server is less than or equal to a preset weight value or the resource occupancy rate is greater than or equal to a preset occupancy threshold, incrementing the server index, and returning to the step of judging whether the server index exceeds the server number when the water curtain hole index is less than or equal to the target water curtain hole number;

[0041] when the current weight of the target server is greater than the preset weight value, issuing a transmission control protocol connection task corresponding to the water curtain hole index to the target server, and decrementing the current weight of the target server, incrementing the water curtain hole index and the server index, until all transmission control protocol connection tasks corresponding to the water curtain holes enabled are completed.

[0042] In an embodiment, the step of adding a plurality of servers to a server list, initializing the current weight of the servers in the server list, and determining the total weight of the servers and the number of servers comprises:

[0043] scanning available servers in a preset network range, obtaining hardware parameters of each of the available servers, the hardware parameters including the number of processor cores, the size of memory, and network transmission rate;

[0044] allocating an initial weight to each of the available servers according to the hardware parameters;

[0045] creating a blank server list, and adding all the available servers with allocated initial weights to the server list one by one;

[0046] initializing the current weight of each server in the server list as the corresponding initial weight;

[0047] counting the total number of the servers to obtain the number of servers;

[0048] summing up the current weights of all the servers to obtain the total weight of the servers.

[0049] In addition, to achieve the above-mentioned purposes, the present application also provides a water curtain equipment distributed real-time computing device, which comprises:

[0050] an initialization module for adding a plurality of servers to a server list, initializing the current weight of the servers in the server list, and determining the total weight of the servers and the number of servers;

[0051] The task scheduling module is configured to start a transmission control protocol connection task corresponding to the enabled water curtain hole based on the number of servers, and schedule the servers to execute the transmission control protocol connection task through a load balancing mechanism.

[0052] The hash table recording module is configured to record the water curtain hole name and the transmission control protocol connection task in a first hash table, and record the water curtain hole name and the server executing the transmission control protocol connection task in a second hash table.

[0053] The test task processing module is configured to decompose a hydraulic test task into a plurality of subtasks, and schedule the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism.

[0054] The resource and task control module is configured to release corresponding server resources and update the current weight of the corresponding server when the transmission control protocol connection task or the subtask is executed, and control the start of subsequent tasks according to the task execution result fed back by each server.

[0055] In addition, to achieve the above-mentioned purpose, the present application also provides a water curtain equipment distributed real-time computing device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the water curtain equipment distributed real-time computing method as described above.

[0056] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the water curtain equipment distributed real-time computing method as described above.

[0057] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the water curtain equipment distributed real-time computing method as described above.

[0058] The one or more technical solutions provided by the present application have at least the following technical effects:

[0059] Firstly, multiple servers are added to the server list, and the current weight is initialized, while the total weight of the server and the number of servers are determined, providing a resource evaluation basis for subsequent task scheduling, which helps to allocate tasks according to the ability and improve resource utilization efficiency; then, based on the number of enabled water curtain holes, the corresponding transmission control protocol connection task is started, and through the load balancing mechanism, these tasks are dynamically scheduled to the servers with effective weight and non-exceeding load to avoid single machine overload; subsequently, the water curtain hole name is recorded in the first hash table and the second hash table respectively corresponding to the transmission control protocol connection task and the server executing the task, which facilitates subsequent rapid positioning of communication tasks and execution nodes, and improves the efficiency of control instruction issuance and state query; again, the hydraulics test task is decomposed into multiple ordered sub-tasks according to the test logic, and the aforementioned hash table and load balancing mechanism are used to schedule servers to execute these sub-tasks, so that the complex test process can be distributed and promoted; finally, when the transmission control protocol connection task or sub-task is executed, the processor, memory and network resources of the corresponding server are released, the current weight is incremented to restore the scheduling ability, and according to the task execution result, it is decided whether to start the next sub-task or terminate the entire test process, to ensure the continuity and fault tolerance of the test. The application can avoid system resource shortage, performance degradation or process lock due to too many tasks when processing a large amount of water curtain equipment data real-time warehousing, interface refreshing and multiple hydraulics test processes, while ensuring the real-time and continuity of data. BRIEF DESCRIPTION OF DRAWINGS

[0060] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0062] Figure 1 The flowchart provided for the first embodiment of the water curtain equipment distributed real-time computing method of the present application;

[0063] Figure 2 The flowchart provided for the second embodiment of the water curtain equipment distributed real-time computing method of the present application;

[0064] Figure 3 The brief flowchart of the water curtain equipment distributed real-time computing method provided for the second embodiment of the present application;

[0065] Figure 4 The module structure diagram of the water curtain equipment distributed real-time computing device of the embodiment of the present application;

[0066] Figure 5 The device structure diagram of the hardware running environment involved in the water curtain equipment distributed real-time computing method in the embodiment of the present application.

[0067] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0068] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0069] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments.

[0070] It should be noted that the execution subject of the embodiment of the present application can be a computing service device with data processing, network communication and program running functions, such as tablet computers, personal computers, mobile phones, etc., or an electronic device capable of realizing the above functions, a real-time distributed computing processing system (referred to as distributed computing system) of underground water sealed cave storage water curtain system, etc. The following will take the distributed computing system as an example to describe the embodiment and the following embodiments.

[0071] Based on this, the embodiment of the present application provides a water curtain equipment distributed real-time computing method, referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the water curtain equipment distributed real-time computing method of the present application.

[0072] In the embodiment, the water curtain equipment distributed real-time computing method comprises steps S10-S50:

[0073] Step S10, add multiple servers to a server list, and initialize the current weight of the servers in the server list, determine the total weight of the servers and the number of servers.

[0074] It should be noted that the server list refers to a set of all computing nodes (i.e. servers) participating in distributed task scheduling, which stores the identification and scheduling-related parameters of each server in a data structure (such as an array or linked list) as the basis for task allocation by the load balancing algorithm. The current weight refers to the dynamic value assigned to each server in the list for task allocation in the current scheduling period, which reflects the server's current ability or priority to undertake tasks, which is usually set to a preset weight value initially and dynamically decreases or recovers during task allocation. The total weight of the server is the sum of the preset weight values of all servers in the server list, which is used to calculate the probability or proportion of task allocation in the load balancing strategy, and is a key parameter for determining the overall task scheduling size and resource allocation benchmark.

[0075] As an example, the step of adding multiple servers to the server list and initializing the current weight of the servers in the server list, determining the total weight of the servers and the number of servers includes: scanning available servers in a preset network range, obtaining hardware parameters of each available server, the hardware parameters including the number of processor cores, memory size and network transmission rate; assigning an initial weight to each available server according to the hardware parameters; creating a blank server list and adding all available servers with assigned initial weights to the server list one by one; initializing the current weight of each server in the server list to the corresponding initial weight; counting the total number of servers to obtain the number of servers; and summing all the current weights of the servers to obtain the total weight of the servers.

[0076] The preset network range refers to a local area network IP address segment or subnet range (e.g. 192.168.1.0 / 24) predefined in the system deployment environment for automatic discovery of computing nodes. The system will actively probe server nodes that can participate in distributed task scheduling within this range through network scanning mechanism. The available server refers to a computing node (i.e. a physical or virtual server with processor, memory and network interface) within the preset network range that is discovered and confirmed by scanning to have normal communication capability, meet the minimum hardware configuration requirements, and be currently online and can be included in the task scheduling system. The initial weight refers to a benchmark value reflecting the computing and communication capability of the available server assigned after comprehensive evaluation of the hardware parameters of the available server. The stronger the hardware performance of the server, the higher the initial weight assigned to it. This value is used as the basis for task allocation priority and resource proportion in subsequent load balancing scheduling.

[0077] Step S20, based on the number of servers, starting the transmission control protocol connection task corresponding to the enabled water curtain hole, and scheduling the server to execute the transmission control protocol connection task through the load balancing mechanism.

[0078] It should be noted that the Transmission Control Protocol connection task (TCP task) refers to a Transmission Control Protocol (TCP) based communication task initiated and maintained by the upper computer for each enabled water curtain hole, which is used to establish a stable network connection with the PLC device corresponding to the water curtain hole, complete the periodic reading of sensor data (such as pressure, flow), the issuance of control instructions (such as valve switching), and the necessary state interaction during the test process. Each water curtain hole corresponds to an independent TCP task, which is the basic execution unit for realizing real-time data acquisition and device control.

[0079] As an example, the step of starting a Transmission Control Protocol connection task corresponding to the enabled water curtain hole based on the number of servers and scheduling the servers to execute the Transmission Control Protocol connection task through a load balancing mechanism includes: obtaining the total number of currently enabled water curtain holes, denoted as the target water curtain hole quantity; for each enabled water curtain hole, creating a corresponding Transmission Control Protocol connection task, which includes creating a Transmission Control Protocol connection with the Programmable Logic Controller to which the water curtain hole belongs, reading the register data corresponding to the sensor data in the Programmable Logic Controller, and writing device control commands to the Programmable Logic Controller; initializing the water curtain hole index and the server index according to a preset starting value; when the water curtain hole index is greater than the target water curtain hole quantity, ending the scheduling of all Transmission Control Protocol connection tasks; when the water curtain hole index is less than or equal to the target water curtain hole quantity, scheduling the servers to execute the Transmission Control Protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list.

[0080] The target water curtain hole quantity refers to the total number of water curtain holes in the current system that are in an enabled state, need to establish a communication connection, and participate in data acquisition and control. This value determines the total number of transmission control protocol connection tasks that need to be created. The device control command refers to the instruction sent by the upper computer to the programmable logic controller (PLC) to which the water curtain hole belongs through TCP, which is used to control the action of the field device, including but not limited to opening or closing the valve, starting or stopping water injection, switching test phase, etc. The preset starting value refers to the reference value used to initialize the index variable in the task scheduling loop, which is usually set to 1, indicating that the first water curtain hole or the first server is started for traversal and distribution. The water curtain hole index refers to the count variable used to identify the serial number of the water curtain hole currently being processed in the scheduling process, which starts from the preset starting value and increments until it reaches the target water curtain hole quantity, which is used to traverse all water curtain holes that need to be processed one by one. The server index refers to the count variable used to identify the position of the current candidate execution server in the server list in the load balancing scheduling process, which is dynamically updated according to the scheduling strategy (such as weighted round robin), which is used to determine which server the next TCP task should be assigned to execute.

[0081] As an example, when the water curtain hole index is less than or equal to the target water curtain hole quantity, the step of scheduling the server to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the server quantity, the preset starting value, and the server list includes: when the water curtain hole index is less than or equal to the target water curtain hole quantity, determining whether the server index exceeds the server quantity; when the server index is greater than the server quantity, resetting the server index to the preset starting value, and retrieving the corresponding target server from the server list according to the server index; when the server index is less than or equal to the server quantity, retrieving the corresponding target server from the server list according to the server index; when the current weight of the target server is less than or equal to the preset weight value or the resource occupancy rate is greater than or equal to the preset occupancy threshold, incrementing the server index, and returning to the step of determining whether the server index exceeds the server quantity when the water curtain hole index is less than or equal to the target water curtain hole quantity; when the current weight of the target server is greater than the preset weight value, assigning the transmission control protocol connection task corresponding to the water curtain hole index to the target server, and decrementing the current weight of the target server, incrementing the water curtain hole index and the server index, until all enabled water curtain holes corresponding to the transmission control protocol connection task are completed.

[0082] The target server refers to a specific server node selected from the server list according to the server index in the current scheduling round, which is intended to execute the task of a certain water curtain hole corresponding transmission control protocol connection. The preset weight value refers to the weight lower limit threshold set by the system to judge whether the server has the task undertaking capacity, which is usually set to 0. When the current weight of the server is less than or equal to this value, it is considered that there is no available scheduling resource at the moment, and new tasks cannot be allocated. The resource occupancy rate refers to the percentage of the currently used computing resources (such as CPU usage, memory occupancy or comprehensive load index) of the target server in its total resource capacity, which is used to dynamically evaluate the real-time load state of the server. The preset occupancy threshold refers to the upper limit of the resource occupancy rate set by the system in advance, which is usually set to 80%. Once the resource occupancy rate of the target server is greater than or equal to this threshold, it is considered that the load is too high, and new transmission control protocol connection tasks should not be allocated. Increment refers to the operation of increasing the value of an index variable by 1 based on the original value, which is used to sequentially advance the traversal process of the water curtain hole or the server. Decrement refers to the operation of reducing the current weight value of the target server by 1 based on the original value, which is used to temporarily reduce the scheduling priority of the server after allocating a task, reflecting the state that its resources have been occupied.

[0083] In step S30, the water curtain hole name and the transmission control protocol connection task are recorded in the first hash table, and the water curtain hole name and the server executing the transmission control protocol connection task are recorded in the second hash table.

[0084] It should be noted that the water curtain hole name refers to a string or number used to uniquely identify a water curtain hole, which is usually determined by engineering naming rules (for example: SMK-01, SMK-02, etc.), and is used as the primary key in the system to associate the corresponding equipment, data and task of the water curtain hole. The first hash table refers to a data structure for storing the mapping relationship between the water curtain hole name and its corresponding transmission control protocol connection task, through which the exclusive TCP connection task instance of the water curtain hole can be quickly found according to the water curtain hole name. The second hash table refers to a data structure for storing the mapping relationship between the water curtain hole name and the target server executing the transmission control protocol connection task corresponding to the water curtain hole, through which the server currently responsible for executing the communication task of a certain water curtain hole can be quickly located.

[0085] It can be understood that after completing the scheduling of the transmission control protocol connection task, the system binds the water curtain hole name and its corresponding transmission control protocol connection task, and stores them in the first hash table, so that the exclusive transmission control protocol connection task of the water curtain hole can be quickly located through the water curtain hole name in the future. At the same time, the system also binds the water curtain hole name with the target server actually executing the transmission control protocol connection task, and stores it in the second hash table, so that when control operation or state query is needed for a specific water curtain hole, the server responsible for the task can be quickly determined.

[0086] Step S40, the hydraulics test task is divided into multiple sub-tasks, and the server is scheduled to execute the sub-tasks based on the first hash table and the second hash table through the load balancing mechanism.

[0087] It should be noted that the hydraulics test task refers to a complete test process started in the host computer software for verifying the water sealing effect of the underground water sealed cavern, and each type of test needs to perform data collection, equipment control and state judgment according to the predetermined stage sequence. The sub-task refers to a number of independent execution units with clear start and end conditions and operation contents divided from a complete hydraulics test task according to its test stage logic. Each sub-task needs to feed back the result after execution to determine whether to enter the next stage.

[0088] Step S50, when the transmission control protocol connection task or the sub-task is executed, the corresponding server resource is released and the current weight of the corresponding server is updated, and the start of the subsequent task is controlled according to the task execution result fed back by each server.

[0089] It should be noted that the task execution result refers to the information returned by the server to the scheduling system after completing a transmission control protocol connection task or a hydraulics test sub-task, which is used to represent the execution state of the task, including whether the task is successfully completed, whether communication exception occurs, whether data collection is effective, whether equipment control is responsive, and other specific feedback contents. The result will be used as the basis for determining whether to start the subsequent sub-task or to perform abnormal processing.

[0090] As an example, the step of releasing corresponding server resources and updating the current weight of the corresponding server when the transmission control protocol connection task or the subtask is completed, and controlling the start of a subsequent task according to the task execution result fed back by each server comprises: receiving a task completion signal sent by each server when the transmission control protocol connection task or the subtask is completed; determining a target server that executes the transmission control protocol connection task or the subtask according to the task completion signal, and releasing relevant hardware resources in the target server, the hardware resources including processor occupation resources, memory occupation resources and network connection resources; searching for the target server from the server list, and incrementing the current weight of the target server; receiving a task execution result fed back by each server, the task execution result including an execution success result and an execution failure result, and the execution failure result being accompanied by a failure cause; if the task execution result is the execution success result and the task that is completed is not the last task in a series task, starting a next task in the series task; if the task execution result is the execution success result and the task that is completed is the last task in the series task, terminating the series task; and if the task execution result is the execution failure result, directly terminating the corresponding series task and feeding back failure information.

[0091] The task completion signal is a flag signal sent by a server to an upper computer dispatching module to notify that a task is completed after the server completes a transmission control protocol connection task or a hydraulics test subtask assumed by the server, and the signal does not include a task success or failure judgment, but only indicates that a task execution flow is terminated. The failure cause is specific error description information returned by the server together with the task execution result when the task execution result is the execution failure result, and is used to explain technical factors causing the task failure, for example, TCP connection interruption, PLC communication timeout, sensor data anomaly, valve control non-response or stage judgment condition not being met. The series task is a task set composed of multiple subtasks with a clear execution sequence, and a previous subtask must be successfully completed before a next subtask is started, and in this embodiment, specifically refers to three subtasks that are executed in sequence and are decomposed from a single-hole water injection and back-off test or a water curtain effectiveness test. The failure information is comprehensive prompt content including a failed subtask name, a failure cause and a corresponding water curtain hole name, and is fed back by the system to a user or a log module when a series task is terminated due to the execution failure of a subtask, and is used to support fault positioning and operation decision.

[0092] The embodiment provides a water curtain equipment distributed real-time computing method, first, a plurality of servers are added to a server list, and a current weight is initialized, and a total weight of the servers and a number of the servers are determined, so as to provide a resource evaluation basis for subsequent task scheduling, help to realize task allocation according to ability, and improve resource utilization efficiency; then, a corresponding transmission control protocol connection task is started based on the number of enabled water curtain holes, and the task is dynamically scheduled to a server with effective weight and non-overload load by using a load balancing mechanism, so that single machine overload is avoided; subsequently, the water curtain hole name is recorded to a first hash table and a second hash table together with the corresponding transmission control protocol connection task and the server executing the task, so that subsequent fast positioning of a communication task and an execution node is facilitated, and the efficiency of control instruction issuing and state querying is improved; again, a hydraulics test task is decomposed into a plurality of ordered subtasks according to test logic, and the servers are scheduled to execute the subtasks by using the aforementioned hash table and load balancing mechanism, so that a complex test flow can be distributed and promoted; finally, when the transmission control protocol connection task or the subtask is executed, the processor, the memory and the network resource of the corresponding server are released, the current weight of the server is increased to restore the scheduling ability, and whether the next subtask is started or the whole test flow is terminated is determined according to the test execution result, so that the continuity and fault tolerance of the test are ensured. The embodiment can avoid system resource shortage, performance decline or process lock caused by too many tasks when a large amount of water curtain equipment data is stored in a database in real time, an interface is refreshed and a plurality of hydraulics test flows are processed, and meanwhile, the real-time performance and continuity of the data are ensured.

[0093] Based on the first embodiment of the application, the same or similar contents as the above embodiment one can be referred to the foregoing description, and the subsequent description will not be repeated. On this basis, please refer to Figure 2 , Figure 2 FIG. 2 is a flowchart of a second embodiment of a water curtain equipment distributed real-time computing method of the application, and step S40 of the water curtain equipment distributed real-time computing method comprises steps S41-S44.

[0094] In step S41, a hydraulics test task is decomposed into a plurality of subtasks, and execution requirements of the subtasks are determined.

[0095] It should be noted that the execution requirement refers to preconditions and operation requirements that must be met by each subtask when running, including which water curtain holes the subtask should act on, which PLC register data needs to be read or written, setting requirements of valve switch states, frequency and stability criteria (for example, 5 consecutive readings fluctuate less than 10% of the final value) of data recording, and whether the subtask depends on successful completion of a previous subtask, and the like, so as to ensure that the subtask can be correctly and orderly executed and meet the standard flow of the hydraulics test.

[0096] As an example, the execution requirements include execution duration requirements, data acquisition frequency, valve control rules, and pressure monitoring requirements, the sub-tasks include still water observation sub-tasks, water injection stage sub-tasks, back-off stage sub-tasks, full-closed stage sub-tasks, odd-open even-closed stage sub-tasks, and odd-closed even-open stage sub-tasks; the step of decomposing the hydraulics test task into multiple sub-tasks and determining execution requirements of the sub-tasks includes: receiving a hydraulics test opening instruction sent by the upper computer, and analyzing the hydraulics test opening instruction to obtain a hydraulics test type; when the hydraulics test type is a single-hole water injection back-off test, decomposing the single-hole water injection back-off test into still water observation sub-tasks, water injection stage sub-tasks, and back-off stage sub-tasks, and determining execution duration requirements and data acquisition frequency of each sub-task; when the hydraulics test type is a water curtain effectiveness test, decomposing the water curtain effectiveness test into full-closed stage sub-tasks, odd-open even-closed stage sub-tasks, and odd-closed even-open stage sub-tasks, and determining valve control rules and pressure monitoring requirements of each sub-task.

[0097] The execution duration requirement refers to the minimum time length that each sub-task must be continuously run in the test process, for ensuring that the physical process (such as pressure stabilization, water injection saturation, or back-off balance) of the stage is fully completed, and the duration is set according to the hydraulics test specification (for example, the still water observation sub-task lasts for 15 minutes, and the back-off stage sub-task lasts for 90 minutes). The data acquisition frequency refers to the time interval at which the system reads and records the water curtain hole sensor data (such as pressure value, flow value) during the execution of the sub-task, for obtaining sufficient density of test data to judge whether the state is stable (for example, the still water observation stage collects data every 5 minutes, and the back-off stage collects data every 15 minutes). The valve control rule refers to the specific operation instruction for the opening or closing state of the water curtain hole valve in each stage of the water curtain effectiveness test, for controlling the water injection path and pressure distribution, for example, all water curtain hole valves are closed in the full-closed stage, and odd-numbered water curtain hole valves are opened and even-numbered water curtain hole valves are closed in the odd-open even-closed stage. The pressure monitoring requirement refers to the recording frequency, stability judgment standard, and continuous monitoring duration of all water curtain hole pressure data during the execution of each sub-task of the water curtain effectiveness test, for example, recording once every 0min-10min-20min-30min-1h-2h-4h-6h and thereafter every 6 hours, and needing to meet the condition that the difference between the maximum value and the minimum value of the continuous 5 pressure readings is less than 10% of the final value to be considered stable. The hydraulics test opening instruction refers to the control command issued by the upper computer software for starting a certain type of hydraulics test, and the instruction contains a test type identifier, for triggering the initialization and task decomposition of the system for the corresponding test process.

[0098] Hydraulic test type refers to the specific test category specified in the hydraulic test opening instruction, including "single-hole water injection and back-falling test" and "water curtain effectiveness test", which are used to determine the subsequent task decomposition method and execution logic. The single-hole water injection and back-falling test refers to a hydraulic test conducted on a single water curtain hole to determine the permeability of the rock formation. The process includes three stages: static pressure observation, water injection and pressurization, and pressure natural back-falling. The purpose is to obtain key parameters such as static water pressure, stable water injection volume, and back-falling pressure. The static water observation sub-task, water injection stage sub-task, and back-falling stage sub-task refer to the three ordered sub-tasks that the single-hole water injection and back-falling test is decomposed into: the static water observation sub-task is used to monitor the initial static water pressure in the hole under the closed valve state; the water injection stage sub-task is used to open the water injection valve, inject water flow at a set pressure, and record the stable flow; the back-falling stage sub-task is used to monitor the natural back-falling process of the pressure in the hole after stopping water injection, lasting for 90 minutes and recording the pressure changes.

[0099] The water curtain effectiveness test refers to a comprehensive test that simulates different water injection conditions by controlling the valve state of multiple water curtain holes to verify whether the entire water curtain system can form an effective water seal barrier, which is used to evaluate the hydraulic connectivity and sealing performance of the cavern area. The full-closed stage sub-task, odd-open even-closed stage sub-task, and odd-closed even-open stage sub-task refer to the three ordered sub-tasks that the water curtain effectiveness test is decomposed into: the full-closed stage sub-task requires all water curtain hole valves to be closed, and only the natural pressure distribution is monitored; the odd-open even-closed stage sub-task opens odd-numbered water curtain holes and closes even-numbered water curtain holes, and records the pressure and odd-numbered hole flow; the odd-closed even-open stage sub-task is the opposite, opening even-numbered holes and closing odd-numbered holes, and also recording the pressure and even-numbered hole flow, which together form a complete effectiveness verification process.

[0100] Step S42, extracting the transmission control protocol connection task information corresponding to each water curtain hole from the first hash table, and extracting the execution server information corresponding to the transmission control protocol connection task information from the second hash table.

[0101] It should be noted that the transmission control protocol connection task information refers to the specific content of the transmission control protocol connection task stored in the first hash table and associated with the water curtain hole name, including the TCP connection object corresponding to the task, the IP address and port number of the target PLC, the register address list to be read, the control command format to be written, and other complete task parameters for executing communication operations. The execution server information refers to the server identification information stored in the second hash table and associated with the same water curtain hole name, which is actually responsible for running the transmission control protocol connection task, including the IP address of the server, the index number in the server list, the current weight state, and other server metadata for task scheduling and resource management.

[0102] Step S43, based on the execution demand, the transmission control protocol connection task information and the execution server information, match an execution server for each of the sub-tasks through a load balancing mechanism.

[0103] It can be understood that first, the system determines whether the execution server still has execution capability based on the execution demand, the transmission control protocol connection task information and the execution server information of each sub-task; if the current weight of the execution server is greater than the preset weight value and the resource occupancy rate thereof does not exceed the preset occupancy rate threshold, the sub-task is directly assigned to the server for execution to reuse the established TCP connection, reduce the communication reconstruction overhead and ensure the consistency of control instructions and data collection; if the current weight of the execution server is exhausted or the load is too high, the server is polled from the next server according to the order and weight in the server list to find a server that meets the scheduling condition (for example, server 3 with a weight of 0 is skipped and server 4 with a weight of 2 is selected), and the sub-task is re-bound to the newly selected server; finally, through this scheduling mode combining the existing task binding relationship and the dynamic load state, the delay caused by frequent switching of communication connections is avoided, and the system is prevented from being stuck due to the high load server continuing to undertake tasks, so that the continuity of the test process is ensured while the resources are reasonably allocated.

[0104] Step S44, each of the sub-tasks is issued to the execution server in the order of test execution to enable the execution server to execute the sub-tasks based on the transmission control protocol connection task information.

[0105] It can be understood that the system sequentially issues each sub-task to the execution server that has been matched to it according to the execution order specified by the hydraulics test, ensuring that the next sub-task is issued only after the previous sub-task is completed and a successful result is returned; the execution server executes specific operations according to the transmission control protocol connection task information corresponding to the sub-task after receiving the sub-task, including establishing or reusing an existing TCP connection, reading sensor data, writing device control commands, recording data according to the execution demand, etc., so as to ensure that the test process strictly advances according to the stage, and avoid control logic errors or data distortion caused by out-of-order execution.

[0106] The embodiment first decomposes the hydraulics test task into multiple sub-tasks, and clearly defines the execution requirements of each sub-task, so as to structure and schedule the test process; then extracts the transmission control protocol connection task information corresponding to each water curtain hole from the first hash table, and extracts the execution server information bound by the task from the second hash table, to provide accurate communication and execution context for task scheduling; then based on the above execution requirements, transmission control protocol connection task information and execution server information, through a load balancing mechanism, each sub-task is matched with an appropriate execution server, while reusing existing connections to avoid assigning tasks to servers that are overloaded or weight depleted; finally, according to the execution order specified by the test, the sub-tasks are sequentially issued to the matched execution server, which executes data reading, device control and result recording operations based on the established transmission control protocol connection task information. The embodiment can avoid system resource shortage, performance degradation or process lock when processing a large amount of water curtain equipment data real-time warehousing, interface refreshing and multiple hydraulics test processes, while ensuring the real-time and continuity of data.

[0107] Exemplarily, in order to facilitate the understanding of the implementation process of the water curtain equipment distributed real-time computing method obtained after the above embodiment one, please refer to Figure 3 , Figure 3 A schematic diagram of the brief process of the water curtain equipment distributed real-time computing method is provided, specifically:

[0108] The flowchart firstly starts from "determining the number of servers S_count and adding servers to the list, initializing the weight of each server Si", that is, obtaining all available servers and setting the initial weight according to the hardware capability; then enters "establishing two hash tables HT1 and HT2", which are used to store the mapping relationship between the water curtain hole and the TCP task, and the water curtain hole and the execution server in the subsequent; then "determining the number of TCP connections, that is, the number of water curtain holes", the total number of tasks to be created is determined; then "setting the current water curtain hole x = 1, server i = 1", the traversal index is initialized. After the main loop starts, firstly judge "Si>0? of server i", if "yes", execute "issue the TCP connection task of water curtain hole x to server i", and decrease the weight of the server (Si = Si - 1); then record the current water curtain hole x and the TCP connection task to HT1, and record the water curtain hole x and the execution server i to HT2; then the water curtain hole index is incremented (x = x + 1), and it is judged "x>the number of water curtain holes?", if "no", return to the starting point of the loop to continue processing the next water curtain hole; if "yes", the flowchart ends. If the result of the judgment "Si>0? of server i" is "no", then enter the branch judgment "i>the number of servers S_count?", if "yes", it means that all servers have no available weight, and the system needs to "wait for resource release"; if "no", the server index is incremented (i = i + 1), and returns to the judgment of "Si>0? of server i" to continue to find the next available server, so as to realize the load balancing scheduling based on weighted round robin.

[0109] It should be noted that the above examples are only used for understanding the present application and do not constitute a limitation on the water curtain equipment distributed real-time computing method of the present application. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0110] The present application also provides a water curtain equipment distributed real-time computing device, please refer to Figure 4 , the water curtain equipment distributed real-time computing device comprises:

[0111] The initialization module 10 is used for adding a plurality of servers to a server list and initializing the current weight of the servers in the server list, determining the total weight of the servers and the number of servers;

[0112] The task scheduling module 20 is used for starting the transmission control protocol connection task corresponding to the enabled water curtain hole based on the number of servers, and scheduling the server to execute the transmission control protocol connection task through a load balancing mechanism;

[0113] The hash table recording module 30 is configured to record the water curtain hole name and the transmission control protocol connection task to a first hash table, and record the water curtain hole name and the server performing the transmission control protocol connection task to a second hash table;

[0114] The test task processing module 40 is configured to decompose a hydraulic test task into a plurality of subtasks, and schedule the servers to perform the subtasks based on the first hash table and the second hash table through the load balancing mechanism;

[0115] The resource and task control module 50 is configured to release the corresponding server resources and update the current weights of the corresponding servers when the transmission control protocol connection task or the subtasks are completed, and control the start of subsequent tasks according to the task execution results fed back by the servers.

[0116] The water curtain equipment distributed real-time computing device provided by the application can solve the technical problem of how to avoid system resource shortage, performance decline or process lock when a large amount of water curtain equipment data is processed in real time, the interface is refreshed, and a plurality of hydraulic test processes are processed, while ensuring the real-time and continuity of data. Compared with the prior art, the water curtain equipment distributed real-time computing device provided by the application has the same beneficial effects as the water curtain equipment distributed real-time computing method provided by the above-mentioned embodiments, and other technical features in the water curtain equipment distributed real-time computing device are the same as the features disclosed in the above-mentioned embodiments, which will not be repeated here.

[0117] The water curtain equipment distributed real-time computing device provided by the application includes at least one processor and a memory in communication connection with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the water curtain equipment distributed real-time computing method in the above-mentioned embodiment one.

[0118] Reference will be made to the following description Figure 5 which shows a structural schematic diagram of a water curtain equipment distributed real-time computing device suitable for being used to implement the embodiments of the application. The water curtain equipment distributed real-time computing device in the embodiments of the application can include, but is not limited to, a notebook computer, a desktop computer, a server, and the like. Figure 5 The water curtain equipment distributed real-time computing device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.

[0119] As Figure 5As shown, the water curtain device distributed real-time computing device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a ROM (Read Only Memory) 1002 or programs loaded from a storage apparatus 1003 into a RAM (Random Access Memory) 1004. Various programs and data required for the water curtain device distributed real-time computing device to operate are also stored in the RAM 1004. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the water curtain device distributed real-time computing device to communicate with other devices wirelessly or by wire to exchange data. Although the water curtain device distributed real-time computing device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.

[0120] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carrying computer program code for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0121] The water curtain equipment distributed real-time computing device provided by the application adopts the water curtain equipment distributed real-time computing method in the above embodiment, and can solve the technical problem of how to avoid system resource shortage, performance decline or process lock when a large amount of water curtain equipment data is processed in real time, interface is refreshed, and a plurality of hydraulic test processes are processed, while ensuring the real-time and continuity of data. Compared with the prior art, the water curtain equipment distributed real-time computing device provided by the application has the same beneficial effects as the water curtain equipment distributed real-time computing method provided by the above embodiment, and other technical features in the water curtain equipment distributed real-time computing device are the same as the features disclosed in the previous embodiment method, and will not be repeated here.

[0122] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0123] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0124] The present application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the water curtain equipment distributed real-time computing method in the above embodiment.

[0125] The computer readable storage medium provided in the application may be, for example, a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a RAM (Random Access Memory), a ROM (Read Only Memory), an EPROM (Erasable Programmable Read Only Memory or flash memory), an optical fiber, a CD-ROM (CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination of the above.

[0126] The computer readable storage medium described above may be contained in the water curtain device distributed real-time computing device, or may exist separately without being assembled into the water curtain device distributed real-time computing device.

[0127] The computer readable storage medium described above carries one or more programs, which, when executed by the water curtain device distributed real-time computing device, cause the water curtain device distributed real-time computing device to: add multiple servers to a server list and initialize the current weights of the servers in the server list, determine the total weight of the servers and the number of servers; based on the number of servers, start a transmission control protocol connection task corresponding to an enabled water curtain hole, and schedule the servers to execute the transmission control protocol connection task through a load balancing mechanism; record the water curtain hole name and the transmission control protocol connection task to a first hash table, and record the water curtain hole name and the server executing the transmission control protocol connection task to a second hash table; decompose a hydraulics test task into multiple subtasks, and schedule the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism; when the transmission control protocol connection task or the subtask is executed, release the corresponding server resources and update the current weight of the corresponding server, and control the start of a subsequent task according to the task execution result fed back by each server.

[0128] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0129] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0130] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.

[0131] The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (i.e. computer programs) for executing the water curtain equipment distributed real-time computing method described above, and can solve the technical problem of how to avoid system resource shortage, performance decline or process lock due to too many tasks when processing a large amount of water curtain equipment data real-time warehousing, interface refreshing and multiple hydraulic test processes, while ensuring the real-time and continuity of data. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the water curtain equipment distributed real-time computing method provided by the above-mentioned embodiments, and will not be repeated here.

[0132] The application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the water curtain equipment distributed real-time computing method as described above.

[0133] The computer program product provided by the application can solve the technical problem of how to avoid system resource shortage, performance decline or process lock due to too many tasks when processing a large amount of water curtain equipment data real-time warehousing, interface refreshing and multiple hydraulic test processes, while ensuring the real-time and continuity of data. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the water curtain equipment distributed real-time computing method provided by the above-mentioned embodiments, and will not be repeated here.

[0134] The above-mentioned is only part of the embodiments of the application, and does not limit the patent scope of the application, and any equivalent structural transformation, direct / indirect application in other related technical fields made by the application specification and the contents of the drawings within the technical concept of the application are included in the patent protection scope of the application.

Claims

1. A method for distributed real-time computing for water curtain equipment, characterized in that, The method comprises: adding a plurality of servers to a server list and initializing current weights of the servers in the server list, determining a total weight of servers and a number of servers; based on the number of servers, starting a transmission control protocol connection task corresponding to an enabled water curtain hole, and scheduling the servers to execute the transmission control protocol connection task through a load balancing mechanism; recording a water curtain hole name and the transmission control protocol connection task to a first hash table, and recording the water curtain hole name and the server executing the transmission control protocol connection task to a second hash table; decomposing a hydraulics test task into a plurality of subtasks, and scheduling the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism; when the transmission control protocol connection task or the subtask is executed, releasing corresponding server resources and updating the current weight of the corresponding server, and controlling the start of a subsequent task according to the task execution result fed back by each server; the step of starting a transmission control protocol connection task corresponding to an enabled water curtain hole based on the number of servers, and scheduling the servers to execute the transmission control protocol connection task through a load balancing mechanism comprises: obtaining the total number of currently enabled water curtain holes, denoted as the target water curtain hole number; for each enabled water curtain hole, creating a corresponding transmission control protocol connection task, which includes creating a transmission control protocol connection with a programmable logic controller to which the water curtain hole belongs, reading register data corresponding to sensor data in the programmable logic controller, and writing device control commands to the programmable logic controller; initializing a water curtain hole index and a server index according to a preset starting value; when the water curtain hole index is greater than the target water curtain hole number, ending the scheduling of all transmission control protocol connection tasks; when the water curtain hole index is less than or equal to the target water curtain hole number, scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list; the step of scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list when the water curtain hole index is less than or equal to the target water curtain hole number comprises: when the water curtain hole index is less than or equal to the target water curtain hole number, determining whether the server index exceeds the number of servers; when the server index is greater than the number of servers, resetting the server index to the preset starting value, and calling a corresponding target server from the server list according to the server index; when the server index is less than or equal to the number of servers, calling a corresponding target server from the server list according to the server index; when the current weight of the target server is less than or equal to a preset weight value or the resource occupancy rate is greater than or equal to a preset occupancy threshold, the server index is incremented, and it is judged whether the server index exceeds the server quantity when the water curtain hole index is less than or equal to the target water curtain hole quantity; when the current weight of the target server is greater than the preset weight value, the transmission control protocol connection task corresponding to the water curtain hole index is assigned to the target server, the current weight of the target server is decremented, the water curtain hole index and the server index are incremented, and all transmission control protocol connection tasks corresponding to the enabled water curtain holes are scheduled.

2. The method of claim 1, wherein, The step of decomposing the hydraulics test task into multiple subtasks and scheduling the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism comprises: decomposing the hydraulics test task into multiple subtasks and determining the execution requirements of the subtasks; extracting the transmission control protocol connection task information corresponding to each water curtain hole from the first hash table and the execution server information corresponding to the transmission control protocol connection task information from the second hash table; based on the execution requirements, the transmission control protocol connection task information, and the execution server information, matching an execution server for each subtask through a load balancing mechanism; assigning each subtask to the execution server in a test execution order, so that the execution server executes the subtask based on the transmission control protocol connection task information.

3. The method of claim 2, wherein, The execution requirements include execution time requirements, data acquisition frequency, valve control rules, and pressure monitoring requirements, and the subtasks include still water observation subtasks, water injection phase subtasks, back-off phase subtasks, full-closing phase subtasks, odd-opening and even-closing phase subtasks, and odd-closing and even-opening phase subtasks; The step of decomposing the hydraulics test task into multiple subtasks and determining the execution requirements of the subtasks comprises: receiving a hydraulics test start instruction sent by an upper computer and analyzing the hydraulics test start instruction to obtain a hydraulics test type; when the hydraulics test type is a single-hole water injection and back-off test, decomposing the single-hole water injection and back-off test into still water observation subtasks, water injection phase subtasks, and back-off phase subtasks, and determining the execution time requirements and data acquisition frequency of each subtask; when the hydraulics test type is a water curtain effectiveness test, decomposing the water curtain effectiveness test into full-closing phase subtasks, odd-opening and even-closing phase subtasks, and odd-closing and even-opening phase subtasks, and determining the valve control rules and pressure monitoring requirements of each subtask.

4. The method of claim 1, wherein, The step of releasing the corresponding server resources and updating the current weight of the corresponding server when the transmission control protocol connection task or the subtask is executed, and controlling the start of subsequent tasks according to the task execution results fed back by each server comprises: when the transmission control protocol connection task or the subtask is executed, receiving a task execution completion signal sent by each server; determining a target server for executing the transmission control protocol connection task or the subtask according to the task execution completion signal, and releasing relevant hardware resources in the target server, the hardware resources including processor occupation resources, memory occupation resources and network connection resources; finding the target server from the server list, and increasing a current weight of the target server; receiving a task execution result fed back by each of the servers, the task execution result including a successful execution result and a failed execution result, and the failed execution result being accompanied by a failure cause; if the task execution result is the successful execution result and a currently executed task is not a last task in a series task, starting a next task in the series task; if the task execution result is the successful execution result and the currently executed task is the last task in the series task, terminating the series task; if the task execution result is the failed execution result, directly terminating a corresponding series task and feeding back failure information.

5. The method of any one of claims 1 to 4, wherein, The step of adding the plurality of servers to the server list and initializing the current weight of the server in the server list, determining the total weight of the server and the number of servers comprises: scanning available servers in a preset network range, obtaining hardware parameters of each of the available servers, the hardware parameters including a number of processor cores, a size of memory and a network transmission rate; allocating an initial weight to each of the available servers according to the hardware parameters; creating a blank server list, and adding all the available servers with the allocated initial weight to the server list one by one; initializing the current weight of each of the servers in the server list as the corresponding initial weight; counting the total number of the servers to obtain the number of servers; summing the current weight of all the servers to obtain the total weight of the servers.

6. A water curtain apparatus distributed real-time computing device, comprising: The apparatus comprises: an initialization module configured to add a plurality of servers to a server list, initialize a current weight of the server in the server list, and determine a total weight of the server and a number of servers. The task scheduling module is configured to start a transmission control protocol connection task corresponding to an enabled water curtain hole based on the number of servers, and schedule the servers to execute the transmission control protocol connection task through a load balancing mechanism. The step of starting a transmission control protocol connection task corresponding to an enabled water curtain hole based on the number of servers, and scheduling the servers to execute the transmission control protocol connection task through a load balancing mechanism includes: obtaining the total number of currently enabled water curtain holes, denoted as a target water curtain hole number; for each enabled water curtain hole, creating a corresponding transmission control protocol connection task, which includes creating a transmission control protocol connection with a programmable logic controller to which the water curtain hole belongs, reading register data corresponding to sensor data in the programmable logic controller, and writing device control commands to the programmable logic controller; initializing a water curtain hole index and a server index according to a preset starting value; when the water curtain hole index is greater than the target water curtain hole number, ending the scheduling of all transmission control protocol connection tasks; when the water curtain hole index is less than or equal to the target water curtain hole number, scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list; when the water curtain hole index is less than or equal to the target water curtain hole number, the step of scheduling the servers to execute the transmission control protocol connection task according to the water curtain hole index, the server index, the number of servers, the preset starting value, and the server list includes: when the water curtain hole index is less than or equal to the target water curtain hole number, determining whether the server index exceeds the number of servers; when the server index is greater than the number of servers, resetting the server index to the preset starting value and calling a corresponding target server from the server list according to the server index; when the server index is less than or equal to the number of servers, calling a corresponding target server from the server list according to the server index; when the current weight of the target server is less than or equal to a preset weight value or the resource occupancy rate is greater than or equal to a preset occupancy threshold, incrementing the server index and returning to the step of determining whether the server index exceeds the number of servers when the water curtain hole index is less than or equal to the target water curtain hole number; when the current weight of the target server is greater than the preset weight value, assigning the transmission control protocol connection task corresponding to the water curtain hole index to the target server, decreasing the current weight of the target server, and incrementing the water curtain hole index and the server index until the transmission control protocol connection tasks corresponding to all enabled water curtain holes are completed. The hash table recording module is configured to record a water curtain hole name and the transmission control protocol connection task in a first hash table, and record the water curtain hole name and the server executing the transmission control protocol connection task in a second hash table. The test task processing module is configured to divide a hydraulics test task into a plurality of subtasks, and to schedule the servers to execute the subtasks based on the first hash table and the second hash table through the load balancing mechanism. The resource and task control module is configured to release the corresponding server resources and update the current weight of the corresponding server when the transmission control protocol connection task or the subtask is executed, and to control the start of subsequent tasks according to the task execution results fed back by the servers.

7. A water curtain apparatus distributed real-time computing device, comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the water curtain device distributed real-time computing method according to any one of claims 1 to 5.

8. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the water curtain device distributed real-time computing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Consistent hashing method for Modelica task load balancing

    CN118672777A

  • Cooperative scheduling method and device for computing power resources in multi-cloud scene and storage medium

    CN119557067A

  • Stateless distributed load-balancing

    US20190312811A1