Water quality pollution tracing method, device and equipment based on privacy calculation and medium
Through the privacy calculation method, the RSA public key algorithm and the prediction of water quality pollution concentration value are used to solve the problem of low traceability accuracy of water quality pollution, and the accurate traceability of water quality conditions and data security are achieved.
Patent Information
- Application Number
- CN202510238254.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-03-03
AI Technical Summary
In the prior art, there is a problem of low accuracy in tracing water quality pollution, and it is impossible to accurately determine whether the upstream point is the pollution source at the current point.
A privacy-based calculation method is used to assume that the upstream point causes pollution to the current point, and the water quality pollution concentration value is calculated and predicted based on the excessive concentration threshold, water flow velocity and distance. The RSA public key algorithm is used to encrypt the random number, and the decryption data string is used to determine whether the actual water pollution concentration value at the upstream point is greater than the predicted value to determine whether it is a source of pollution.
It is realized that the upstream point is a source of pollution without obtaining the real water pollution concentration at the upstream point, avoiding the defects of exposure of private data and manual monitoring, and improving the accuracy and data security of water quality pollution traceability.
Smart Images

Figure CN119740254A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water quality monitoring technology, and in particular to a water pollution source tracing method, device, equipment and medium based on privacy computing. Background Art
[0002] In order to better manage and protect water resources, it is particularly important to trace the source of water pollution. By collecting and analyzing various indicators and data in water bodies, we can timely grasp the water quality status and development trends, and provide a scientific basis for water resource management, pollution control and environmental planning. At the same time, tracing the source of water pollution can also guide the rational allocation and use of water resources, promote the sustainable use of water resources and the improvement of the ecological environment. Therefore, tracing the source of water pollution is of great significance for protecting water resources, ensuring public health, promoting ecological balance and achieving sustainable development.
[0003] Calculating the source of water pollution requires obtaining upstream pollutant concentrations, but water quality data in different regions are private data of each region. In this case, it is impossible to obtain upstream water quality data. Currently, manual methods are needed to monitor real-time concentrations, which is time-consuming, labor-intensive, and inefficient, making it impossible to accurately trace the source of water pollution. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a water pollution source tracing method based on privacy computing to solve the technical problem of low accuracy in water pollution source tracing in the prior art. The method includes: When the water pollution concentration value at the current point is greater than the excess concentration threshold, it is assumed that the upstream point of the current point pollutes the water quality of the current point, and the predicted water pollution concentration value of the upstream point is calculated according to the excess concentration threshold, the water flow velocity and the distance between the current point and the upstream point; A random number is selected, and based on the RSA public key algorithm, the public key concentration of the upstream point is used to encrypt the random number to obtain encrypted data, wherein the order of magnitude of the random number is greater than the water pollution concentration value of the current point by a preset multiple; Send the encrypted data in a request to obtain a returned decrypted data string, wherein the decrypted data string includes multiple values and a prime number, and the multiple values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing on the prime number; Performing a modulo process on the random number and the prime number to obtain a modulo result value; A value whose ranking number is consistent with the water pollution concentration value of the current point is taken out from the multiple values, and whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value is judged according to whether the taken out value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
[0005] The embodiment of the present invention also provides a water pollution source tracing device based on privacy computing to solve the technical problem of low accuracy in water pollution source tracing in the prior art. The device includes: A calculation module, for assuming that the upstream point of the current point pollutes the water quality of the current point when the water pollution concentration value of the current point is greater than the excessive concentration threshold, and calculating the predicted water pollution concentration value of the upstream point according to the excessive concentration threshold, the water flow velocity and the distance between the current point and the upstream point; An encryption module, used for selecting a random number, and encrypting the random number based on the RSA public key algorithm using the public key concentration of the upstream point to obtain encrypted data, wherein the order of magnitude of the random number is a preset multiple greater than the water pollution concentration value of the current point; A data acquisition module, used for sending the encrypted data in a request to obtain a returned decrypted data string, wherein the decrypted data string includes a plurality of numerical values and a prime number, and the plurality of numerical values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing on the prime number; A modulus calculation module, used for performing modulus processing on the random number and the prime number to obtain a modulus result value; The judgment module is used to extract a value whose ranking number is consistent with the water pollution concentration value of the current point from the multiple values, and judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value based on whether the extracted value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
[0006] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned water pollution source tracing methods based on privacy computing to solve the technical problem of low precision in water pollution source tracing in the prior art.
[0007] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing any of the above-mentioned water pollution source tracing methods based on privacy computing, so as to solve the technical problem of low accuracy in water pollution source tracing in the prior art.
[0008] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least: when the water pollution concentration value of the current point is greater than the excessive concentration threshold, it is proposed to assume that the upstream point of the current point pollutes the water quality of the current point, and the predicted water pollution concentration value of the upstream point is calculated according to the excessive concentration threshold, the water flow velocity and the distance between the current point and the upstream point; at the same time, based on the RSA public key algorithm, the public key concentration of the upstream point is used to encrypt the random number to obtain an encrypted number. The method comprises the following steps: obtaining the decrypted data string returned by the RSA (asymmetric encryption algorithm) decryption algorithm based on the upstream point based on the encrypted data, calculating the modulus result values of the prime numbers and the random numbers in the decrypted data string, and taking out the value whose ranking number is consistent with the water pollution concentration value of the current point from the multiple values. Finally, by judging whether the taken out value is equal to the modulus result value, it is possible to judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value, so as to determine whether the upstream point is the pollution source of the current point. It is achieved that in the case of combining the predicted water pollution concentration value of the upstream point and the decrypted data string obtained based on the RSA decryption algorithm of the upstream point, it is not necessary to obtain the real, actual water pollution concentration of the upstream point, and it is possible to judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value. This not only avoids the problem of exposing private water pollution data in various places, but also avoids the problems caused by manual monitoring of real-time concentrations, and can also achieve accurate tracing of water quality conditions, so that data security can be ensured and water pollution tracing can be achieved conveniently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0010] Figure 1 This is a flow chart of a water pollution source tracing method based on privacy computing provided by an embodiment of the present invention; Figure 2 is a structural block diagram of a computer device provided by an embodiment of the present invention; Figure 3 This is a structural block diagram of a water pollution source tracing device based on privacy computing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0012] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0013] In an embodiment of the present invention, a water pollution source tracing method based on privacy computing is provided. Figure 1 As shown, the method includes: Step S101: when the water pollution concentration value of the current point is greater than the excessive concentration threshold, it is assumed that the upstream point of the current point pollutes the water quality of the current point, and the predicted water pollution concentration value of the upstream point is calculated according to the excessive concentration threshold, the water flow velocity and the distance between the current point and the upstream point; Step S102: Select a random number, and encrypt the random number using the public key concentration of the upstream point based on the RSA public key algorithm to obtain encrypted data, wherein the order of magnitude of the random number is greater than the water pollution concentration value of the current point by a preset multiple; Step S103: The encrypted data is carried in the request and sent to obtain a returned decrypted data string, wherein the decrypted data string includes a plurality of numerical values and a prime number, and the plurality of numerical values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing with the prime number; Step S104: performing a modulo process on the random number and the prime number to obtain a modulo result value; Step S105: Take out a value whose ranking number is consistent with the water pollution concentration value of the current point from the multiple values, and judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value based on whether the taken out value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
[0014] Depend on Figure 1It can be seen from the process shown that in the embodiment of the present invention, it is possible to determine whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value to determine whether the upstream point is the pollution source of the current point. It is achieved that in the case of combining the predicted water pollution concentration value of the upstream point and the decrypted data string obtained based on the RSA decryption algorithm of the upstream point, it is not necessary to obtain the real and actual water pollution concentration of the upstream point, and it is possible to determine whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value, which not only avoids the problem of exposing private water pollution data in various places, but also avoids the problems caused by manual monitoring of real-time concentrations, and can also achieve accurate tracing of water quality conditions, so that data security can be ensured and water pollution can be traced conveniently and accurately.
[0015] In specific implementation, if the water pollution concentration value at the current point exceeds the standard (that is, greater than the exceeding concentration threshold), it is assumed that the upstream point causes pollution to the current point, and the predicted water pollution concentration value of the upstream point is reversed.
[0016] For example, at time t, the excessive concentration threshold of the current point a is 40. When the water pollution of the upstream point b spreads to the current point a, the water pollution concentration is greater than 40, and the upstream point b causes pollution to the current point a.
[0017] We assume that the upstream point b has caused pollution to the current point a, and the water pollution concentration of the water flowing from the upstream point b to the current point a is greater than 40, and then calculate the minimum water pollution concentration that the upstream point b causes to the current point a at time t (that is, the above-mentioned predicted water pollution concentration value).
[0018] In specific implementation, the predicted water pollution concentration value of the upstream point can be calculated according to the excessive concentration threshold, water flow velocity, and the distance between the current point and the upstream point by the following formula:
[0019] Wherein, j is the predicted water pollution concentration value of the upstream point, u is the water flow velocity, k is the attenuation value, and x ab is the distance between the current point a and the upstream point b.
[0020] t ab = x ab / u t1 = tt ab Among them, t is the current time, t ab is the time required for the water from the upstream point b to flow to the current point a, and t1 is the time at which the water from the upstream point b flows to the current point a at time t.
[0021] In specific implementation, in order to obtain the decrypted data string of the upstream point, the data processing device or local data management device at the current point can send a request carrying encrypted data to the data processing device or local data management device at the upstream point, and then this embodiment proposes to generate a decrypted data string and feed it back to the data processing device or local data management device at the current point in the following manner: The encrypted data is decrypted based on the RSA decryption algorithm of the upstream point using the following formula to obtain multiple decrypted values: , n=1,2,…N; Among them, y n is the nth decrypted value, E(x) is the encrypted data of the random number x, N is the total number of n, N is greater than the water pollution concentration value i at the current point, n is a positive integer, D is the RSA decryption algorithm, and E is the RSA encryption algorithm; The prime number is randomly selected, and each of the decrypted values is modulo the prime number using the following formula to obtain multiple modulo values: z n =y n mod p Among them, z n is the nth modulus value, p is the prime number, and mod is the modulus function; The multiple numerical values are generated based on the multiple modulus values, and the decrypted data string is generated based on the multiple numerical values and the prime number.
[0022] In a specific implementation, generating the multiple values based on the multiple modulus values includes: Among the multiple modulus values, for the modulus value whose ranking number is less than or equal to the water pollution concentration value of the current point, the modulus value is used as the value of the corresponding ranking number, and for the modulus value whose ranking number is greater than the water pollution concentration value of the current point, the modulus value is added by 1 as the value of the corresponding ranking number to generate the multiple values. For example, the multiple values are: z1, z2, ..., z i+1 +1,z i+2 +1,…,z N +1, where i is the water pollution concentration value at the current point, z i+1 That is, the ranking number n is the modulus value of i+1, and z i+1 +1 is the value whose ranking order n is i+1 among multiple values.
[0023] In a specific implementation, in order to further improve the accuracy of water pollution source tracing, a method for verifying multiple modulus values is proposed. For example, the multiple values are generated based on the multiple modulus values, including: Determine whether the 1-norm of the difference between any two different modulus values among the multiple modulus values is greater than or equal to 2; if not, reselect the prime number to calculate multiple modulus values; if so, generate the multiple values based on the multiple modulus values.
[0024] In specific implementation, the process of generating a decrypted data string includes the following steps: Assume that the actual water pollution concentration value at the current point a and the reverse predicted water pollution concentration value at the upstream point b are i and j respectively.
[0025] Select the RSA public key algorithm to encrypt the concentration data, let E be the RSA encryption algorithm, and D be the RSA decryption algorithm.
[0026] The current point a randomly selects a very large random number x, encrypts the random number x with the public key of the upstream point b, obtains E(x), and then calculates E(x)-i and sends it to the relevant data processing equipment or local data management equipment of the upstream point b.
[0027] On the relevant data processing equipment or local data management equipment at the upstream point b, first, calculate N decrypted values: , n=1,2,…,N; Then, randomly select a prime number p and calculate N modulo values: z n =y n mod p; Next, verify that for all 0 ≤ n1≠ n2≤ N − 1, ||z n1 − z n2 ||≥ 2, if not satisfied, then reselect a large prime number p and re-verify, where n1 and n2 belong to any two values of n, z n1 、z n2 Any two different (i.e., different ranking numbers) modulus values among multiple modulus values.
[0028] If satisfied, the decrypted data string generated by p and N modulo values is sent to the relevant data processing device or data management device of the current point a. The multiple values in the decrypted data string are as follows: z1,z2,…,z i+1 +1,z i+2 +1,…,z N +1.
[0029] In specific implementation, judging whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value according to whether the extracted value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point, including: If the value z is taken out i If the value z is equal to the modulo result value f (f = x mod p), it is judged that the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value j, so as to determine that the upstream point is the pollution source of the current point, that is, the upstream point b causes pollution to the current point a. If the value z is i If it is not equal to the modulo result value f, it is judged that the actual water pollution concentration value of the upstream point is less than the predicted water pollution concentration value j, so as to determine that the upstream point is not the pollution source of the current point, that is, the upstream point b does not cause pollution to the current point a.
[0030] In this embodiment, a computer device is provided, such as Figure 2 As shown, it includes a memory 201, a processor 202, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned water pollution tracing methods based on privacy computing is implemented.
[0031] Specifically, the computer device may be a computer terminal, a server or a similar computing device.
[0032] In this embodiment, a computer-readable storage medium is provided, which stores a computer program for executing any of the above-mentioned water pollution source tracing methods based on privacy computing.
[0033] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0034] Based on the same inventive concept, a water pollution source tracing device based on privacy computing is also provided in an embodiment of the present invention, as described in the following embodiments. Since the principle of solving the problem by the water pollution source tracing device based on privacy computing is similar to that of the water pollution source tracing method based on privacy computing, the implementation of the water pollution source tracing device based on privacy computing can refer to the implementation of the water pollution source tracing method based on privacy computing, and the repetitions will not be repeated. As used below, the terms "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0035] Figure 3 is a structural block diagram of a water pollution source tracing device based on privacy computing according to an embodiment of the present invention. Figure 3 As shown, including: The calculation module 301 is used for assuming that the upstream point of the current point pollutes the water quality of the current point when the water pollution concentration value of the current point is greater than the excessive concentration threshold, and calculating the predicted water pollution concentration value of the upstream point according to the excessive concentration threshold, the water flow velocity and the distance between the current point and the upstream point; The encryption module 302 is used to select a random number, and encrypt the random number based on the RSA public key algorithm using the public key concentration of the upstream point to obtain encrypted data, wherein the order of magnitude of the random number is greater than the water pollution concentration value of the current point by a preset multiple; The data acquisition module 303 is used to send the encrypted data in a request to obtain a returned decrypted data string, wherein the decrypted data string includes multiple values and a prime number, and the multiple values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing on the prime number; A modulus calculation module 304 is used to perform modulus processing on the random number and the prime number to obtain a modulus result value; The judgment module 305 is used to extract a value whose ranking number is consistent with the water pollution concentration value of the current point from the multiple values, and judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value based on whether the extracted value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
[0036] In one embodiment, the calculation module 301 is used to calculate the predicted water pollution concentration value of the upstream point according to the excessive concentration threshold, the water flow velocity, and the distance between the current point and the upstream point by the following formula:
[0037] Wherein, j is the predicted water pollution concentration value of the upstream point, u is the water flow velocity, k is the attenuation value, and x ab is the distance between the current point a and the upstream point b.
[0038] In one embodiment, the above device further comprises: The decryption data module is used to decrypt the encrypted data based on the RSA decryption algorithm using the following formula to obtain multiple decrypted values: , n=1,2,…N; Among them, y n is the nth decrypted value, E(x) is the encrypted data of the random number x, N is the total number of n, N is greater than the water pollution concentration value i at the current point, n is a positive integer, D is the RSA decryption algorithm, and E is the RSA encryption algorithm; The prime number is randomly selected, and each of the decrypted values is modulo the prime number using the following formula to obtain multiple modulo values: z n =y n mod p Among them, z n is the nth modulus value, p is the prime number, and mod is the modulus function; The multiple numerical values are generated based on the multiple modulus values, and the decrypted data string is generated based on the multiple numerical values and the prime number.
[0039] In one embodiment, the decryption data module is used to, among the multiple modulus values, use the modulus value of the water quality pollution concentration value whose ranking number is less than or equal to the current point as the value of the corresponding ranking number, and add 1 to the modulus value of the water quality pollution concentration value whose ranking number is greater than the current point as the value of the corresponding ranking number, so as to generate the multiple values.
[0040] In one embodiment, the decryption data module is used to determine whether the 1-norm of the difference between any two different modulus values among the multiple modulus values is greater than or equal to 2. If not, reselect the prime number to calculate multiple modulus values. If so, generate the multiple values based on the multiple modulus values.
[0041] In one embodiment, the judgment module is used to judge that the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value if the extracted value is equal to the modulo result value, so as to determine that the upstream point is the pollution source of the current point; if the extracted value is not equal to the modulo result value, then the actual water pollution concentration value of the upstream point is judged to be less than the predicted water pollution concentration value, so as to determine that the upstream point is not the pollution source of the current point.
[0042] The embodiments of the present invention achieve the following technical effects: in combination with the predicted water pollution concentration value of the upstream point and the decrypted data string obtained based on the RSA decryption algorithm of the upstream point, it is possible to judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value without obtaining the real and actual water pollution concentration of the upstream point, thereby avoiding the problem of exposing private water pollution data in various places and the problems caused by manual monitoring of real-time concentrations, and achieving accurate tracing of water quality conditions, thereby ensuring data security and conveniently and accurately tracing water pollution.
[0043] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0044] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A water pollution source tracing method based on privacy computing, characterized in that: include: When the water pollution concentration value at the current point is greater than the excess concentration threshold, it is assumed that the upstream point of the current point pollutes the water quality of the current point, and the predicted water pollution concentration value of the upstream point is calculated according to the excess concentration threshold, the water flow velocity and the distance between the current point and the upstream point; A random number is selected, and based on the RSA public key algorithm, the public key concentration of the upstream point is used to encrypt the random number to obtain encrypted data, wherein the order of magnitude of the random number is greater than the water pollution concentration value of the current point by a preset multiple; Send the encrypted data in a request to obtain a returned decrypted data string, wherein the decrypted data string includes multiple values and a prime number, and the multiple values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing on the prime number; Performing a modulo process on the random number and the prime number to obtain a modulo result value; A value whose ranking number is consistent with the water pollution concentration value of the current point is taken out from the multiple values, and whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value is judged according to whether the taken out value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
2. The water pollution source tracing method based on privacy computing as claimed in claim 1, characterized in that: Calculating the predicted water pollution concentration value of the upstream point according to the excessive concentration threshold, the water flow velocity, and the distance between the current point and the upstream point, including: Wherein, j is the predicted water pollution concentration value of the upstream point, u is the water flow velocity, k is the attenuation value, and x ab is the distance between the current point a and the upstream point b.
3. The water pollution source tracing method based on privacy computing as claimed in claim 1, characterized in that: Also includes: The encrypted data is decrypted based on the RSA decryption algorithm of the upstream point using the following formula to obtain multiple decrypted values: ,n=1,2,…N; Among them, y n is the nth decrypted value, E(x) is the encrypted data of the random number x, N is the total number of n, N is greater than the water pollution concentration value i at the current point, n is a positive integer, D is the RSA decryption algorithm, and E is the RSA encryption algorithm; The prime number is randomly selected, and each of the decrypted values is modulo the prime number using the following formula to obtain multiple modulo values: z n =y n mod p Among them, z n is the nth modulus value, p is the prime number, and mod is the modulus function; The multiple numerical values are generated based on the multiple modulus values, and the decrypted data string is generated based on the multiple numerical values and the prime number.
4. The water pollution source tracing method based on privacy computing as claimed in claim 3 is characterized in that: Generating the plurality of values based on the plurality of modulo values comprises: Among the multiple modulus values, for the modulus value whose ranking number is less than or equal to the water quality pollution concentration value of the current point, the modulus value is used as the value of the corresponding ranking number; for the modulus value whose ranking number is greater than the water quality pollution concentration value of the current point, the modulus value is increased by 1 and used as the value of the corresponding ranking number to generate the multiple values.
5. The water pollution source tracing method based on privacy computing as claimed in claim 3 is characterized in that: Generating the plurality of values based on the plurality of modulo values comprises: Determine whether the 1-norm of the difference between any two different modulus values among the multiple modulus values is greater than or equal to 2; if not, reselect the prime number to calculate multiple modulus values; if so, generate the multiple values based on the multiple modulus values.
6. The water pollution source tracing method based on privacy computing according to any one of claims 1 to 5, characterized in that: According to whether the extracted value is equal to the modulo result value, it is judged whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value, so as to determine whether the upstream point is the pollution source of the current point, including: If the extracted value is equal to the value of the modulo result, it is judged that the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value, so as to determine that the upstream point is the pollution source of the current point. If the extracted value is not equal to the value of the modulo result, it is judged that the actual water pollution concentration value of the upstream point is less than the predicted water pollution concentration value, so as to determine that the upstream point is not the pollution source of the current point.
7. A water pollution source tracing device based on privacy computing, characterized in that: include: A calculation module, for assuming that the upstream point of the current point pollutes the water quality of the current point when the water pollution concentration value of the current point is greater than the excessive concentration threshold, and calculating the predicted water pollution concentration value of the upstream point according to the excessive concentration threshold, the water flow velocity and the distance between the current point and the upstream point; An encryption module, used for selecting a random number, and encrypting the random number based on the RSA public key algorithm using the public key concentration of the upstream point to obtain encrypted data, wherein the order of magnitude of the random number is a preset multiple greater than the water pollution concentration value of the current point; A data acquisition module, used for sending the encrypted data in a request to obtain a returned decrypted data string, wherein the decrypted data string includes a plurality of numerical values and a prime number, and the plurality of numerical values are obtained by decrypting the encrypted data based on the RSA decryption algorithm of the upstream point and performing modulo processing on the prime number; A modulus calculation module, used for performing modulus processing on the random number and the prime number to obtain a modulus result value; The judgment module is used to extract a value whose ranking number is consistent with the water pollution concentration value of the current point from the multiple values, and judge whether the actual water pollution concentration value of the upstream point is greater than the predicted water pollution concentration value based on whether the extracted value is equal to the modulo result value, so as to determine whether the upstream point is the pollution source of the current point.
8. The water pollution source tracing device based on privacy computing as claimed in claim 7, characterized in that: Also includes: The decryption data module is used to decrypt the encrypted data based on the RSA decryption algorithm using the following formula to obtain multiple decrypted values: ,n=1,2,…N; Among them, y n is the nth decrypted value, E(x) is the encrypted data of the random number x, N is the total number of n, N is greater than the water pollution concentration value i at the current point, n is a positive integer, D is the RSA decryption algorithm, and E is the RSA encryption algorithm; The prime number is randomly selected, and each of the decrypted values is modulo the prime number using the following formula to obtain multiple modulo values: z n =y n mod p Among them, z n is the nth modulus value, p is the prime number, and mod is the modulus function; The multiple numerical values are generated based on the multiple modulus values, and the decrypted data string is generated based on the multiple numerical values and the prime number.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the water pollution source tracing method based on privacy computing described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the water pollution source tracing method based on privacy computing as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Water pollution tracing method and device and terminal equipment
CN112559657A
Water pollution tracing method, device and equipment and storage medium
CN116166669A
Water quality pollution tracing method and terminal
CN116644889A
Water quality monitoring reporting method and system based on edge calculation
CN117236902A
Peripheral pollution source tracing method and device based on multi-source data, medium and equipment
CN118169339A