Data sharing system based on P2P technology
By setting up device scoring and sharing analysis units in the P2P data sharing system, the process of selecting shared clients is optimized, and the problem of inaccurate client selection in the existing technology is solved, and more efficient resource utilization and server load reduction is achieved.
Patent Information
- Application Number
- CN202411365709.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-09-29
AI Technical Summary
When selecting clients that assist in sharing data, the prior art ignores key factors such as the frequency of shared data and the data capacity of each client itself, resulting in the selected clients being inaccurate enough and waste of resources.
By setting up a device scoring unit and a shared analysis unit in the client module, scoring according to multiple parameters of each trusted client, and periodically analyzing the data capacity and click time of shared data, calculating the amount of shared capability evaluation, and optimizing the process of selecting shared clients.
It realizes the accuracy of client selection for auxiliary shared data, reduces server load, rationally utilizes client shared resources, and avoids resource waste.
Smart Images

Figure CN119544727A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data sharing, and in particular to a data sharing system based on P2P technology. Background Art
[0002] In the process of data sharing among multiple clients, a server is usually needed as an intermediary. Multiple clients upload the data they want to share to the server, and then the server transmits the data to other clients to achieve data sharing. However, when the amount of shared data is large and frequent, this traditional centralized model often brings huge pressure to the server, causing it to be overloaded for a long time, which is not conducive to the stable operation of the server.
[0003] In order to solve this problem, the existing technology introduces P2P (peer-to-peer) technology, which selects some clients as auxiliary sharing nodes and stores the data to be shared on these clients in a distributed manner, thereby greatly alleviating the sharing pressure on the server. However, when selecting these clients that undertake the auxiliary sharing task, the existing technology mainly bases on the hardware performance of the client, while ignoring key factors such as the frequency of each client's own sharing of data and the size of the data capacity. The clients selected in this way are often not accurate enough, and this is also a waste of the shared transmission resources of the remaining clients.
[0004] In order to solve the above problems, the present invention proposes a solution. Summary of the invention
[0005] The purpose of the present invention is to provide a data sharing system based on P2P technology, in order to solve the problem that in the prior art, when selecting a client for assisting in sharing data, key factors such as the frequency of each client's own sharing of data and the size of the data capacity are ignored, resulting in the problem that the selected client is not accurate enough;
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] The data sharing system based on P2P technology includes:
[0008] A multi-client terminal is used for trusted clients to share data. The multi-client terminal includes several client modules, and one client module corresponds to one trusted client.
[0009] When the client module detects that the user clicks the submit button, it obtains the pre-shared data selected by the user for this click and the click time, and generates the shared data of the user's click based on the data;
[0010] Then the client module searches whether there is a shared management table stored therein, and if not, transmits the shared data clicked by the user to the transfer server, otherwise selects a trusted client from the shared management table as a shared client, transmits the shared data clicked by the user to the shared client, and the shared client transmits the shared data clicked by the user to other trusted clients;
[0011] The transfer server is used to share data between trusted clients. The transfer server includes a transfer service unit, a sharing analysis unit, a device scoring unit, and a sharing management unit.
[0012] The device scoring unit scores each trusted client according to several scoring features of several parameter items of each trusted client to obtain device scores of all trusted clients, wherein the parameter items include processor, memory, storage, graphics card, network card and system version;
[0013] The sharing analysis unit periodically analyzes the data volume and click time of all shared data received by the transit server, and calculates the sharing capability evaluation of all trusted clients in combination with the device scores of the trusted clients;
[0014] The sharing management unit extracts the sharing capability evaluation quantities of several trusted clients from the sharing capability evaluation quantities of all the received trusted clients, and then matches the corresponding shared data quantities for all the intercepted trusted clients based on several capability evaluation intervals preset by the administrator and their corresponding shared data quantities, to obtain a sharing management table, which includes several trusted clients and their corresponding sharing capability evaluation quantities and shared data quantities.
[0015] Furthermore, the sharing management unit extracts the sharing capability evaluation amounts of several trusted clients from the received sharing capability evaluation amounts of all trusted clients in descending order of the sharing capability evaluation amounts.
[0016] Further, when the sharing client detects that the data capacity of the shared data transmitted to all other trusted clients is greater than or equal to the corresponding shared data volume in the sharing management table, a stop sharing instruction is generated and transmitted to all other trusted clients;
[0017] After receiving the transmission stop sharing instruction, all other trusted clients stop transmitting the shared data to the sharing client;
[0018] And according to the order of the sharing capability evaluation values in the sharing management table from large to small, the client corresponding to the next sharing capability evaluation value is selected as the sharing client.
[0019] Furthermore, when all sharing clients in the sharing management table generate a stop sharing instruction, the client module destroys the sharing management table.
[0020] Beneficial effects of the present invention:
[0021] (1) The present invention acquires the user's pre-shared data by setting up a client module and shares it with other trusted clients. At the same time, by setting up a transfer service unit, data sharing between trusted clients is realized. In addition, a device scoring unit is configured to score each trusted client according to multiple parameters to evaluate its device performance. In order to further optimize the sharing process, a sharing analysis unit is also added. The unit periodically analyzes the data capacity and click time of all shared data received by the transfer service end, and calculates the sharing capability evaluation amount of all trusted clients in combination with the device scores of the trusted clients. This comprehensive evaluation method makes the selection of trusted clients for auxiliary shared data more accurate, avoiding the inaccuracy that may be caused by selecting clients only based on the device itself;
[0022] (2) The present invention sets a sharing management unit to extract several trusted clients according to the sharing capability evaluation amount of all trusted clients, and matches the corresponding shared data amount for all the intercepted trusted clients based on several capability evaluation intervals preset by the management personnel and their corresponding shared data amount, so as to obtain a sharing management table. Then, when a certain client module pre-shares data, the sharing client is preferentially selected based on the sharing management table, and the sharing client replaces the transit service unit to perform the data sharing operation. In this way, not only can the load pressure of the server on the shared data be greatly reduced, but also the shared resources of the trusted clients can be reasonably utilized as much as possible, avoiding the occurrence of a situation where some resources are wasted due to being in an idle state. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described below in conjunction with the accompanying drawings.
[0024] Figure 1 is a system block diagram of the present invention;
[0025] Figure 2 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] like Figure 1 , 2 As shown, the data sharing system based on P2P technology includes multiple client terminals and a transfer server;
[0028] The multi-client terminal is used for trusted clients to share data. The multi-client terminal includes a plurality of client modules, one of which corresponds to one trusted client. In this embodiment, the trusted client refers to a computer that is authorized to share data.
[0029] The client module, in one embodiment of the present invention, provides a submit button for the corresponding user to click and select the pre-shared data for data sharing;
[0030] When the user clicks the Submit button, the corresponding client module obtains the pre-shared data selected by the user and the time when the Submit button is clicked, and generates the shared data clicked by the user based on the pre-shared data obtained and the time when the Submit button is clicked;
[0031] Then the client module searches for a shared management table stored therein, and if not, transmits the shared data clicked by the user to the transfer server;
[0032] A transfer server, used for transferring shared data between several trusted clients, including a transfer service unit, a sharing analysis unit, a device scoring unit and a sharing management unit;
[0033] After receiving the transmitted shared data clicked by the user, the transfer service end transmits it to the transfer service unit and the sharing analysis unit respectively. After receiving the transmitted shared data clicked by the user, the transfer service unit first stores it, and then transmits the shared data clicked by the user to all other client modules except the client module corresponding to the user.
[0034] After receiving the transmitted shared data clicked by the user, the client module stores the data and provides it to the user corresponding to the client module for viewing;
[0035] The sharing analysis unit stores the shared data clicked by the user after receiving the transmitted data;
[0036] A device scoring unit is used to score all trusted clients. The device scoring unit obtains several scoring features of several parameter items of all trusted clients. The parameter items include processor, memory, storage, graphics card, network card and system version. The scoring features of the processor include processor brand, model, number of cores, threads and main frequency. The scoring features of the memory include memory capacity, type and frequency. The scoring features of the storage include storage hard disk capacity, hard disk type and read and write speed. The scoring features of the graphics card include graphics card brand, model, video memory capacity, GPU core frequency. The scoring features of the network card include network card model and supported network protocols. The scoring features of the system version include operating system version and system architecture (32-bit or 64-bit).
[0037] The device scoring unit pre-stores scoring rules set by the administrator for scoring several scoring features of several parameter items of the client, wherein the scoring rules include several scoring indicators of the several parameter items, each scoring indicator is set with a corresponding score, and the scoring indicator is used to assess whether the corresponding scoring feature of the corresponding parameter item meets the scoring indicator. If it meets the scoring indicator, the score corresponding to the scoring indicator is obtained, and the score is assigned to the scoring feature, indicating that the device scoring unit has assigned the score to the scoring feature;
[0038] After the device scoring unit scores the several scoring features of the several parameter items of each trusted client according to the scoring rules, for each trusted client, the scores of the several scoring features of the several parameter items are added together to obtain the device score of each trusted client, and the score is stored;
[0039] A sharing analysis unit, used to periodically analyze the stored sharing data of all users' multiple clicks;
[0040] In the current sharing analysis cycle, the sharing analysis unit analyzes the sharing data of all users' multiple clicks stored in the current sharing monitoring cycle. The analysis steps are as follows:
[0041] S11: First, a trusted client is selected as the client to be analyzed, and the shared data of all clicks generated by the client to be analyzed within the shared analysis period are marked as A1, A2, ..., Aa in the order of the click time, where a≥1;
[0042] S12: sequentially obtaining the data capacity of the pre-shared data included in the shared data A1, A2, ..., Aa, and marking them as B1, B2, ..., Ba;
[0043] S13: Utilize the formula Calculate the deviation C1 of the data capacity sizes B1, B2, ..., Ba, and compare the sizes of C1 and C. At this time, B is the average value of the data capacity sizes B1, B2, ..., Ba, and C is the preset standard deviation of the data capacity size;
[0044] If C1 ≥ C, then delete the corresponding Bb in descending order of |Bb - B|, calculate the deviation C1 of the remaining Bb, compare the sizes of C1 and C again until C1 < C, obtain the average value of the remaining Bb at this time, and re-calibrate it as the standard amount of shared data of the client to be analyzed, and re-label it as D1;
[0045] S14: Sequentially obtain the times when the client to be analyzed clicks the submit button in the shared data A1, A2, ..., Aa, and mark them as E1, E2, ..., Ea correspondingly;
[0046] S15: Calculate the absolute values of the differences between the times E1 and E2, E2 and E3, ..., Ea - 1 and Ea respectively, and mark them as F1, F2, ..., Ff, where f = 1, 2, ..., a - 1;
[0047] S16: Use the formula Calculate the deviation G1 of the times F1, F2, ..., Ff, and compare the sizes of G1 and G. At this time, F is the average value of Ff, and G is the preset standard deviation of the shared time;
[0048] If G1 ≥ G, then delete the corresponding time Fg in descending order of |Fg - F| and calculate the deviation G1 of the remaining Fg, compare the sizes of G1 and G again until G1 < G, obtain the average value of the remaining Fg at this time, and re-calibrate it as the standard amount of shared time of the client to be analyzed, and re-label it as D2;
[0049] S14: Obtain the device score H1 of the client to be analyzed stored in the device analysis unit;
[0050] S15: Use the formula Calculate the shared ability evaluation amount J1 of the client to be analyzed, where α1 is a preset dimension adjustment factor used to adjust the standard amount of shared data and the standard amount of shared time to the same operation dimension for calculation, I1 is a preset dimension adjustment constant used to adjust the result of the calculation of the standard amount of shared data and the standard amount of shared time to the same operation dimension as the device score for calculation, and β1 and β2 are preset first adjustment proportion factors and second adjustment proportion factors respectively;
[0051] S16: Select all trusted clients as clients to be analyzed respectively, calculate and obtain the sharing capability evaluation values of all trusted clients in turn, and update and store the sharing capability evaluation values of all trusted clients stored in the sharing analysis unit according to the calculation values;
[0052] At the same time, the sharing analysis unit transmits the sharing capability evaluation quantities of all trusted clients stored in the update to the sharing management unit;
[0053] The sharing management unit pre-stores an auxiliary sharing table set by the management personnel, and the auxiliary sharing table stores a number of capability evaluation intervals, each capability evaluation interval corresponding to a preset sharing data volume;
[0054] After receiving the shared capability evaluation values of all the transmitted trusted clients, the shared management unit first sorts all the trusted clients in descending order according to the shared capability evaluation values, and extracts the trusted clients whose shared capability evaluation values are greater than or equal to P1;
[0055] Then, referring to the auxiliary sharing table, the corresponding capability evaluation interval is matched for each intercepted shared capability evaluation amount, and the shared data amount corresponding to the successfully matched capability evaluation interval is obtained;
[0056] Finally, a sharing management table is generated according to the intercepted sharing capability evaluation amount of each trusted client, its corresponding client and the sharing data amount corresponding to the matching capability evaluation interval;
[0057] The sharing management unit transmits the sharing management table to all trusted clients, and the corresponding clients store the sharing management table;
[0058] If the client module finds a sharing management table stored therein, the client with the largest sharing capability evaluation value is obtained as the sharing client clicked this time in descending order of the sharing capability evaluation values in the sharing management table, and the sharing data clicked by the user this time is preferentially transmitted to the sharing client;
[0059] After receiving the shared data clicked by the user, the shared client transmits it to all other trusted clients. It should be noted that the transmission to all other trusted clients does not include the client that generates the shared data clicked by the user.
[0060] When the sharing client detects that the data capacity of the shared data transmitted to all other trusted clients is greater than or equal to the corresponding shared data volume in the sharing management table, a stop sharing instruction is generated and transmitted to all other trusted clients;
[0061] After receiving the transmission stop sharing instruction, all other trusted clients stop transmitting the shared data to the sharing client;
[0062] When a client module generates new shared data that needs to be shared, the client corresponding to the next shared capability evaluation value is selected as the shared client according to the order of shared capability evaluation values from large to small in the shared management table;
[0063] When all the sharing clients in the sharing management table generate a stop sharing instruction, the client module destroys the sharing management table;
[0064] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0065] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.
[0066] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A data sharing system based on P2P technology, characterized in that: include: A multi-client terminal is used for trusted clients to share data. The multi-client terminal includes several client modules, and one client module corresponds to one trusted client. When the client module detects that the user clicks the submit button, it obtains the pre-shared data selected by the user for this click and the click time, and generates the shared data of the user's click based on the data; Then the client module searches whether there is a shared management table stored therein, and if not, transmits the shared data clicked by the user to the transfer server, otherwise selects a trusted client from the shared management table as a shared client, transmits the shared data clicked by the user to the shared client, and the shared client transmits the shared data clicked by the user to other trusted clients; The transfer server is used to share data between trusted clients. The transfer server includes a transfer service unit, a sharing analysis unit, a device scoring unit, and a sharing management unit. The device scoring unit scores each trusted client according to several scoring features of several parameter items of each trusted client to obtain device scores of all trusted clients, wherein the parameter items include processor, memory, storage, graphics card, network card and system version; The sharing analysis unit periodically analyzes the data volume and click time of all shared data received by the transit server, and calculates the sharing capability evaluation of all trusted clients in combination with the device scores of the trusted clients; The sharing management unit extracts the sharing capability evaluation quantities of several trusted clients from the sharing capability evaluation quantities of all the received trusted clients, and then matches the corresponding shared data quantities for all the intercepted trusted clients based on several capability evaluation intervals preset by the administrator and their corresponding shared data quantities, to obtain a sharing management table, which includes several trusted clients and their corresponding sharing capability evaluation quantities and shared data quantities.
2. The data sharing system based on P2P technology according to claim 1 is characterized in that: The client module provides a submit button for the corresponding user to click and select the pre-shared data for data sharing.
3. The data sharing system based on P2P technology according to claim 1 is characterized in that: The scoring features of the processor include the processor brand, model, number of cores, threads and main frequency; the scoring features of the memory include the memory capacity, type and frequency; the scoring features of the storage include the storage hard disk capacity, hard disk type and read and write speed; the scoring features of the graphics card include the graphics card brand, model, video memory capacity, GPU core frequency; the scoring features of the network card include the network card model and supported network protocols; the scoring features of the system version include the operating system version and system architecture.
4. The data sharing system based on P2P technology according to claim 1 is characterized in that: The sharing management unit extracts the sharing capability evaluation amounts of several trusted clients from the received sharing capability evaluation amounts of all trusted clients in descending order of the sharing capability evaluation amounts.
5. The data sharing system based on P2P technology according to claim 1 is characterized in that: The device scoring unit pre-stores scoring rules set by the administrator to score several scoring features of several parameter items of the client. The scoring rules include several scoring indicators for several parameter items. Each scoring indicator is set with a corresponding score. The scoring indicator is used to evaluate whether the corresponding scoring feature of the corresponding parameter item meets the scoring indicator.
6. The data sharing system based on P2P technology according to claim 1 is characterized in that: When the sharing client detects that the data capacity of the shared data transmitted to all other trusted clients is greater than or equal to the corresponding shared data volume in the sharing management table, a stop sharing instruction is generated and transmitted to all other trusted clients; After receiving the transmission stop sharing instruction, all other trusted clients stop transmitting the shared data to the sharing client; And according to the order of the sharing capability evaluation values in the sharing management table from large to small, the client corresponding to the next sharing capability evaluation value is selected as the sharing client.
7. The data sharing system based on P2P technology according to claim 6 is characterized in that: When all sharing clients in the sharing management table generate a stop sharing instruction, the client module destroys the sharing management table.
8. The data sharing system based on P2P technology according to claim 1, characterized in that: The transfer server also includes a transfer service unit. After the shared data clicked by the user is transmitted to the transfer server, the transfer server transmits the shared data clicked by the user to the transfer service unit, and the transfer service unit transmits it to all other trusted clients.
Citation Information
Patent Citations
Data sharing system based on micro-service architecture
CN116827961A
Cross-chain data security sharing mechanism construction method based on oracle machine
CN117579693A
Data sharing method, device and computer readable storage medium
US20200143071A1
Systems and methods to evaluate client device trust in a distributed computing system
US20220286300A1