Collaboration method and system for cloud, local server and edge device
Through the use of synergy between clouds, local servers and edge devices, using adaptive acquisition interval update data to solve the high load problem caused by the increase in the number of long -link resources in the existing technology Data transmission and system scalability.
Patent Information
- Application Number
- CN202411428606.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-14
AI Technical Summary
In the data collaboration between edge devices and cloud servers, the long link resource occupies high, resulting in low data transmission efficiency and consistent maintenance troubles. The increase in the number of edge devices will cause high load on cloud servers and affect scalability.
Adopt the synergy method of cloud, local server and edge devices, send personal information to the cloud server through the user terminal, and the cloud server is reviewed and stored. Local servers and edge devices use adaptive intervals to the cloud server to obtain personnel information version number number number , Update the database of local and edge devices.
The coupling between the edge terminals is reduced, the edge device load is transferred to the local server, the cloud server load is reduced, the system expansion is improved, and the instructions in the complex network environment are difficult to penetrate difficulties.
Smart Images

Figure CN119383196A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of collaboration, and in particular to a collaboration method and system among a cloud, a local server and an edge device. Background Art
[0002] With the development of IT technology and process manufacturing, there are more and more types of edge terminals, such as IoT devices, embedded terminals, etc. In the field of access control and security, edge devices such as face recognition devices are often used. When edge devices and cloud servers collaborate on data, existing technologies usually use long links for data collaboration, but long links occupy a lot of resources. Maintaining connections for a long time will occupy the resources of cloud servers and edge devices, including bandwidth, memory, and processing power. Relying solely on long links makes data transmission inefficient and consistency maintenance troublesome. The increase in the number of edge devices will bring high load problems to cloud servers, which is not conducive to later scale expansion. Summary of the invention
[0003] The purpose of the present invention is to disclose a collaborative method and system among a cloud, a local server and an edge device to solve the technical problems raised in the background technology.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] In one aspect, the present invention provides a collaborative method among a cloud, a local server, and an edge device, which is applied to a system including a user terminal, a cloud server, a local server, and an edge device, including:
[0006] S1, the user terminal sends the entered personal information to the cloud server;
[0007] S2, the cloud server obtains the review and processing result of the personal information, and stores the personal information according to the review and processing result. The cloud server is provided with a first personal information database, and stores the personal information version number of the first personal information database;
[0008] S3, the local server uses an adaptive acquisition interval to obtain the personnel information version number of the first personnel information database from the cloud server, and updates the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database;
[0009] S4, the edge device uses an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server, and updates the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
[0010] Preferably, the user terminal includes a smart phone, a tablet computer and a desktop computer.
[0011] Preferably, the personal information includes a face photo, an ID card photo and basic personal information;
[0012] Basic personal information includes name and mobile phone number.
[0013] Preferably, obtaining the review and processing results of personal information includes:
[0014] Calculate the similarity between the face photo in the personal information and the face area in the ID card photo stored in the cloud server, and determine whether the similarity is greater than the set similarity threshold. If so, the audit processing result is passed; if not, the audit processing result is failed.
[0015] Preferably, the personal information is stored according to the audit processing results, including:
[0016] If the audit processing result is that the audit is passed, the personal information sent by the user terminal is stored in the first personal information database, and the personal information version number of the first personal information database is updated.
[0017] Preferably, the adaptive acquisition interval is used to obtain the personnel information version number of the first personnel information database from the cloud server, including:
[0018] Calculate the first acquisition interval;
[0019] Acquire a personnel information version number of a first personnel information database from a cloud server based on a first acquisition interval;
[0020] Adopting an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server includes:
[0021] Calculate the second acquisition interval;
[0022] The personnel information version number of the second personnel information database is obtained from the local server based on the second acquisition interval.
[0023] Preferably, updating the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database includes:
[0024] Determine whether the personnel information version number of the first personnel information database is consistent with the personnel information version number of the second personnel information database, and if not, send a first update request to the cloud server;
[0025] Receiving first update information pushed by the cloud server according to the first update request;
[0026] updating the second personnel information database according to the first update information;
[0027] The personnel information version number of the second personnel information database is updated to the personnel information version number of the first personnel information database.
[0028] Preferably, calculating the first acquisition interval includes:
[0029] For the kth first acquisition interval, the calculation is as follows:
[0030] Use t k,1 Indicates the time when the calculation of the kth first acquisition interval begins, with N k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the number of times the local server sends the first update request to the cloud server, expressed as M k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the total number of times the local server obtains the personnel information version number of the first personnel information database from the cloud server, where T represents the preset duration;
[0031] Based on N k,1 and M k,1 Calculate the kth first acquisition interval.
[0032] Preferably, updating the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database includes:
[0033] Determine whether the personnel information version number of the second personnel information database is consistent with the personnel information version number of the third personnel information database, and if not, send a second update request to the local server;
[0034] Receiving second update information pushed by the local server according to the second update request;
[0035] updating the third personnel information database according to the second update information;
[0036] The personnel information version number of the third personnel information database is updated to the personnel information version number of the second personnel information database.
[0037] In another aspect, the present invention provides a collaborative system of cloud, local server and edge device, including a user terminal, a cloud server, a local server and an edge device;
[0038] The user terminal is used to send the entered personal information to the cloud server;
[0039] The cloud server is used to obtain the review and processing results of the personal information, and store the personal information according to the review and processing results. The cloud server is provided with a first personnel information database, and stores the personnel information version number of the first personnel information database;
[0040] The local server is used to obtain the personnel information version number of the first personnel information database from the cloud server at an adaptive acquisition interval, and update the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database;
[0041] The edge device is used to obtain the personnel information version number of the second personnel information database from the cloud server using an adaptive acquisition interval, and update the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
[0042] Beneficial effects:
[0043] The traditional cloud server maintains data consistency, and the edge terminal maintains it autonomously, which reduces the coupling between edge terminals. The load pressure of edge devices is transferred from the cloud server to the local server in each project scenario, which reduces the cloud load and improves the scalability of the system. The low-level nodes actively query the high-level nodes, and only the cloud server needs to have an Internet IP to communicate. The local server and the edge device interact through the IP address under the local area network. It can also solve the problem of difficult instruction penetration in complex network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0045] Figure 1 A schematic diagram of a collaborative method among a cloud, a local server and an edge device of the present invention.
[0046] Figure 2 A schematic diagram of a collaborative system of a cloud, a local server and an edge device of the present invention. DETAILED DESCRIPTION
[0047] 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.
[0048] like Figure 1 As shown, the present invention provides a collaborative method among a cloud, a local server and an edge device, which is applied to a system including a user terminal, a cloud server, a local server and an edge device, including:
[0049] S1, the user terminal sends the entered personal information to the cloud server;
[0050] S2, the cloud server obtains the review and processing result of the personal information, and stores the personal information according to the review and processing result. The cloud server is provided with a first personal information database, and stores the personal information version number of the first personal information database;
[0051] S3, the local server uses an adaptive acquisition interval to obtain the personnel information version number of the first personnel information database from the cloud server, and updates the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database;
[0052] S4, the edge device uses an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server, and updates the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
[0053] Preferably, the user terminal includes a smart phone, a tablet computer and a desktop computer.
[0054] The user terminal is an electronic device that can communicate with the cloud server.
[0055] For example, in a residential access control system, user terminals are electronic devices such as smart phones, tablet computers, and desktop computers used by residents of the community that can communicate with cloud servers.
[0056] When residents need to apply for access control rights to the community, they enter their personal information through their own user terminal, which then sends the personal information to the cloud server.
[0057] Specifically, there may be multiple local servers, and each local server communicates with multiple edge devices respectively.
[0058] For example, a local server is set up in each community, and the access control devices at various locations in the community serve as edge devices.
[0059] Preferably, the personal information includes a face photo, an ID card photo and basic personal information;
[0060] Basic personal information includes name and mobile phone number.
[0061] Preferably, obtaining the review and processing results of personal information includes:
[0062] Calculate the similarity between the face photo in the personal information and the face area in the ID card photo stored in the cloud server, and determine whether the similarity is greater than the set similarity threshold. If so, the audit processing result is passed; if not, the audit processing result is failed.
[0063] Specifically, the pre-stored ID card photo is uploaded by the administrator of the cloud server.
[0064] For example, in a community's access control management system, the pre-stored ID card photos are the ID card photos of the owners of the community. At this time, the administrator of the cloud server can be the property management staff of the community.
[0065] By uploading a photo of the ID card in advance, when a community owner applies for access control rights, it can be automatically reviewed without the need for manual review, thereby improving the efficiency of the review.
[0066] Specifically, the similarity threshold is set to 0.7.
[0067] Preferably, calculating the similarity between the face photo in the personal information and the face region in the ID card photo pre-stored in the cloud server includes:
[0068] Determine whether there is an ID card number in all pre-stored ID card photos that is consistent with the ID card number in the ID card photo of the personal information. If not, set the similarity to 0. If so, perform the following calculation:
[0069] A represents the ID card number in the ID card photo of the personal information, and from all pre-stored ID card photos, obtain the ID card photo P2 with the ID card number A;
[0070] P1 represents the face photo in personal information;
[0071] Use the preset mask image to obtain the area BK from P2;
[0072] Use the image segmentation algorithm to segment BK and obtain the face region FC1 in BK;
[0073] Segment P1 to obtain the face region FC2 in BK;
[0074] Calculate the similarity between FC1 and FC2.
[0075] Preferably, using a preset mask image to obtain the area BK from P2 includes:
[0076] The size of the mask image is the same as that of P2;
[0077] PU represents the set of coordinates of the pixel points belonging to the face image area in the ID card photo;
[0078] In the mask image, the grayscale values of the pixels whose coordinates belong to PU are set to 1, while the grayscale values of the remaining pixels are set to 0;
[0079] Multiply the mask image by P2 to obtain image P3;
[0080] The area in the image P3 where the grayscale value is greater than 0 is the area BK.
[0081] Specifically, when multiplying, P2 needs to be converted into a grayscale image and then multiplied with the mask image. The multiplication operation is to calculate the pixels with the same coordinates in the two images one by one, and the product of the grayscale values of the two pixels with the same coordinates is used as the grayscale value of the pixel with the same coordinates in P3.
[0082] Preferably, the image segmentation algorithm is used to segment BK to obtain the face region FC1 in BK, including:
[0083] The maximum inter-class variance algorithm is used to segment BK and obtain the face region FC1 in BK.
[0084] Specifically, after the maximum inter-class variance algorithm calculates the grayscale threshold, the pixels that are greater than the grayscale threshold are the pixels in FC1.
[0085] Preferably, segmenting P1 to obtain the face region FC2 in BK includes:
[0086] Perform grayscale processing on P1 to obtain image G1;
[0087] Perform regional processing on G1, divide G1 into multiple connected domains, and store the obtained connected domains into the set CU;
[0088] Obtain a set FCU1 of pixel points in P1 that conform to the skin detection model;
[0089] Filter the pixels in FCU1 to obtain a set FCU2;
[0090] Get a set FCU3 of pixel points in G1 that have the same coordinates as FCU1; get a set FCU4 of pixel points in G1 that have the same coordinates as FCU2;
[0091] Get set FCU5 based on FCU4;
[0092] The pixels in FCU3 and FCU5 are used as the pixels in FC2.
[0093] The segmentation process of the present invention is different from the existing segmentation process based only on the skin detection model. Because the segmentation is performed based only on the skin detection model, the image obtained after segmentation is not a complete face area, which will affect the validity of the subsequent similarity calculation results. Therefore, after obtaining FCU1, the present invention obtains a set of pixel points FCU2 at the edge position of the area composed of pixel points in FCU1 by screening, and then performs subsequent repair calculations in G1, thereby improving the completeness of the face area FC2 finally obtained.
[0094] Specifically, the pixels in FCU3 are obtained based on the skin detection model, while the pixels in FCU5 are obtained by patching calculation. The pixels in these two sets are used as the pixels of FC2 to achieve a more complete acquisition of the face area.
[0095] Preferably, obtaining a set FCU1 of pixel points in P1 that conform to the skin detection model includes:
[0096] For the pixel point px in P1, get the value of the H component, S component and V component of px in the HSV color space px , S px and V px ;
[0097] Judge H px , S px and V px Whether the following conditions are met:
[0098]
[0099] If it matches, store px into set FCU1.
[0100] Preferably, G1 is regionalized and divided into multiple connected domains, and the obtained connected domains are stored in a set CU, including:
[0101] The first step is to initialize the gray value GR = 0;
[0102] The second step is to retain only the pixels whose grayscale values are equal to GR in G1, obtain multiple connected domains, and store the obtained connected domains into the set CU;
[0103] Step 3: Add 1 to the value of GR
[0104] The fourth step is to determine whether GR is greater than 255. If so, the calculation ends; if not, proceed to the second step.
[0105] The regionalization processing of the present invention allows the subsequent repair calculation to be performed based on the connected domain. Each repair does not obtain only one pixel point, but obtains the pixel points of a connected domain, which greatly improves the efficiency of the repair process.
[0106] Specifically, the obtained connected domain is stored in a set CU, including:
[0107] It is determined whether the number of pixels in the connected domain is greater than or equal to 2. If so, the connected domain is stored in the set CU.
[0108] Preferably, the pixel points in FCU1 are screened to obtain a set FCU2, including:
[0109] For the pixel px1 in FCU1, determine in P1 whether all the pixels in the 8-neighborhood of px1 are pixels in FCU1. If not, store px1 in the set FCU2.
[0110] The above screening process is mainly to select the pixel points at the edge position of the area composed of the pixels in FCU1. If the pixels in the 8-neighborhood of px1 are all pixels in FCU1, then px1 is inside the area composed of the pixels in FCU1.
[0111] Preferably, obtaining a set FCU5 based on FCU4 includes:
[0112] S10, randomly select a pixel point px2 from FCU4;
[0113] S20, obtain the connected domain bk2 where px2 is located from CU, and use bk2 as the calculation area;
[0114] S30, saving the pixel points in the calculation area to the set FCU5, and obtaining the set CNTU of all connected domains adjacent to the calculation area in the CU;
[0115] S40, respectively calculating the difference between the grayscale value of each connected domain in the CNTU and the grayscale value of the calculation area;
[0116] S50, obtaining the minimum value of the absolute values of the multiple differences obtained in S40;
[0117] S60, determining whether the minimum value obtained in S50 is less than the set grayscale value, if so, storing the pixel points in the connected domain corresponding to the minimum value obtained in S50 in the CU into the set FCU5; if not, proceeding to S90;
[0118] S70, deleting the connected domain corresponding to the minimum value obtained in S50 in the CU from the CU, and deleting the calculation area from the CU;
[0119] S80, taking the connected domain corresponding to the minimum value obtained in S50 in the CU as the next calculation area;
[0120] S90, deleting the pixel points in FCU5 from FCU4;
[0121] S100, determine whether FCU4 is an empty set, if so, end the calculation, if not, enter S10.
[0122] In the above-mentioned patching process of the present invention, a pixel point is randomly selected from FCU4 each time, and then the corresponding connected domain is obtained based on this pixel point, and then the subsequent patching calculation can be performed based on the connected domain. Since the grayscale values of the pixels in the connected domain are the same, the connected domain can be regarded as a pixel point with a larger area for patching calculation, thereby greatly improving the efficiency of the patching process. In addition, after the present invention obtains the connected domain with similar grayscale values and interconnected in each calculation area, the pixel points in the calculation area and the pixel points of the connected domain stored in FCU5 are calculated from FCU4, which can avoid repeated calculation of the pixel points in FCU4, and effectively improve the calculation efficiency.
[0123] Preferably, the grayscale value is set to 5.
[0124] Since the grayscale values of the pixels in each connected domain are the same, the grayscale value of the connected domain is the grayscale value of any pixel in the connected domain, and the grayscale value of the calculation area is the grayscale value of any pixel in the calculation area.
[0125] Preferably, calculating the similarity between FC1 and FC2 includes:
[0126] Adjust FC2 to the same resolution as FC1 to obtain image FC4;
[0127] Calculate the similarity between FC1 and FC4.
[0128] Specifically, the similarity can be calculated by using histogram similarity, SSIM, etc.
[0129] Preferably, the personal information is stored according to the audit processing results, including:
[0130] If the audit processing result is that the audit is passed, the personal information sent by the user terminal is stored in the first personal information database, and the personal information version number of the first personal information database is updated.
[0131] Preferably, the process of updating the personnel information version number of the first personnel information database is as follows:
[0132] In the process of obtaining and storing the personal information sent by the user terminal in the first personal information database, the time of completing the storage is converted into the personal information version number of the first personal information database.
[0133] Preferably, converting the time of completing storage into a personnel information version number of the first personnel information database includes:
[0134] The time when storage is completed is accurate to the second. The personnel information version number of the first personnel information database has 14 digits, the 1st to 4th digits represent the year, the 5th to 6th digits represent the month, the 7th to 8th digits represent the day, the 9th to 10th digits represent the hour, the 11th to 12th digits represent the minute, and the 13th to 14th digits represent the second.
[0135] For example, when the storage is completed at 18:18:18 on September 29, 2024, the updated version number is represented by 20240929181818.
[0136] Preferably, the adaptive acquisition interval is used to obtain the personnel information version number of the first personnel information database from the cloud server, including:
[0137] Calculate the first acquisition interval;
[0138] Acquire a personnel information version number of a first personnel information database from a cloud server based on a first acquisition interval;
[0139] Adopting an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server includes:
[0140] Calculate the second acquisition interval;
[0141] The personnel information version number of the second personnel information database is obtained from the local server based on the second acquisition interval.
[0142] By obtaining the version number of the first personnel information database from the cloud server at an adaptive acquisition interval, the communication pressure of the cloud server can be reduced and the amount of data sent and received can be reduced when the number of local servers is large.
[0143] In addition, you only need to use the version number to know whether the data has changed, and update the data only when it has changed, without transmitting all the data for comparison, which can further reduce communication pressure.
[0144] By obtaining the personnel information version number of the second personnel information database from the local server at an adaptive acquisition interval, the communication pressure of the local server can be reduced when the number of edge devices is large.
[0145] Preferably, obtaining the personnel information version number of the first personnel information database from the cloud server based on the first acquisition interval includes:
[0146] After the first acquisition interval calculation is completed and a time length equal to the first acquisition interval has passed, the personnel information version number of the first personnel information database is obtained from the cloud server.
[0147] Preferably, obtaining the personnel information version number of the second personnel information database from the local server based on the second acquisition interval includes:
[0148] After the second acquisition interval is calculated and a time length equal to the second acquisition interval has passed, the personnel information version number of the second personnel information database is obtained from the local server.
[0149] Preferably, updating the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database includes:
[0150] Determine whether the personnel information version number of the first personnel information database is consistent with the personnel information version number of the second personnel information database, and if not, send a first update request to the cloud server;
[0151] Receiving first update information pushed by the cloud server according to the first update request;
[0152] updating the second personnel information database according to the first update information;
[0153] The personnel information version number of the second personnel information database is updated to the personnel information version number of the first personnel information database.
[0154] Specifically, the first update request may include data such as a URL, Cookie information stored in a local server, and a personnel information version number of a second personnel information database.
[0155] Cookie information is used to verify the identity of the local server when the cloud server uses Cookies to identify the device.
[0156] Specifically, the process of obtaining the first update information is as follows:
[0157] The cloud server compares the data corresponding to the personnel information version number of the second personnel information database contained in the first update request with the data stored in the first personnel information database to obtain the newly added data and the deleted data;
[0158] The newly added data and the deleted data are taken as the first update information.
[0159] Specifically, updating the second personnel information database according to the first update information includes:
[0160] The deleted data is deleted from the second information database, and the newly added data is added to the second information database.
[0161] Preferably, calculating the first acquisition interval includes:
[0162] For the kth first acquisition interval, the calculation is as follows:
[0163] Use t k,1 Indicates the time when the calculation of the kth first acquisition interval begins, with N k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the number of times the local server sends the first update request to the cloud server, expressed as M k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the total number of times the local server obtains the personnel information version number of the first personnel information database from the cloud server, where T represents the preset duration;
[0164] Based on N k,1 and M k,1 Calculate the kth first acquisition interval.
[0165] By controlling the change of the first acquisition interval through historical update data, adaptive changes of the first acquisition interval can be achieved, thereby avoiding the use of a first acquisition interval with a fixed value. When data updates frequently, personnel information can be synchronized more timely. Conversely, the update interval can be extended to reduce the communication pressure on the cloud server.
[0166] Specifically, when the k-1th acquisition interval ends, the stage of calculating the kth first acquisition interval begins. When the calculation of the kth first acquisition interval is completed, the stage of entering the kth first acquisition interval begins.
[0167] Preferably, the preset duration is 24 hours.
[0168] Preferably, based on N k,1 and M k,1 Calculate the kth first acquisition interval, including:
[0169] Use the following formula to calculate the kth first acquisition interval:
[0170]
[0171] getitrf k Indicates the kth first acquisition interval, getitrf k-1 represents the k-1th first acquisition interval, η is the weight, tpre represents the set time length, Ψ represents the control score, and the value range of the control score is
[0172] Determine getitrf k Is it in the time interval [thsr,thed]? If so, keep gettingitrf k If not, proceed as follows:
[0173] If getitrf k If it is less than thsr, getitrf k The value of getitrf is set to thsr. k is greater than thed, then getitrf k The value of is set to thed;
[0174] thsr is the minimum time length of the acquisition interval, and thed is the maximum time length of the acquisition interval.
[0175] The first acquisition interval of the present invention is not a fixed value, because the data update interval in the first personnel information database is not fixed. If a fixed first acquisition interval is set, it is easy to send too frequent acquisition requests for the personnel information version number of the first personnel information database to the cloud server during the time period when the data update interval in the first personnel information database is large. Obviously, this will cause excessive communication pressure on the cloud server, and it will be necessary to waste more bandwidth to return the personnel information version number of the first personnel information database to the local server. During the time period when the data update interval in the first personnel information database is small, the data in the second personnel information database cannot be updated in time, affecting the data synchronization efficiency.
[0176] Therefore, the present invention calculates the kth first acquisition interval based on the number of times the local server sends the first update request to the cloud server within a given time interval, the total number of times the local server obtains the personnel information version number of the first personnel information database from the cloud server, and the previous acquisition interval, thereby improving the responsiveness of the kth first acquisition interval to the data update intervals in different first personnel information databases, and can be used in When N k,1 and Mk,1 The larger the difference between , the longer the duration of the kth first acquisition interval is. When N k,1 The larger the value of , the shorter the duration of the kth first acquisition interval. Thus, while timely synchronizing data between the first personnel information database and the second personnel information database, the communication pressure of the cloud server in the time period when the data update interval in the first personnel information database is small can be reduced.
[0177] Preferably, the minimum time length of the acquisition interval is 1 hour, and the maximum time length of the acquisition interval is 10 hours.
[0178] Preferably, tpre is 1 hour.
[0179] Preferably, the value of the control score is
[0180] Preferably, the value of the weight is
[0181] Preferably, the time length of the first first acquisition interval is Tlen1, and the value of k is greater than or equal to 2.
[0182] Tlen1 is a preset first value.
[0183] Preferably, the preset first value is 1 hour.
[0184] Preferably, updating the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database includes:
[0185] Determine whether the personnel information version number of the second personnel information database is consistent with the personnel information version number of the third personnel information database, and if not, send a second update request to the local server;
[0186] Receiving second update information pushed by the local server according to the second update request;
[0187] updating the third personnel information database according to the second update information;
[0188] The personnel information version number of the third personnel information database is updated to the personnel information version number of the second personnel information database.
[0189] Specifically, the second update request may include Cookie information stored in the edge device and a personnel information version number of the third personnel information database.
[0190] Specifically, the process of obtaining the second update information is as follows:
[0191] The local server compares the data corresponding to the personnel information version number of the third personnel information database contained in the second update request with the data stored in the second personnel information database to obtain the newly added data and the deleted data;
[0192] The newly added data and the deleted data are taken as the second update information.
[0193] Specifically, updating the third personnel information database according to the second update information includes:
[0194] The deleted data is deleted from the third information database, and the newly added data is added to the third information database.
[0195] Preferably, calculating the second acquisition interval includes:
[0196] For the kth second acquisition interval, the calculation is as follows:
[0197] Use t k,2 Indicates the time to start calculating the kth second acquisition interval, with N k,2 Indicates that in the time interval [t k,2 , t k,2 -T], the number of times the edge device sends the second update request to the local server, M k,2 Indicates that in the time interval [t k,2 , t k,2 -T], the total number of times the edge device obtains the personnel information version number of the second personnel information database from the local server, where T represents the preset duration;
[0198] Based on N k,2 and M k,2 Calculate the kth second acquisition interval.
[0199] Specifically, when the k-1th acquisition interval ends, the kth second acquisition interval is calculated, and when the kth second acquisition interval is calculated, the kth second acquisition interval is entered.
[0200] Preferably, based on N k,2 and M k,2 Calculate the kth second acquisition interval, including:
[0201] The kth second acquisition interval is calculated using the following formula:
[0202]
[0203] getitrs k Indicates the kth second acquisition interval, getitrs k-1represents the k-1th second acquisition interval, η is the weight, tpre represents the set time length, Ψ represents the control score, and the value range of the control score is
[0204] judge getitrs k Is it in the time interval [thsr,thed]? If so, keep gettingitrs k If not, proceed as follows:
[0205] If getitrs k If it is less than thsr, getitrs k The value of getitrs is set to thsr. k is greater than thed, then getitrs k The value of is set to thed;
[0206] thsr is the minimum time length of the acquisition interval, and thed is the maximum time length of the acquisition interval.
[0207] Through the above method, the second acquisition interval can change with the change of the data update interval of the second personnel information database, so that when the data update interval of the second personnel information database is small, the third personnel information database can be updated in time. When the data update interval of the second personnel information database is large, the value of the second acquisition interval is expanded to reduce the communication pressure of the local server.
[0208] Preferably, the time length of the first second acquisition interval is Tlen2, and the value of k is greater than or equal to 2.
[0209] Tlen2 is a preset second value.
[0210] Preferably, the preset second value is 1 hour.
[0211] In another aspect, the present invention provides a collaborative system of cloud, local server and edge device, including a user terminal, a cloud server, a local server and an edge device;
[0212] The user terminal is used to send the entered personal information to the cloud server;
[0213] The cloud server is used to obtain the review and processing results of the personal information, and store the personal information according to the review and processing results. The cloud server is provided with a first personnel information database, and stores the personnel information version number of the first personnel information database;
[0214] The local server is used to obtain the personnel information version number of the first personnel information database from the cloud server at an adaptive acquisition interval, and update the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database;
[0215] The edge device is used to obtain the personnel information version number of the second personnel information database from the cloud server using an adaptive acquisition interval, and update the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
[0216] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A collaborative method among cloud, local server and edge device, applied to a system including a user terminal, a cloud server, a local server and an edge device, characterized in that: include: S1, the user terminal sends the entered personal information to the cloud server; S2, the cloud server obtains the review and processing result of the personal information, and stores the personal information according to the review and processing result. The cloud server is provided with a first personal information database, and stores the personal information version number of the first personal information database; S3, the local server uses an adaptive acquisition interval to obtain the personnel information version number of the first personnel information database from the cloud server, and updates the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database; S4, the edge device uses an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server, and updates the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
2. A collaborative method among a cloud, a local server and an edge device according to claim 1, characterized in that: User terminals include smartphones, tablets and desktop computers.
3. The collaborative method among cloud, local server and edge device according to claim 1, characterized in that: Personal information includes facial photos, ID card photos and basic personal information; Basic personal information includes name and mobile phone number.
4. The collaborative method among cloud, local server and edge device according to claim 1, characterized in that: Obtain the results of the review and processing of personal information, including: Calculate the similarity between the face photo in the personal information and the face area in the ID card photo stored in the cloud server, and determine whether the similarity is greater than the set similarity threshold. If so, the audit processing result is passed; if not, the audit processing result is failed.
5. The collaborative method among cloud, local server and edge device according to claim 1, characterized in that: Personal information is stored based on the review and processing results, including: If the audit processing result is that the audit is passed, the personal information sent by the user terminal is stored in the first personal information database, and the personal information version number of the first personal information database is updated.
6. The collaborative method among cloud, local server and edge device according to claim 1, characterized in that: Acquiring the personnel information version number of the first personnel information database from the cloud server at an adaptive acquisition interval includes: Calculate the first acquisition interval; Acquire a personnel information version number of a first personnel information database from a cloud server based on a first acquisition interval; Adopting an adaptive acquisition interval to obtain the personnel information version number of the second personnel information database from the cloud server includes: Calculate the second acquisition interval; The personnel information version number of the second personnel information database is obtained from the local server based on the second acquisition interval.
7. A collaborative method among a cloud, a local server and an edge device according to claim 6, characterized in that: The second personnel information database and the personnel information version number of the second personnel information database are updated according to the obtained personnel information version number of the first personnel information database, including: Determine whether the personnel information version number of the first personnel information database is consistent with the personnel information version number of the second personnel information database, and if not, send a first update request to the cloud server; Receiving first update information pushed by the cloud server according to the first update request; Updating the second personnel information database according to the first update information; The personnel information version number of the second personnel information database is updated to the personnel information version number of the first personnel information database.
8. A collaborative method among a cloud, a local server and an edge device according to claim 7, characterized in that: Calculate the first acquisition interval, including: For the kth first acquisition interval, the calculation is as follows: Use t k,1 Indicates the time when the calculation of the kth first acquisition interval begins, with N k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the number of times the local server sends the first update request to the cloud server, expressed as M k,1 Indicates that in the time interval [t k,1 , t k,1 -T], the total number of times the local server obtains the personnel information version number of the first personnel information database from the cloud server, where T represents the preset duration; Based on N k,1 and M k,1 Calculate the kth first acquisition interval.
9. The method for collaboration among a cloud, a local server and an edge device according to claim 6, characterized in that: The third personnel information database and the personnel information version number of the third personnel information database are updated according to the obtained personnel information version number of the second personnel information database, including: Determine whether the personnel information version number of the second personnel information database is consistent with the personnel information version number of the third personnel information database, and if not, send a second update request to the local server; Receiving second update information pushed by the local server according to the second update request; updating the third personnel information database according to the second update information; The personnel information version number of the third personnel information database is updated to the personnel information version number of the second personnel information database.
10. A collaborative system of cloud, local server and edge device, characterized in that: Includes user terminals, cloud servers, local servers, and edge devices; The user terminal is used to send the entered personal information to the cloud server; The cloud server is used to obtain the review and processing results of the personal information, and store the personal information according to the review and processing results. The cloud server is provided with a first personnel information database, and stores the personnel information version number of the first personnel information database; The local server is used to obtain the personnel information version number of the first personnel information database from the cloud server at an adaptive acquisition interval, and update the second personnel information database and the personnel information version number of the second personnel information database according to the obtained personnel information version number of the first personnel information database; The edge device is used to obtain the personnel information version number of the second personnel information database from the cloud server using an adaptive acquisition interval, and update the third personnel information database and the personnel information version number of the third personnel information database according to the obtained personnel information version number of the second personnel information database.
Citation Information
Patent Citations
Biometrics-based device for detecting indentity of people and identification
CN101669824A
An agricultural product marketing system and a marketing method thereof
CN109191248A
Identity verification method, system, electronic device and storage medium
CN109409245A
Card identification method and device, terminal and storage medium
CN110472602A
Pulmonary nodule recognition and segmentation method and system based on deep learning
CN112581436A