CN106250476B - Method, device and system for updating and synchronizing white list - Google Patents

Method, device and system for updating and synchronizing white list Download PDF

Info

Publication number
CN106250476B
CN106250476B CN201610616700.2A CN201610616700A CN106250476B CN 106250476 B CN106250476 B CN 106250476B CN 201610616700 A CN201610616700 A CN 201610616700A CN 106250476 B CN106250476 B CN 106250476B
Authority
CN
China
Prior art keywords
white list
link
operator
time stamp
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610616700.2A
Other languages
Chinese (zh)
Other versions
CN106250476A (en
Inventor
余明阳
查志勇
吴耿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Information and Telecommunication Branch of State Grid Hubei Electric Power Co Ltd
Original Assignee
Information and Telecommunication Branch of State Grid Hubei Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Information and Telecommunication Branch of State Grid Hubei Electric Power Co Ltd filed Critical Information and Telecommunication Branch of State Grid Hubei Electric Power Co Ltd
Priority to CN201610616700.2A priority Critical patent/CN106250476B/en
Publication of CN106250476A publication Critical patent/CN106250476A/en
Application granted granted Critical
Publication of CN106250476B publication Critical patent/CN106250476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention discloses a method, a device and a system for updating and synchronizing a white list, wherein the method for updating the white list is applied to a server and comprises the following steps: when a newly added operation is detected, acquiring a newly added white list link, generating a first time stamp, and correspondingly storing the newly added white list link, the first time stamp and a newly added operational character; when the deletion operation is detected, updating the operation character corresponding to the deletion operation into a deletion operation character, generating a second time stamp, and updating the time stamp corresponding to the deletion operation into the second time stamp. When the white list is updated, the operational characters and the time stamps corresponding to the white list links are updated, the operation logs are not newly established, the accumulation of a large number of operation logs at the server is avoided, the writing and inquiring performance of the server is improved, a large number of redundant data are removed, and the operation efficiency of the client is improved.

Description

Method, device and system for updating and synchronizing white list
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for updating and synchronizing a white list.
Background
In a browser, a white list is considered to be website data that can be securely accessed without a website security check. The white list is maintained through a network management background, and operators can add, delete, modify, import, export and query the white list. The data of the white list can be changed due to adding, deleting, modifying and importing (adding in batches), and the client side can achieve data synchronization by acquiring the changed data.
In the prior art, when an operator operates a white list at a server, update information of the white list is written into an operation log. When the client synchronizes the white list, all log records larger than the log identification are pulled from the server according to the log identification stored by the client, and the white list stored by the client is synchronized according to the updated information in the pulled log records.
The prior art has the following defects: the server can accumulate a large amount of operation logs to influence the writing and query performance; a white list may appear in multiple operation logs at the same time, which may generate several times of log records, and if a client pulls a large number of operation logs at one time, the database needs to be frequently updated according to the time sequence, which not only consumes a large amount of traffic, but also brings about serious performance problems, which affects user experience.
Disclosure of Invention
The invention mainly aims to provide a method, a device and a system for updating and synchronizing a white list, and aims to solve the problems that a large amount of flow is consumed and the performance of a client is influenced when the white list is updated and synchronized in the prior art.
In order to achieve the above object, a method for updating a white list provided by the present invention is applied to a server, and includes:
when a newly added operation is detected, acquiring a newly added white list link, generating a first time stamp, and correspondingly storing the newly added white list link, the first time stamp and a newly added operational character;
when the deletion operation is detected, updating the operation character corresponding to the deletion operation into a deletion operation character, generating a second time stamp, and updating the time stamp corresponding to the deletion operation into the second time stamp.
In addition, in order to achieve the above object, the present invention further provides a device for updating a white list, which is applied to a server and is used for executing the method for updating a white list.
In addition, in order to achieve the above object, the present invention further provides a method for synchronizing a white list, which is applied to a client, and includes:
the client receives a white list identifier, a white list link and an operator from the server;
when the operational character is a newly added operational character, the client correspondingly stores the received white list identification and the received white list link;
and when the operator is a deletion operator, deleting the white list link which is stored by the client and corresponds to the received white list identifier.
In addition, in order to achieve the above object, the present invention further provides a device for synchronizing a white list, which is applied to a client and is used for executing the method for synchronizing the white list.
In addition, to achieve the above object, the present invention further provides a system for updating and synchronizing a white list, including:
the server is used for executing the method for updating the white list;
and the client is used for executing the method for synchronizing the white list.
The method, the device and the system for updating and synchronizing the white lists set the corresponding operational characters and the time stamps for each white list link, update the operational characters and the time stamps corresponding to the white list links when the white lists are updated, avoid building a large number of operation logs at the service end, improve the writing and inquiring performance of the service end, remove a large number of redundant data and improve the operation efficiency of the client.
Drawings
FIG. 1 is a flowchart illustrating a method for updating a white list according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for updating a white list according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for processing a white list update request according to a third embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for synchronizing white lists according to a fourth embodiment of the present invention;
FIG. 5 is a flowchart of a method for synchronizing white lists according to a fifth embodiment of the present invention;
FIG. 6 is a block diagram of an apparatus for updating a white list according to a sixth embodiment of the present invention;
FIG. 7 is a block diagram of an apparatus for synchronizing white lists according to a seventh embodiment of the present invention;
FIG. 8 is a system block diagram of updating and synchronizing a white list in an eighth embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a first embodiment of the present invention provides a method for updating a white list, which is applied to a server, and the method includes:
and 101, when a new operation is detected, acquiring a new white list link, generating a first time stamp, and correspondingly storing the new white list link, the first time stamp and a new operational character.
Specifically, when a new operation is detected, a new white list link may be acquired, a white list identifier may be assigned to the new white list link, a first timestamp may be generated, and the white list identifier may be stored in correspondence with the new operator, the new white list link, and the first timestamp.
In this embodiment, the whitelist identifier, the newly added operator, the newly added whitelist link, and the first timestamp may be correspondingly stored in the local database.
Further, after the newly added white list link is obtained, the newly added operator, the white list identifier and the newly added white list link can be correspondingly stored in the first storage area, and the white list identifier and the first time stamp can be correspondingly stored in the second storage area. The first storage area and the second storage area may be located in an in-memory database.
And 102, when the deletion operation is detected, updating the operator corresponding to the deletion operation into the deletion operator, generating a second timestamp, and updating the timestamp corresponding to the deletion operation into the second timestamp.
Specifically, when the deletion operation is detected, the white list identifier may be acquired, the second timestamp may be generated, and the operation character and the timestamp which are stored by the operation character and the timestamp and correspond to the white list identifier may be modified into the deletion operation character and the second timestamp, respectively.
Further, when the deletion operation is detected, the operator corresponding to the white list identifier stored in the first storage area may be modified into a deletion operator, and the time stamp corresponding to the white list identifier stored in the second storage area may be modified into a second time stamp.
In addition, when the modification operation is detected, the white list identifier and the white list link can be acquired, a third timestamp is generated, and the white list link, the operator and the timestamp which are stored by the device and correspond to the white list identifier are modified into the acquired white list link, the modified operator and the third timestamp respectively.
Further, when the modification operation is detected, the whitelist link and the operational character corresponding to the whitelist identifier stored in the first storage area may be modified to the obtained whitelist link and the obtained operational character, respectively, and the timestamp corresponding to the whitelist identifier stored in the second storage area may be modified to a third timestamp.
The embodiment of the invention aims to set the corresponding operational character and the timestamp for each white list link, and when the white list is updated, the operational character and the timestamp corresponding to the white list link are updated, so that an operation log is not newly established, the accumulation of a large number of operation logs at a service end is avoided, and the writing and query performance of the service end is improved.
As shown in fig. 2, a second embodiment of the present invention provides a method for updating a white list, including:
step 201, when the server detects the update operation, the server determines the operation type, and if the operation is a new addition operation, step 202 is executed; if so, go to step 208; if it is a delete operation, step 214 is performed.
Step 202, the server side obtains a white list link and a site name.
For example, the white list link and the site name acquired by the server are "www.aaa.com" and "AAA website", respectively.
Step 203, the server side judges whether the obtained white list link exists in the database, and if so, step 204 is executed; otherwise, step 205 is performed.
And step 204, the server returns error information, and the process is ended.
Step 205, the server allocates a white list identifier to the white list link, acquires the current time as a first time stamp, and stores the white list identifier, the site name, the white list link, the first time stamp and the newly added operator into a database.
Wherein the first timestamp may be 13 bits of data and the database may be a Mysql relational database.
For example, the server allocates a white list identifier "10010" to the white list link "www.aaa.com", acquires the current time "2016071809155" as the first timestamp, and stores the white list identifier "10010", the site name "AAA website", the white list link "www.aaa.com", the first timestamp "2016071809155" and the newly added operator "a" in the Mysql relational database.
And step 206, the server side stores the white list identification, the white list link and the newly added operator as white list detail data to a first storage area.
The first storage area may be located in an in-memory database.
In this embodiment, the first storage area may be a Hash (Hash) of a Redis cache, the Hash includes a plurality of field-value pairs (field-value pair), the fields and values of the Hash may be words, integers, floating point numbers or binary data, and each field in the same Hash is unique and different.
For example, the white list link is "www.aaa.com," the white list is identified as "10010," the server saves the white list identification "10010," the white list link "www.aaa.com," and the newly added operator "a" as white list detail data into a hash of the Redis cache. The hashed fields are respectively a white list identifier, a white list link and an operator, and the corresponding values are "10010", "www.aaa.com" and "a".
And step 207, the server side stores the white list identifier and the first time stamp as white list index data into a second storage area, and the process is ended.
Wherein the second storage area may be located in the in-memory database.
In this embodiment, the second storage area may be a Sorted list (Sorted set) of the Redis cache, the Sorted list including a score field and a value. And the server side respectively takes the white list identification and the first time stamp as values and scoring fields to be stored in the ordered list.
For example, the server stores the white list identified as "10010" and the first timestamp "2016071809155" as white list index data into the ordered list of the Redis cache, where the score field of the ordered list is the first timestamp "2016071809155" and takes the value of "10010".
And step 208, the server side acquires the white list identification, the white list link and the site name.
For example, the white list identifier, the white list link, and the site name acquired by the server are "10010", "www.aaa111.com", and "AAA 111 website", respectively.
Step 209, the server determines whether the obtained white list identifier exists in the database, and if so, executes step 211; otherwise, step 210 is performed.
And step 210, the server returns error information, and the process is ended.
And step 211, the server acquires the current time as a third timestamp, and modifies the white list link, the site name, the operator and the timestamp corresponding to the acquired white list identifier in the database into the acquired white list link, the acquired site name, the modified operator and the third timestamp respectively.
For example, the server modifies the whitelist link "www.aaa.com", the site name "AAA website", the operator "a", and the timestamp "2016071809155" in the database corresponding to the whitelist identifier "10010" into "www.aaa111.com", "AAA 111 website", the operator "U", and the timestamp "2016071811352", respectively.
In step 212, the server side queries the white list detail data containing the white list identifier in the first storage area according to the obtained white list identifier, and updates the white list link and the operator in the queried white list detail data to the obtained white list link and the modified operator respectively.
For example, the white list acquired by the server is identified as "10010", the white list detail data queried in the first storage area includes the white list identification "10010", the white list link "www.aaa.com" and the operator "a", and the server modifies the white list link "www.aaa.com" and the operator "a" in the queried white list detail data into "www.aaa111.com" and the operator "U", respectively.
Step 213, the server side queries the white list index data containing the white list identifier in the second storage area according to the obtained white list identifier, updates the time stamp in the queried white list index data to a third time stamp, and ends the process.
For example, the white list acquired by the server is identified as "10010", the white list index data queried in the second storage area includes the white list identification "10010" and the timestamp "2016071809155", and the server modifies the timestamp "2016071809155" into the timestamp "2016071811352".
In step 214, the server obtains the white list identifier.
For example, the white list acquired by the server is identified as "10010".
Step 215, the server side judges whether the obtained white list identifier exists in the database, and if so, step 217 is executed; otherwise, step 216 is performed.
And step 216, the server returns error information, and the process is ended.
And step 217, the server acquires the current time as a second time stamp, and modifies the operator and the time stamp corresponding to the acquired white list identifier in the database into a deleted operator and the second time stamp respectively.
For example, the server modifies the operator "a" and the timestamp "2016071809155" in the database corresponding to the white list identifier "10010" to the operator "D" and the timestamp "2016071811352", respectively.
In step 218, the server queries, according to the obtained white list identifier, the white list detail data containing the white list identifier in the first storage area, and updates an operator in the queried white list detail data to a delete operator.
For example, the white list acquired by the server is identified as "10010", the white list detail data queried in the first storage area includes the white list identification "10010", the white list link "www.aaa.com" and the operator "a", and the server modifies the operator "a" in the queried white list detail data into the operator "D".
Step 219, the server side queries the white list index data containing the white list identifier in the second storage area according to the obtained white list identifier, updates the time stamp in the queried white list index data to a second time stamp, and ends the process.
For example, the white list acquired by the server is identified as "10010", the white list index data queried in the second storage area includes the white list identification "10010" and the timestamp "2016071809155", and the server modifies the timestamp "2016071809155" into the timestamp "2016071811352".
In the second embodiment of the present invention, a corresponding operator and a timestamp are set for each white list link, and when a white list is updated, the operator and the timestamp corresponding to the white list link are updated, and an operation log is not newly created, so that a large amount of operation logs are prevented from being accumulated at a server, and writing and query performance of the server is improved. In addition, the white list detail data and the white list index data are stored in the memory, so that the white list of the client side can be rapidly synchronized.
As shown in fig. 3, a third embodiment of the present invention provides a method for processing a white list update request, including:
step 301, the server receives a white list update request from the client and returns a maximum timestamp to the client.
The maximum timestamp is the timestamp with the maximum value currently stored by the server.
For example, the server returns a maximum timestamp of "2016071809155" to the client.
Step 302, the server side inquires a timestamp larger than the timestamp progress information from the second storage area according to the timestamp progress information in the white list updating request, and acquires a white list identifier corresponding to the inquired timestamp.
Wherein the second storage area may be located in the in-memory database.
In this embodiment, the second storage area may be an ordered list of the Redis cache, the ordered list including a scoring field and a value.
For example, the timestamp progress information in the white list update request is "2016070607349", the server queries timestamps greater than "2016070607349", i.e., "2016070819343", "2016071023190", and "2016071809155", from the ordered list, and acquires white list identifications "10001", "10009", and "10005" corresponding to the queried timestamps.
Step 303, the server side inquires the white list link and the operator corresponding to the white list identifier from the first storage area according to the obtained white list identifier, and sends the inquired white list link and operator and the obtained white list identifier to the client side as white list increment data.
The first storage area may be located in an in-memory database.
In this embodiment, the first storage area may be a hash of a Redis cache, the hash includes a plurality of field value pairs, the field and value of the hash may be words, integers, floating point numbers or binary data, and each field in the same hash is unique and different.
For example, the service side queries corresponding links and operators of the white list from the hash according to the obtained white list identifications "10001", "10009" and "10005", wherein the links and operators of the white list corresponding to "10001" are "www.bbb.com" and "a", the links and operators of the white list corresponding to "10009" are "www.ccc.com" and "U", and the links and operators of the white list corresponding to "10005" are "www.aaa.com" and "D", respectively, and sends the links, operators and the white list identifications of the white list to the client side as white list increment data.
In the third embodiment of the invention, the corresponding operational character and the timestamp are set for each white list link, and when the white list is updated, the operational character and the timestamp corresponding to the white list link are updated, so that an operation log is not newly established, the accumulation of a large number of operation logs at the server is avoided, and the writing and query performance of the server is improved. In addition, the white list detail data and the white list index data stored in the memory are read, and the white list increment data are sent to the client, so that the white list of the client can be quickly synchronized.
As shown in fig. 4, a fourth embodiment of the present invention provides a method for synchronizing a white list, including:
in step 401, the client receives the white list identifier, the white list link and the operator from the server.
Step 402, when the operational character is a new operational character, the client correspondingly stores the received white list identification and the white list link; and when the operator is a deletion operator, the client deletes the white list link which is stored by the client and corresponds to the received white list identifier.
Specifically, when the operator is a new operator, the client may store the corresponding whitelist identifier and the whitelist link to the local database. When the operational character is a deletion operational character, the client can judge whether the received white list identifier is stored in the local database, and if so, delete the white list identifier stored in the local database and the link corresponding to the white list identifier; otherwise, the flow ends.
In addition, when the operator is a modification operator, the client modifies the white list link corresponding to the received white list identification, which is stored by the client, into the received white list link.
In this embodiment, when the operational character is a modified operational character, the client may determine whether the received white list identifier is stored in the local database, and if so, modify a link corresponding to the received white list identifier in the local database into the received white list link; otherwise, the received white list link and the white list identification are added to a local database.
The client in the fourth embodiment of the invention updates the white list according to the received operator, and does not pull the intermediate data synchronization client any more, thereby removing a large amount of redundant data and improving the operating efficiency of the client.
As shown in fig. 5, a fifth embodiment of the present invention provides a method for synchronizing a white list, including:
step 501, the client sends a white list update request to the server.
And the white list updating request comprises timestamp progress information.
For example, the white list update request includes timestamp progress information "2016070607349".
Step 502, the client receives the white list incremental data and the maximum timestamp returned by the server.
The white list incremental data comprises one or more white list links and white list identifications and operators corresponding to the white list links.
In step 503, the client updates the timestamp progress information stored by the client to the received maximum timestamp.
For example, when the received maximum timestamp is "2016071809155", the client updates the timestamp progress information "2016070607349" stored by itself to "2016071809155".
Step 504, the client obtains an unprocessed white list link from the received white list increment data as a current link, judges an operator corresponding to the current link, and executes step 505 if the current link is a new operator; if so, executing step 506; if it is a delete operator, step 509 is performed.
In step 505, the client adds the current link and the white list identifier corresponding to the current link to the local database, and performs step 511.
Step 506, the client judges whether a white list identifier corresponding to the current link is stored in the local database, if so, step 507 is executed; otherwise, step 508 is performed.
In step 507, the client modifies the link corresponding to the white list identifier in the local database into the current link according to the white list identifier corresponding to the current link, and executes step 511.
In step 508, the client adds the current link and the white list identifier corresponding to the current link to the local database, and performs step 511.
Step 509, the client determines whether a white list identifier corresponding to the current link is stored in the local database, and if yes, step 510 is executed; otherwise, step 511 is performed.
Step 510, the client deletes the white list identifier stored in the local database and the link corresponding to the white list identifier according to the white list identifier corresponding to the current link, and executes step 511.
Step 511, the client determines whether unprocessed white list links exist in the white list incremental data, and if yes, step 504 is executed; otherwise, the flow ends.
The client in the fifth embodiment of the invention updates the white list according to the received operational characters, and does not pull the intermediate data synchronization client any more, thereby removing a large amount of redundant data, reducing the times of operating the local database and improving the operating efficiency of the client.
As shown in fig. 6, a sixth embodiment of the present invention provides an apparatus for updating a white list, applied to a server, including:
the detecting module 610 is configured to detect whether an update operation occurs.
And the adding module 620 is configured to obtain a newly added white list link and generate a timestamp when the detecting module 610 detects a newly added operation, and store the newly added white list link and the generated timestamp in correspondence with the newly added operator.
A deleting module 630, configured to, when the detecting module 610 detects a deleting operation, update an operator corresponding to the deleting operation to a deleting operator, generate a timestamp, and update the timestamp corresponding to the deleting operation to the generated timestamp.
Further, the newly added module 620 is further configured to allocate a white list identifier for the newly added white list link, and store the white list identifier in correspondence with the newly added operator, the newly added white list link, and the timestamp.
Further, the above apparatus further comprises:
and the modifying module 640 is configured to, when the detecting module 610 detects a modifying operation, acquire a white list identifier and a white list link, generate a timestamp, and modify the white list link, the operator, and the timestamp, which are stored by the modifying module and correspond to the white list identifier, into the acquired white list link, the modified operator, and the generated timestamp, respectively.
The deleting module 630 is specifically configured to, when the detecting module 610 detects a deleting operation, obtain a white list identifier, generate a timestamp, and modify an operator and a timestamp, which are stored by the detecting module and correspond to the white list identifier, into a deleted operator and a generated timestamp, respectively.
Further, the adding module 620 is further configured to correspondingly store the added operator, the white list identifier, and the newly added white list link in the first storage area, and correspondingly store the white list identifier and the timestamp in the second storage area.
Correspondingly, the modifying module 640 is further configured to modify the whitelist link and the operational character corresponding to the whitelist identifier stored in the first storage area into the obtained whitelist link and the obtained operational character, and modify the timestamp corresponding to the whitelist identifier stored in the second storage area into the generated timestamp.
The deleting module 630 is further configured to modify the operator corresponding to the white list identifier stored in the first storage area into a deleting operator, and modify the timestamp corresponding to the white list identifier stored in the second storage area into the generated timestamp.
Further, the above apparatus further comprises:
the receiving module is used for receiving a white list updating request from a client;
the acquisition module is used for inquiring the timestamp greater than the timestamp progress information from the second storage area according to the timestamp progress information in the white list updating request and acquiring a white list identifier corresponding to the inquired timestamp;
the query module is used for querying a white list link and an operator corresponding to the white list identifier from the first storage area according to the white list identifier acquired by the acquisition module;
and the sending module is used for sending the white list link and the operator inquired by the inquiry module and the acquired white list identifier to the client.
In the sixth embodiment of the present invention, a corresponding operator and a timestamp are set for each white list link, and when a white list is updated, the operator and the timestamp corresponding to the white list link are updated, and an operation log is not newly created, so that a large amount of operation logs are prevented from being accumulated at a server, and writing and query performance of the server is improved. In addition, the white list detail data and the white list index data are stored in the memory, so that the white list of the client side can be rapidly synchronized.
As shown in fig. 7, a seventh embodiment of the present invention provides an apparatus for synchronizing a white list, applied to a client, including:
the first receiving module 710 is configured to receive a whitelist identifier, a whitelist link, and an operator from the server.
A first updating module 720, configured to, when the operation character is a new operation character, correspondingly store the white list identifier and the white list link received by the first receiving module 710; and when the operator is a deletion operator, deleting the white list link which is stored by the operator and corresponds to the received white list identifier.
Further, the first updating module 720 is further configured to modify the whitelist link corresponding to the received whitelist identifier, which is stored by the first updating module, into the received whitelist link when the operator is a modification operator.
Specifically, the first updating module 720 is specifically configured to, when the operator is a new operator, store the corresponding white list identifier and the white list link to the local database;
when the operational character is a modification operational character, judging whether the received white list identification is stored in the local database, if so, modifying the link corresponding to the received white list identification in the local database into the received white list link; otherwise, adding the received white list link and the white list identifier to a local database;
and when the operator is a deletion operator, judging whether the received white list identifier is stored in the local database, and deleting the white list identifier stored in the local database and the link corresponding to the white list identifier when the received white list identifier is judged to be stored in the local database.
Further, the above apparatus further comprises:
the sending module is used for sending a white list updating request to the server side, wherein the white list updating request comprises timestamp progress information;
the second receiving module is used for receiving the maximum timestamp returned by the server;
and the second updating module is used for updating the timestamp progress information stored by the second updating module into the maximum timestamp.
The first updating module 720 in the seventh embodiment of the present invention updates the white list according to the received operator, and does not pull the intermediate data synchronization client, thereby removing a large amount of redundant data, reducing the number of times of operating the local database, and improving the operating efficiency of the client.
Fig. 8 is a system structural diagram for updating and synchronizing a white list according to an eighth embodiment of the present invention, which includes a server 810 and a client 820.
The server 810 is configured to, when a new operation is detected, obtain a new white list link, generate a first timestamp, and store the new white list link, the first timestamp, and a new operational character in a corresponding manner; when the deletion operation is detected, the operation character corresponding to the deletion operation is updated to the deletion operation character, a second timestamp is generated, and the timestamp corresponding to the deletion operation is updated to the second timestamp.
Further, the server 810 is further configured to, after acquiring the newly added white list link, allocate a white list identifier to the newly added white list link, and store the white list identifier in correspondence with the newly added operator, the newly added white list link, and the first timestamp.
Further, the server 810 is specifically configured to, when a modification operation is detected, obtain a white list identifier and a white list link, generate a third timestamp, and modify the white list link, the operator, and the timestamp, which are stored by the server and correspond to the white list identifier, into the obtained white list link, the modified operator, and the third timestamp, respectively; and when the deletion operation is detected, acquiring the white list identifier, generating a second time stamp, and modifying the operation character and the time stamp which are stored by the white list identifier and correspond to the white list identifier into the deletion operation character and the second time stamp respectively.
Further, the server 810 is further configured to, after acquiring the newly added white list link, correspondingly store the newly added operator, the white list identifier, and the newly added white list link in a first storage area, and correspondingly store the white list identifier and the first timestamp in a second storage area; when the deleting operation is detected, modifying the operation character corresponding to the white list identification and stored in the first storage area into a deleting operation character, and modifying the time stamp corresponding to the white list identification and stored in the second storage area into a second time stamp; and when the modification operation is detected, modifying the white list link and the operational character which are stored in the first storage area and correspond to the white list identification into the obtained white list link and the obtained operational character, and modifying the time stamp which is stored in the second storage area and corresponds to the white list identification into a third time stamp.
Further, the server 810 is further configured to receive a white list update request from the client 820, query, according to the timestamp progress information in the white list update request, a timestamp larger than the timestamp progress information from the second storage area, and obtain a white list identifier corresponding to the queried timestamp; and querying a white list link and an operator corresponding to the white list identifier from the first storage area according to the obtained white list identifier, and sending the queried white list link and operator and the obtained white list identifier to the client 820.
The client 820 is configured to receive the whitelist identifier, the whitelist link and the operator from the server 810, and when the operator is a new operator, correspondingly store the received whitelist identifier and the received whitelist link; and when the operator is a deletion operator, deleting the white list link which is stored by the operator and corresponds to the received white list identifier.
Further, the client 820 is further configured to modify the whitelist link corresponding to the received whitelist identifier, which is stored by the client, into the received whitelist link when the operator is a modification operator.
Further, the client 820 is further configured to send a whitelist update request to the server 810 before receiving the whitelist identifier, the whitelist link, and the operator from the server 810, where the whitelist update request includes timestamp progress information; after a white list updating request is sent to the server 810, the maximum timestamp returned by the server 810 is received, and the timestamp progress information stored by the server is updated to be the maximum timestamp.
In the eighth embodiment of the present invention, a corresponding operator and a timestamp are set for each white list link, and when the white list is updated by the server 810, the operator and the timestamp corresponding to the white list link are updated, and no new operation log is created, so that a large amount of operation logs are prevented from being accumulated in the server 810, and the writing and query performance of the server 810 is improved; accordingly, the client 820 updates the white list according to the received operator, and the intermediate data synchronization client 820 is not pulled any more, so that a large amount of redundant data is removed, and the operating efficiency of the client 820 is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for updating a white list is applied to a server side, and is characterized by comprising the following steps:
when a newly added operation is detected, acquiring a newly added white list link, distributing a white list identifier to the newly added white list link, generating a first time stamp, and correspondingly storing the white list identifier, a newly added operational character, the newly added white list link and the first time stamp;
when the deleting operation is detected, updating the operational character corresponding to the deleting operation into a deleting operational character, acquiring a white list identifier, generating a second time stamp, and modifying the operational character and the time stamp which are stored by the device and correspond to the white list identifier into the deleting operational character and the second time stamp respectively;
correspondingly storing the newly added operator, the white list identifier and the newly added white list link into a first storage area, and correspondingly storing the white list identifier and the first time stamp into a second storage area;
the server receives a white list updating request from a client, inquires a time stamp larger than time stamp progress information from the second storage area according to the time stamp progress information in the white list updating request, and acquires a white list identifier corresponding to the inquired time stamp;
and the server side inquires the white list link and the operator corresponding to the white list identifier from the first storage area according to the obtained white list identifier, and sends the inquired white list link and operator and the obtained white list identifier to the client side.
2. The method of claim 1, further comprising:
and when the modification operation is detected, acquiring a white list identifier and a white list link, generating a third time stamp, and respectively modifying the white list link, the operator and the time stamp which are stored by the device and correspond to the white list identifier into the acquired white list link, the modified operator and the third time stamp.
3. The method of claim 2,
the updating the operator corresponding to the deletion operation to a deletion operator, generating a second timestamp, and updating the timestamp corresponding to the deletion operation to the second timestamp, further includes:
modifying the operational character corresponding to the white list identification and stored in the first storage area into a deletion operational character, and modifying the time stamp corresponding to the white list identification and stored in the second storage area into the second time stamp;
the method further comprises the following steps:
when modification operation is detected, modifying the white list link and the operator corresponding to the white list identifier stored in the first storage area into the obtained white list link and the obtained modified operator respectively, and modifying the time stamp corresponding to the white list identifier stored in the second storage area into the third time stamp.
4. An apparatus for updating a white list, applied to a server, for performing the method for updating a white list according to any one of claims 1 to 3.
5. A method for synchronizing a white list is applied to a client, and is characterized by comprising the following steps:
the client sends a white list updating request to the server side according to claim 4, wherein the white list updating request includes timestamp progress information;
the client receives the maximum timestamp returned by the server, and updates the timestamp progress information stored by the client into the maximum timestamp;
the client receives a white list identifier, a white list link and an operator from a server;
when the operational character is a newly added operational character, the client correspondingly stores the received white list identification and the received white list link;
and when the operator is a deletion operator, deleting the white list link which is stored by the client and corresponds to the received white list identifier.
6. The method of claim 5, wherein the client, after receiving the whitelist identification, the whitelist link, and the operator from the server, comprises:
and when the operator is a modification operator, modifying the white list link corresponding to the received white list identifier, which is stored by the client, into the received white list link by the client.
7. An apparatus for synchronizing white lists, applied to a client, and configured to perform the method for synchronizing white lists according to any one of claims 5 to 6.
8. A system for updating and synchronizing a white list, comprising:
a server for executing the method of updating a white list according to any one of claims 1 to 3;
client for performing the method of synchronizing a white list according to any of claims 5-6.
CN201610616700.2A 2016-07-29 2016-07-29 Method, device and system for updating and synchronizing white list Active CN106250476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610616700.2A CN106250476B (en) 2016-07-29 2016-07-29 Method, device and system for updating and synchronizing white list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610616700.2A CN106250476B (en) 2016-07-29 2016-07-29 Method, device and system for updating and synchronizing white list

Publications (2)

Publication Number Publication Date
CN106250476A CN106250476A (en) 2016-12-21
CN106250476B true CN106250476B (en) 2020-11-20

Family

ID=57605662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610616700.2A Active CN106250476B (en) 2016-07-29 2016-07-29 Method, device and system for updating and synchronizing white list

Country Status (1)

Country Link
CN (1) CN106250476B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008697A (en) * 2019-03-31 2019-07-12 深圳联想懂的通信有限公司 A kind of equipment and its intelligent white list management method
CN112069137A (en) * 2020-09-02 2020-12-11 北京百度网讯科技有限公司 Method and device for generating information, electronic equipment and computer readable storage medium
CN112099757A (en) * 2020-09-21 2020-12-18 珠海格力电器股份有限公司 Application keep-alive method and device
CN113779138A (en) * 2021-02-04 2021-12-10 北京京东振世信息技术有限公司 Order management method and device
CN114363001A (en) * 2021-12-06 2022-04-15 国网安徽省电力有限公司超高压分公司 Method, system and storage medium for client access limitation based on offline configuration

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651856A (en) * 2011-02-23 2012-08-29 腾讯科技(深圳)有限公司 Method, system and device for improving Internet surfing security of terminal
CN103136200A (en) * 2011-11-22 2013-06-05 中兴通讯股份有限公司 Data updating information obtaining method and device and data synchronization method and device
US8688734B1 (en) * 2011-02-04 2014-04-01 hopTo Inc. System for and methods of controlling user access and/or visibility to directories and files of a computer
CN105763554A (en) * 2016-03-28 2016-07-13 努比亚技术有限公司 Network detection method, client, and network detection system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442042B (en) * 2013-08-14 2017-01-04 福建天晴数码有限公司 Incremental data synchronization method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8688734B1 (en) * 2011-02-04 2014-04-01 hopTo Inc. System for and methods of controlling user access and/or visibility to directories and files of a computer
CN102651856A (en) * 2011-02-23 2012-08-29 腾讯科技(深圳)有限公司 Method, system and device for improving Internet surfing security of terminal
CN103136200A (en) * 2011-11-22 2013-06-05 中兴通讯股份有限公司 Data updating information obtaining method and device and data synchronization method and device
CN105763554A (en) * 2016-03-28 2016-07-13 努比亚技术有限公司 Network detection method, client, and network detection system

Also Published As

Publication number Publication date
CN106250476A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106250476B (en) Method, device and system for updating and synchronizing white list
CN111459985B (en) Identification information processing method and device
CN104580085B (en) service data updating method, system, client and server
EP2564549B1 (en) Apparatus, and associated method, for synchronizing directory services
CN109299157B (en) Data export method and device for distributed big single table
CN102253991B (en) Uniform resource locator (URL) storage method, web filtering method, device and system
CN101751473A (en) The searching of a kind of amendment record item, renewal and method for synchronous and data sync equipment
CN101246535A (en) Method, system and device for renovating abnormal document
CN111400298A (en) Data processing method and device and computer readable storage medium
CN104767839A (en) IP positioning method and device
CN108198035B (en) Order following method and device
CN110109906B (en) Data storage system and method
CN111858486A (en) File classification method and device
CN108762979B (en) Terminal information backup method and backup device based on matching tree
CN111767314A (en) Data caching and querying method and device, lazy caching system and storage medium
CN111045988B (en) File searching method, device and computer program product
CN107181715B (en) Service checking method and device
CN108717438B (en) Chained data state acquisition system and method
CN110704466B (en) Black product data storage method and device
CN113656438B (en) Data query method and device for data tree
CN110099117B (en) Method and device for issuing full amount of multi-version DNS zone files
CN110069539B (en) Data association method and system
CN111221905A (en) Customer order information synchronization method based on mobile terminal
CN112052367A (en) Searching method, searching device, electronic equipment and storage medium
CN105786972A (en) Webpage template generation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Yu Mingyang

Inventor after: Zha Zhiyong

Inventor after: Wu Geng

Inventor before: Wang Ping

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201102

Address after: 430070, 341 East Main Street, Hongshan District, Hubei, Wuhan

Applicant after: STATE GRID HUBEI ELECTRIC POWER CO., LTD. INFORMATION AND COMMUNICATION Co.

Address before: 518000 Guangdong Province, Shenzhen high tech Zone of Nanshan District City, No. 9018 North Central Avenue's innovation building A, 6-8 layer, 10-11 layer, B layer, C District 6-10 District 6 floor

Applicant before: NUBIA TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant