Disclosure of Invention
In order to overcome the above-mentioned deficiencies in the prior art, the present invention aims to provide a software gray scale publishing method and apparatus, where the software gray scale publishing method has low implementation cost, low implementation difficulty and small implementation workload, can fixedly allocate a suitable gray scale publishing server to a client, and can quickly and flexibly access the client to the corresponding gray scale publishing server.
As for a method, an embodiment of the present invention provides a software grayscale release method, where the method is applied to a release management server communicatively connected to a client, and the release management server stores therein a plurality of grayscale release policies corresponding to the software, and network address information of a grayscale release server corresponding to each grayscale release policy, and the method includes:
receiving a software access request sent by a client, and analyzing the software access request to obtain identity identification information of the client, software version information when the client accesses software and network address information of the client, wherein the identity identification information of the client, the software version information when the client accesses the software, and the network address information of the client are included in the software access request;
searching a gray release strategy correspondingly matched with the software access request according to the identity identification information, the software version information and the network address information;
if the matched gray scale release strategy is successfully found, distributing target network address information for the client from the network address information of the gray scale release server corresponding to the gray scale release strategy according to the found gray scale release strategy;
and correspondingly sending the distributed target network address information to the client so that the client fixedly accesses software content running on a server corresponding to the target network address information based on the acquired target network address information.
As for an apparatus, an embodiment of the present invention provides a software distribution apparatus applied to a distribution management server communicatively connected to a client, the distribution management server storing therein a plurality of distribution policies for grays corresponding to the software and network address information of a grayscale distribution server corresponding to each of the distribution policies, the apparatus including:
the software access request analysis module is used for receiving a software access request sent by a client and analyzing the software access request to obtain the identity information of the client, the software version information when the client accesses software and the network address information of the client, wherein the identity information of the client, the software version information when the client accesses the software, and the network address information of the client are included in the software access request;
the strategy searching module is used for searching a gray release strategy correspondingly matched with the software access request according to the identity identification information, the software version information and the network address information;
the address allocation module is used for allocating target network address information to the client from the network address information of the gray scale issuing server corresponding to the gray scale issuing strategy according to the searched gray scale issuing strategy if the matched gray scale issuing strategy is successfully searched;
and the address sending module is used for correspondingly sending the allocated target network address information to the client so that the client accesses software content running on a server corresponding to the target network address information based on the acquired target network address information.
Compared with the prior art, the software gray scale publishing method and the software gray scale publishing device provided by the embodiment of the invention have the following beneficial effects: the software gray scale publishing method is low in implementation cost, low in implementation difficulty and small in implementation workload, and can be used for quickly and flexibly fixedly distributing a proper gray scale publishing server to a client side, so that the client side is fixedly connected to the corresponding gray scale publishing server to perform software access. The release management server applied by the method is in communication connection with the client, and a plurality of gray release strategies corresponding to the software and network address information of the gray release servers corresponding to the gray release strategies are stored in the release management server. Firstly, after receiving a software access request sent by a client, the method analyzes the software access request to obtain the identity information of the client, the software version information when the client accesses the software and the network address information of the client, wherein the identity information of the client, the software version information and the network address information are included in the software access request. Then, the method searches a gray scale release strategy which is correspondingly matched with the software access request in the gray scale release server according to the identity identification information, the software version information and the network address information. Then, after the gray scale release strategy matched with the software access request is successfully found, a target network address information is distributed to the client side from the network address information of the gray scale release server corresponding to the gray scale release strategy according to the found gray scale release strategy. Finally, the method correspondingly sends the distributed target network address information to the client, so that the client fixedly accesses the software content running on the server corresponding to the target network address information based on the obtained target network address information, and a gray scale release server is fixedly distributed to the client meeting a gray scale release strategy, so that the client can be directly and fixedly accessed to the corresponding gray scale release server for software access according to the target network address information of the correspondingly distributed gray scale release server without inquiring gray scale control logic again in the online software access process, the realization cost of the whole software gray scale release process is low, the realization difficulty is low, and the realization workload is small.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 1 is a schematic diagram of interaction among a distribution management server 10, a client 20, a gray scale distribution server 30, and a regular server 40 according to an embodiment of the present invention. In the embodiment of the present invention, the release management server 10 is communicatively connected to the client 20, and is configured to allocate a software server to the client 20 when the client 20 wants to perform software access, so that the client 20 accesses software content on the software server by means of a fixed access to the allocated software server. The software server comprises a gray release server 30 and a conventional server 40, wherein the gray release server 30 is a server which runs new version software content and is used for software gray release, and the conventional server 40 is a server which runs original version software.
In this embodiment, the client 20 is a terminal Device that logs in a user account corresponding to a software user, each user account corresponds to one software user, and the terminal Device may be, but is not limited to, a smart phone, a Personal Computer (PC), a tablet Computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like.
In this embodiment, the release management server 10 is configured to manage an event that whether the client 20 performs software gray scale release, and fixedly allocate one gray scale release server 30 to the client 20 meeting the software gray scale release condition, so that the client 20 can be fixedly accessed to the gray scale release server 30 for software access directly according to the target network address information of the allocated gray scale release server 30 without acquiring new network address information of the gray scale release server 30 from the release management server 10 again in the software online access process.
In the present embodiment, the number of the clients 20 communicatively connected to the distribution management server 10 is at least one, the number of the gradation distribution servers 30 in the software server is at least one, and the number of the regular servers 40 in the software server is at least one. The number of times each software server is allocated may be plural, that is, the number of clients 20 corresponding to each software server may be plural.
Fig. 2 is a schematic flow chart of a software gray scale publishing method according to an embodiment of the present invention. In the embodiment of the present invention, the software grayscale publishing method is applied to the publishing management server 10 shown in fig. 1 and communicatively connected to the client 20, the publishing management server 10 stores a plurality of grayscale publishing policies corresponding to the software, and network address information of the grayscale publishing servers 30 corresponding to the grayscale publishing policies, where the grayscale publishing policies are used as a policy for determining whether the client 20 needs to perform software grayscale publishing access debugging, and the number of the grayscale publishing servers 30 corresponding to each grayscale publishing policy may be multiple or only one. The specific flow and steps of the software gray scale publishing method shown in fig. 2 are explained in detail below.
Step S210, receiving a software access request sent from the client 20, and analyzing the software access request to obtain the identity information of the client 20, the software version information when the client 20 accesses the software, and the network address information of the client 20, which are included in the software access request.
In this embodiment, when a software user logs in a corresponding user account at a client 20 to perform software access through the client 20, the client 20 sends a software access request to the release management server 10, where the software access request includes identification information of the client 20, software version information when the client 20 accesses software, and current network address information of the client 20. The identification information is used to indicate an identity of the client 20 independent of other electronic devices, and the identification information may be a physical address (for example, a MAC address) of the client 20, or may be a UUID (universal Unique Identifier) of the client 20; the software version information is version information which is operated on the client 20 and correspondingly matched with a software front end; the network address information is a network address allocated when the client 20 performs network access at the location, and the network address information may be an IP address corresponding to the client 20.
After receiving the software access request from the client 20, the release management server 10 obtains the identity information of the client 20, the software version information when the client 20 accesses the software, and the network address information of the client 20, which are included in the software access request, by analyzing the software access request.
Step S220, searching a gray release strategy correspondingly matched with the software access request according to the identity identification information, the software version information and the network address information.
Fig. 3 is a flowchart illustrating the sub-steps included in step S220 shown in fig. 2. In this embodiment, each of the grayscale release policies stored in the release management server 10 includes an identity matching sub-policy for verifying identity information, a version matching sub-policy for verifying software version information, and a location matching sub-policy for verifying an area in which the client 20 is located. The step S220 may include a substep S221, a substep S222, and a substep S223.
And a substep S221 of analyzing the network address information of the client 20 to obtain the location information corresponding to the client 20.
In this embodiment, after acquiring the network address information of the client 20 sending the software access request from the software access request, the distribution management server 10 analyzes the network address information to obtain the location information of the location of the corresponding client 20.
In the substep S222, the identity matching sub-policy, the version matching sub-policy, and the location matching sub-policy corresponding to each gray scale release policy are respectively compared and matched with the province identification information, the software version information, and the location information of the client 20 one by one.
In this embodiment, the release management server 10 queries whether a gray scale release policy matching the software access request exists in all the gray scale release policies stored in the release management server 10 by comparing and matching the province identification information, the software version information, and the location information of the client 20 sending the software access request with the identity matching sub-policy, the version matching sub-policy, and the location matching sub-policy corresponding to each stored gray scale release policy, respectively.
In the substep S223, if the identity identification information, the software version information, and the location information of the client 20 respectively conform to the identity matching sub-policy, the version matching sub-policy, and the location matching sub-policy corresponding to the same gray scale publishing policy, it is determined that the gray scale publishing policy is the gray scale publishing policy corresponding to the software access request.
In this embodiment, if the identity information, the software version information, and the position information of the client 20 respectively conform to the identity matching sub-policy, the version matching sub-policy, and the position matching sub-policy corresponding to a certain gray scale distribution policy in the gray scale distribution policies stored in the distribution management server 10, that is, the identity information conforms to the identity matching sub-policy corresponding to the same gray scale distribution policy, the software version information conforms to the version matching sub-policy corresponding to the same gray scale distribution policy, and the position information conforms to the position sub-matching policy corresponding to the same gray scale distribution policy, the distribution management server 10 determines the gray scale distribution policy including three matching sub-policies respectively matched with the three information of the client 20 as the gray scale distribution policy corresponding to the software access request.
For example, an identity matching sub-policy of a certain grayscale release policy a requires that the UUID of the client 20 is at the beginning of 1234, a version matching sub-policy corresponding to the grayscale release policy a requires that the software version when the client 20 software accesses is 1.1 version, and a location matching sub-policy corresponding to the grayscale release policy a requires that the location of the client 20 is in the sichuan area. The identity matching sub-policy of another gray release policy B is to require that the UUID of the client 20 starts with 135, the version matching sub-policy corresponding to the gray release policy B is empty (i.e. there is no requirement for the software version when the client 20 software accesses), and the location matching sub-policy corresponding to the gray release policy B is to require that the location of the client 20 is in the guangdong area. If the identification information of the client 20 acquired by the release management server 10 from the software access request is a UUID with 1234 as the beginning, the software version information is 1.1 version, the location information is in the sikawa area, and the three information respectively conform to three matching sub-policies of the gray release policy a, the gray release policy a is correspondingly determined as the gray release policy matched with the software access request. If the identification information of the client 20 acquired by the release management server 10 from the software access request is a UUID with a beginning of 135, the software version information is 1.1 version or 0.6 version, and the location information is in the guangdong area, when the three information corresponding to the client 20 respectively conform to the three matching sub-policies of the gray scale release policy B, the gray scale release policy B is determined as the gray scale release policy matching the software access request.
Referring to fig. 2 again, in step S230, if the matched gray scale distribution policy is found successfully, a target network address information is allocated to the client 20 from the network address information of the gray scale distribution server 30 corresponding to the gray scale distribution policy according to the found gray scale distribution policy.
In this embodiment, the number of the tone distribution servers 30 corresponding to each tone distribution policy stored in the distribution management server 10 is at least one, and the number of times each tone distribution server 30 is assigned is recorded in the distribution management server 10.
If the release management server 10 successfully finds the gray scale release policy corresponding to the software access request and the number of the gray scale release servers 30 corresponding to the gray scale release policy that is successfully found is only one, the step of allocating a target network address information to the client 20 from the network address information of the gray scale release server 30 corresponding to the gray scale release policy according to the found gray scale release policy includes:
the gray scale distribution server 30 corresponding to the gray scale distribution strategy is directly allocated to the client 20, and the network address information of the gray scale distribution server 30 is used as the target network address information corresponding to the client 20.
If the release management server 10 successfully finds the gray scale release policy corresponding to the software access request and the number of the gray scale release servers 30 corresponding to the gray scale release policy that is successfully found is multiple, the step of allocating a target network address information to the client 20 from the network address information of the gray scale release server 30 corresponding to the gray scale release policy according to the found gray scale release policy includes:
selecting the gray scale releasing server 30 with the least distribution frequency to distribute to the client 20 according to the distributed frequency of each gray scale releasing server 30 corresponding to the gray scale releasing strategy, and using the network address information of the selected gray scale releasing server 30 as the target network address information corresponding to the client 20, so that the gray scale releasing servers 30 corresponding to the gray scale releasing strategy are mutually load balanced when being in communication connection with the client 20.
Step S240, correspondingly sending the allocated target network address information to the client 20, so that the client 20 fixedly accesses software content running on a server corresponding to the target network address information based on the acquired target network address information.
In this embodiment, after fixedly allocating network address information of a software server to the client 20 that sends the software access request as target network address information matched with the client 20, the distribution management server 10 sends the target network address information allocated to the client 20, so that the client 20 fixedly accesses software content running on the software server corresponding to the target network address information based on the acquired target network address information.
If the target network address information allocated by the release management server 10 to the client 20 is the network address information of the grayscale release server 30, the client 20 will fixedly access the new version software content running on the grayscale release server 30 corresponding to the target network address information according to the acquired target network address information.
If the target network address information allocated by the release management server 10 to the client 20 is the network address information of the regular server 40, the client 20 will fixedly access the original version software content running on the regular server 40 corresponding to the target network address information according to the acquired target network address information.
Fig. 4 is a schematic flow chart of a software gray scale publishing method according to an embodiment of the present invention. In the embodiment of the present invention, the distribution management server 10 further stores network address information of each regular server 40 corresponding to the software, and the number of times each regular server 40 is allocated. Before the step S240, the method further includes a step S250, where the step S250 and the step S230 are parallel to each other and have no execution precedence relationship.
In step S250, if the matched gray scale distribution policy is not found, the conventional server 40 with the least number of distribution times is distributed to the client 20 according to the number of distribution times of each conventional server 40, and the network address information of the conventional server 40 is used as the target network address information corresponding to the client 20.
In this embodiment, if there is no gray scale distribution policy matching the software access request in all the gray scale distribution policies stored in the distribution management server 10, that is, at least one matching sub-policy of the three identity matching sub-policies, the version matching sub-policy, and the location matching sub-policy corresponding to each gray scale distribution policy stored in the distribution management server 10 does not match the client 20, the distribution management server 10 determines that the gray scale distribution policy matching the software access request is not found, the distribution management server 10 distributes the regular server 40 with the least distribution frequency to the client 20 according to the stored distribution frequency of each regular server 40, and uses the network address information of the regular server 40 as the target network address information corresponding to the client 20, so that the client 20 accesses the software running on the corresponding and matching regular server 40 based on the target network address information The contents.
Fig. 5 is a schematic flow chart of a third method for software gray scale publishing according to an embodiment of the present invention. In this embodiment of the present invention, before the step S210, the software gray scale issuing method may further include a step S209.
Step S209 is to configure each gray scale distribution policy and establish a connection between the gray scale distribution policy and the gray scale distribution server 30.
In this embodiment, after deploying the software content of the new version software on the grayscale issuing server 30, the software producer configures the corresponding grayscale issuing policy for the grayscale issuing server 30 with the new version software on the issuing management server 10, thereby completing the configuration work of each grayscale issuing policy and establishing the connection between the grayscale issuing policy and the grayscale issuing server 30.
Fig. 6 is a first block diagram of the software gray scale publishing device 100 shown in fig. 1 according to an embodiment of the present invention. In the embodiment of the present invention, the release management server 10 includes a software gray scale distribution device 100, and the release management server 10 implements the software gray scale distribution by executing the software gray scale distribution method shown in fig. 2 to 5 by the software gray scale distribution device 100. The software gray scale publishing device 100 comprises a request parsing module 110, a policy searching module 120, an address assigning module 130 and an address sending module 140.
The request analysis module 110 is configured to receive a software access request sent from a client 20, and analyze the software access request to obtain identity information of the client 20, software version information when the client 20 accesses software, and network address information of the client 20, where the identity information is included in the software access request.
In this embodiment, the request parsing module 110 may execute step S210 in fig. 2, and the specific execution process may refer to the above detailed description of step S210.
The policy searching module 120 is configured to search a gray release policy corresponding to the software access request according to the identity information, the software version information, and the network address information.
Referring to fig. 7, a block diagram of the policy lookup module 120 shown in fig. 6 is shown. In this embodiment, the policy searching module 120 includes a location obtaining sub-module 121, a matching verification sub-module 122, and a policy determining sub-module 123.
The location obtaining sub-module 121 is configured to analyze and process the network address information of the client 20 to obtain location information corresponding to the client 20.
The matching verification sub-module 122 is configured to compare and match the identity matching sub-policy, the version matching sub-policy, and the location matching sub-policy corresponding to each gray scale release policy with the province identification information, the software version information, and the location information of the client 20 one by one.
The policy determining sub-module 123 is configured to determine that the grayscale release policy is a grayscale release policy corresponding to the software access request if the identity identification information, the software version information, and the location information of the client 20 respectively conform to the identity matching sub-policy, the version matching sub-policy, and the location matching sub-policy corresponding to the same grayscale release policy.
In this embodiment, the position obtaining sub-module 121, the matching verification sub-module 122 and the policy determining sub-module 123 may respectively perform the sub-steps S221, S222 and S223 in fig. 3, and the specific implementation process may refer to the detailed description of the sub-steps S221, S222 and S223 above.
Referring to fig. 6 again, the address allocating module 130 is configured to, if the matched gray scale distribution policy is found successfully, allocate a piece of target network address information to the client 20 from the network address information of the gray scale distribution server 30 corresponding to the gray scale distribution policy according to the found gray scale distribution policy.
The address allocating module 130 is further configured to, if the matched gray scale distribution policy is not found, allocate the conventional server 40 with the smallest allocation frequency to the client 20 according to the allocation frequency of each conventional server 40, and use the network address information of the conventional server 40 as the target network address information corresponding to the client 20.
In this embodiment, the address assignment module 130 may execute step S230 in fig. 2 and step S250 shown in fig. 4, and the specific execution process may refer to the above detailed description of step S230 and step S250.
The address sending module 140 is configured to correspondingly send the allocated target network address information to the client 20, so that the client 20 fixedly accesses software content running on a server corresponding to the target network address information based on the acquired target network address information.
In this embodiment, the address sending module 140 may execute step S240 in fig. 2, and the specific execution process may refer to the above detailed description of step S240.
Fig. 8 is a second block diagram of the software gray scale publishing device 100 shown in fig. 1 according to an embodiment of the present invention. In the embodiment of the present invention, the software gray scale issuing apparatus 100 may further include a policy configuration module 150.
The policy configuration module 150 is configured to configure each gray scale publishing policy and establish a relationship between the gray scale publishing policy and the gray scale publishing server 30.
In this embodiment, the policy configuration module 150 may execute step S209 in fig. 5, and the specific execution process may refer to the above detailed description of step S209.
In summary, in the software grayscale publishing method and apparatus provided in the embodiments of the present invention, the software grayscale publishing method is low in implementation cost, low in implementation difficulty and low in implementation workload, and can quickly and flexibly fixedly allocate an appropriate grayscale publishing server to a client, so that the client is fixedly connected to the corresponding grayscale publishing server for software access. The release management server applied by the method is in communication connection with the client, and a plurality of gray release strategies corresponding to the software and network address information of the gray release servers corresponding to the gray release strategies are stored in the release management server. Firstly, after receiving a software access request sent by a client, the method analyzes the software access request to obtain the identity information of the client, the software version information when the client accesses the software and the network address information of the client, wherein the identity information of the client, the software version information and the network address information are included in the software access request. Then, the method searches a gray scale release strategy which is correspondingly matched with the software access request in the gray scale release server according to the identity identification information, the software version information and the network address information. Then, after the gray scale release strategy matched with the software access request is successfully found, a target network address information is distributed to the client side from the network address information of the gray scale release server corresponding to the gray scale release strategy according to the found gray scale release strategy. Finally, the method correspondingly sends the distributed target network address information to the client, so that the client fixedly accesses the software content running on the server corresponding to the target network address information based on the obtained target network address information, and a gray scale release server is fixedly distributed to the client meeting a gray scale release strategy, so that the client can be directly and fixedly accessed to the corresponding gray scale release server for software access according to the target network address information of the correspondingly distributed gray scale release server without inquiring gray scale control logic again in the online software access process, the realization cost of the whole software gray scale release process is low, the realization difficulty is low, and the realization workload is small.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.