Data sharing method and system for computer local area network
By building a LAN and data management center, data splitting and virtual polygons are used to simulate light reflection, the problem of unbalanced load of data sharing equipment is solved, data security and efficient access is achieved, and data backup and encrypted storage are provided.
Patent Information
- Application Number
- CN202510777491.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing data sharing method, shared files can be accessed by all visitors. When the number of visits increases, the performance of the devices used to store shared files will be increased, resulting in load imbalance.
By building a device LAN, using the data management center and multiple data storage devices, using data splitting, virtual polygons to simulate light reflection and permission level management methods, randomly disperse data storage locations, and build storage tables in the data management center to ensure data security and access efficiency.
It realizes balancing load under high access volume, ensuring data security and access efficiency, avoiding overload of a single device, and providing data backup and encrypted stored procedures.
Smart Images

Figure CN120602160A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data sharing, and in particular relates to a data sharing method and system for a computer local area network. Background Art
[0002] LAN data sharing refers to the ability to exchange and access data between devices on the same local network (typically within a home, office, or enterprise). Through a LAN, users can easily share files, printers, and other resources across multiple computers, smartphones, tablets, or other devices, greatly improving work efficiency and resource sharing possibilities.
[0003] In existing data sharing methods, shared files can be accessed by all visitors. When the number of visits increases, the performance of the device used to store the shared files will increase, resulting in load imbalance. Summary of the Invention
[0004] The purpose of the present invention is to provide a data sharing method for a computer local area network, aiming to solve the problem in the existing data sharing mode that shared files can be accessed by all visitors. When the number of visits increases, the performance of the device used to store the shared files will increase, resulting in load imbalance.
[0005] The present invention is achieved by a data sharing method for a computer local area network, the method comprising:
[0006] Build a device local area network, which includes a data management center and multiple data storage devices, and the data management center and the data storage devices are connected through a network;
[0007] Acquire the data to be shared, split the data into multiple data segments, and count the idle storage space in each data storage device;
[0008] Constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining a storage location of the data segment according to a path of the simulated light;
[0009] Generate storage information of the data to be shared, build a data storage table in the data management center, record the storage information in the data storage table, and initiate a request to the data management center when you need to obtain the data to be shared.
[0010] Preferably, the steps of obtaining the data to be shared, splitting the data to be shared into multiple data segments, and counting the idle storage space in each data storage device specifically include:
[0011] Acquire data to be shared, and determine the number of data segments according to the total number of data storage devices;
[0012] Split the shared data according to the number of data segments. When splitting, use a random algorithm to determine the amount of data contained in the data segment.
[0013] Traverse each data storage device and query the idle storage space of each data storage device.
[0014] Preferably, the steps of constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining the storage location of the data segment according to the path of the simulated light specifically include:
[0015] Constructing a two-dimensional coordinate system, constructing a virtual polygon in the two-dimensional coordinate system, where the number of sides of the virtual polygon is n, the side length of the virtual polygon is ML, L is a base length, M is a normalized value of idle storage space in the data storage device, and n is the number of data storage devices;
[0016] Using the centroid of the virtual polygon as the starting point, determine the emission direction, emit simulated light toward the edge, record the order in which the simulated light reaches the virtual polygon, and obtain a reflection point mapping table. The edges in the virtual polygon correspond to the data storage devices.
[0017] The reflection point mapping table is queried according to the number of data segments. When the number of valid reflections is equal to the number of data segments, the simulation is stopped and the storage location of each data segment is determined according to the reflection point mapping table.
[0018] Preferably, the steps of generating storage information of the data to be shared, constructing a data storage table in the data management center, recording the storage information in the data storage table, and initiating a request to the data management center when the data to be shared needs to be obtained specifically include:
[0019] Performing information statistics on the data to be shared, counting the number of data segments split into which the data to be shared is divided, providing the serial number of the data storage device for the data to be shared, and the unique identifier of the data to be shared, to obtain storage information;
[0020] Build a data storage table, store the stored information one by one, set the access permission level in the data management center, and divide the shared data according to the access level;
[0021] When you need to obtain the data to be shared, send a data request to the data management center. The data management center will make a judgment based on the requester's authority and extract the data to be shared based on the judgment result.
[0022] Preferably, the data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared.
[0023] Another object of the present invention is to provide a data sharing system for a computer local area network, the system comprising:
[0024] A local area network construction module is used to construct a device local area network, which includes a data management center and multiple data storage devices. The data management center and the data storage devices are connected via a network;
[0025] A data splitting module is used to obtain the data to be shared, split the shared data into multiple data segments, and count the idle storage space in each data storage device;
[0026] a storage location determination module, configured to construct a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulate light reflection in the virtual polygon, and determine the storage location of the data segment according to the path of the simulated light;
[0027] The data request module is used to generate storage information of the data to be shared, build a data storage table in the data management center, record the storage information in the data storage table, and initiate a request to the data management center when the data to be shared needs to be obtained.
[0028] Preferably, the data splitting module includes:
[0029] a data segment quantity determination unit, configured to obtain data to be shared and determine the quantity of data segments according to the total quantity of data storage devices;
[0030] A data splitting unit is used to split the shared data according to the number of data segments. When splitting, a random algorithm is used to determine the amount of data contained in the data segment.
[0031] The device information statistics unit is used to traverse each data storage device and query the idle storage space of each data storage device.
[0032] Preferably, the storage location determination module includes:
[0033] a virtual polygon construction unit, configured to construct a two-dimensional coordinate system, and construct a virtual polygon in the two-dimensional coordinate system, wherein the number of sides of the virtual polygon is n, the side length of the virtual polygon is ML, L is a base length, M is a normalized value of an idle storage space in the data storage device, and n is the number of data storage devices;
[0034] A virtual propagation unit is configured to use the centroid of the virtual polygon as a starting point, determine an emission direction, emit simulated light toward the edge, record the order in which the simulated light arrives at the virtual polygon, and obtain a reflection point mapping table, wherein the edges in the virtual polygon correspond to the data storage devices;
[0035] The termination determination unit is used to query the reflection point mapping table according to the number of data segments, stop the simulation when the number of valid reflections is equal to the number of data segments, and determine the storage location of each data segment according to the reflection point mapping table.
[0036] Preferably, the data request module includes:
[0037] a storage information extraction unit, configured to perform information statistics on the data to be shared, count the number of data segments split into which the data to be shared is divided, provide the serial number of the data storage device for the data to be shared, and provide the unique identifier of the data to be shared, thereby obtaining storage information;
[0038] The data level division unit is used to construct a data storage table, store the stored information one by one, set the access permission level in the data management center, and divide the shared data according to the access level;
[0039] The request determination unit is used to send a data request to the data management center when it needs to obtain the data to be shared. The data management center makes a determination based on the requester's authority and extracts the data to be shared based on the determination result.
[0040] Preferably, the data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared.
[0041] The present invention provides a data sharing method for a computer local area network. When sharing data, the data is randomly dispersed into multiple data storage devices. Since the storage locations are random, data leakage will not occur even if plain text storage is used. The storage process is the encryption process, and the reading process is the decryption process. Visitors can directly access the data in the data storage device, ensuring data security and access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flow chart of a data sharing method for a computer local area network provided by an embodiment of the present invention;
[0043] Figure 2 A flowchart of the steps of obtaining data to be shared, splitting the data to be shared into multiple data segments, and counting the idle storage space in each data storage device provided by an embodiment of the present invention;
[0044] Figure 3 A flowchart of the steps of constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining the storage location of a data segment according to the path of the simulated light, provided in an embodiment of the present invention;
[0045] Figure 4A flowchart of the steps of generating storage information of data to be shared, constructing a data storage table in a data management center, recording the storage information in the data storage table, and initiating a request to the data management center when the data to be shared is needed, provided in an embodiment of the present invention;
[0046] Figure 5 An architectural diagram of a data sharing system for a computer local area network provided by an embodiment of the present invention;
[0047] Figure 6 An architectural diagram of a data splitting module provided in an embodiment of the present invention;
[0048] Figure 7 An architectural diagram of a storage location determination module provided in an embodiment of the present invention;
[0049] Figure 8 This is an architectural diagram of a data request module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] like Figure 1 FIG. 1 is a flow chart of a data sharing method for a computer local area network provided by an embodiment of the present invention, the method comprising:
[0052] S100, constructing a device local area network, wherein the device local area network includes a data management center and multiple data storage devices, and the data management center and the data storage devices are connected via a network.
[0053] In this step, a device local area network is constructed, which includes multiple data storage devices. The data storage devices are used to store data. The data storage devices can be divided according to needs. For example, each department is equipped with a data storage device. The data in the data storage device allows users within the department to directly access it, and direct data access is not allowed between departments. If a file needs to be shared with other departments, it is defined as data to be shared. The data management center is used to store, allocate and manage the shared data. The data storage devices can be connected through wireless routing devices or wired network connections.
[0054] S200 , obtaining data to be shared, splitting the data to be shared into multiple data segments, and counting idle storage space in each data storage device.
[0055] In this step, the data to be shared is obtained. When a file needs to be shared with other departments or some departments, it is sent to the data management center. The data management center receives the data to be shared and splits the data to be shared into multiple data segments. The data segments contain different amounts of data. When splitting, the number of data segments is determined according to the amount of data to be shared, and then the data is split and the idle storage space of each data storage device is counted. The idle storage space in the data storage device can be set by yourself.
[0056] S300 , constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining a storage location of the data segment according to a path of the simulated light.
[0057] In this step, a virtual polygon is constructed in a two-dimensional coordinate system according to the number of data storage devices. In order to randomly determine the storage location of each data segment, light transmission simulation is performed by constructing a virtual polygon. The shape of the virtual polygon is associated with each data storage device. Therefore, the shape of the obtained virtual polygon is random, so the storage location of the determined data segment is also random. Specifically, a mapping relationship is established between the edges of the virtual polygon and the data storage device, and the data storage device matching each data segment is determined according to the data storage device corresponding to the reflection point of the virtual light.
[0058] S400, generating storage information of the data to be shared, building a data storage table in the data management center, recording the storage information in the data storage table, and initiating a request to the data management center when the data to be shared needs to be obtained.
[0059] In this step, storage information of the data to be shared is generated. The data management center is used to store information related to the data to be shared. When the data to be shared needs to be extracted later, a request can be directly initiated to the data management center. The data management center determines whether the user has the corresponding authority based on the request. If the user has the authority, the same virtual polygon is constructed according to the storage information, and a light propagation simulation is performed to determine the extraction order of each data segment. After the extraction is completed, the data segments are spliced to obtain the complete data to be shared. When multiple users access the same data to be shared at the same time, there is no need to extract the data to be shared from the data storage device that provides the data to be shared. Instead, the data segments are extracted from other data storage devices to avoid a large amount of access traffic to a certain data storage device, thereby ensuring the availability of each data storage device.
[0060] like Figure 2As shown, as a preferred embodiment of the present invention, the steps of obtaining the data to be shared, splitting the data to be shared into multiple data segments, and counting the idle storage space in each data storage device specifically include:
[0061] S201 , obtaining data to be shared, and determining the number of data segments according to the total number of data storage devices.
[0062] In this step, the data to be shared is obtained. The data storage devices can be divided according to departments. One department shares one data storage device. The data generated by the department can be stored in the data storage device. When sharing is required, the data to be shared is sent to the data management center. The data management center determines the total number of data segments based on the preset data volume-data segment number mapping table. For example, if the data volume of the data to be shared is R, the number of data segments is |R / m|, where m is the baseline data volume and || indicates rounding up.
[0063] S202 , splitting the shared data according to the number of data segments. During the splitting process, a random algorithm is used to determine the amount of data contained in the data segment.
[0064] In this step, the shared data is split according to the number of data segments, and the corresponding random function is called to generate multiple random numbers. The number of random numbers is the same as the number of data segments. Specifically, the range of random number generation is limited, for example, the range of random numbers is between 90-100, and the random numbers correspond to the data segment numbers one by one. The random number is represented by H, and the sum of the random numbers is T. Then the data volume of the data segment corresponding to the random number is R*(H / T).
[0065] S203: traverse each data storage device and query the idle storage space of each data storage device.
[0066] In this step, each data storage device is traversed to query the idle storage space of each data storage device. The specific value of the idle storage space can be set by the user. For example, the storage space in the data storage device can be divided into a storage space of a specified size for storing shared files.
[0067] like Figure 3 As shown, as a preferred embodiment of the present invention, the steps of constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining the storage location of the data segment according to the path of the simulated light specifically include:
[0068] S301, construct a two-dimensional coordinate system, construct a virtual polygon in the two-dimensional coordinate system, the number of sides of the virtual polygon is n, the side length of the virtual polygon is ML, L is the basic length, M is the normalized value of the idle storage space in the data storage device, and n is the number of data storage devices.
[0069] In this step, a two-dimensional coordinate system is constructed, and the size G of the idle storage space in each data storage device is read. The number of sides of the virtual polygon is n. If there are n data storage devices in total, and the data storage device that provides the shared data is removed, there are n-1 data storage devices. Then n-1 sides are constructed, and the remaining side is used to close the polygon and is defined as a closed side. The side corresponding to the data storage device is defined as a non-closed side. Then the n-1 data storage devices have n-1 numbers, and each side has a number. There is a one-to-one correspondence between the edges and the data storage devices. The parameters of each side, including the side length and the angle, are determined in the order of the numbers. The starting point of the first side is the origin of the two-dimensional coordinate system. Its side length is ML, where M is the normalized value of the idle storage space in the data storage device. For example, if the idle storage space of all data storage devices is distributed between P1 and P2, and the normalized range is 0-1, then the normalized value M of the idle storage space P is P / (P2-P1). Based on this, the lengths of all non-closed edges are determined, and all non-closed edges are connected in order of numbering, that is, the end point of the current non-closed edge is connected to the starting point of the next adjacent non-closed edge, and the angle between adjacent non-closed edges is fixed at θ=180*(n-2) / (n-1), where n≥3. After all non-closed edges are connected, the broken lines obtained by connecting the non-closed edges are connected end to end through closed edges to obtain a virtual polygon.
[0070] S302, using the centroid of the virtual polygon as the starting point, determining the emission direction, emitting simulated light toward the edge, recording the order in which the simulated light reaches the virtual polygon, obtaining a reflection point mapping table, and the edges in the virtual polygon correspond to the data storage devices.
[0071] S303, querying the reflection point mapping table according to the number of data segments, stopping the simulation when the number of valid reflections is equal to the number of data segments, and determining the storage location of each data segment according to the reflection point mapping table.
[0072] In this step, the centroid of the virtual polygon is used as the starting point to emit simulated light. The emission direction of the simulated light is determined according to the normalized value M corresponding to the first non-closed edge. The positive direction of the Y-axis is used as the starting point, and the rotation angle is M*360 in clockwise direction. The starting emission direction of the simulated light is determined accordingly. Then, according to the reflection characteristics of the light, the reflection path of the light in the virtual polygon is simulated, and the order in which the light reaches each non-closed edge is recorded. When the simulated light reaches the non-closed edge, it is regarded as a valid reflection. When the number of valid reflections is equal to the number of data segments, the simulation is stopped to obtain the reflection sequence. The reflection point mapping table is queried. The reflection point mapping table records the mapping relationship between the non-closed edge and the data storage device, thereby determining the data storage device corresponding to each data segment.
[0073] like Figure 4 As shown, as a preferred embodiment of the present invention, the steps of generating storage information of the data to be shared, constructing a data storage table in the data management center, recording the storage information in the data storage table, and initiating a request to the data management center when the data to be shared needs to be obtained specifically include:
[0074] S401 , performing information statistics on the data to be shared, counting the number of data segments split into which the data to be shared is divided, the number of the data storage device providing the data to be shared, and the unique identifier of the data to be shared, to obtain storage information.
[0075] In this step, information statistics are performed on the data to be shared, the number of data segments into which the data to be shared is split is determined, the number of the data storage device to be shared and the unique identifier of the data to be shared are provided, and the size information of the idle storage space contained in each data storage device is recorded to obtain storage information.
[0076] S402, constructing a data storage table, storing the storage information one by one, setting access permission levels in the data management center, and dividing the shared data according to the access levels.
[0077] In this step, a data storage table is constructed to store the storage information. At the same time, each data segment is extracted according to the reflection order sequence and stored in the corresponding data storage device. The data segment is packaged, and one data segment is a package. After the storage is completed, the storage space of the stored data segment is divided into a whole, and the unique identifier of the data to be shared is recorded. When the access rights to the data to be shared need to be further divided, the access right level can be set in the data management center, and the shared data can be divided according to the access level.
[0078] S403: When it is necessary to obtain the data to be shared, a data request is sent to the data management center. The data management center makes a determination based on the authority of the requester and extracts the data to be shared based on the determination result.
[0079] In this step, when it is necessary to obtain the data to be shared, a data request is sent to the data management center. At this time, the data management center extracts the corresponding storage information, replicates the virtual polygon according to the storage information, and simulates the propagation of light to obtain a reflection order sequence, thereby accessing each data storage device, extracting data segments from the corresponding storage area one by one, and performing data splicing to restore the data to be shared; the data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared, so during the access process, it will not affect the data storage device that provides the data to be shared, and also provides data backup for the data to be shared. Even if the data storage device that provides the data to be shared is temporarily offline, it will not affect the use of the data to be shared; to ensure the security of the data, the data to be shared can be encrypted to a certain extent, and the data segments can also be encrypted.
[0080] like Figure 5 As shown, a data sharing system for a computer local area network provided by an embodiment of the present invention includes:
[0081] The local area network construction module 100 is used to construct a device local area network. The device local area network includes a data management center and multiple data storage devices. The data management center and the data storage devices are connected via a network.
[0082] In this system, the LAN construction module 100 constructs a device LAN, which includes multiple data storage devices. The data storage devices are used to store data. The data storage devices can be divided according to needs. For example, each department is equipped with a data storage device. The data in the data storage device allows users within the department to directly access it, and direct data access is not allowed between departments. If a file needs to be shared with other departments, it is defined as data to be shared. The data management center is used to store, allocate and manage the shared data. The data storage devices can be connected through wireless routing devices or wired network connections.
[0083] The data splitting module 200 is used to obtain the data to be shared, split the data to be shared into multiple data segments, and count the idle storage space in each data storage device.
[0084] In this system, the data splitting module 200 obtains the data to be shared. When a file needs to be shared with other departments or some departments, it is sent to the data management center. The data management center receives the data to be shared and splits the data to be shared into multiple data segments. The data segments contain different amounts of data. When splitting, the number of data segments is determined according to the amount of data to be shared, and then the data is split and the idle storage space of each data storage device is counted. The idle storage space in the data storage device can be set by yourself.
[0085] The storage location determination module 300 is used to construct a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulate light reflection in the virtual polygon, and determine the storage location of the data segment according to the path of the simulated light.
[0086] In this system, the storage location determination module 300 constructs a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices. In order to randomly determine the storage location of each data segment, light transmission simulation is performed by constructing a virtual polygon. The shape of the virtual polygon is associated with each data storage device. Therefore, the shape of the obtained virtual polygon is random, and the storage location of the determined data segment is also random. Specifically, a mapping relationship is established between the edges of the virtual polygon and the data storage device, and the data storage device matching each data segment is determined according to the data storage device corresponding to the reflection point of the virtual light.
[0087] The data request module 400 is used to generate storage information of the data to be shared, build a data storage table in the data management center, record the storage information in the data storage table, and initiate a request to the data management center when the data to be shared needs to be obtained.
[0088] In this system, the data request module 400 generates storage information of the data to be shared, and the data management center is used to store information related to the data to be shared. When the data to be shared needs to be extracted later, a request can be directly initiated to the data management center. The data management center determines whether the user has the corresponding authority based on the request. If the user has the authority, the same virtual polygon is constructed according to the storage information, and a light propagation simulation is performed to determine the extraction order of each data segment. After the extraction is completed, the data segments are spliced to obtain the complete data to be shared. When multiple users access the same data to be shared at the same time, there is no need to extract the data to be shared from the data storage device that provides the data to be shared. Instead, the data segments are extracted from other data storage devices to avoid a large amount of access traffic to a certain data storage device, thereby ensuring the availability of each data storage device.
[0089] like Figure 6As shown, as a preferred embodiment of the present invention, the data splitting module 200 includes:
[0090] The data segment quantity determining unit 201 is configured to obtain data to be shared and determine the quantity of data segments according to the total quantity of data storage devices.
[0091] In this module, the data segment quantity determination unit 201 obtains the data to be shared. The data storage device can be divided according to departments. One department shares one data storage device. The data generated by the department can be stored in the data storage device. When sharing is required, the data to be shared is sent to the data management center. The data management center determines the total number of data segments based on a preset data volume-data segment quantity mapping table. For example, if the data volume of the data to be shared is R, the number of data segments is |R / m|, where m is the baseline data volume and || indicates rounding up.
[0092] The data splitting unit 202 is configured to split the shared data according to the number of data segments. During the splitting process, a random algorithm is used to determine the amount of data contained in the data segment.
[0093] In this module, the data disassembly unit 202 splits the shared data according to the number of data segments, calls the corresponding random function, and generates multiple random numbers through the random function. The number of random numbers is the same as the number of data segments. Specifically, the generation range of random numbers is limited, for example, the range of random numbers is between 90-100, and the random numbers correspond one-to-one to the data segment numbers. The random number is represented by H, and the sum of the random numbers is T. Then the data volume of the data segment corresponding to the random number is R*(H / T).
[0094] The device information statistics unit 203 is used to traverse each data storage device and query the idle storage space of each data storage device.
[0095] In this module, the device information statistics unit 203 traverses each data storage device and queries the idle storage space of each data storage device. The specific value of the idle storage space can be set by the user. For example, the storage space in the data storage device can be divided into a storage space of a specified size for storing shared files.
[0096] like Figure 7 As shown, as a preferred embodiment of the present invention, the storage location determination module 300 includes:
[0097] The virtual polygon construction unit 301 is used to construct a two-dimensional coordinate system and construct a virtual polygon in the two-dimensional coordinate system. The number of sides of the virtual polygon is n, and the side length of the virtual polygon is ML, where L is the basic length, M is the normalized value of the idle storage space in the data storage device, and n is the number of data storage devices.
[0098] In this module, the virtual polygon construction unit 301 constructs a two-dimensional coordinate system, reads the size G of the idle storage space in each data storage device, and the number of sides of the virtual polygon is n. If there are n data storage devices in total, and the data storage device that provides the data to be shared is removed, there are n-1 data storage devices, then n-1 sides are constructed, and the remaining side is used to close the polygon, which is defined as a closed side, and the side corresponding to the data storage device is defined as a non-closed side. Then the n-1 data storage devices have n-1 numbers, and each side has a number. There is a one-to-one correspondence between the edges and the data storage devices. The parameters of each side are determined in the order of the numbers, including the side length and the angle. The starting point of the first side is the two-dimensional coordinate system. The origin of the coordinate system has a side length of ML, where M is the normalized value of the idle storage space in the data storage device. For example, if the idle storage space of all data storage devices is distributed between P1 and P2, and the normalized range is 0-1, then the normalized value M of the idle storage space P is P / (P2-P1). Based on this, the lengths of all non-closed edges are determined, and all non-closed edges are connected in order of numbering, that is, the end point of the current non-closed edge is connected to the starting point of the next adjacent non-closed edge, and the angle between adjacent non-closed edges is fixed at θ=180*(n-2) / (n-1), where n≥3. After all non-closed edges are connected, the broken lines obtained by connecting the non-closed edges are connected end to end through closed edges to obtain a virtual polygon.
[0099] The virtual propagation unit 302 is used to use the centroid of the virtual polygon as the starting point, determine the emission direction, emit simulated light to the edge, record the order in which the simulated light arrives at the virtual polygon, and obtain a reflection point mapping table. The edges in the virtual polygon correspond to data storage devices.
[0100] The termination determination unit 303 is configured to query the reflection point mapping table according to the number of data segments, stop the simulation when the number of valid reflections is equal to the number of data segments, and determine the storage location of each data segment according to the reflection point mapping table.
[0101] In this module, the virtual propagation unit 302 uses the centroid of the virtual polygon as the starting point to emit simulated light. The emission direction of the simulated light is determined according to the normalized value M corresponding to the first non-closed edge. The positive direction of the Y-axis is used as the starting point and the light rotates clockwise with a rotation angle of M*360. The starting emission direction of the simulated light is determined accordingly. Subsequently, according to the reflection characteristics of the light, the reflection path of the light in the virtual polygon is simulated, and the order in which the light reaches each non-closed edge is recorded. The arrival of the simulated light at the non-closed edge is regarded as a valid reflection. When the number of valid reflections is equal to the number of data segments, the simulation is stopped to obtain the reflection sequence. The reflection point mapping table is queried. The reflection point mapping table records the mapping relationship between the non-closed edge and the data storage device, thereby determining the data storage device corresponding to each data segment.
[0102] like Figure 8 As shown, as a preferred embodiment of the present invention, the data request module 400 includes:
[0103] The storage information extraction unit 401 is used to perform information statistics on the data to be shared, count the number of data segments split into which the data to be shared is divided, provide the number of the data storage device to be shared and the unique identifier of the data to be shared, and obtain storage information.
[0104] In this module, the storage information extraction unit 401 performs information statistics on the data to be shared, determines the number of data segments into which the data to be shared is split, provides the number of the data storage device to be shared and the unique identifier of the data to be shared, and records the size information of the idle storage space currently contained in each data storage device to obtain storage information.
[0105] The data level division unit 402 is used to construct a data storage table, store the stored information one by one, set the access permission level in the data management center, and divide the shared data according to the access level.
[0106] In this module, the data level division unit 402 constructs a data storage table to store the storage information. At the same time, each data segment is extracted according to the reflection order sequence and stored in the corresponding data storage device. The data segment is packaged, and one data segment is a package. After the storage is completed, the storage space of the stored data segment is divided into a whole, and the unique identifier of the data to be shared is recorded. When the access rights to the data to be shared need to be further divided, the access right level can be set in the data management center, and the shared data can be divided according to the access level.
[0107] The request determination unit 403 is used to send a data request to the data management center when it is necessary to obtain the data to be shared. The data management center makes a determination based on the authority of the requester and extracts the data to be shared based on the determination result.
[0108] In this module, when the request determination unit 403 needs to obtain the data to be shared, it sends a data request to the data management center. At this time, the data management center extracts the corresponding storage information, replicates the virtual polygon according to the storage information, and simulates the propagation of light to obtain a reflection order sequence, thereby accessing each data storage device, extracting data segments one by one from the corresponding storage area, and performing data splicing to restore the data to be shared; the data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared, so during the access process, it will not affect the data storage device that provides the data to be shared, and also provides data backup for the data to be shared. Even if the data storage device that provides the data to be shared is temporarily offline, it will not affect the use of the data to be shared.
[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data sharing method for a computer local area network, characterized in that: The method comprises: Build a device local area network, which includes a data management center and multiple data storage devices, and the data management center and the data storage devices are connected through a network; Acquire the data to be shared, split the data into multiple data segments, and count the idle storage space in each data storage device; Constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining a storage location of the data segment according to a path of the simulated light; Generate storage information of the data to be shared, build a data storage table in the data management center, record the storage information in the data storage table, and initiate a request to the data management center when you need to obtain the data to be shared.
2. The data sharing method for a computer local area network according to claim 1, characterized in that: The steps of obtaining the data to be shared, splitting the data to be shared into multiple data segments, and counting the idle storage space in each data storage device specifically include: Acquire data to be shared, and determine the number of data segments according to the total number of data storage devices; Split the shared data according to the number of data segments. When splitting, use a random algorithm to determine the amount of data contained in the data segment. Traverse each data storage device and query the idle storage space of each data storage device.
3. The data sharing method for a computer local area network according to claim 1, characterized in that: The steps of constructing a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulating light reflection in the virtual polygon, and determining the storage location of the data segment according to the path of the simulated light specifically include: Constructing a two-dimensional coordinate system, constructing a virtual polygon in the two-dimensional coordinate system, where the number of sides of the virtual polygon is n, the side length of the virtual polygon is ML, L is a base length, M is a normalized value of idle storage space in the data storage device, and n is the number of data storage devices; Using the centroid of the virtual polygon as the starting point, determine the emission direction, emit simulated light toward the edge, record the order in which the simulated light reaches the virtual polygon, and obtain a reflection point mapping table. The edges in the virtual polygon correspond to the data storage devices. The reflection point mapping table is queried according to the number of data segments. When the number of valid reflections is equal to the number of data segments, the simulation is stopped and the storage location of each data segment is determined according to the reflection point mapping table.
4. The data sharing method for a computer local area network according to claim 1, characterized in that: The steps of generating storage information of the data to be shared, constructing a data storage table in the data management center, recording the storage information in the data storage table, and initiating a request to the data management center when the data to be shared needs to be obtained specifically include: Performing information statistics on the data to be shared, counting the number of data segments split into which the data to be shared is divided, providing the serial number of the data storage device for the data to be shared, and the unique identifier of the data to be shared, to obtain storage information; Build a data storage table, store the stored information one by one, set the access permission level in the data management center, and divide the shared data according to the access level; When you need to obtain the data to be shared, send a data request to the data management center. The data management center will make a judgment based on the requester's authority and extract the data to be shared based on the judgment result.
5. The data sharing method for a computer local area network according to claim 1, characterized in that: The data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared.
6. A data sharing system for a computer local area network, characterized in that: The system comprises: A local area network construction module is used to construct a device local area network, which includes a data management center and multiple data storage devices. The data management center and the data storage devices are connected via a network; A data splitting module is used to obtain the data to be shared, split the shared data into multiple data segments, and count the idle storage space in each data storage device; a storage location determination module, configured to construct a virtual polygon in a two-dimensional coordinate system according to the number of data storage devices, simulate light reflection in the virtual polygon, and determine the storage location of the data segment according to the path of the simulated light; The data request module is used to generate storage information of the data to be shared, build a data storage table in the data management center, record the storage information in the data storage table, and initiate a request to the data management center when the data to be shared needs to be obtained.
7. The data sharing system for a computer local area network according to claim 6, characterized in that: The data splitting module includes: a data segment quantity determination unit, configured to obtain data to be shared and determine the quantity of data segments according to the total quantity of data storage devices; A data splitting unit is used to split the shared data according to the number of data segments. When splitting, a random algorithm is used to determine the amount of data contained in the data segment. The device information statistics unit is used to traverse each data storage device and query the idle storage space of each data storage device.
8. The data sharing system for a computer local area network according to claim 6, characterized in that: The storage location determination module includes: a virtual polygon construction unit, configured to construct a two-dimensional coordinate system, and construct a virtual polygon in the two-dimensional coordinate system, wherein the number of sides of the virtual polygon is n, the side length of the virtual polygon is ML, L is a base length, M is a normalized value of an idle storage space in the data storage device, and n is the number of data storage devices; A virtual propagation unit is configured to use the centroid of the virtual polygon as a starting point, determine an emission direction, emit simulated light toward the edge, record the order in which the simulated light arrives at the virtual polygon, and obtain a reflection point mapping table, wherein the edges in the virtual polygon correspond to the data storage devices; The termination determination unit is used to query the reflection point mapping table according to the number of data segments, stop the simulation when the number of valid reflections is equal to the number of data segments, and determine the storage location of each data segment according to the reflection point mapping table.
9. The data sharing system for a computer local area network according to claim 6, characterized in that: The data request module includes: a storage information extraction unit, configured to perform information statistics on the data to be shared, count the number of data segments split into which the data to be shared is divided, provide the serial number of the data storage device for the data to be shared, and provide the unique identifier of the data to be shared, thereby obtaining storage information; The data level division unit is used to construct a data storage table, store the stored information one by one, set the access permission level in the data management center, and divide the shared data according to the access level; The request determination unit is used to send a data request to the data management center when it needs to obtain the data to be shared. The data management center makes a determination based on the requester's authority and extracts the data to be shared based on the determination result.
10. The data sharing system for a computer local area network according to claim 6, characterized in that: The data sharing device that provides the data to be shared does not participate in the process of storing the data segments of the data to be shared.