A method, device and medium for sharing power data
By establishing a shared query table in the cloud server and dynamically managing access paths based on access frequency and duration, the problem of low security and efficiency in power data sharing is solved, and efficient and safe power data sharing is achieved.
Patent Information
- Application Number
- CN202311707697.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-12-12
AI Technical Summary
During the cloud sharing process, power data has low security because shared links and passwords are easily stolen, and due to the deletion of access paths, it takes too long to access complete information again, affecting efficiency.
By establishing a shared query table in the cloud server, including the first and second data units, receiving the shared configuration information and generating an access path, judging whether to transfer the path based on the access frequency and duration, and querying qualified paths after a verification, periodically Obtain accumulated shared information for dynamic management, mark temporary paths and update them in real time, monitor and generate blacklists to ensure security and efficiency.
It improves the security and efficiency of power data sharing, ensures the efficiency and flexibility of access path search, dynamically adapts to the real-time access situation of power data, and enhances the reliability and stability of data sharing.
Smart Images

Figure CN117852051B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data security, and in particular, relates to a method, device and medium for sharing power data. Background Art
[0002] Electricity data contains a variety of information such as electricity consumption, region, and user. It is stored in the cloud server and data access is achieved by various terminals through cloud service data sharing. The electricity data sharing process is usually that an uploading terminal stores the data to be shared in the cloud server, sets a sharing link and password, and then informs the access terminal that is allowed to access the shared electricity data of the sharing link and password. Each time the access terminal accesses the shared electricity data, it needs to re-enter the corresponding sharing link and enter the password. Only after the cloud server successfully verifies the password can the access terminal be allowed to access the shared electricity data. However, the sharing link and password can be easily stolen by a third party to illegally access the cloud shared electricity data, which reduces the security of electricity data sharing.
[0003] The prior art improves the security of data sharing by constructing data units in a cloud server. Chinese invention patent CN115987685B discloses a cloud service data sharing method and system, which stores shared data corresponding to user information and shared verification information in a data unit corresponding to an access terminal that is allowed to access the shared data, generates an access path for the shared data located in the data unit, and writes the generated access path into a shared configuration table; if the access request does not carry shared verification information, the access path for the shared data located in the data unit that meets preset conditions in the data unit corresponding to the current access terminal is pushed to the current access terminal, and the access terminals that can access the shared power data are limited by the upload terminal, thereby reducing the potential safety hazards in the data sharing process and improving the security of cloud data sharing to a certain extent; at the same time, before pushing the access path corresponding to the found shared data to the current access terminal, the accumulated shared information of each access path is obtained, and if the accumulated shared information reaches the restriction condition in the shared restriction information, the access path in the shared configuration table is deleted, thereby improving the convenience and response speed of data sharing. However, power data contains a large amount of scattered information such as users, power consumption, frequency, time, and region. Some special information, such as the power consumption information of power users in the current month and each month, has an uncertain access frequency. After the relevant access path is deleted, it will take too long to obtain complete information when accessed again. Therefore, it is necessary to consider the characteristics of power data and design a power data sharing method to improve the security and access efficiency of power data sharing. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a power data sharing method, device and medium to ensure the security and efficiency of power data sharing.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A method for sharing power data comprises the following steps:
[0007] Establishing a shared query table, wherein the shared query table includes a first data unit and a second data unit;
[0008] receiving shared configuration information and shared power data corresponding to the shared configuration information, generating an access path for the corresponding shared power data, and storing the access path in the first data unit;
[0009] Obtaining the access frequency of each access path in the first data unit, determining whether a first transfer condition is satisfied, and if so, transferring the corresponding access path to the second data unit;
[0010] An access request is received, and a verification is performed by comparing the access request with the shared configuration information. If the verification succeeds, it is determined in turn whether there is an access path in the first data unit and the second data unit that meets the preset conditions in the access request. If so, the access request is successful, the corresponding access path is sent, and the corresponding power data is shared.
[0011] Furthermore, the shared configuration information includes user information, shared verification information and a shared configuration relationship, and the shared configuration relationship is a corresponding relationship between the user information, the shared verification information and corresponding shared power data.
[0012] Furthermore, the accumulated shared information includes the historical access frequency and access duration of the access path. If either the access frequency or the access duration is less than a set threshold, the first transfer condition is met.
[0013] Furthermore, the accumulated sharing information of each access path in the second data unit is periodically obtained to determine whether a second transfer condition is met, and if so, the corresponding access path is transferred to the first data unit.
[0014] Furthermore, before determining whether there is an access path in the second data unit that meets the preset conditions in the access request, first obtain the number of accesses corresponding to each time unit within the target time to determine whether the trigger condition is met. If so, send an access request to the second data unit; if not, perform a secondary verification; if the secondary verification passes, send an access request to the second data unit; if not, return a warning instruction.
[0015] Furthermore, the number of accesses corresponding to each time unit within the target time is compared with the trigger threshold, and the ratio of the number of time units whose accesses are greater than the trigger threshold to the target time is calculated. If it is greater than the trigger ratio, the trigger condition is met. The trigger threshold is dynamically adjusted based on the average number of accesses, the adjustment factor and the offset.
[0016] Furthermore, the number of times the access request issuer receives warning instructions is monitored and counted in real time, an access blacklist is generated, and subsequent access requests from the access request issuers on the blacklist are rejected.
[0017] Furthermore, if the access path that meets the access request is stored in the second data unit, the process of sending the access path is as follows:
[0018] Marking the access path in the second data unit that meets the preset conditions in the access request as a temporary access path and writing it into the first data unit, sending the temporary access path, and performing power data sharing;
[0019] It is determined whether the power data sharing is ended. If so, the corresponding temporary access path is deleted from the first data unit, and the accumulated sharing information of the access path is updated in real time in the second data unit.
[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a program stored in the memory, wherein the processor implements the above method when executing the program.
[0021] The present invention also provides a computer-readable storage medium on which a computer program is stored, and the program implements the above method when executed by a processor.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] 1. After receiving an access request, the present invention first performs a verification, and then queries whether there is an access path that meets the preset conditions after the verification is passed. If so, the corresponding access path is sent to share the corresponding power data, thereby improving the security of power data sharing; the present invention divides each access path according to the accumulated shared information, and stores them in the first data unit and the second data unit respectively, thereby improving the efficiency of access path search and making power data sharing more efficient and convenient.
[0024] 2. The present invention periodically obtains the cumulative sharing information of each access path in the second data unit to determine whether the second transfer condition is met. If so, the corresponding access path is transferred to the first data unit, and the access path is dynamically transferred between the first data unit and the second data unit. It can adapt to changes in the real-time access situation of shared power data and ensure the flexibility and reliability of power data sharing.
[0025] 3. Before the present invention determines whether there is an access path in the second data unit that meets the preset conditions in the access request, it first obtains the number of accesses corresponding to each time unit in the target time to determine whether the trigger condition is met. If so, an access request is sent to the second data unit. If not, a secondary verification is performed. If passed, an access request is sent to the second data unit. If not, a warning instruction is returned. At the same time, the number of times the access request issuer receives the warning instruction is monitored and counted in real time, an access blacklist is generated, and subsequent access requests from the access request issuers on the blacklist are rejected, thereby ensuring that the access request issuers are legal and enhancing the security and stability of the data sharing process.
[0026] 4. The present invention marks the access path in the second data unit that meets the preset conditions in the access request as a temporary access path and writes it into the first data unit. When the power data sharing is completed, the corresponding temporary access path is deleted from the first data unit, and the cumulative sharing information of the access path is updated in real time in the second data unit. This solves the problem in the prior art that directly deleting the access path with low access frequency and short access time results in a long time for re-access to obtain complete information, realizes the mining of potential high-frequency access paths in the second data unit, and improves the access efficiency of shared power data. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Schematic diagram of the process for shared power data access. DETAILED DESCRIPTION
[0028] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0029] Example 1
[0030] In the process of data sharing, in order to improve security, a data unit is usually constructed in the cloud server. When the access terminal needs to access a certain shared power data, the access terminal uploads the shared verification information sent by the upload terminal, and the cloud server sends the access path of the shared power data found to the access terminal. The access terminal can access the shared power data by clicking the access path. The upload terminal limits the access terminals that can access the shared power data, which reduces the security risks in the data sharing process and improves the security of cloud data sharing to a certain extent. On this basis, the convenience of data sharing is improved by deleting access paths with low access frequency and short access time.
[0031] However, for power data, some special information, such as the power consumption information of power users in the current month and each month, contains a large amount of scattered information such as users, power consumption, frequency time, region, etc. The corresponding access frequency is uncertain. For users, after the relevant access path is deleted, it takes too long to access again to obtain complete information. Therefore, this embodiment provides a power data sharing method, including the following steps:
[0032] A shared query table is established in the cloud server, and the shared query table includes a first data unit and a second data unit. The upload terminal uploads the shared configuration information and the shared power data corresponding to the shared configuration information to the cloud server, generates an access path for the corresponding shared power data, and stores it in the first data unit. The upload terminal limits the access terminals that can access the shared power data, reduces the security risks in the data sharing process, and improves the security of cloud data sharing. The shared configuration information includes user information, shared verification information, and shared configuration relationships, wherein the user information includes a user account and a user password; the shared verification information includes account verification information and terminal type verification information, etc., and the accessible terminal verification type is obtained by type classification according to the industry to which the access terminal belongs. The terminal verification type can be divided into multiple terminal types such as industrial terminals, telecommunications terminals, financial terminals, transportation terminals, natural resource terminals, health terminals, education terminals, and science and technology terminals; the shared configuration relationship is the corresponding relationship between the user information, the shared verification information, and the corresponding shared power data, which can be configured after the upload terminal uploads the shared power data, or it can be configured while uploading the shared power data.
[0033] The accumulated sharing information of each access path in the first data unit is obtained to determine whether the first transfer condition is met, and if so, the corresponding access path is transferred to the second data unit. The accumulated shared information includes the historical access frequency and access duration of the access path. If one of the access frequency and the access duration is less than the set threshold, it means that the current access terminal has little demand for understanding the shared power data, and the probability of the access terminal accessing the power data in the short term in the future is not high. In order to reduce the possibility of other access devices that are not allowed to share illegally accessing the shared power data through the current access terminal and improve the security of storing and sharing shared power data, it is necessary to remove the access path corresponding to the shared power data from the shared query table of the data unit corresponding to the current access terminal. Regardless of whether the access request carries shared verification information, the access path corresponding to the shared power data whose accumulated shared information reaches the restriction conditions in the shared restriction information cannot be found in the shared query table. At this time, a prompt message that the access terminal has not found the access path can be fed back to the access terminal. At the same time, in order to avoid re-password identity authentication when the access terminal continues to access the shared power data later, the access path whose accumulated shared information reaches the restriction conditions in the shared restriction information is transferred to the second data unit, thereby improving the efficiency of the access terminal in accessing the shared power data and providing a more convenient sharing method for the access terminal.
[0034] By setting up a second data unit, it is possible to centrally store and manage future access paths with low frequency and low access time. When the accumulated shared information reaches the restriction condition in the shared restriction information, the corresponding access path will be deleted and stored in the second data unit. The establishment of the second data unit ensures that the deleted access path will not immediately disappear completely from the shared query table. In this way, even if it is deleted by mistake, it can be retrieved through the second data unit. When the access terminal needs to view the access path of a certain power data again, it can be searched and restored through the second data unit without rebuilding the shared query table, which greatly improves the efficiency and convenience of data management.
[0035] The access process of power data is as follows: Figure 1 As shown, the following steps are included:
[0036] S1. Receive an access request from an access terminal, perform a verification by comparing the access request with the shared configuration information, and if the verification is successful, proceed to step S2. It should be noted that when the same access terminal needs to re-access the previously accessed shared power data, it does not need to perform a verification again, and the access paths corresponding to multiple shared power data can be directly fed back to the access terminal, thereby improving the convenience and response speed of data sharing.
[0037] S2. Determine whether there is an access path in the first data unit that meets the preset conditions in the access request. If so, the access request is successful, the corresponding access path is sent, and the corresponding power data is shared; if not, proceed to step S3. Since the amount of shared power data allowed to be accessed may be large, multiple access paths for shared power data can be screened by setting preset conditions, thereby improving the convenience of the access terminal in selecting from multiple access paths when the shared verification information is not sent; the preset conditions may be preset data types, the last access within a preset number of days, etc. In this embodiment, the access terminal can select the preset conditions. When the access path corresponding to the found shared power data is pushed to the current access terminal, the remark information of the access path is synchronously sent to the current access terminal. The remark information is information that facilitates the access terminal to distinguish between multiple access paths.
[0038] S3. Obtain the number of accesses corresponding to each time unit within the target time, and determine whether the trigger condition is met. If so, send an access request to the second data unit and enter step S4; if not, perform secondary verification. If the secondary verification passes, send an access request to the second data unit. If not, return a warning instruction.
[0039] The number of accesses corresponding to each time unit within the target time is stored in the target array, and compared with the trigger threshold P respectively. The ratio of the number of time units whose accesses are greater than the trigger threshold to the target time is calculated. If it is greater than the trigger ratio, the trigger condition is met. The trigger threshold is dynamically adjusted based on the average number of accesses f, the adjustment factor k and the offset e. The calculation formula is as follows: P = f*ke.
[0040] Assume that the trigger threshold is 100, the trigger ratio is 80%, the target time is 5 minutes, and each time unit is 1 minute. If the number of visits by access terminal A within the target time is [120, 150, 180, 210, 240], the trigger condition is met and the access terminal is allowed to access the second data unit; if the number of visits by access terminal B within the target time is [80, 90, 100, 110, 120], since the ratio of the number of time units whose access times are greater than the trigger threshold to the target time is 40%, which is lower than the trigger ratio of 80%, secondary verification is required.
[0041] In a preferred embodiment, the number of times the access request issuer receives warning instructions is monitored and counted in real time, an access blacklist is generated, and subsequent access requests from the access request issuers on the blacklist are rejected to ensure the security of power data sharing.
[0042] S4. Determine whether there is an access path in the second data unit that meets the preset conditions in the access request. If so, the access request is successful, the corresponding access path is sent, and the corresponding power data is shared.
[0043] It should be noted that, if the access path that meets the access request is stored in the second data unit, the process of sending the access path is as follows:
[0044] S401, marking an access path in the second data unit that meets the preset conditions in the access request as a temporary access path and writing it into the first data unit, sending the temporary access path, and performing power data sharing;
[0045] S402. Determine whether the power data sharing is ended. If so, delete the corresponding temporary access path from the first data unit, and update the accumulated sharing information of the access path in real time in the second data unit, thereby realizing dynamic management and maintenance of the access path.
[0046] If the above method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0047] Example 2
[0048] Embodiment 1 transfers the access path whose access frequency or access duration is less than or equal to the set threshold from the first data unit to the second data unit. However, for some special data, the access frequency and access duration will change after a certain period of time. In order to adapt to the variability and real-time nature of shared power data access and provide more accurate path selection for access terminals to share power data, this embodiment proposes an adaptive adjustment method for the access path in the second data unit, which is as follows:
[0049] The accumulated sharing information of each access path in the second data unit is obtained periodically (for example, every month), and it is determined whether the second transfer condition is met. If so, the corresponding access path is transferred to the first data unit. In this way, the access path can be dynamically transferred between the first data unit and the second data unit to adapt to the changes in the real-time access to the shared power data, and ensure the flexibility and reliability of power data sharing.
[0050] The above description of the embodiments is to facilitate the understanding and use of the invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to these embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the scope of protection of the present invention.
Claims
1. A method for sharing power data, characterized in that: The following steps are involved: Establishing a shared query table, wherein the shared query table includes a first data unit and a second data unit; receiving shared configuration information and shared power data corresponding to the shared configuration information, generating an access path for the corresponding shared power data, and storing the access path in the first data unit; Obtaining the accumulated sharing information of each access path in the first data unit, determining whether a first transfer condition is met, and if so, transferring the corresponding access path to the second data unit; receiving an access request, performing a verification by comparing the access request with the shared configuration information, and if the verification is successful, determining in turn whether there is an access path in the first data unit and the second data unit that meets the preset conditions in the access request, and if so, the access request is successful, sending the corresponding access path, and sharing the corresponding power data; The accumulated shared information includes the historical access frequency and access duration of the access path. If either the access frequency or the access duration is less than a set threshold, the first transfer condition is met. Periodically obtaining the accumulated sharing information of each access path in the second data unit, determining whether a second transfer condition is met, and if so, transferring the corresponding access path to the first data unit; Before determining whether there is an access path in the second data unit that meets the preset conditions in the access request, first obtain the number of accesses corresponding to each time unit in the target time, determine whether the trigger condition is met, if so, send an access request to the second data unit, if not, perform secondary verification, if the secondary verification is passed, send an access request to the second data unit, if not, return a warning instruction; The number of accesses corresponding to each time unit within the target time is compared with the trigger threshold, and the ratio of the number of time units whose accesses are greater than the trigger threshold to the target time is calculated. If it is greater than the trigger ratio, the trigger condition is met. The trigger threshold is dynamically adjusted based on the average number of accesses, the adjustment factor and the offset.
2. A power data sharing method according to claim 1, characterized in that: The shared configuration information includes user information, shared verification information and a shared configuration relationship, and the shared configuration relationship is a correspondence between the user information, the shared verification information and corresponding shared power data.
3. A power data sharing method according to claim 1, characterized in that: Monitor and count the number of times the access request issuer receives warning instructions in real time, generate an access blacklist, and reject subsequent access requests from the access request issuers on the blacklist.
4. A power data sharing method according to claim 1, characterized in that: If the access path that meets the access request is stored in the second data unit, the process of sending the access path is as follows: Marking the access path in the second data unit that meets the preset conditions in the access request as a temporary access path and writing it into the first data unit, sending the temporary access path, and performing power data sharing; It is determined whether the power data sharing is ended. If so, the corresponding temporary access path is deleted from the first data unit, and the accumulated sharing information of the access path is updated in the second data unit in real time.
5. An electronic device comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
