Business data communication method and equipment for water conservancy monitoring system and medium

By obtaining business scenario data information of each monitoring station in the water conservancy monitoring system, dynamically allocating cache resources, and storing data according to the spatiotemporal index rules, the problem of inflexible resource allocation in traditional systems is solved, and efficient and stable service data communication is achieved.

CN120144620APending Publication Date: 2025-06-13INSPUR SMART TECH INNOVATION (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510298835.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The network signal of the existing water conservancy monitoring system in remote areas is unstable, resulting in slow application response and untimely data updates. The resource allocation of traditional cache architectures lacks flexibility and cannot be optimized for the functional differences and data transmission characteristics of different monitoring stations, resulting in waste or insufficient resources, affecting the quality of business data communication.

Method used

By obtaining data operation information of each preset monitoring station in different business scenarios, based on these information and preset business scenario trigger conditions, the service data allocation factor is determined, the proportion of business data allocation in the cache space is regulated, and the service data is stored in the cache space according to the preset spatiotemporal index rules to realize dynamic cache resource allocation.

Benefits of technology

It realizes accurate and dynamic allocation of cache resources, reduces resource waste and insufficient resources, improves the stability and efficiency of business data communication, and ensures the efficiency of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144620A_ABST
    Figure CN120144620A_ABST
Patent Text Reader

Abstract

The invention provides a business data communication method and device for a water conservancy monitoring system and a medium, and belongs to the technical field of water conservancy monitoring. The method comprises the following steps: acquiring a data operation information set corresponding to each preset monitoring station in different service scenes; based on the data operation information set and a judgment result of a preset service scene triggering condition, determining each service data distribution factor corresponding to the corresponding service scene; wherein the service data distribution factor is used for regulating and controlling the distribution proportion of the service data in the cache space; based on the service data distribution factor and a preset spatio-temporal index rule, storing the service data of each preset monitoring station to a cache space; and after a service data acquisition request from a user terminal is received, judging whether response data corresponding to the service data acquisition request exists in the cache space or not so as to respond or generate a service data updating instruction according to a judgment result. Therefore, accurate and dynamic allocation of cache resources is realized, and the data communication quality is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of water conservancy monitoring, and particularly to a business data communication method, device, and medium for a water conservancy monitoring system. Background Art

[0002] In the current large-scale watershed water conservancy monitoring system, many technical challenges are faced. The monitoring systems in the water conservancy industry are generally located in remote areas and often face unstable network signals or weak network environments, resulting in slow application responses, untimely data updates, and even service interruptions. If caching can be used to assist business data communication, the communication stability can be improved to a certain extent, but the traditional caching architecture lacks flexibility in resource allocation.

[0003] The inventors found that the cache resource allocation based on geographical location only simply divides according to regions and does not fully consider the functional differences of monitoring stations and data transmission characteristics. For example, in the areas monitoring the water environment around large water conservancy hubs and ecological sensitive areas, the demands for cache resources are very different, but the traditional method cannot optimize and configure them specifically, resulting in waste or shortage of resources, affecting the quality of business data communication and poor user experience. Summary of the Invention

[0004] To solve the above problems, the embodiments of this application provide a business data communication method, device, and medium for a water conservancy monitoring system, which are used to achieve precise and dynamic allocation of cache resources, avoid waste and shortage of resources, and meet the requirements for efficient data storage and access in different scenarios.

[0005] On the one hand, the embodiments of this application provide a business data communication method for a water conservancy monitoring system, and the method includes:

[0006] Obtain the set of data operation information corresponding to each preset monitoring station in different business scenarios; the set of data operation information at least includes the business data access information and business data update information for the business scenario;

[0007] Based on the set of data operation information and the determination result of the triggering condition of the preset business scenario, determine each business data allocation factor corresponding to the corresponding business scenario; wherein, the business data allocation factor is used to regulate the allocation ratio of business data in the cache space;

[0008] Based on the business data allocation factor and the preset spatio-temporal index rule, store the business data of each preset monitoring station into the cache space respectively;

[0009] After receiving a business data acquisition request from a user terminal, determine whether the response data corresponding to the business data acquisition request exists in the cache space, so as to make a response or generate a business data update instruction according to the determination result.

[0010] In one implementation of the present application, based on the set of data operation information and the determination result of the trigger condition of the preset business scenario, each business data allocation factor corresponding to the corresponding business scenario is determined, specifically including:

[0011] According to the trigger condition of the preset business scenario, determine the business scenario standard interval corresponding to each business data of the preset monitoring station, so as to determine the business scenario of the corresponding preset monitoring station according to the business scenario standard interval and / or the scenario specifying instruction from the user terminal; wherein, the business scenario includes one of the following: daily monitoring scenario, flood warning scenario, project scheduling scenario, ecological water replenishment scenario, water quality monitoring scenario;

[0012] According to the determined business scenario, match the data weight triples corresponding to each data type in the preset data weight list; the data weight triple includes the access frequency weight, update frequency weight, and business scenario weight corresponding to the data type;

[0013] According to the business data access information, business data update information, and the data weight triple corresponding to the data type, calculate the business data allocation factor.

[0014] In one implementation of the present application, before storing the business data of each preset monitoring station into the cache space based on the business data allocation factor and the preset spatio-temporal index rule, the method further includes:

[0015] Determine the water conservancy monitoring area corresponding to each preset monitoring station, and perform grid division;

[0016] According to the number of monitoring stations in each grid, the total capacity of the cache space, the total number of monitoring stations in the water conservancy monitoring area, and each business data allocation factor, determine the cache capacity corresponding to each grid;

[0017] According to the cache capacity corresponding to each grid, establish a cache subspace corresponding to each grid; wherein, each cache subspace corresponds to each grid one by one; the cache subspace is used to store the business data of the corresponding grid;

[0018] According to the spatial position corresponding to each grid, set pointers respectively pointing to the quadtree nodes corresponding to each grid, so as to construct a quadtree spatial index; wherein, the quadtree node stores at least the business data of the monitoring stations in the grid; the pointer is used to realize the positioning from the grid to the quadtree node, so that when performing a spatial query, based on the grid information, the part of the quadtree associated with the grid can be accessed through the pointer;

[0019] According to the collection time of each piece of the service data, and in accordance with a preset time window, record the service data of each grid separately into a preset linked list to construct a time index;

[0020] Determine the preset spatio-temporal index rule according to each of the cache sub-spaces, the quadtree spatial index, and the time index.

[0021] In an implementation manner of the present application, based on the service data distribution factor and the preset spatio-temporal index rule, store the service data of each of the preset monitoring stations into the cache space respectively, specifically including:

[0022] Obtain the service data of each of the preset monitoring stations, and determine the allocation ratio of each piece of the service data in the cache space according to the service data distribution factor;

[0023] According to each of the allocation ratios, and in accordance with the preset spatio-temporal index rule, store each piece of the service data into the corresponding cache sub-space respectively until all the service data are stored into the cache space, or the used capacity of the cache space is greater than a first preset threshold.

[0024] In an implementation manner of the present application, before storing the service data of each of the preset monitoring stations into the cache space respectively, the method further includes:

[0025] Obtain the network communication data sets of each of the preset monitoring stations; wherein, the network communication data sets at least include the following network communication data: network signal strength, network latency, and packet loss rate;

[0026] Input the network communication data sets into a pre-trained LSTM model to determine the network state prediction result within a preset time period according to the output result of the LSTM model;

[0027] Determine the service data update frequency corresponding to the preset monitoring station according to the network state prediction result and a preset cache update frequency table, so as to update the service data corresponding to the preset monitoring station in the cache space through the service data update frequency.

[0028] In an implementation manner of the present application, the method further includes:

[0029] Determine the key service data corresponding to the service scenario according to a preset scenario data cache list;

[0030] During the data monitoring period corresponding to the service scenario, update the key service data in the cache space in real time.

[0031] In an implementation manner of the present application, the method further includes:

[0032] Determine the data access volume of each of the quadtree nodes in real time within a unit time;

[0033] When the data access volume is greater than a second preset threshold, determine the adjacent quadtree nodes of the corresponding quadtree node;

[0034] In the case where the data access volume of the adjacent quadtree nodes is less than a third preset threshold and the used capacity of the corresponding cache subspace is less than a fourth preset threshold, establish a temporary cache subspace in the cache subspace of the adjacent quadtree nodes to store the service data corresponding to the quadtree node through the temporary cache subspace.

[0035] In an implementation manner of the present application, determine whether the response data corresponding to the service data acquisition request exists in the cache space, and perform a response or generate a service data update instruction according to the determination result, specifically including:

[0036] When it is determined that the response data corresponding to the service data acquisition request exists in the cache space, use the corresponding service data in the cache space as the response data and send it to the user terminal;

[0037] Otherwise, generate the service data update instruction to obtain the requested service data collected by a preset monitoring station corresponding to the service data acquisition request, and send it to the user terminal.

[0038] On the other hand, an embodiment of the present application further provides a service data communication device for a water conservancy monitoring system, and the device includes:

[0039] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a service data communication method for a water conservancy monitoring system as described above.

[0040] On yet another aspect, an embodiment of the present application further provides a non-volatile computer storage medium storing computer-executable instructions that can execute a service data communication method for a water conservancy monitoring system as described above.

[0041] Compared with the prior art, the present application has the following remarkable effects:

[0042] Through the above solution, the present application generates a business data allocation factor based on the business scenario and caches data according to the preset spatio-temporal index rule, realizing dynamic cache resource allocation, enabling more reasonable utilization of cache resources, reducing data acquisition latency, and ensuring data query efficiency. It realizes accurate, dynamic allocation and efficient query of cache resources according to the geographical location, function and diversity of business scenarios of the water conservancy monitoring stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0044] Figure 1 is a schematic flowchart of a method for business data communication in a water conservancy monitoring system according to an embodiment of the present application;

[0045] Figure 2 is a schematic structural diagram of a business data communication device in a water conservancy monitoring system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0047] The embodiments of the present application provide a method, device and medium for business data communication in a water conservancy monitoring system, which are used to solve the problem of how to achieve accurate, dynamic allocation and efficient query of cache resources according to the geographical location, function and diversity of business scenarios of water conservancy monitoring stations.

[0048] The following will describe in detail the various embodiments of the present application with reference to the accompanying drawings.

[0049] The embodiments of the present application provide a method for business data communication in a water conservancy monitoring system, as Figure 1 shown, the method may include steps S101-S104:

[0050] S101, the edge computing device obtains a set of data operation information corresponding to each preset monitoring station in different business scenarios.

[0051] Among them, the set of data operation information includes at least business data access information and business data update information for the business scenario.

[0052] It should be noted that the edge computing device, as the execution entity of the business data communication method for the water conservancy monitoring system, is only an exemplary existence. The execution entity may not be limited to the edge computing device, and the present application does not make specific limitations in this regard.

[0053] The edge computing device can be connected to multiple preset monitoring stations in a water conservancy monitoring area, such as water conservancy monitoring stations distributed in different areas of a large water area. Among them, the entire basin can also be divided into multiple geographical area blocks, with multiple preset monitoring stations in each area block, and each area block corresponds to one or more edge computing nodes, that is, edge computing devices. For example, according to the water system branches of the basin, it is divided into upper, middle, and lower reaches areas, with a core edge computing node set in each area, and several auxiliary edge computing nodes are set within the area according to the density of the monitoring stations. The core edge computing node is connected to multiple auxiliary edge computing nodes and can integrate the data received by the auxiliary edge computing nodes.

