CN109995577B - Method, device and system for updating strategy - Google Patents
Method, device and system for updating strategy Download PDFInfo
- Publication number
- CN109995577B CN109995577B CN201910132658.0A CN201910132658A CN109995577B CN 109995577 B CN109995577 B CN 109995577B CN 201910132658 A CN201910132658 A CN 201910132658A CN 109995577 B CN109995577 B CN 109995577B
- Authority
- CN
- China
- Prior art keywords
- strategy
- sub
- version
- terminal
- type
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
Abstract
The invention discloses a method, a device and a system for updating a strategy, belongs to the technical field of computer application, and particularly relates to a method for updating a strategy, which comprises the following steps: the terminal acquires the strategy type and the sub-strategy version to be updated; the terminal broadcasts the strategy type and the sub-strategy version to be updated to other terminals in the network segment; and acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated, and updating the strategy. The terminal in the invention broadcasts the strategy type and the sub-strategy version to be updated to other terminals in the network segment, so that each terminal in the network segment provides a new version strategy for other terminals, and each terminal can be used for updating the strategy for other terminals, thereby avoiding the dependence on a server in the traditional updating strategy, reducing the configuration of the server, saving hardware resources and reducing the cost of the updating strategy.
Description
Technical Field
The invention belongs to the technical field of computer application, and particularly relates to a method, a device and a system for updating a strategy.
Background
Servers, also known as servers, are devices that provide computing services. Since the server needs to respond to and process the service request, the server generally has the capability of assuming and securing the service. The server is constructed to include a processor, a hard disk, a memory, a system bus, etc., similar to a general-purpose computer architecture, but requires high processing power, stability, reliability, security, scalability, manageability, etc., due to the need to provide highly reliable services. The server stores the strategy and distributes the strategy to the terminal so as to enable the server to realize the functions.
The strategy in the server is transmitted with the complete strategy of the terminal, generally, after the terminal logs in, the server is requested to have corresponding strategy information, after the result is inquired by the server, the server sends the result to the corresponding terminal, namely, each terminal requests the server and the server transmits the strategy content to each terminal once. In some cases, the strategy is divided into sub-strategies, and only the sub-strategies with difference between the terminal and the server are transmitted, but the sub-strategies are transmitted between the terminal and the server, or a plurality of sub-servers are deployed, and different terminals update the sub-strategies with difference or the complete strategy from the sub-servers.
The inventor finds that the following defects exist in the prior art: the traditional update strategy depends on the servers, and has a certain requirement on the number of the servers, so that the update strategy needs to be supported by additionally configuring hardware, and the deployment and maintenance costs of hardware equipment required by the update strategy are high.
Disclosure of Invention
In order to at least solve the above technical problem, the present invention provides a method, an apparatus, and a system for updating a policy.
According to a first aspect of the present invention, there is provided a method for updating a policy, which is applied to a terminal, and includes:
acquiring a strategy type and a sub-strategy version to be updated;
broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment;
and acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated, and updating the strategy.
In another embodiment of the present invention, the obtaining the policy type and the sub-policy version to be updated includes:
the method comprises the steps that the terminal is connected with a server, a strategy type request corresponding to the terminal is sent to the server to inquire under the condition that the terminal is connected with the server, the strategy type and the sub-strategy version returned by the server are received, and when the received sub-strategy version returned by the server is different from the sub-strategy version of the terminal, the strategy type and the sub-strategy version returned by the server are respectively used as the strategy type and the sub-strategy version to be updated.
In another embodiment of the present invention, the obtaining the policy type and the sub-policy version to be updated includes:
under the condition that the terminal is not successfully connected with the server, broadcasting a policy type request of the terminal to a local area network, and when a response is received and a sub-policy version contained in the response is higher than the current sub-policy version of the terminal, respectively using the policy type and the sub-policy version in the response as a policy type and a sub-policy version to be updated;
and when the terminal is not successfully connected with the server and the response is not received, taking the strategy type and the sub-strategy version used by the terminal last time as the strategy type and the sub-strategy version to be updated.
In another embodiment of the present invention, the broadcasting the policy type and the sub-policy version to be updated to other terminals in the network segment includes:
and the terminal broadcasts the strategy type and the sub-strategy version to be updated to the network segment so that other terminals in the network segment can receive the broadcast.
In another embodiment of the present invention, the method further comprises, including:
and under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version needing to be updated is not acquired, the terminal adopts corresponding updating operation according to the connection state with the server.
In another embodiment of the present invention, the terminal performs a corresponding update operation according to a connection state with the server, including:
under the condition that the terminal is connected with the server, sending an updating strategy request containing the strategy type to be updated and the sub-strategy version to the server, and performing strategy updating operation according to the received updating response;
and under the condition that the terminal is not successfully connected with the server, the terminal takes the last used strategy type and sub-strategy version as the updated strategy type and sub-strategy version.
In another embodiment of the present invention, the obtaining the returned sub-policy number corresponding to the policy type and the sub-policy version to be updated, and updating the policy, includes:
and when the terminal receives the strategy type to be updated, the corresponding sub-strategy version, the sub-strategy number and the terminal number of the current connection updating strategy, which are returned by other terminals in the network segment, the terminal selects the optimal terminal according to the strategy type to be updated, the sub-strategy version number and the terminal number of the current connection updating strategy, and obtains the strategy type, the sub-strategy number and the sub-strategy version returned by the optimal terminal, and updates the strategy.
In a second aspect of the present invention, there is provided an apparatus for updating a policy, including:
the information to be updated acquisition module is used for acquiring the strategy type and the sub-strategy version to be updated;
the broadcasting module is used for broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment;
and the strategy updating module is used for acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated and updating the strategy.
In a third aspect of the present invention, there is provided a system for updating a policy, comprising:
a plurality of terminals and a plurality of servers,
the terminal is used for acquiring the strategy type and the sub-strategy version to be updated and broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment;
updating the strategy under the condition of acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated;
the terminal establishes connection with the server, and is also used for sending an updating strategy request containing the strategy type and the strategy version to the server under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version needing to be updated is not obtained, waiting for receiving an updating strategy response sent by the server, and executing corresponding updating strategy operation according to the received updating strategy response;
and the server is used for issuing an update strategy response to the terminal when receiving the update strategy request containing the strategy type and the strategy version.
In a fourth aspect of the present invention, there is provided a computer-readable storage medium storing a program for implementing the update policy method as described above.
The invention has the beneficial effects that: the terminal broadcasts the strategy type and the sub-strategy version to be updated to other terminals in the network segment, so that each terminal in the network segment provides a new version strategy for other terminals, each terminal can be used for updating the strategy for other terminals, a server which is depended on by the traditional updating strategy is avoided, the configuration of the server is reduced, hardware resources are saved, and the cost of the updating strategy is reduced.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which,
FIG. 1 is a flow chart of a method for updating a policy according to the present invention;
fig. 2 is a block diagram of an apparatus for updating a policy according to the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
In order to more clearly illustrate the invention, the invention is further described below with reference to preferred embodiments and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
In a first aspect of the present invention, a method for updating a policy is provided, which is applied to a terminal, as shown in fig. 1, and includes:
step 201: acquiring a strategy type and a sub-strategy version to be updated;
in the embodiment of the invention, the terminal is started and establishes connection with the server. Under the condition that the terminal is connected with the server, a strategy type request corresponding to the terminal is sent to the server, the strategy type and each sub-strategy version returned by the server are waited to be received, and when the received sub-strategy version returned by the server is different from the current sub-strategy version of the terminal, the strategy type and the corresponding sub-strategy version are determined to be required to be updated. The policy type and sub-policy version returned by the server are respectively used as the policy type and sub-policy version to be updated, and step 202 is executed. The server generates each sub-policy file according to each policy type, and if a certain sub-policy file is updated, the server notifies the terminal corresponding to the policy type with the policy change to update the policy.
Under the condition that the terminal is not successfully connected with the server, a policy type request corresponding to the terminal is broadcasted to the local area network, a response is waited to be received, when the response is received and the sub-policy version contained in the response is higher than the current sub-policy version of the terminal, the policy type and the sub-policy version in the response are respectively used as the policy type and the sub-policy version to be updated, and step 202 is executed.
And if no connection is established with the server, and no response is received, the policy type and the sub-policy version used by the terminal last time are respectively used as the policy type and the sub-policy version to be updated, and step 202 is executed.
Step 202: broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment;
in the embodiment of the invention, the terminal broadcasts the strategy type and the sub-strategy version to be updated to the network segment, so that each terminal in the network segment can receive the broadcast, for the terminal which has the sub-strategy corresponding to the strategy type and the sub-strategy version to be updated, the sub-strategy number and the number of the terminals which are currently connected with the updating strategy, which are corresponding to the strategy type and the sub-strategy version to be updated, are obtained, and the strategy type and the sub-strategy version to be updated, the corresponding sub-strategy number and the number of the terminals which are currently connected with the updating strategy are returned.
And under the condition that the terminal does not receive the broadcast response, further performing corresponding operation according to the connection state of the terminal and the server, wherein under the condition that the terminal is connected with the server, an updating strategy request containing the strategy type and the sub-strategy version to be updated is sent to the server, and strategy updating operation is performed according to the received updating response.
And under the condition that the terminal is not successfully connected with the server, the terminal acquires the last used strategy type and the corresponding sub-strategy version, and takes the last used strategy type and the sub-strategy version as the updated strategy type and the updated sub-strategy version.
In the invention, each terminal in the network segment provides a new version strategy for other terminals by broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment, so that each terminal can serve as a server for updating the strategy, the updating strategy is prevented from depending on the server, the configuration of the server is reduced, the hardware resource is saved, and the cost for updating the strategy is reduced.
Step 203: acquiring a returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated, and updating the strategy;
in the embodiment of the invention, when the terminal receives the strategy type to be updated and the corresponding sub-strategy version, sub-strategy number and the terminal number of the current connection updating strategy returned by other terminals in the network segment, the terminal selects the optimal terminal according to the strategy type to be updated, the sub-strategy version number and the terminal number of the current connection updating strategy, and obtains the strategy type, the sub-strategy number and the sub-strategy version returned by the optimal terminal and updates the strategy.
Specifically, when the terminal receives the policy types to be updated and the corresponding sub-policy versions, sub-policy numbers and the number of terminals currently connected with the update policy, which are returned by other terminals in the network segment, the priority of the terminal is established according to the sequence of the policy types and sub-policy versions which accord with the update, from high to low, that is, the number of the latest policy is from high to low, and the number of the terminals currently connected with the update policy is from low to high, and the terminal with high priority, that is, the terminal which accords with the policy types and sub-policy versions which accord with the update, from high to high, the number of the latest policy is from high, and the number of the terminals currently connected with the update policy is low, is used as the preferred terminal, and the policy types, the sub-policy numbers and the sub-policy versions which are returned by the preferred terminal are obtained, and the policy is updated. Correspondingly, the update policy is requested to the next preferred terminal including other policy to be updated, the specific operation is the same as the above method, and details are not described here. And ending the operation under the condition that all the strategies needing to be updated are updated.
In the invention, the strategy is obtained from the terminal to carry out strategy updating operation by selecting the terminal with more strategy types and sub-strategy versions to be updated and less terminals connected with the updating strategy currently, thereby achieving the purpose of updating the strategy rapidly, saving time, reasonably utilizing network resources and avoiding overlarge network bandwidth pressure.
Correspondingly, after updating the strategy, generating a new strategy directory according to the updated strategy, updating the meta-strategy directory by using the new strategy directory, and updating the strategy version and the sub-strategy version.
It should be noted that, in the embodiment of the present invention, in a case that a policy number and a corresponding policy version that are the same as a policy type to be updated are not obtained, an update policy request including the policy type and the policy version is sent to a server, an update policy response sent by the server is waited to be received, and a corresponding update policy operation is executed according to the received update policy response. And under the condition that the terminal is not successfully connected with the server, the terminal acquires the last-time used strategy stored in the terminal and takes the strategy as an updated strategy to perform corresponding operation.
In a second aspect of the present invention, there is provided an apparatus for updating a policy, as shown in fig. 2, including:
an information to be updated obtaining module 401, configured to obtain a policy type and a sub-policy version to be updated;
in this embodiment of the present invention, the information to be updated obtaining module 401 is configured to start a terminal and establish a connection with a server. Under the condition that the terminal is connected with the server, a strategy type request corresponding to the terminal is sent to the server, the strategy type and each sub-strategy version returned by the server are waited to be received, and when the received sub-strategy version returned by the server is different from the current sub-strategy version of the terminal, the strategy type and the corresponding sub-strategy version are determined to be required to be updated. The strategy type and the sub-strategy version returned by the server are respectively used as the strategy type and the sub-strategy version to be updated, and the broadcasting module 402 is triggered. The server generates each sub-policy file according to each policy type, and if a certain sub-policy file is updated, the server notifies the terminal corresponding to the policy type with the policy change to update the policy.
Under the condition that the terminal is not successfully connected with the server, the strategy type request corresponding to the terminal is broadcasted to the local area network, the response is waited to be received, and when the response is received and the sub-strategy version contained in the response is higher than the current sub-strategy version of the terminal, the strategy type and the sub-strategy version in the response are respectively used as the strategy type and the sub-strategy version to be updated, and the broadcasting module 402 is triggered.
The connection with the server is not established, and in the case that the response is not received, the policy type and the sub-policy version used by the terminal last time are respectively used as the policy type and the sub-policy version to be updated, and the broadcasting module 402 is triggered.
A broadcasting module 402, configured to broadcast the policy type and the sub-policy version to be updated to other terminals in the network segment;
in the embodiment of the present invention, the broadcasting module 402 is configured to broadcast the policy type and the sub-policy version to be updated to the network segment where the terminal is located, so that each terminal in the network segment can receive the broadcast, obtain, for the terminal in which the sub-policy corresponding to the policy type and the sub-policy version to be updated exists, the sub-policy number and the number of terminals currently connected to the update policy corresponding to the policy type and the sub-policy version to be updated, and return the policy type and the sub-policy version to be updated, the corresponding sub-policy number and the number of terminals currently connected to the update policy.
The broadcast module 402 is further configured to, in a situation that the terminal does not receive the broadcast response, perform corresponding operations according to a connection state between the terminal and the server, where in a situation that the terminal establishes a connection with the server, send an update policy request including the policy type and the sub-policy version to be updated to the server, and perform policy update operations according to the received update response.
And the method is also used for acquiring the last used strategy type and the corresponding sub-strategy version by the terminal under the condition that the terminal is not successfully connected with the server, and taking the last used strategy type and the sub-strategy version as the updated strategy type and the updated sub-strategy version.
In the invention, each terminal in the network segment provides a new version strategy for other terminals by broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment, so that each terminal can serve as a server for updating the strategy, the updating strategy is prevented from depending on the server, the configuration of the server is reduced, the hardware resource is saved, and the cost for updating the strategy is reduced.
And a policy updating module 403, configured to obtain a returned sub-policy number corresponding to the policy type and the sub-policy version to be updated, and update the policy.
In this embodiment of the present invention, the policy updating module 403 is configured to, when the terminal receives the policy type to be updated and the corresponding sub-policy version, sub-policy number and the number of terminals currently connected to the update policy, which are returned by other terminals in the network segment where the terminal is located, select a preferred terminal according to the policy type to be updated and the number of sub-policy versions, and the number of terminals currently connected to the update policy, and obtain the policy type, the sub-policy number and the sub-policy version returned by the preferred terminal, and update the policy.
Specifically, the policy updating module 403 is configured to, when the terminal receives the policy types to be updated and the corresponding sub-policy versions, sub-policy numbers and the number of terminals currently connected to the update policy, which are returned by other terminals in the network segment, establish a priority of the terminal according to an order from a large number of the policy types to be updated and the sub-policy versions, that is, a large number of the latest policy, and a small number of terminals currently connected to the update policy, and use the terminal with a high priority, that is, the terminal including the policy types to be updated and the sub-policy versions, the terminal including the large number of the latest policy, and the terminal including the small number of the terminals currently connected to the update policy, as a preferred terminal to obtain the policy types, the sub-policy numbers, and the sub-policy versions returned by the preferred terminal, and update the policy. Correspondingly, the update policy is requested to the next preferred terminal including other policy to be updated, the specific operation is the same as the above method, and details are not described here. And finishing the operation under the condition that all the strategies needing to be updated are updated.
Correspondingly, the policy updating module 403 is further configured to, after updating the policy, generate a new policy directory according to the updated policy, update the meta-policy directory with the new policy directory, and update the policy version and the sub-policy version.
In a third aspect of the present invention, there is provided a system for updating a policy, comprising:
the terminal is used for acquiring the strategy type and the sub-strategy version to be updated; the strategy type and the sub-strategy version which need to be updated are broadcasted to other terminals in the network segment; and the strategy updating module is also used for acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated and updating the strategy. And when the returned sub-policy number corresponding to the policy type and the sub-policy version to be updated is not acquired, sending an update policy request containing the policy type and the policy version to a server connected with the sub-policy number, waiting for receiving an update policy response sent by the server, and executing corresponding update policy operation according to the received update policy response.
The server is used for issuing an updating strategy response to the terminal when receiving an updating strategy request containing the strategy type and the strategy version;
in the embodiment of the invention, the terminal is started and establishes connection with the server. Under the condition that the terminal is connected with the server, a strategy type request corresponding to the terminal is sent to the server, the strategy type and each sub-strategy version returned by the server are waited to be received, and when the received sub-strategy version returned by the server is different from the current sub-strategy version of the terminal, the strategy type and the corresponding sub-strategy version are determined to be required to be updated. And respectively taking the strategy type and the sub-strategy version returned by the server as the strategy type and the sub-strategy version to be updated, wherein the server generates each sub-strategy file according to each strategy type, and if a certain sub-strategy file is updated, the terminal corresponding to the strategy type with the strategy change is informed to update the strategy.
Under the condition that the terminal is not successfully connected with the server, a strategy type request corresponding to the terminal is broadcasted to the local area network, a response is waited to be received, and when the response is received and the sub-strategy version contained in the response is higher than the current sub-strategy version of the terminal, the strategy type and the sub-strategy version in the response are respectively used as the strategy type and the sub-strategy version to be updated.
And when the terminal does not establish connection with the server and does not receive a response, respectively using the strategy type and the sub-strategy version used by the terminal last time as the strategy type and the sub-strategy version to be updated.
In a fourth aspect of the present invention, there is provided a computer-readable storage medium storing a program for implementing the update policy method as described above.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It should be understood that the above detailed description of the technical solution of the present invention with the help of preferred embodiments is illustrative and not restrictive. On the basis of reading the description of the invention, a person skilled in the art can modify the technical solutions described in the embodiments, or make equivalent substitutions for some technical features; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (6)
1. A method for updating a policy is applied to a terminal, and comprises the following steps: acquiring a strategy type and a sub-strategy version to be updated; broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment; acquiring a returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated, and updating the strategy;
under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version needing to be updated is not acquired, the terminal takes corresponding updating operation according to the connection state with the server;
the terminal adopts corresponding updating operation according to the connection state with the server, and the updating operation comprises the following steps: under the condition that the terminal is connected with the server, sending an updating strategy request containing the strategy type to be updated and the sub-strategy version to the server, and performing strategy updating operation according to the received updating response; under the condition that the terminal is not successfully connected with the server, the terminal takes the last used strategy type and sub-strategy version as the updated strategy type and sub-strategy version;
the acquiring of the policy type and the sub-policy version to be updated includes: the terminal establishes connection with a server, and sends a request for inquiring the strategy type corresponding to the terminal to the server under the condition that the terminal establishes connection with the server; receiving the strategy type and the sub-strategy version returned by the server; when the received sub-strategy version returned by the server is different from the sub-strategy version of the terminal, the strategy type and the sub-strategy version returned by the server are respectively used as the strategy type and the sub-strategy version to be updated;
the acquiring of the policy type and the sub-policy version to be updated includes: under the condition that the terminal is not successfully connected with the server, a strategy type request of the terminal is broadcasted to a local area network, when a response is received and the sub-strategy version contained in the response is higher than the current sub-strategy version of the terminal, the strategy type and the sub-strategy version in the response are respectively taken as the strategy type and the sub-strategy version to be updated and are not successfully connected between the terminal and the server, and under the condition that the response is not received, the strategy type and the sub-strategy version used by the terminal last time are taken as the strategy type and the sub-strategy version to be updated.
2. The method of claim 1, wherein the broadcasting the policy type and sub-policy version to be updated to other terminals in the network segment includes: and the terminal broadcasts the strategy type and the sub-strategy version to be updated to the network segment so that other terminals in the network segment can receive the broadcast.
3. The method of claim 1, wherein the obtaining the returned sub-policy number corresponding to the policy type and sub-policy version to be updated, updating the policy, comprises: and when the terminal receives the strategy type to be updated, the corresponding sub-strategy version, the sub-strategy number and the terminal number of the current connection updating strategy, which are returned by other terminals in the network segment, the terminal selects the optimal terminal according to the strategy type to be updated, the sub-strategy version number and the terminal number of the current connection updating strategy, and obtains the strategy type, the sub-strategy number and the sub-strategy version returned by the optimal terminal, and updates the strategy.
4. An apparatus for updating policies, comprising: the information to be updated acquisition module is used for acquiring the strategy type and the sub-strategy version to be updated; the broadcasting module is used for broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment; the strategy updating module is used for acquiring a returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated and updating the strategy;
the information to be updated acquisition module is also used for the terminal to adopt corresponding updating operation according to the connection state with the server under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated is not acquired;
the broadcast module is further used for sending an update policy request containing the policy type to be updated and the sub-policy version to the server under the condition that the terminal is connected with the server, and performing policy update operation according to the received update response; under the condition that the terminal is not successfully connected with the server, the terminal takes the last used strategy type and sub-strategy version as the updated strategy type and sub-strategy version;
the policy updating module is further used for establishing connection between the terminal and the server, and sending a policy type request for inquiring the terminal to the server under the condition that the connection between the terminal and the server is established; receiving the strategy type and the sub-strategy version returned by the server; when the received sub-strategy version returned by the server is different from the sub-strategy version of the terminal, the strategy type and the sub-strategy version returned by the server are respectively used as the strategy type and the sub-strategy version to be updated;
and the policy updating module is further used for broadcasting a policy type request of the terminal to a local area network under the condition that the terminal is unsuccessfully connected with the server, respectively using the policy type and the sub-policy version in the response as the policy type and the sub-policy version to be updated when the response is received and the sub-policy version contained in the response is higher than the current sub-policy version of the terminal, and using the policy type and the sub-policy version used last time by the terminal as the policy type and the sub-policy version to be updated under the condition that the response is not received.
5. A system for updating policies, comprising: the terminal is used for acquiring the strategy type and the sub-strategy version to be updated and broadcasting the strategy type and the sub-strategy version to be updated to other terminals in the network segment; updating the strategy under the condition of acquiring the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated; the terminal establishes connection with the server, and is used for sending an updating strategy request containing the strategy type and the strategy version to the server under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version to be updated is not obtained, waiting for receiving an updating strategy response sent by the server, and executing corresponding updating strategy operation according to the received updating strategy response;
under the condition that the returned sub-strategy number corresponding to the strategy type and the sub-strategy version needing to be updated is not acquired, the terminal takes corresponding updating operation according to the connection state with the server;
the terminal adopts corresponding updating operation according to the connection state with the server, and the updating operation comprises the following steps: under the condition that the terminal is connected with the server, sending an updating strategy request containing the strategy type to be updated and the sub-strategy version to the server, and performing strategy updating operation according to the received updating response; under the condition that the terminal is not successfully connected with the server, the terminal takes the last used strategy type and sub-strategy version as the updated strategy type and sub-strategy version;
the acquiring of the policy type and the sub-policy version to be updated includes: the terminal establishes connection with a server, and sends a request for inquiring the strategy type corresponding to the terminal to the server under the condition that the terminal establishes connection with the server; receiving the strategy type and the sub-strategy version returned by the server; when the received sub-strategy version returned by the server is different from the sub-strategy version of the terminal, the strategy type and the sub-strategy version returned by the server are respectively used as the strategy type and the sub-strategy version to be updated;
the acquiring of the policy type and the sub-policy version to be updated includes: under the condition that the terminal is not successfully connected with the server, broadcasting a policy type request of the terminal to a local area network, when a response is received and a sub-policy version contained in the response is higher than a current sub-policy version of the terminal, respectively taking the policy type and the sub-policy version in the response as a policy type and a sub-policy version to be updated when the terminal is not successfully connected with the server, and under the condition that the response is not received, taking the policy type and the sub-policy version used by the terminal last time as the policy type and the sub-policy version to be updated;
and the server is used for issuing an update strategy response to the terminal when receiving the update strategy request containing the strategy type and the strategy version.
6. A computer-readable storage medium characterized in that the computer-readable storage medium stores a program for implementing the update policy method according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910132658.0A CN109995577B (en) | 2019-02-22 | 2019-02-22 | Method, device and system for updating strategy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910132658.0A CN109995577B (en) | 2019-02-22 | 2019-02-22 | Method, device and system for updating strategy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109995577A CN109995577A (en) | 2019-07-09 |
CN109995577B true CN109995577B (en) | 2022-08-02 |
Family
ID=67130231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910132658.0A Active CN109995577B (en) | 2019-02-22 | 2019-02-22 | Method, device and system for updating strategy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109995577B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112165522A (en) * | 2020-09-28 | 2021-01-01 | 杭州安恒信息技术股份有限公司 | Policy library upgrading method, device, system, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101651704A (en) * | 2008-08-14 | 2010-02-17 | 北京摩软科技有限公司 | Method and system for updating business service content of mobile terminal by server |
CN102761599A (en) * | 2012-05-10 | 2012-10-31 | Ut斯达康通讯有限公司 | Scalable file distribution method used in distributed system |
CN102945175A (en) * | 2012-11-09 | 2013-02-27 | 杭州易和网络有限公司 | Terminal software online upgrading system and method based on cloud computing environment |
CN104598262A (en) * | 2014-11-25 | 2015-05-06 | 深圳市腾讯计算机系统有限公司 | Method and device for updating mobile application |
CN107018194A (en) * | 2017-04-07 | 2017-08-04 | 厦门天锐科技股份有限公司 | The implementation method that a kind of strategy is correctly downloaded in time |
CN107306275A (en) * | 2016-04-18 | 2017-10-31 | 中兴通讯股份有限公司 | The method and NM server of a kind of multicast upgrading terminal system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4748819B2 (en) * | 2009-01-28 | 2011-08-17 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Client program, terminal, method, server system, and server program |
CN103874113B (en) * | 2014-03-19 | 2017-11-21 | 成都西加云杉科技有限公司 | Wireless network maintaining method, device and system |
-
2019
- 2019-02-22 CN CN201910132658.0A patent/CN109995577B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101651704A (en) * | 2008-08-14 | 2010-02-17 | 北京摩软科技有限公司 | Method and system for updating business service content of mobile terminal by server |
CN102761599A (en) * | 2012-05-10 | 2012-10-31 | Ut斯达康通讯有限公司 | Scalable file distribution method used in distributed system |
CN102945175A (en) * | 2012-11-09 | 2013-02-27 | 杭州易和网络有限公司 | Terminal software online upgrading system and method based on cloud computing environment |
CN104598262A (en) * | 2014-11-25 | 2015-05-06 | 深圳市腾讯计算机系统有限公司 | Method and device for updating mobile application |
CN107306275A (en) * | 2016-04-18 | 2017-10-31 | 中兴通讯股份有限公司 | The method and NM server of a kind of multicast upgrading terminal system |
CN107018194A (en) * | 2017-04-07 | 2017-08-04 | 厦门天锐科技股份有限公司 | The implementation method that a kind of strategy is correctly downloaded in time |
Also Published As
Publication number | Publication date |
---|---|
CN109995577A (en) | 2019-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108810993B (en) | Network slice selection method, equipment, UE, control plane function entity and medium | |
WO2015078281A1 (en) | Method, server and system for application synchronization | |
US20120258747A1 (en) | Server cluster and method for push notification service | |
US20100174806A1 (en) | Data Processing Method, Apparatus And System | |
CN105335231B (en) | server thread dynamic allocation method and device | |
CN109982152B (en) | P2P CDN service processing method, intelligent gateway and CDN platform | |
CN112218342A (en) | Method, device and system for realizing core network sub-slice disaster tolerance | |
CN114328618A (en) | Cache data synchronization method, device, equipment and storage medium | |
CN113572864A (en) | Data processing method, network element equipment and readable storage medium | |
CN110417876B (en) | Session method, node server in distributed system and master control equipment | |
CN109995577B (en) | Method, device and system for updating strategy | |
CN109947081B (en) | Internet vehicle control method and device | |
CN106686117B (en) | Data storage processing system and method of distributed computing cluster | |
CN112491951B (en) | Request processing method, server and storage medium in peer-to-peer network | |
CN114338063A (en) | Message queue system, service processing method, and computer-readable storage medium | |
CN111131470A (en) | Terminal device, data processing method thereof and data processing system | |
CN114172792B (en) | Method and device for realizing sequence number generation method for ensuring high availability of service | |
CN104602047A (en) | Share method of EPG (error pattern generator) data, server, terminal and system | |
CN111193789B (en) | Subscription information pushing method, device, computer equipment and readable storage medium | |
CN113064658B (en) | Copying method, copying device, copying equipment and computer readable storage medium for configuration data | |
CN114422591A (en) | Point-to-point communication method, data communication system, computer device, and storage medium | |
CN108989467B (en) | Centralized addressing method | |
CN110784510A (en) | Method for accessing target service node to bus and information interaction method of service node | |
CN111309467A (en) | Task distribution method and device, electronic equipment and storage medium | |
WO2023050945A1 (en) | Multimedia content transmission method and system, electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |