A crew positioning network communication system and method in a ship
By optimizing the connection pool configuration of the ship's crew positioning system, the problem of untimely updates of crew location information under high-concurrency access was solved, enabling rapid response and efficient rescue in emergency situations, and improving the system's stability and resource utilization efficiency.
Patent Information
- Application Number
- CN202511262242.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Existing shipboard crew positioning systems cannot update crew location information in a timely manner under high-concurrency access scenarios, leading to delays in rescue in emergencies. Furthermore, unreasonable connection pool configurations increase database load and waste resources, affecting the operation of other important systems.
A shipboard crew positioning network communication system is adopted. Through data acquisition, system establishment, data evaluation, connection pool parameter configuration and optimization modules, the minimum number of connections, maximum number of connections and connection timeout time of the connection pool are gradually adjusted to optimize the performance of the database management system and ensure that crew location information update requests can be responded to quickly under high concurrency access.
In emergency situations, managers can immediately obtain the latest crew location information, shorten rescue time, reduce database load and resource waste, and improve system stability and response speed.
Smart Images

Figure CN120751336B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a shipboard crew positioning network communication system and method. Background Technology
[0002] Maritime safety is a core issue in the global maritime transport system, particularly for large vessels such as naval ships and ocean-going vessels. As the tonnage of these ships increases, crew management during voyages becomes increasingly complex. Ship command demands diligence, meticulousness, rigor, and speed, which places extremely high standards on crew management across all departments and compartments.
[0003] In maritime operations, crew members' activities are confined to the ship throughout the entire operation. However, existing shipboard crew positioning systems have shortcomings, potentially preventing ship management from promptly ascertaining the crew's location and movements in emergencies. For example, if a crew member encounters danger or suffers a sudden illness, the inability to quickly locate them delays rescue efforts and increases safety risks. Furthermore, crew members losing contact in certain areas of the ship due to equipment malfunction also poses a threat to the ship's safe operation.
[0004] The existing shipboard crew positioning system uses a connection pool configuration strategy. This strategy involves setting parameters and planning behavior for the connection pool in database connection management to optimize system performance and resource utilization. However, in high-concurrency scenarios, when the minimum number of connections in the connection pool is set too low, it cannot meet the demands of high-concurrency access. This leads to delays in crew location updates due to untimely database connection acquisition. In emergencies, such as when crew members encounter danger or require emergency assistance, management personnel cannot immediately obtain the latest crew location information, thus delaying rescue efforts. Furthermore, the lack of a reasonable connection pool configuration strategy results in frequent creation and destruction of database connections, increasing the load on the database server and wasting resources. This additional resource consumption can affect the operation of other important shipboard systems, such as navigation and communication, indirectly impacting crew safety. Summary of the Invention
[0005] To address the technical problem that existing technologies cannot immediately obtain the latest crew location information inside a ship, thus delaying rescue time and affecting crew safety, this invention proposes a shipboard crew positioning network communication system and method.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A shipboard crew positioning network communication system includes a data acquisition module, a system establishment module, a data evaluation module, a connection pool parameter configuration module, a testing module, and an optimization module; wherein,
[0008] The data acquisition module is used to acquire user parameters and equipment parameters within the ship;
[0009] The system establishment module establishes a database management system and stores the user parameters and device parameters in the database management system;
[0010] The data evaluation module is used to evaluate the capacity and response time of the database management system and predict the concurrent access volume of the system.
[0011] The connection pool parameter configuration module configures the minimum number of connections, the maximum number of connections, and the connection timeout time based on the database management system's capacity, concurrent access volume, and response time.
[0012] The testing module detects the minimum number of connections, the maximum number of connections, and the connection timeout time of the connection pool. It uses performance testing tools to simulate high-concurrency access and database connection requests and monitors the performance metrics of the connection pool during the test.
[0013] The optimization module, based on the results of monitoring tests, formulates adjustment strategies based on the current load of the database management system, and gradually adjusts and feeds back the minimum number of connections, the maximum number of connections, and the connection timeout time in the connection pool; specifically, the minimum number of connections is gradually adjusted based on the response time and the number of active connections in the connection pool, the maximum number of connections is gradually adjusted based on CPU utilization and concurrent query volume, and the connection timeout time is gradually adjusted based on the average waiting time.
[0014] On the other hand, the present invention also provides a method for the above-mentioned shipboard crew positioning network communication system, the method comprising the following steps:
[0015] Step 1: Start the data acquisition module: collect user parameters and equipment parameters inside the ship, and send the user parameters and equipment parameters to the database management system;
[0016] Step 2: Establish a database management system: Establish a database management system on the server to store the user parameters and device parameters;
[0017] Step 3: Evaluate database performance: Assess the database management system's capacity, response time, and concurrent access volume;
[0018] Step 4: Configure connection pool parameters: Based on the evaluation results, configure the connection pool parameters, including the minimum number of connections, the maximum number of connections, and the connection timeout time.
[0019] Step 5: Conduct system testing: After configuration, use performance testing tools to simulate high-concurrency access and database connection requests, and monitor the performance metrics of the connection pool.
[0020] Step 6: Optimize connection pool parameters: Based on the test results, formulate an adjustment strategy based on the current load of the database management system, gradually adjust the connection pool parameters, and record the specific time, target parameters, and expected adjustment effects of each adjustment.
[0021] Step 7: Achieve crew positioning and communication: After optimizing the connection pool parameters, crew members use communication devices to upload their location information in real time and communicate with other crew members or shore personnel through the communication devices;
[0022] Step 8: Continuous monitoring and maintenance: Based on the location information uploaded by the crew members, continuously monitor the database management system and perform regular maintenance on the database management system.
[0023] Compared with the prior art, the beneficial effects of this application are:
[0024] This application employs an optimized connection pool configuration approach. Based on the current database management system load, an adjustment strategy is developed to progressively adjust the minimum number of connections, the maximum number of connections, and the connection timeout time in the connection pool. This iterative optimization continuously approaches the optimal connection pool configuration parameters, enabling rapid response and processing of crew location information update requests under high-concurrency access scenarios. This solves the problem of delayed crew location information updates due to untimely database connection acquisition, which prevents managers from immediately obtaining the latest crew location information in emergencies, thus delaying rescue efforts. Through gradual adjustment and optimization, when crew members encounter danger or require emergency assistance, managers can immediately obtain the latest crew location information, enabling a rapid response and significantly shortening rescue time.
[0025] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0026] Figure 1 This is a structural block diagram of the shipboard crew positioning network communication system according to the present invention;
[0027] Figure 2 This is a flowchart of the shipboard crew positioning network communication adjustment strategy according to the present invention;
[0028] Figure 3 This is a flowchart of the shipboard crew positioning network communication method according to the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings, so as to more clearly understand the purpose, features and advantages of this invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of this invention, but are only for illustrating the essential spirit of the technical solutions of this invention. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0030] Unless the context requires otherwise, throughout the specification and claims, the word “comprising” and its variations, such as “including” and “having”, shall be understood to have an open, inclusive meaning, that is, to be interpreted as “including, but not limited to”.
[0031] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.
[0032] The singular forms “a” and “the” used in this specification and the appended claims include plural references unless otherwise expressly stated herein. It should be noted that the term “or” is generally used to mean “and / or” unless otherwise expressly stated herein.
[0033] In the following description, in order to clearly demonstrate the structure and working method of the present invention, a number of directional terms will be used. However, terms such as "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", and "down" should be understood as convenient terms and not as limiting terms.
[0034] The implementation details of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following content is only for the convenience of understanding the implementation details and is not necessary for implementing this solution.
[0035] The structural block diagram of the shipboard crew positioning network communication system of this application is as follows: Figure 1As shown, the shipboard crew positioning network communication system includes a data acquisition module, a system establishment module, a data evaluation module, a connection pool parameter configuration module, a testing module, and an optimization module.
[0036] Specifically, the data acquisition module is used to obtain user parameters and equipment parameters within the ship. User parameters include the number of users and user behavior patterns; equipment parameters include the number of devices and device types. The number of users includes the number of crew members and management personnel, and the user behavior patterns include login frequency and data request frequency. It should be noted that in the data acquisition module, user parameters also include user location information; equipment parameters also include device status and network connection status.
[0037] The system establishment module, based on the user and equipment parameters acquired by the data acquisition module, establishes a database management system and stores the user and equipment parameters in the database management system. It should be noted that the database management system includes, but is not limited to, the relational database management system MySQL.
[0038] The data evaluation module assesses the database management system's capacity, response time, and predicts concurrent access volume. Capacity refers to the maximum amount of data, transactions, or user requests the database management system can handle while maintaining stable performance. Response time refers to the complete time period from when a user initiates a request to when the system returns a result, including network latency, query processing time, and result transmission time. Concurrent access volume refers to the number of users or services making requests to the database at the same time.
[0039] The connection pool parameter configuration module configures connection pool parameters based on the database management system's capacity, concurrent access volume, and response time. These parameters include the minimum number of connections, the maximum number of connections, and the connection timeout. The connection pool is a key technical component in a database management system, used for reusing and managing database connections. The minimum number of connections is the number of connections created during pool initialization to maintain persistent connections. The maximum number of connections is the maximum number of connections allowed in the connection pool. The connection timeout is the maximum time a client can wait to acquire a connection.
[0040] The testing module is responsible for detecting the minimum number of connections, the maximum number of connections, and the timeout during connection in the connection pool. It uses performance testing tools to simulate high-concurrency access and database connection requests and monitors the performance metrics of the connection pool during the test.
[0041] The optimization module, based on the results of monitoring and testing, formulates adjustment strategies according to the current load of the database management system, and gradually adjusts and provides feedback on the minimum number of connections, maximum number of connections, and connection timeout time in the connection pool. If the adjustment achieves the expected results, it is fed back to the "connection pool parameter configuration module," forming a closed loop to continuously improve system performance; if it does not achieve the expected results, the adjustment step size is gradually increased or decreased, and the adjustment continues.
[0042] In some embodiments, the optimization module formulates adjustment strategies based on the results of monitoring tests and the current load of the database management system, such as... Figure 2 As shown, the adjustment strategy includes the following steps:
[0043] S1. Data Acquisition and Analysis Phase: First, a fixed monitoring cycle is set, and the performance indicators are monitored using the monitoring tools built into the database management system. At the end of each monitoring cycle, the performance indicator data of the connection pool in the test module is collected from the monitoring terminal of the database management system and analyzed.
[0044] For example, collect connection pool performance metrics data from the database management system's monitoring terminal every 5 minutes.
[0045] The data analysis is as follows:
[0046] Calculate the average response time, maximum response time, and minimum response time.
[0047] Analyze throughput trends to identify peak and trough periods.
[0048] Calculate the error rate, identify the error type and the time of occurrence.
[0049] Assess resource utilization and determine if the system is approaching its bottleneck.
[0050] Example data: Monitoring period: 5 minutes
[0051] Example of collected data: Timestamp: 2024-12-12 10:00:00; Response time: 450ms; Throughput: 200 requests / s; Error rate: 0.5%; CPU utilization: 60%; Memory utilization: 70%.
[0052] S2. Preliminary Adjustment Phase: Based on the data analysis results, preliminary design adjustment thresholds for the response time, throughput, and error rate of the connection pool configuration parameters are made. If the response time of the database management system is long, consider increasing the minimum number of connections; if the performance of the database management system degrades under high concurrency, consider adjusting the maximum number of connections.
[0053] For S2, there are the following examples: For example: response time threshold: 500ms, exceeding this value is considered too long; throughput decrease threshold: 10% decrease compared to the previous cycle; error rate increase threshold: 1% increase compared to the previous cycle.
[0054] At this point, make initial adjustments: if the average response time exceeds 500ms and the CPU utilization is below 80%, consider increasing the minimum number of connections, with an initial increase of 10.
[0055] If the throughput decreases by more than 10% compared to the previous period, consider increasing the maximum number of connections, with an initial increase of 50.
[0056] If the error rate increases by more than 1% compared to the previous period, consider shortening the connection timeout. Assuming the original connection timeout was 30 seconds, initially set it to be shortened to 5 seconds.
[0057] The adjusted data is as follows: Average response time: 550ms, CPU utilization: 65% → Increase the minimum number of connections from 20 to 30;
[0058] Throughput: 180 requests / s (11% decrease compared to the previous period) → Increase the maximum number of connections from 500 to 550;
[0059] Error rate: 1.2% → Reduce connection timeout from 30 seconds to 25 seconds.
[0060] S3. Further Adjustment Phase: Based on the step size set in the initial adjustment phase, determine whether the effect of the initial adjustment strategy has met expectations. If it has met expectations, proceed to feedback. If it has not met expectations, gradually increase or decrease the adjustment step size, and record the specific time, target parameters, and expected adjustment effect of each adjustment.
[0061] The following analysis is provided for step S3, including the following steps:
[0062] 1. Set step size: Minimum connection number adjustment step size: 5, Maximum connection number adjustment step size: 10, Timeout time adjustment step size: 2 seconds;
[0063] 2. Determine the effect of the adjustment: After implementing the initial adjustment, wait for a 5-minute monitoring period, collect new performance index data, analyze the adjusted performance index, and determine whether the expected effect has been achieved, such as reduced response time, increased throughput, or decreased error rate.
[0064] 3. Adjust step size: If the adjustment effect does not meet expectations, gradually increase or decrease the adjustment step size. For example, if the response time still does not improve significantly after increasing the minimum number of connections, increase the number of connections by 5 again. At this time, record the specific time of each adjustment, the minimum number of connections, the maximum number of connections, the connection timeout time, and the expected adjustment effect.
[0065] For example: After the initial adjustment, the average response time is still 520ms → the minimum number of connections is increased again from 30 to 35;
[0066] Throughput increased to 190 requests / s, but still did not meet expectations → Maximum number of connections increased from 550 to 560;
[0067] The error rate dropped to 0.8%, but the effect of adjusting the connection timeout was not obvious → shorten the connection timeout from 25 seconds to 23 seconds.
[0068] S4. Implementation, Adjustment and Monitoring Phase: Based on the further adjustment phase, the minimum number of connections, the maximum number of connections, and the connection timeout time of the connection pool are gradually adjusted. After each adjustment, wait for a monitoring cycle, collect new performance indicator data, and continuously monitor the performance indicators of the database management system.
[0069] For example, after adjusting the minimum number of connections to 35, the average response time decreased to 480ms;
[0070] After adjusting the maximum number of connections to 560, the throughput increased to 205 requests / s;
[0071] After adjusting the connection timeout to 23 seconds, the error rate stabilized at around 0.7%.
[0072] S5. Iterative Optimization and Recording Phase: Based on the performance of the database management system after each adjustment, continuously iterate and optimize the adjustment strategy to gradually approach the optimal connection pool configuration parameters, that is, to obtain the parameter combination with the shortest response time, highest throughput, lowest error rate, and reasonable resource utilization. Record the history of each adjustment in detail, including adjustment time, step size, adjustment reason, adjustment content, including minimum number of connections, maximum number of connections, connection timeout time, and performance indicators before and after the adjustment.
[0073] For example: Adjusted time: 2024-12-12 10:10:00
[0074] Reason for adjustment: Average response time exceeds threshold.
[0075] Adjustments: Minimum number of connections increased from 30 to 35.
[0076] Performance metrics before adjustment: response time 550ms, throughput 180 requests / s, error rate 1.2%;
[0077] Adjusted performance metrics: response time 480ms, throughput 205 requests / s, error rate 0.7%.
[0078] Furthermore, in step S5, the iterative optimization includes the following steps:
[0079] b1. Collect performance data: After each adjustment of the connection pool parameters, obtain performance indicator data from the monitoring terminal of the database management system, including the response time, throughput, error rate and resource utilization of the database management system, so as to reflect the current performance status of the database management system.
[0080] b2. Analyze performance: Analyze the collected performance data, evaluate the impact of the current connection pool configuration parameters on system performance, and compare the performance under different adjustment strategies. The database management system can then compare the specific impact of the current connection pool configuration parameters on system performance.
[0081] b3. Formulate iterative strategy: Based on the analysis results, formulate the next iterative optimization strategy, determine the direction and step size of the adjustment, that is, increase or decrease the minimum number of connections, the maximum number of connections, and the specific values of the connection timeout time. Among them, adjusting the connection timeout time includes shortening the connection timeout time.
[0082] b4. Implement adjustments: Adjust the parameters of the connection pool step by step according to the established iterative strategy. During the adjustment process, it is necessary to ensure the continuity and stability of the system and avoid interference with the crew positioning service.
[0083] b5. Continuous monitoring and evaluation: After the adjustment is implemented, the performance indicators of the database management system are continuously monitored to evaluate the effect of the adjustment strategy. The database management system can determine whether the adjustment strategy is effective and whether the expected performance improvement goals have been achieved.
[0084] b6. Recording and Optimization: During continuous monitoring, record the specific time, target parameters, adjustment strategy, and performance after each adjustment. Based on the evaluation results, continuously optimize the adjustment strategy and gradually approach the optimal connection pool configuration parameters.
[0085] It should be noted that through continuous iterative optimization, the database management system can find the optimal connection pool configuration parameters, significantly improving the performance of the database management system, including shortening response time, increasing throughput, reducing error rate, and optimizing resource utilization.
[0086] In some embodiments, the minimum number of connections, the maximum number of connections, and the connection timeout time in the connection pool are gradually adjusted, including the following specific steps:
[0087] Step 1, Parameter Definition: Includes the following definitions:
[0088] Minimum number of connections at time t ;
[0089] Maximum number of connections at time t ;
[0090] Connection timeout at time t ;
[0091] Current response time R(t);
[0092] Current concurrent queries Q(t);
[0093] Database CPU utilization U(t);
[0094] The number of active connections in the connection pool, L(t), is within the range of: ;
[0095] Step 2: Establish the objective function: Based on the defined parameters, establish the objective function:
[0096]
[0097] in, The weight coefficients are calculated based on the objective function for the minimum number of connections. Maximum number of connections and timeout period Make adjustments;
[0098] Step 3: Calculate the minimum number of connections. Adjustments are made dynamically based on the response time R(t) and the number of active connections L(t), including the following formula:
[0099]
[0100] For formula (1):
[0101] For formula (2):
[0102] in, For response time threshold; This is the utilization threshold; To adjust the step size;
[0103] Step 4: Calculate the maximum number of connections. Adjustments are made based on CPU utilization U(t) and concurrent query volume Q(t), including the following formulas:
[0104]
[0105] For formula (3): If U(t) safe And Q(t) > Q peak ;
[0106] For formula (4): If U(t) >= U safe ;
[0107] Among them, U safe For safe CPU utilization; Q peak This represents the historical peak concurrent query volume. To adjust the step size; This represents the maximum number of global connections.
[0108] Step 5: Set connection timeout time Adjustments are made based on the average waiting time W(t), including the following formula:
[0109]
[0110] For formula (5): if ;
[0111] For formula (6): if ;
[0112] Where W(t) is the average waiting time of the connection waiting queue, in milliseconds; To adjust the step size; Minimum timeout period;
[0113] Step Six: Dynamic Adjustment: Based on the objective function and minimum connection number Maximum number of connections and connection timeout Periodically collect R(t), Q(t), U(t), L(t), and W(t), and then calculate the new parameters. And a moving average is used to avoid sudden changes in parameters. The moving average formula is:
[0114]
[0115] in, As a smoothing factor, the minimum number of connections, maximum number of connections, and connection timeout time of the connection pool are gradually adjusted based on the calculation results.
[0116] It should be noted that through the collaborative work of the data acquisition module, data evaluation module, and optimization module, the system can accurately identify and resolve performance bottlenecks, thereby significantly improving the system's concurrent processing capabilities and response speed. Especially in high-concurrency scenarios, the database management system can maintain stable operation and provide accurate positioning services for crew members.
[0117] In some embodiments, such as Figure 3 As shown, a method for a shipboard crew positioning network communication system includes the following steps:
[0118] Step 1: Start the data acquisition module: Collect user parameters and equipment parameters inside the ship. After preprocessing, the collected user parameters and equipment parameters will be sent to the database management system.
[0119] Step 2: Establish a database management system: Based on user parameters and device parameters, establish a database management system on the server;
[0120] Step 3: Evaluate database performance: Use the data evaluation module to evaluate the database management system's capacity, response time, and concurrent access volume;
[0121] Step 4: Configure connection pool parameters: Based on the evaluation results, configure the minimum number of connections, the maximum number of connections, and the connection timeout time for the connection pool;
[0122] Step 5: Perform system testing: After configuration, use the performance testing tools in the testing module to simulate high-concurrency access and database connection requests, and monitor the performance metrics of the connection pool.
[0123] Step 6: Optimize connection pool parameters: Based on the test results, use the optimization module to gradually adjust the parameters of the connection pool, and record the specific time, target parameters, and expected adjustment effects of each adjustment; among these, optimizing connection pool parameters also includes determining the optimization priority based on the test results.
[0124] Step 7: Achieve crew positioning and communication: After optimizing the connection pool parameters, crew members use communication devices to upload their location information in real time and communicate with other crew members or shore personnel through the communication devices;
[0125] Step 8: Continuous Monitoring and Maintenance: Based on the location information uploaded by crew members, the database management system will be continuously monitored and regularly maintained. This regular maintenance includes data backup, virus scanning, and performance optimization to ensure the long-term stable operation of the database management system. It should be noted that crew members can upload location information in real time and communicate efficiently with other crew members or shore personnel through communication devices, which not only improves the accuracy of crew positioning but also enhances the efficiency and reliability of communication.
[0126] Furthermore, in some embodiments, Step 5, performing the system test includes the following steps:
[0127] a1. Select a performance testing tool: Select LoadRunner as the performance testing tool;
[0128] a2. Configure the test environment: Set up the test environment according to the LoadRunner load testing tool, including the test server, database server and communication network;
[0129] a3. Execution test: Run scripts in the database management system to simulate high-concurrency access and database connection requests, and use performance testing tools to monitor the response time, throughput and error rate of the connection pool;
[0130] a4. Analyze test results: Collect and analyze test results, and formulate optimization strategies and adjustment plans.
[0131] Furthermore, in some embodiments, in Step 6, determining the optimization priority includes the following steps:
[0132] Step 1: Collect and analyze the test results of the database management system to identify performance bottlenecks.
[0133] Specifically, the LoadRunner load testing tool can be used to simulate high-concurrency access and database connection requests to test the response time, throughput, and error rate of the database management system. The tests revealed that the database management system's response time significantly increased under high-concurrency scenarios, while throughput decreased and the error rate increased. Response time became the most significant performance bottleneck, with the average response time increasing from the normal 50 milliseconds to over 200 milliseconds.
[0134] Step 2: Prioritize performance bottlenecks based on the urgency of business needs.
[0135] Specifically, high response time delays can lead to untimely updates of crew location information, affecting the efficiency of rescue and emergency response. Based on the urgency of business needs, response time is identified as the primary performance bottleneck to optimize.
[0136] Step 3: Evaluate the impact of parameter adjustments on the stability of the database management system and adjust the priority order accordingly.
[0137] Specifically, consider increasing the maximum number of connections in the connection pool and adjusting the connection timeout to improve response time. Use simulation tools to simulate the behavior of the database management system after parameter adjustment and evaluate the impact on the stability of the database management system. Increasing the maximum number of connections from 300 to 500 and adjusting the connection timeout from 60 seconds to 30 seconds effectively improves response time.
[0138] Step 4: Consider resource utilization and finally determine the optimization priority.
[0139] Specifically, taking into account resource requirements, optimization effects, and long-term operating costs, it was decided to implement the above parameter adjustment plan. In the short term, a certain amount of server resources need to be invested, but in the long term, it will significantly improve the performance and stability of the system and reduce operating costs caused by performance issues. Ultimately, optimizing the maximum number of connections in the connection pool and the connection timeout time is the primary task, with the goal of improving system response time.
[0140] Example 1
[0141] Next, refer to it again. Figure 2 The adjustment strategy will be analyzed with examples.
[0142] First, a set of performance metrics data of the connection pool in the test module were collected from the monitoring terminal of the database management system, including response time, throughput and concurrent connections, as shown in Table 1.
[0143]
[0144] As shown in Table 1, the response time increases at time T2, the throughput decreases, and the number of consecutive concurrent connections increases.
[0145] Initial adjustment phase: Analyze the above data. Since the response time in Table 1 has increased, the minimum number of connections should be increased. At the same time, since the performance has decreased due to the increase in the number of concurrent connections, the maximum number of connections should be adjusted.
[0146] For example, increase the minimum number of connections from 10 to 20, and adjust the maximum number of connections from 500 to 600.
[0147] Further adjustments: Based on the initial adjustment step size, the minimum number of connections is increased by 10 and the maximum number of connections is increased by 50. The effect of the initial adjustment strategy is then assessed.
[0148] If the expected results are achieved, such as reduced response time and increased throughput, then proceed to provide feedback.
[0149] If the expected results are not achieved, gradually increase or decrease the adjustment step size, and record the specific time, target parameters, and expected adjustment effect for each adjustment.
[0150] First adjustment: The minimum number of connections was increased to 20 and the maximum number of connections was increased to 600, but the response time is still too high.
[0151] Second adjustment: Increase the minimum number of connections to 30, keep the maximum number of connections unchanged, and test again.
[0152] Implementation and monitoring: Based on the results of the further adjustment phase, the minimum number of connections, the maximum number of connections, and the connection timeout time of the connection pool were gradually adjusted, and the performance indicators of the database management system were continuously monitored. After multiple adjustments, it was finally determined that the system performance was optimal when the minimum number of connections was 35 and the maximum number of connections was 600. At this point, the time of each adjustment, parameter changes, and performance indicator changes were recorded. Through multiple iterations, the optimal connection pool configuration parameters were finally determined.
[0153] The shipboard crew positioning network communication system and method provided in this application offer a reliable and efficient solution for crew positioning and communication within ships through precise data collection, scientific performance evaluation, comprehensive system testing and optimization, efficient positioning and communication functions, and a continuous monitoring and maintenance mechanism. This enables management personnel to immediately obtain the latest crew location information, thereby responding quickly and significantly shortening rescue time.
[0154] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects. The scope of the invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0155] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A shipboard crew positioning network communication system, characterized in that, The system includes a data acquisition module, a system establishment module, a data evaluation module, a connection pool parameter configuration module, a testing module, and an optimization module; among which, The data acquisition module is used to acquire user parameters and equipment parameters within the ship; The system establishment module establishes a database management system and stores the user parameters and device parameters in the database management system; The data evaluation module is used to evaluate the capacity and response time of the database management system and predict the concurrent access volume of the system. The connection pool parameter configuration module configures the minimum number of connections, the maximum number of connections, and the connection timeout time based on the database management system's capacity, concurrent access volume, and response time. The testing module detects the minimum number of connections, the maximum number of connections, and the connection timeout time of the connection pool. It uses performance testing tools to simulate high-concurrency access and database connection requests and monitors the performance metrics of the connection pool during the test. The optimization module, based on the results of monitoring tests, formulates adjustment strategies based on the current load of the database management system, and gradually adjusts and feeds back the minimum number of connections, the maximum number of connections, and the connection timeout time in the connection pool; specifically, the minimum number of connections is gradually adjusted based on the response time and the number of active connections in the connection pool, the maximum number of connections is gradually adjusted based on CPU utilization and concurrent query volume, and the connection timeout time is gradually adjusted based on the average waiting time.
2. The system according to claim 1, characterized in that, In the data acquisition module, the user parameters include the number of users and user behavior patterns, and the device parameters include the number of devices and device types; wherein, the number of users includes crew members and management personnel, and the user behavior patterns include login frequency and data request frequency.
3. The system according to claim 1, characterized in that, The database management system includes the relational database management system MySQL.
4. A method for a shipboard crew positioning network communication system according to any one of claims 1-3, characterized in that, The method includes the following steps: Step 1: Start the data acquisition module: collect user parameters and equipment parameters inside the ship, and send the user parameters and equipment parameters to the database management system; Step 2: Establish a database management system: Establish a database management system on the server to store the user parameters and device parameters; Step 3: Evaluate database performance: Assess the database management system's capacity, response time, and concurrent access volume; Step 4: Configure connection pool parameters: Based on the evaluation results, configure the connection pool parameters, including the minimum number of connections, the maximum number of connections, and the connection timeout time. Step 5: Conduct system testing: After configuration, use performance testing tools to simulate high-concurrency access and database connection requests, and monitor the performance metrics of the connection pool. Step 6: Optimize connection pool parameters: Based on the test results, formulate an adjustment strategy based on the current load of the database management system, gradually adjust the connection pool parameters, and record the specific time, target parameters, and expected adjustment effects of each adjustment. Step 7: Achieve crew positioning and communication: After optimizing the connection pool parameters, crew members use communication devices to upload their location information in real time and communicate with other crew members or shore personnel through the communication devices; Step 8: Continuous monitoring and maintenance: Based on the location information uploaded by the crew members, continuously monitor the database management system and perform regular maintenance on the database management system.
5. The method according to claim 4, characterized in that, In Step 5, the system testing includes the following steps: a1. Select LoadRunner load testing tool; a2. Configure the test environment: Set up the test environment according to the LoadRunner load testing tool, including the test server, database server and communication network; a3. Execution test: Run scripts in the database management system to simulate high-concurrency access and database connection requests, and use performance testing tools to monitor the response time, throughput and error rate of the connection pool; a4. Collect and analyze test results, and formulate optimization strategies and adjustment plans.
6. The method according to claim 4, characterized in that, In Step 6, based on the test results, an adjustment strategy is formulated based on the current load of the database management system. The adjustment strategy includes the following steps: S1. Data Acquisition and Analysis Phase: After a monitoring cycle ends, collect and analyze the performance metrics data of the connection pool in the test module from the monitoring terminal of the database management system. S2. Preliminary Adjustment Phase: Based on the analysis results, a preliminary strategy for adjusting the connection pool configuration parameters is designed. If the response time of the database management system is long, consider increasing the minimum number of connections; if the performance of the database management system degrades under high concurrency, consider adjusting the maximum number of connections. S3. Further Adjustment Phase: Based on the initial adjustment step size, determine whether the effect of the initial adjustment strategy has met expectations. If it has met expectations, provide feedback. If it has not met expectations, gradually increase or decrease the adjustment step size, and record the specific time, target parameters, and expected adjustment effect of each adjustment. S4. Implementation, Adjustment and Monitoring Phase: Based on the further adjustment phase, the minimum number of connections, maximum number of connections, and connection timeout time of the connection pool are gradually adjusted, and the performance indicators of the database management system are continuously monitored. S5. Iterative Optimization and Recording Phase: Based on the performance indicators of the database management system after each adjustment, continuously iterate and optimize the adjustment strategy, gradually approach the optimal connection pool configuration parameters, and record the results.
7. The method according to claim 6, characterized in that, In S5, the iterative optimization includes the following steps: b1. Collect performance data: After each adjustment of the connection pool configuration parameters, obtain performance indicator data from the monitoring terminal of the database management system, including the response time, throughput, error rate and resource utilization of the database management system. b2. Analyze performance: Analyze the collected performance index data, evaluate the impact of the current connection pool configuration parameters on system performance, and compare the performance under different adjustment strategies; b3. Formulate iterative strategy: Based on the analysis results, formulate the next iterative optimization strategy and determine the direction and step size of the adjustment; b4. Implement adjustments: Adjust the parameters of the connection pool step by step according to the established iterative optimization strategy; b5. Continuous monitoring and evaluation: After the adjustment is completed, continuously monitor the performance indicators of the database management system, evaluate the effect of the adjustment strategy, and determine whether the expected performance improvement target has been achieved. b6. Recording and Optimization: During continuous monitoring, record the specific time, target parameters, adjustment strategy, and performance after each adjustment. Based on the evaluation results, continuously optimize the adjustment strategy and gradually approach the optimal connection pool configuration parameters.
8. The method according to claim 4, characterized in that, Step 6 involves gradually adjusting the connection pool parameters, including the following steps: Step 1, Parameter Definition: This includes defining the minimum number of connections at time t. Maximum number of connections at time t Connection timeout at time t Current response time R(t); Current concurrent queries Q(t); Database CPU utilization U(t); Number of active connections in the connection pool L(t), ranging from: ; Step 2: Establish the objective function: Based on the defined parameters, establish the objective function: in, The weight coefficients are calculated based on the objective function for the minimum number of connections. Maximum number of connections and connection timeout Make adjustments; Step 3: Calculate the minimum number of connections. Adjustments will be made, including the following formulas: For formula (1): For formula (2): in, For response time threshold; This is the utilization threshold; To adjust the step size; Step 4: Calculate the maximum number of connections. Adjustments will be made, including the following formulas: For formula (3): If U(t) safe And Q(t) > Q peak ; For formula (4): If U(t) >= U safe ; Among them, U safe For safe CPU utilization; Q peak This represents the historical peak concurrent query volume. To adjust the step size; This represents the maximum number of global connections. Step 5: Set connection timeout time Adjustments will be made, including the following formulas: For formula (5): if ; For formula (6): if ; Where W(t) is the average waiting time of the connection waiting queue, in milliseconds; To adjust the step size; Minimum timeout period; Step Six: Dynamic Adjustment: Based on the objective function and minimum connection number Maximum number of connections and connection timeout Periodically collect R(t), Q(t), U(t), L(t), and W(t), and then calculate the new parameters. And a moving average is used to avoid sudden changes in parameters. The moving average formula is: in, As a smoothing factor, the minimum number of connections, maximum number of connections, and connection timeout time of the connection pool are gradually adjusted based on the calculation results.
9. The method according to claim 4, characterized in that, In Step 6, optimizing the connection pool parameters also includes determining the optimization priority based on the test results.
10. The method according to claim 9, characterized in that, Determining the optimization priority includes the following steps: Step 1: Collect and analyze the test results of the database management system to identify performance bottlenecks; Step 2: Prioritize performance bottlenecks based on the urgency of business needs; Step 3: Evaluate the impact of parameter adjustments on the stability of the database management system and adjust the priority order accordingly; Step 4: Consider resource utilization and finally determine the optimization priority.
Citation Information
Patent Citations
Distributive connection pool management method and system for databases
CN106021544A
Dynamic management method and system of database connection pool
CN106250500A