[0054] The present application presupposes multiple business scenarios, such as daily monitoring scenarios, flood warning scenarios, project scheduling scenarios, ecological water replenishment scenarios, and water quality monitoring scenarios. The data operation information set includes business data access information and business data update information under the corresponding business scenarios. The business data access information includes: the access frequency of business data corresponding to the data type and the average access frequency; the business data update information includes: the update frequency of business data corresponding to the data type and the average update frequency. The data types are, for example, water level, water quality, flow rate, etc. The access frequency of business data corresponding to the data type can be understood as the frequency of accessing the business data of a certain data type in a certain business scenario. The above data operation information set can be collected by the edge computing device, and the edge computing device is connected to each monitoring device of the user terminal and the monitoring station. The user terminal is devices such as servers, user mobile phones, and computers, and the monitoring devices include but are not limited to water level monitoring devices, flow monitoring devices, water quality monitoring devices, and meteorological monitoring devices. The present application does not make specific limitations in this regard.

[0055] The above business scenarios can be flexibly switched, which can be actively switched by the user or switched according to the monitored business data. The present application does not make specific limitations in this regard.

[0056] S102. The edge computing device determines each business data distribution factor corresponding to the corresponding business scenario based on the data operation information set and the determination result of the trigger condition of the preset business scenario.

[0057] Among them, the business data distribution factor is used to regulate the distribution ratio of business data in the cache space.

[0058] In the embodiments of the present application, based on the data operation information set and the determination result of the preset business scenario trigger condition, each business data allocation factor corresponding to the corresponding business scenario is determined, specifically including:

[0059] According to the preset business scenario trigger condition, determine the business scenario standard interval corresponding to each business data of the preset monitoring station, so as to determine the business scenario of the corresponding preset monitoring station according to the business scenario standard interval and / or the scenario specifying instruction from the user terminal. Among them, the business scenario includes one of the following: daily monitoring scenario, flood warning scenario, project scheduling scenario, ecological water replenishment scenario, water quality monitoring scenario. According to the determined business scenario, match the data weight triples corresponding to each data type in the preset data weight list. The data weight triple includes the access frequency weight, update frequency weight, and business scenario weight corresponding to the data type. Calculate the business data allocation factor according to the business data access information, business data update information corresponding to the data type, and the data weight triple.

[0060] That is to say, the present application is pre-set with business scenario trigger conditions, and different business scenario trigger conditions correspond to different business scenario standard intervals. When the business data of this data type is within a business scenario standard interval, judge the business scenario corresponding to the business scenario standard interval where it is located. If the judged business scenario is inconsistent with the current business scenario at this time, then switch the business scenario to the business scenario corresponding to the business scenario standard interval where it is located, and determine the switched business scenario as the business scenario of the preset monitoring station.

[0061] For example, the business scenario standard intervals are (a1, b1), (a2, b2), (a3, b3), and this interval is the business data standard interval of the water level data type. The edge computing device can compare the monitored water level business data with these three intervals to verify the interval where the water level business data is located. If the business scenario is the interval (a1, b1) of the daily monitoring scenario at this time, and the water level business data is in the interval (a2, b2) of the flood warning scenario, then switch the business scenario to the flood warning scenario. In addition, the business scenario of the present application can also be actively switched by the user terminal. The user can actively send a scenario specifying instruction to the edge computing device, such as specifying that the business scenario within the next 2 hours is the flood warning scenario, then the business data will be monitored according to the monitoring standard corresponding to the flood warning scenario within the next 2 hours.

[0062] After determining the above business scenarios, the edge computing device will also match the access frequency weight, update frequency weight, and business scenario weight of the data type from the preset data weight list based on the data type of the business data involved in the business scenario, and add them to the data weight triple. The correspondence between the business scenario corresponding business data type and the weight value in the preset data weight list can be set by the user during actual use, and this application does not make specific limitations on this.

[0063] Subsequently, the edge computing device will use the above business data access information, business data update information, and data weight triple to calculate the business data distribution factor. The calculation formula is as follows:

[0064]

[0065] Among them, R ij is the business data distribution factor of the jth data type in the ith business scenario, F ij is the accessed frequency of the jth data type in the ith business scenario, I ij is the access frequency weight of the jth data type in the ith business scenario, U ij is the updated frequency of the jth data type in the ith business scenario, V ij is the update frequency weight of the jth data type in the ith business scenario, is the average accessed frequency of the jth data type in the ith business scenario within the preset duration, is the average access frequency weight of the jth data type, is the average updated frequency of the jth data type in the ith business scenario within the preset duration, is the average update frequency weight of the jth data type, W i is the business scenario weight of the ith business scenario. The above preset duration can be set by the user during actual use, or there is a default duration preset, such as half an hour, 1 hour, etc., and no specific limitations are made here.

[0066] Through the above solution, a business data distribution factor for more accurately and real-time adjusting the allocation ratio of cache resources can be obtained.

[0067] S103. The edge computing device stores the business data of each preset monitoring station into the cache space respectively based on the business data distribution factor and the preset spatio-temporal index rule.

[0068] In the embodiment of this application, before storing the business data of each preset monitoring station into the cache space respectively based on the business data distribution factor and the preset spatio-temporal index rule, the method further includes:

[0069] Determine the water conservancy monitoring areas corresponding to each preset monitoring station and perform grid division. Determine the cache capacity corresponding to each grid according to the number of monitoring stations in each grid, the total cache space capacity, the total number of monitoring stations in the water conservancy monitoring area, and each service data distribution factor. Establish a cache subspace corresponding to each grid according to the cache capacity corresponding to each grid. Among them, each cache subspace corresponds one-to-one with each grid. The cache subspace is used to store the service data of the corresponding grid. Set pointers pointing to the quadtree nodes corresponding to each grid according to the spatial positions corresponding to each grid to construct a quadtree space index. Among them, the quadtree node stores at least the service data of the monitoring stations in the grid. The pointer is used to realize the positioning from the grid to the quadtree node, so that when performing a spatial query, based on the grid information, the part associated with the grid in the quadtree can be accessed through the pointer. Record the service data of each grid into a preset linked list according to the preset time window according to the collection time of each service data to construct a time index. Determine the preset spatio-temporal index rule according to each cache subspace, the quadtree space index, and the time index.

[0070] In other words, this application constructs cache subspaces according to the positions of the monitoring stations, constructs a spatial index using the quadtree data structure at the same time, constructs a time index using the time characteristics of the service data, and then generates a preset spatio-temporal index rule for efficient data query and acquisition from the cache space.

[0071] Specifically, this application can obtain the monitoring areas of each preset monitoring station docked by the edge computing device, and then integrate them into the water conservancy monitoring area. Subsequently, the longitude and latitude grid division method is adopted to divide the water conservancy monitoring area into multiple grids at a certain longitude and latitude interval, and each grid corresponds to a cache subspace. For example, the longitude range is divided into intervals of 0.1 degrees each, and the latitude range is divided into intervals of 0.1 degrees each to form grids. Here, 0.1 degrees is only for illustrative purposes and can be specifically set by the user according to the actual usage scenario. This application does not make specific limitations on this. It should be noted that after dividing the grids, this application will assign a unique identifier to each grid, so as to establish the mapping relationship between the grid and the cache subspace through this identifier and store it in the index table corresponding to the preset spatio-temporal index rule.

[0072] Subsequently, this application will also calculate the number of monitoring stations N in each grid n , determine the total cache space capacity C total , determine the total number of monitoring stations N in the water conservancy monitoring area total , and combine the above-obtained service data distribution factors to calculate the cache capacity required by each grid in the cache space respectively. The calculation formula is as follows:

[0073]

[0074] Among them, C n represents the cache capacity of the nth grid; m is the number of data types; in the above formula, R j The corresponding service scenario can be determined according to the number of service scenarios of each preset monitoring station in the nth grid. For example, there are x preset monitoring stations in the nth grid that are in the first service scenario, and y preset monitoring stations that are in the second service scenario, where x is greater than y. The service scenario corresponding to the nth grid is the first service scenario. The service scenario of this grid can also be specified by the user, and no specific limitation is made here. Through the above formula, the cache capacity allocation result considering both service priority and monitoring density can be obtained, so as to flexibly cache service data and improve the communication efficiency of service data.

[0075] Based on the cache capacity corresponding to each grid obtained above, a cache sub - space can be specified for each grid in the cache space, and the capacity of this cache sub - space is the cache capacity corresponding to the grid.

[0076] Subsequently, the edge computing device will also set a pointer pointing to its corresponding quadtree node for each grid according to the spatial position corresponding to each grid. By mapping the longitude and latitude information of the monitoring station into the quadtree structure, the corresponding node of each grid in the quadtree is determined. The quadtree node stores the service data of the monitoring stations in the corresponding grid and the pointers of the child nodes (if there are child nodes). The child nodes can be understood as follows: if the root node is a water conservancy monitoring area, after being divided into four equal parts, four quadtree nodes are obtained. Each quadtree node can have at most four child nodes at most, and this division is carried out in turn until each quadtree node at the bottom layer uniquely corresponds to a grid. The setting of this pointer is used to achieve fast positioning from the grid to the quadtree node. When performing a spatial query, based on the grid information, the part of the quadtree associated with this grid can be quickly accessed through this pointer, improving the spatial query efficiency. The spatial index of the constructed quadtree structure can be added to the above index table.

[0077] Then, the edge computing device also classifies and organizes the service data of each grid within each preset time window according to the collection time of each service data. The preset time window can be set for each grid according to actual service requirements, or can be unified into one, such as one hour, 12 hours, etc. as a preset time window. Record the service data of each grid within each preset time window into a preset linked list to construct a time index in this way. This application can adopt technical means of combining a hash table and a linked list to organize the data of each grid within different time windows. Among them, the time window is set according to service requirements, and each grid corresponds to multiple time windows. In the index table, clearly record the preset time window identifier corresponding to each grid as the index identifier in the time dimension. At the same time, record the pointer pointing to the time index structure, and this time index structure adopts the form of combining a hash table and a linked list. For each set time window, record the service data corresponding to a specific grid within this time window into the linked list, and record the head node pointer of this linked list in the corresponding field of the time window corresponding to this grid in the index table. In this way, an association between the grid, the time window, the service data, and the time index structure is established, so as to realize the efficient retrieval and management of service data based on the time dimension, and provide strong support for the spatio-temporal data processing and query of the water conservancy service system.

[0078] According to the obtained cache subspace, quadtree spatial index, and time index above, further determine the preset spatio-temporal index rule. This rule integrates the corresponding relationship between the spatial position, the time dimension, and the cache space, providing a comprehensive index basis for accurately storing service data into the cache space based on the service data allocation factor in the following.

[0079] Through the above steps, the construction process of the preset spatio-temporal index rule is realized, laying a solid foundation for efficient data storage and query.

[0080] In the embodiment of this application, storing the service data of each preset monitoring station into the cache space respectively based on the service data allocation factor and the preset spatio-temporal index rule specifically includes:

[0081] Obtain the service data of each preset monitoring station, and determine the allocation ratio of each service data in the cache space according to the service data allocation factor. According to each allocation ratio, store each service data into the corresponding cache subspace according to the preset spatio-temporal index rule until all service data are stored into the cache space, or the used capacity of the cache space is greater than the first preset threshold.

[0082] That is to say, after obtaining the service data of a preset monitoring station at a preset service data update frequency, the present application can obtain its service data allocation factor according to the preset monitoring station and data type corresponding to the service data, and then determine the allocation ratio of the service data in the cache space. Subsequently, according to the preset spatio-temporal index rule, query the cache subspace corresponding to the service data and store it in the cache subspace. Among them, when the used capacity of the cache space is greater than the first preset threshold, the service data will no longer be stored in the cache space. At this time, a prompt message indicating that the cache is full can be generated and sent to the management terminal or the user terminal. The first preset threshold can be set according to the actual usage scenario and will not be specifically limited here. The management terminal can be a mobile phone, a computer, etc. of the system administrator, which will not be specifically limited here.

[0083] For example, according to the calculated service data allocation factor, determine the allocation ratio of different service data in the cache space. For the flood warning service data, its service data allocation factor is relatively high, assumed to be 0.8, then 80% of the space is allocated for it in the total cache space; for the daily monitoring service data, the service data allocation factor is assumed to be 0.2, then 20% of the space is allocated. According to the dynamic change of the service data allocation factor, the allocation of the cache space is adjusted in real time. Among them, when switching from the daily monitoring service scenario to the flood warning service scenario, the cache space ratio of the daily monitoring service data is reduced in time, and the cache space ratio of the flood warning service data is increased. The present application determines the grid to which it belongs according to the location of the monitoring station of the service data. By querying the index table, the corresponding cache subspace is found. For example, the longitude and latitude of a certain monitoring station are (110.5, 25.3). By calculating its grid identifier, the corresponding cache subspace is found. Subsequently, the compressed service data is stored in the cache subspace of the corresponding grid, and a digital watermark is added to each service data. The digital watermark contains information such as the data source, collection time, service scenario, etc., and is used for data traceability and integrity verification during data transmission and storage. For example, information such as the data source marked as "Monitoring Station A", the collection time as "xxxx year xx month xx day xx:xx", and the service scenario as "Flood Warning" is embedded in the data.

[0084] In addition, in another embodiment of the present application, before storing the service data of each preset monitoring station into the cache space respectively, it further includes:

[0085] Obtain the network communication data sets of each preset monitoring station. Among them, the network communication data sets at least include the following network communication data: network signal strength, network latency, and packet loss rate. Input the network communication data sets into a pre-trained LSTM model to determine the network status prediction result within a preset time period according to the output result of the LSTM model. Determine the service data update frequency corresponding to the preset monitoring station according to the network status prediction result and the preset cache update frequency table, so as to update the service data corresponding to the preset monitoring station in the cache space through the service data update frequency.

[0086] In other words, the edge computing device can collect historical data such as network signal strength, network latency, and packet loss rate of each preset monitoring station. In this application, the network signal strength, network latency, and packet loss rate can be normalized and used as training samples. Among them, the training samples can be labeled by experts or users. After labeling, a Long Short-Term Memory (LSTM) model is trained. The LSTM model can include an input layer, multiple hidden layers, and an output layer. The input layer receives the preprocessed network communication data and labels. The hidden layer learns the time series features in the data and the influence relationship of different factors on the network status through LSTM units. The output layer outputs the network status prediction result for a future period of time (such as the next 30 minutes) (including the predicted values of network signal strength, latency, and packet loss rate), so as to compare the network status prediction result with the label to judge the output accuracy of the model. At the same time, in order to improve the generalization ability and prediction accuracy of the model, during the model training process, the Dropout technique is used to prevent overfitting, and the Adam optimizer is used to adjust the weights and biases of the model to minimize the mean square error between the prediction result and the actual network status data. Until the output accuracy of the model is greater than a predetermined value, a pre-trained LSTM model is obtained.

[0087] Subsequently, after obtaining the current network communication data set, use the above LSTM model to predict the network status prediction result within a preset future time period, and match the network status prediction result with the preset cache update frequency table to obtain the service data update frequency corresponding to the network status prediction result pre-recorded in the preset cache update frequency table, so as to update the service data in the cache space according to the matched service data update frequency. Among them, the above preset time period can be set by the user according to the actual usage scenario, and this application does not make specific limitations. The preset cache update frequency table records the corresponding relationship between different network status prediction results and different service data update frequencies, which can be set by the user and are not specifically limited here.

[0088] For example, when the network status prediction result is poor, the matched service data update frequency is to update the service data every 10 minutes; when the network status prediction result is good, the matched service data update frequency is to update the service data every 15 minutes.

[0089] Through the above solution, the cache resources can be reasonably used while ensuring business data communication. It is more applicable to the business data communication in a weak network environment such as a water conservancy monitoring station, which can avoid the loss of key hydrological data caused by network problems, ensure the stable operation of important water conservancy operations such as flood control, and reduce potential economic losses and safety risks.

[0090] In another embodiment of the present application, the method further includes:

[0091] Determine the key business data corresponding to the business scenario according to the preset scenario data cache list. During the data monitoring period corresponding to the business scenario, the key business data in the cache space is updated in real time.

[0092] In other words, the present application can be pre-set with a preset scenario data cache list, and the preset scenario data cache list contains the data types of the key business data corresponding to different business scenarios. For example, in the flood warning scenario, the key business data is the business data related to water level and the business data related to flow. Therefore, the present application matches the key business data through the business scenario, and during the data monitoring period corresponding to the business scenario, the key business data in the cache space is updated in real time. The corresponding relationship between the data monitoring period and the business scenario can be set by the user, and the specific duration of the data monitoring period can be set by the user according to the actual usage scenario. For example, the data monitoring period in the flood warning scenario is 2 hours. This is only an example and is not specifically limited herein.

[0093] Real-time updating of the key business data can avoid data loss and improve the monitoring and warning efficiency of the water conservancy monitoring system.

[0094] S104. After the edge computing device receives a business data acquisition request from the user terminal, it determines whether the response data corresponding to the business data acquisition request exists in the cache space, and responds or generates a business data update instruction according to the judgment result.

[0095] The user terminal can send a business data acquisition request to the edge computing device. The business data acquisition request may include a certain monitoring station, the data type of the business data, etc.

[0096] In the embodiment of the present application, determining whether the response data corresponding to the business data acquisition request exists in the cache space, and responding or generating a business data update instruction according to the judgment result specifically includes:

[0097] When it is determined that the response data corresponding to the service data acquisition request exists in the cache space, the corresponding service data in the cache space is used as the response data and sent to the user terminal. Otherwise, a service data update instruction is generated to obtain the requested service data collected by the preset monitoring station corresponding to the service data acquisition request and sent to the user terminal.

[0098] The edge computing device can parse the service data acquisition request and query the corresponding cached service data from the cache space according to the parsing result. If the service data is queried, the service data is sent to the user terminal. If not, it means that the cache space has not stored the service data yet, so a request is initiated to obtain the latest service data of the preset monitoring station, which is then fed back to the user terminal. At the same time, the latest service data obtained from the cache can also be cached.

[0099] In an embodiment of the present application, since the cache space may still be insufficient due to other reasons after allocation, the following embodiment is also provided in the present application:

[0100] Determine the data access volume of each quadtree node in unit time in real time. When the data access volume is greater than the second preset threshold, determine the adjacent quadtree nodes of the corresponding quadtree node. When the data access volume of the adjacent quadtree nodes is less than the third preset threshold and the used capacity of the corresponding cache subspace is less than the fourth preset threshold, a temporary cache subspace is established in the cache subspace of the adjacent quadtree nodes to store the service data corresponding to the quadtree node through the temporary cache subspace.

[0101] That is to say, the edge computing device can count the data access volume of each quadtree node accessed within unit data. If the data access volume is greater than the second preset threshold preset by the user, at this time, the adjacent quadtree nodes that are spatially adjacent to the quadtree node in the quadtree structure will be found, such as sibling regions. It is judged whether the data access volume of the adjacent quadtree nodes is less than the third preset threshold. The third preset threshold is less than the second preset threshold, and both are set by the user according to the actual usage scenario. At the same time, it is judged whether the used capacity of the cache subspace of the adjacent quadtree nodes is less than the fourth preset threshold preset by the user. If both conditions are met, a temporary cache subspace is established in the adjacent quadtree node so that the temporary cache subspace stores the service data of the quadtree node whose data access volume is greater than the second preset threshold. Thus, the load of the quadtree node is reduced and dynamic load balancing is achieved.

[0102] Through the above solution, the present application generates business data distribution factors based on business scenarios and caches data according to preset spatio-temporal index rules, realizing dynamic cache resource allocation, enabling more reasonable utilization of cache resources, reducing data acquisition latency, and ensuring data query efficiency. It realizes accurate, dynamic allocation and efficient query of cache resources according to the geographical location, functions and diversity of business scenarios of water conservancy monitoring stations.

[0103] Figure 2 FIG. is a schematic structural diagram of a business data communication device for a water conservancy monitoring system provided by an embodiment of the present application, as Figure 2 shown, the device includes:

[0104] At least one processor; and a memory communicatively connected to the at least one processor. Wherein, 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:

[0105] Obtain a set of data operation information corresponding to each preset monitoring station in different business scenarios. The set of data operation information at least includes business data access information and business data update information for the business scenario. Based on the set of data operation information and the determination result of the trigger condition of the preset business scenario, determine each business data distribution factor corresponding to the corresponding business scenario. Wherein, the business data distribution factor is used to regulate the allocation ratio of business data in the cache space. Based on the business data distribution factor and the preset spatio-temporal index rule, store the business data of each preset monitoring station into the cache space respectively. After receiving a business data acquisition request from a user terminal, determine whether the response data corresponding to the business data acquisition request exists in the cache space, so as to make a response or generate a business data update instruction according to the determination result.

[0106] An embodiment of the present application also provides a non-volatile computer storage medium, storing computer-executable instructions, and the computer-executable instructions are set to:

[0107] Obtain a set of data operation information corresponding to each preset monitoring station in different business scenarios. The set of data operation information at least includes business data access information and business data update information for the business scenario. Based on the set of data operation information and the determination result of the trigger condition of the preset business scenario, determine each business data distribution factor corresponding to the corresponding business scenario. Wherein, the business data distribution factor is used to regulate the allocation ratio of business data in the cache space. Based on the business data distribution factor and the preset spatio-temporal index rule, store the business data of each preset monitoring station into the cache space respectively. After receiving a business data acquisition request from a user terminal, determine whether the response data corresponding to the business data acquisition request exists in the cache space, so as to make a response or generate a business data update instruction according to the determination result.

[0108] Each embodiment in this application is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the embodiments of the device and medium, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the corresponding parts of the method embodiments for the relevant content.

[0109] The device and medium provided by the embodiments of this application correspond one by one to the method. Therefore, the device and medium also have beneficial technical effects similar to those of the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be elaborated here.

[0110] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the said element.

[0111] The above description is only for the embodiments of this application and is not intended to limit this application. For those skilled in the art, various changes and modifications can be made to this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the scope of the claims of this application.

Claims

1. A business data communication method for a water conservancy monitoring system, characterized in that: The method comprises: Acquire a data operation information set corresponding to different business scenarios of each preset monitoring station; the data operation information set at least includes business data access information and business data update information for the business scenario; Based on the data operation information set and the determination result of the preset business scenario trigger condition, determine each business data allocation factor corresponding to the corresponding business scenario; wherein the business data allocation factor is used to adjust the allocation ratio of the business data in the cache space; Based on the business data allocation factor and the preset spatiotemporal index rule, the business data of each preset monitoring station is stored in the cache space respectively; After receiving a service data acquisition request from a user terminal, it is determined whether the response data corresponding to the service data acquisition request exists in the cache space, so as to respond or generate a service data update instruction according to the determination result.

2. A business data communication method for a water conservancy monitoring system according to claim 1, characterized in that: Based on the data operation information set and the determination result of the preset business scenario trigger condition, each business data allocation factor corresponding to the corresponding business scenario is determined, specifically including: According to the preset business scenario trigger condition, determine the business scenario standard interval corresponding to each business data of the preset monitoring station, so as to determine the business scenario of the corresponding preset monitoring station according to the business scenario standard interval and / or the scenario designation instruction from the user terminal; wherein the business scenario includes one of the following: daily monitoring scenario, flood warning scenario, engineering scheduling scenario, ecological water replenishment scenario, water quality monitoring scenario; According to the determined business scenario, match the data weight triplet corresponding to each data type in the preset data weight list; the data weight triplet includes the access frequency weight, update frequency weight, and business scenario weight corresponding to the data type; The business data allocation factor is calculated based on the business data access information, the business data update information and the data weight triplet corresponding to the data type.

3. A business data communication method for a water conservancy monitoring system according to claim 1, characterized in that: Before storing the service data of each preset monitoring station in the cache space respectively based on the service data allocation factor and the preset spatiotemporal index rule, the method further includes: Determine the water conservancy monitoring area corresponding to each of the preset monitoring stations and divide it into grids; Determine the cache capacity corresponding to each of the grids according to the number of monitoring stations in each of the grids, the total capacity of the cache space, the total number of monitoring stations in the water conservancy monitoring area, and each of the business data allocation factors; According to the cache capacity corresponding to each of the grids, a cache subspace corresponding to each of the grids is established; wherein each of the cache subspaces corresponds to each of the grids one by one; and the cache subspace is used to store the business data of the corresponding grid; According to the spatial position corresponding to each of the grids, pointers pointing to the quadtree nodes corresponding to each of the grids are set to construct a quadtree spatial index; wherein the quadtree nodes at least store the service data of the monitoring stations in the grid; the pointers are used to realize the positioning from the grid to the quadtree nodes, so that when performing a spatial query, the part of the quadtree associated with the grid can be accessed through the pointers based on the grid information; According to the collection time of each of the business data and the preset time window, the business data of each of the grids are recorded into a preset linked list to construct a time index; The preset spatiotemporal index rule is determined according to each of the cache subspaces, the quadtree spatial index and the time index.

4. A business data communication method for a water conservancy monitoring system according to claim 3, characterized in that: Based on the business data allocation factor and the preset spatiotemporal index rule, the business data of each preset monitoring station is stored in the cache space respectively, specifically including: Acquire the service data of each of the preset monitoring stations, and determine the allocation ratio of each of the service data in the cache space according to the service data allocation factor; According to each of the allocation proportions and the preset spatiotemporal indexing rule, each of the business data is stored in the corresponding cache subspace until each of the business data is stored in the cache space, or the used capacity of the cache space is greater than a first preset threshold.

5. The business data communication method for a water conservancy monitoring system according to claim 1, characterized in that: Before storing the service data of each preset monitoring station in the cache space respectively, the method further includes: Acquire a network communication data set of each of the preset monitoring stations; wherein the network communication data set includes at least the following network communication data: network signal strength, network delay and packet loss rate; Inputting the network communication data set into a pre-trained LSTM model to determine a network status prediction result within a preset time period according to an output result of the LSTM model; According to the network status prediction result and the preset cache update frequency table, the service data update frequency corresponding to the preset monitoring station is determined, so as to update the service data corresponding to the preset monitoring station in the cache space according to the service data update frequency.

6. A method for business data communication for a water conservancy monitoring system according to claim 5, characterized in that: The method further comprises: Determine the key business data corresponding to the business scenario according to the preset scenario data cache list; During a data monitoring period corresponding to the business scenario, the key business data in the cache space is updated in real time.

7. A business data communication method for a water conservancy monitoring system according to claim 4, characterized in that: The method further comprises: Determine in real time the amount of data accessed to each of the quadtree nodes per unit time; When the data access amount is greater than a second preset threshold, determining an adjacent quadtree node corresponding to the quadtree node; When the data access amount of the adjacent quadtree node is less than the third preset threshold and the used capacity of the corresponding cache subspace is less than the fourth preset threshold, a temporary cache subspace is established in the cache subspace of the adjacent quadtree node to store the business data corresponding to the quadtree node through the temporary cache subspace.

8. A business data communication method for a water conservancy monitoring system according to claim 1, characterized in that: Determining whether the response data corresponding to the business data acquisition request exists in the cache space, so as to respond or generate a business data update instruction according to the determination result, specifically includes: In the case where it is determined that the response data corresponding to the service data acquisition request exists in the cache space, the corresponding service data in the cache space is used as the response data and sent to the user terminal; Otherwise, the service data update instruction is generated to obtain the requested service data collected by the preset monitoring station corresponding to the service data acquisition request, and sent to the user terminal.

9. A business data communication device for a water conservancy monitoring system, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a business data communication method for a water conservancy monitoring system as described in any one of claims 1 to 8.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute a business data communication method for a water conservancy monitoring system as described in any one of claims 1 to 8 above.