CN113282326A - Method and device for gray scale upgrading, electronic equipment and readable storage medium - Google Patents

Method and device for gray scale upgrading, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113282326A
CN113282326A CN202110686015.8A CN202110686015A CN113282326A CN 113282326 A CN113282326 A CN 113282326A CN 202110686015 A CN202110686015 A CN 202110686015A CN 113282326 A CN113282326 A CN 113282326A
Authority
CN
China
Prior art keywords
gray scale
target
application program
strategy
gray
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.)
Granted
Application number
CN202110686015.8A
Other languages
Chinese (zh)
Other versions
CN113282326B (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.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian Life Chengdu Technology 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 Duodian Life Chengdu Technology Co ltd filed Critical Duodian Life Chengdu Technology Co ltd
Priority to CN202110686015.8A priority Critical patent/CN113282326B/en
Publication of CN113282326A publication Critical patent/CN113282326A/en
Application granted granted Critical
Publication of CN113282326B publication Critical patent/CN113282326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method, a device, an electronic device and a readable storage medium for gray scale upgrading.A server is pre-configured with an additional data table containing a key word field and a value field, and under the condition that a target gray scale strategy is different from a gray scale strategy stored in the additional data table, the target gray scale strategy can be added to the key word field, and a corresponding actual value can be added to a corresponding value field. And determining the gray scale range of the task to be upgraded based on the actual value of the target gray scale strategy, and storing the target application program of the task to be upgraded into the database and then associating the target application program with the gray scale range. According to the scheme, when the new dimension of the gray strategy needs to be accessed, the field does not need to be expanded, the field can be added to the keyword field to realize the quick access of the new dimension of the gray strategy, the gray range can be determined in advance and stored, and then when the request of a user is received, whether the user hits corresponding content can be judged quickly, so that efficient gray matching is realized.

Description

Method and device for gray scale upgrading, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer networks, and in particular, to a method and an apparatus for gray scale upgrade, an electronic device, and a readable storage medium.
Background
With the popularization of intelligent devices, the upgrading technology of the intelligent devices based on the internet is also rapidly developed, and the grayscale upgrading strategy is widely applied in the upgrading scene of the intelligent devices. The core idea of the gray scale upgrading is to realize the upgrading in batches and in different ranges by configuring upgrading rules. In the implementation process of gray scale upgrading, for upgrading in different upgrading tasks or different time periods, operators may configure different upgrading rules, and upgrade of clients is triggered by hitting different strategies.
In the existing gray scale upgrading mode, different fields are set in a corresponding upgrading information table to store different gray scale strategies. However, in the case of a variable gray policy, this approach needs to expand the field in the upgrade information table to enable access to a new dimension of the gray policy. The field expansion of the upgrade information table will result in slow implementation of the new dimension access of the grayscale strategy, which is complex in implementation.
Disclosure of Invention
Objects of the present application include, for example, providing a method, apparatus, electronic device and readable storage medium for grayscale upgrade that enables fast access to new dimensions of a grayscale policy and efficient grayscale matching.
The embodiment of the application can be realized as follows:
in a first aspect, the present application provides a method for upgrading a grayscale, where the method is applied to a server, where a grayscale policy table and an additional data table are prestored in the server, the additional data table includes a keyword field and a value field, and the keyword field includes at least one stored grayscale policy, where the method includes:
acquiring a target gray level strategy defined in the gray level strategy table and required by a task to be upgraded, wherein the type of the target gray level strategy is different from that of the at least one stored gray level strategy;
adding the target gray strategy to the keyword field, and adding an actual value corresponding to the target gray strategy to a corresponding value field;
determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy;
and acquiring a target application program of the task to be upgraded, storing the target application program into a database and associating the target application program with the gray scale range.
In an alternative embodiment, the method further comprises:
responding to a request from a user, and obtaining application program information carried in the request;
determining whether the user is within a grayscale range associated with the target application;
if the client side application program belongs to the target application program, judging whether the application program of the client side corresponding to the user needs to be upgraded or not according to the application program information and the target application program;
and if the application program of the client needs to be upgraded, feeding the target application program back to the client.
In an optional implementation manner, the step of determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale policy includes:
obtaining a hit strategy required by the task to be upgraded and defined in the gray strategy table;
finding out the actual value of the corresponding hit strategy according to the actual value corresponding to the target gray strategy;
forming a gray scale range of the task to be upgraded based on the obtained actual value of the hit strategy;
the step of determining whether the user is within the grayscale range associated with the target application includes:
obtaining user information carried in the request, and obtaining a real value under the hit strategy contained in the user information;
and searching whether the gray scale range has an actual value matched with the real value, and if so, determining that the user belongs to the gray scale range associated with the target application program.
In an optional embodiment, the actual value corresponding to the target grayscale strategy is a count value;
the step of determining whether the user is within the grayscale range associated with the target application includes:
counting the number of the users which are determined currently and belong to the gray scale range;
if the counted number does not reach the counting value, determining that the user belongs to the gray scale range associated with the target application program;
and if the counted number reaches the counting value, determining that the user does not belong to the gray scale range associated with the target application program.
In an optional implementation manner, the target application program of the task to be upgraded comprises a plurality of sub application programs with different version levels;
the step of feeding back the target application to the client includes:
determining a target sub-application program hit by the user according to the application program information and a plurality of sub-application programs with different version levels;
and feeding back the target sub-application program to the client.
In an alternative embodiment, the method further comprises:
and counting the times of respective feedback of each sub application program under the task to be upgraded.
In a second aspect, the present application provides an apparatus for upgrading a gray scale, where the apparatus is applied to a server, where a gray scale policy table and an additional data table are prestored in the server, the additional data table includes a keyword field and a value field, and the keyword field includes at least one stored gray scale policy, and the apparatus includes:
an obtaining module, configured to obtain a target grayscale policy required by a task to be upgraded and defined in the grayscale policy table, where the target grayscale policy is different from the at least one stored grayscale policy in type;
the adding module is used for adding the target gray strategy to the keyword field and adding an actual value corresponding to the target gray strategy to a corresponding value field;
the determining module is used for determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy;
and the storage module is used for obtaining the target application program of the task to be upgraded, storing the target application program into a database and associating the target application program with the gray scale range.
In a third aspect, the present application provides an electronic device comprising one or more storage media and one or more processors in communication with the storage media, the one or more storage media storing processor-executable machine-executable instructions that, when executed by the electronic device, are executed by the processors to perform the method steps of any one of the preceding embodiments.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon machine-executable instructions which, when executed, implement the method steps of any one of the preceding embodiments.
The beneficial effects of the embodiment of the application include, for example:
when a target gray scale strategy required by a task to be upgraded is obtained, under the condition that the target gray scale strategy is different from the gray scale strategies stored in the additional data table, the target gray scale strategy can be added to the key field, and the corresponding actual value can be added to the corresponding value field. And on the basis, the gray scale range of the task to be upgraded can be determined based on the actual value of the target gray scale strategy, and the target application program of the task to be upgraded is stored in the database and then is associated with the gray scale range. In the scheme, an additional data table containing a keyword field and a value field is established, when the access of a new dimension of the gray strategy is needed, the field is not required to be expanded, the field can be added to the keyword field, the fast access of the new dimension of the gray strategy is realized, the gray range can be determined in advance and stored, and subsequently when a request of a user is received, whether the user hits corresponding content can be judged fast, and efficient gray matching is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic view of an application scenario of a method for upgrading a gray scale according to an embodiment of the present application;
fig. 2 is a flowchart of a method for gray scale upgrading according to an embodiment of the present application;
fig. 3 is a flowchart of a response method in the method for upgrading a gray scale according to the embodiment of the present application;
FIG. 4 is a flowchart of sub-steps included in step S130 of FIG. 2;
FIG. 5 is a flowchart of sub-steps included in step S160 of FIG. 3;
FIG. 6 is another flowchart of the sub-steps included in step S160 of FIG. 3;
FIG. 7 is a flowchart of sub-steps included in step S180 of FIG. 3;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 9 is a functional block diagram of a device for grayscale upgrading according to an embodiment of the present application.
Icon: 100-a server; 110-a storage medium; 120-a processor; 130-means for grayscale upgrading; 131-an acquisition module; 132-add module; 133-a determination module; 134-a save module; 140-communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. 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 application.
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.
In the description of the present application, it should be noted that the features in the embodiments of the present application may be combined with each other without conflict.
Referring to fig. 1, a schematic view of an application scenario of the method for upgrading a grayscale provided in an embodiment of the present application is shown, where the scenario includes a server 100 and a plurality of clients capable of establishing communication with the server 100. Each client may send related request information to the server 100, and the server 100 may process the request information to feed back corresponding information. The client can include, but is not limited to, terminal devices such as smart phones, smart homes, computer devices, and the like. The server 100 may be a single server 100 or a server cluster including a plurality of servers 100.
In this embodiment, the server 100 may be a device on the side of an operator, and may be used to meet the requirement of gray scale upgrading. In this embodiment, the server 100 pre-stores a gray level policy table gram _ rule and an additional data table gram _ rule _ extra, where the additional data table includes a keyword field and a value field, the keyword field includes at least one stored gray level policy, and information in the keyword field and the corresponding value field in the additional data table can be used for operations such as gray level hit.
The method for upgrading the gray scale provided by the embodiment of the present application is described in detail below with reference to the content described in the application scenario shown in fig. 1.
Referring to fig. 2, a flowchart of a method for upgrading a grayscale provided in an embodiment of the present application is schematically shown, and the method may be performed by the server 100. It should be understood that, in other embodiments, the order of some steps in the method for upgrading the gray scale described in this embodiment may be interchanged according to actual needs, or some steps may be omitted or deleted. The detailed steps of the method for gray scale up are described as follows.
Step S110, obtaining a target grayscale policy required by the task to be upgraded defined in the grayscale policy table, where the target grayscale policy is different from the at least one stored grayscale policy in type.
Step S120, adding the target grayscale policy to the keyword field, and adding the actual value corresponding to the target grayscale policy to the corresponding value field.
Step S130, determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy.
Step S140, obtaining the target application program of the task to be upgraded, storing the target application program into a database and associating the target application program with the gray scale range.
In this embodiment, as can be seen from the above, the additional data table is set as an information table including a key field and a value field. And the keyword field includes at least one stored grayscale policy. The grayscale strategy in the additional data table can be used to perform grayscale hits. However, it is often possible to have different greyscale strategies for the same task or for different tasks. That is, situations may arise that require access to a new dimension of the grayscale policy in an additional data table.
The existing additional data table corresponds to different gray strategies by setting different fields, that is, when a new dimension of a gray strategy needs to be accessed in the additional data table, the fields in the additional data table need to be expanded, so that the information of the accessed new dimension is added under the expanded fields. This approach will result in slow implementation of grayscale policy new dimension access due to the expansion of the fields involved.
In this embodiment, the additional data table is set in a different manner from that in the prior art. It is considered that the information required for the gradation upgrade may be information within a certain range under one dimension, and it is not necessary to express the correspondence between different dimensions in the additional data table. Therefore, in this embodiment, the manner of setting different fields to correspond to different grayscale policy dimensions in the existing manner is changed to setting a keyword field and a value field, the keyword field is used to correspond to each of the different grayscale policy dimensions, and the value field is used to store corresponding value information.
In addition, in the implementation process, for the task to be upgraded, the operator at the server 100 side may set a target grayscale policy required by the task to be upgraded, that is, may set which policy is based on which to implement the upgrading task. The defined target gray strategy can be stored in the gray strategy table for subsequent retrieval.
The server 100 may also construct a metadata table gray _ mate, in which basic information of some tasks, such as task names, may be stored.
In addition, other information related to the task may also be stored in the grayscale policy table, for example, the task to be executed is a task for upgrading an application, and the business type busjype that can define the task in the grayscale policy table is an application appUpdate for upgrading. On the basis, if the target gray-scale strategy representation is triggered to be executed based on the mobile phone number of the user, the gray-scale strategy type config _ type which can define the task in the gray-scale strategy table is the mobile phone number phoneNumber. If the range is finally determined based on the user ID, the target match _ key which can define that the task needs to hit in the gray scale policy table is the user ID.
When the task to be executed is an application upgrading task, the gray policy table may further define an external service key, foreign _ busi _ ID, as an ID corresponding to the application version information.
If the defined target gray-scale strategy of the task to be upgraded is different from the type of the stored gray-scale strategy in the additional data table, that is, when access of a new dimension of the gray-scale strategy is required, because the additional data table in the embodiment includes the key field and the value field, the newly accessed target gray-scale strategy can be directly added to the key field, and the actual value corresponding to the target gray-scale strategy can be added to the corresponding value field.
The target grayscale policy may be, for example, a mobile phone number of the user, a store number, or the like, that is, the subsequent grayscale upgrade within a certain user range may be performed based on the mobile phone number of the user.
In this embodiment, after the actual value corresponding to the target grayscale policy is obtained, the grayscale range of the task to be upgraded may be determined. For example, if the target grayscale policy is the mobile phone number of the user, after the actual mobile phone number is obtained, a grayscale range may be determined based on the obtained actual mobile phone number, that is, the user belonging to the grayscale range may be the target user, so as to perform application upgrade on the users.
After the gray scale range is determined, the target application program of the task to be upgraded can be obtained, for example, the target application program comprises the version number of the application program to be upgraded, the download address of the upgrade data packet and the like. The target application may be stored in a database, such as Redis, and associated with the determined grayscale range.
Therefore, by predetermining the target application program and associating the target application program with the gray scale range, whether the user hits corresponding content can be quickly judged when the request of the user is received subsequently, and efficient gray scale matching is further realized.
In addition, in the scheme for upgrading the gray scale provided by this embodiment, an additional data table including a keyword field and a value field is established, and when a new dimension requiring gray scale processing is accessed, the field does not need to be expanded, and can be added to the keyword field, so that the new dimension of the gray scale policy can be accessed quickly.
On the basis, referring to fig. 3, the gray scale upgrading method provided in this embodiment may further include the following steps:
step S150, responding to a request from a user, and obtaining application information carried in the request.
Step S160, determining whether the user belongs to the gray scale range associated with the target application program, and if so, executing the following step S170.
Step S170, determining whether the application program of the client corresponding to the user needs to be upgraded according to the application program information and the target application program, and if it is determined that the application program of the client needs to be upgraded, executing the following step S180.
And step S180, feeding back the target application program to the client.
In this embodiment, the user may send a request to the server 100 through the client, where the request may be a request for performing application upgrade, and of course, may also be a request for requesting other information, and is not limited specifically.
After receiving the request of the user, the server 100 may obtain the application information carried in the request, where the application information may be information of an application currently installed by the client, such as a version number of the currently installed application.
The gray scale range corresponding to the task to be upgraded is calculated through the process, so that when the request of the user is received, whether the user belongs to the gray scale range can be judged, namely whether the user is in the user range which is determined through the process and needs to be upgraded at this time. If the user is determined to belong to the gray scale range, whether the application program of the client needs to be upgraded or not can be judged on the basis of the current application program information of the client and the target application program of the task to be upgraded.
For example, if the version number of the current application program of the client is lower than the version number of the target application program, it may be determined that the application program of the client may be upgraded, and if the version number of the current application program of the client is not lower than the version number of the target application program, it may be determined that the application program of the client is not required to be upgraded.
If it is determined that the application program of the client needs to be upgraded, the stored target application program may be fed back to the client, for example, an upgrade data packet of the target application program may be fed back, or information such as a packet download address of the target application program may be fed back to the client.
If the application program of the client does not need to be upgraded, prompt information which does not need to be upgraded can be fed back to the client, or no response is made.
Therefore, by calculating the gray scale range corresponding to the task in advance and associating the target application program with the gray scale range after storage, when the request of the user comes, whether the user is in the gray scale range or not can be directly judged, the gray scale content of the user can be obtained, long time consumption caused by temporary calculation of the gray scale result of the user can be avoided when the request of the user comes, and efficient gray scale matching is realized.
In this embodiment, different strategies, such as accurate gray scale or counting gray scale, may be adopted during gray scale upgrade. The accurate gray scale is the user which is finally hit and is in a range represented by accurate information, namely the accurate user information is hit. The counting gray scale is a final hit, a counting range is obtained, specific users in the range are not concerned, and the range with the size is concerned, such that gray scale upgrading of 1 ten thousand users is realized.
As a possible implementation manner, in the precise gray scale manner adopted in the gray scale upgrade, when the gray scale range of the task to be upgraded is determined, please refer to fig. 4 in combination with the following manner:
step S131, obtaining the hit strategy needed by the task to be upgraded defined in the gray strategy table.
And step S132, finding the corresponding actual value of the hit strategy according to the actual value corresponding to the target gray strategy.
And step S133, forming the gray scale range of the task to be upgraded based on the obtained actual value of the hit strategy.
In this embodiment, it is considered that the user often uses a wide range of information for uniquely identifying the user during registration, for example, a mobile phone number of the user. Therefore, when the operator sets the target gray level policy, the mobile phone number of the user can be set as the target gray level policy. After a user registers on the platform, the platform often assigns the user with identification information on the platform, such as a user ID on the platform, which can be used to uniquely identify the user on the platform. When performing the gradation upgrade on the platform, the information management on the platform can be facilitated by using the user ID of the user on the platform as the identification information.
Thus, the operator may also define the hit policies, e.g. user ID, required for the task to be upgraded, which may be written into the grey policy table. After the actual value corresponding to the target gray-scale strategy is obtained, the actual value of the corresponding hit strategy can be found based on the pre-registered information.
For example, after obtaining a plurality of actual mobile phone numbers, the user ID corresponding to each mobile phone number, that is, each actual value of the hit policy, may be obtained based on the registration information. The obtained actual value of the hit strategy can form the gray scale range of the task to be upgraded.
In this case, referring to fig. 5, when the grayscale is hit, the step of determining whether the user belongs to the grayscale range associated with the target application may be implemented as follows:
step S161A, obtaining the user information carried in the request, and obtaining the true value included in the user information under the hit policy.
Step S162A, find whether there is an actual value matching the true value in the gray scale range, if yes, execute the following step S163A.
Step S163A, determining that the user belongs within the grayscale range associated with the target application.
In this embodiment, under the policy of the accurate gray scale, when a request from a user is received, user information carried in the request may be obtained. The user information includes information such as a user mobile phone number, a user ID, and the like. If the defined hit strategy is a hit user ID, the true value of the user information under the hit strategy, that is, the true value of the user ID of the user, can be further obtained.
After the gray scale range is determined, the gray scale range contains the actual values of a plurality of determined user IDs which need to be subjected to gray scale upgrading. In this way, it can be checked whether the gray scale range has an actual value matching the true value in the obtained user information, that is, whether there is a user ID matching the user ID to be confirmed in the user information among the plurality of user IDs.
If the gray scale range has a matched actual value, the user is indicated to be a user within a pre-defined range. Thus, it may be determined that the user is within the grayscale range associated with the target application.
As can be seen from the above, the gray-scale strategy may also include a counting strategy, i.e. the number of people with interest in gray scale, in which case the actual value corresponding to the obtained target gray-scale strategy is a counting value, such as ten thousand. Referring to fig. 6 as a possible implementation manner, in this embodiment, it may also be determined whether the user is in the grayscale range associated with the target application program in the following manner.
In step S161B, the number of users currently determined to belong to the gray scale range is counted.
Step S162B, if the counted number does not reach the count value, it is determined that the user belongs to the grayscale range associated with the target application program.
In step S163B, if the counted number reaches the count value, it is determined that the user does not belong to the grayscale range associated with the target application program.
In this embodiment, under the counting grayscale policy, when a request of a user is obtained, the user may be brought into the grayscale range, and a grayscale counter performs statistical counting, for example, an operation of adding 1 every time. In case of newly receiving a request from a certain user, the number of users determined to belong to the gray scale range, which are counted currently, can be checked first.
If the counted number does not reach the counting value, the user can be determined to belong to the gray scale range, otherwise, the user can be determined not to belong to the gray scale range.
For example, if it is predefined that an application program needs to be upgraded for ten thousand users, the count value is ten thousand. If the counted number of users determined to belong to the gray scale range is five thousand when the request of the user comes, the user may determine to belong to the gray scale range, and add 1 to the counted number. If the request of the user comes, the counted number of the users determined to belong to the gray scale range is ten thousand, the number of the users required for representing is reached, and the user can be determined not to belong to the gray scale range.
In this embodiment, when it is determined that the user belongs to the grayscale range and it is determined that the application program of the client of the user needs to be upgraded, the target application program may be fed back to the client to implement grayscale upgrade.
Optionally, the target application program of the task to be upgraded may include multiple sub-application programs of different version levels, that is, a sub-application program that upgrades the version information of the client to the version a level or a sub-application program that upgrades the version information of the client to the version B may be instructed in one task to be upgraded. In this case, referring to fig. 7, when the target application is fed back to the client, the following steps may be performed:
step S181, determining a target sub application program hit by the user according to the application program information and a plurality of sub application programs of different version levels.
Step S182, feeding back the target sub-application to the client.
In this embodiment, the target sub-application hit by the user may be determined, for example, by using, as the target sub-application, only a sub-application that is one level higher than the level of the application currently installed by the client among the plurality of sub-applications with different version levels.
For example, if three sub-applications having version levels of B, C, and D are included in the sub-application, the version levels increase in sequence. The version level of the application program currently installed by the client is A level. The sub-application of the B level among the three sub-applications may be taken as the target sub-application. If the version level of the currently installed application program of the client is the level B, the sub application program of the level C of the three sub application programs can be used as the target sub application program.
In addition, as another implementation manner, the target sub-application may be determined based on the preset upgrade priority of each sub-application, for example, different upgrade priorities may be set for a plurality of sub-applications with different version levels according to the upgrade requirement, and in the case that other conditions are met, the target sub-application may be determined and fed back based on the order of the upgrade priorities from high to low.
Under the mechanism, for a certain task to be upgraded, after the task to be upgraded is completed, the times fed back by each sub-application program can be counted, that is, the times of executing the gray scale upgrade of each sub-application program. The obtained result can be recorded in the log information of the task to be upgraded so as to provide the information to the operator.
According to the scheme for gray scale upgrading provided by the embodiment, the additional data table is configured to include the keyword field and the value field, so that when a new dimension of the gray scale strategy needs to be added, the new dimension can be directly added to the keyword field without field expansion, and the purpose of rapidly accessing the gray scale strategies with different dimensions can be achieved.
Further, the present embodiment may calculate the grayscale range according to the configuration, and store the target application program and then associate the target application program with the grayscale range. When the user request arrives, the corresponding gray content can be directly returned under the condition that the user is judged to belong to the gray range. Time consumption caused by temporarily calculating the gray content of the user is avoided, and the purpose of efficient gray matching is achieved.
Referring to fig. 8, a schematic diagram of exemplary components of an electronic device according to an embodiment of the present application is provided, where the electronic device may be the server 100 shown in fig. 1. The electronic device may include a storage medium 110, a processor 120, a grayscale upgrade apparatus 130, and a communication interface 140. In this embodiment, the storage medium 110 and the processor 120 are both located in the electronic device and are separately disposed. However, it should be understood that the storage medium 110 may be separate from the electronic device and may be accessed by the processor 120 through a bus interface. Alternatively, the storage medium 110 may be integrated into the processor 120, for example, may be a cache and/or general purpose registers.
The apparatus 130 for gray scale upgrade can be understood as the electronic device or the processor 120 of the electronic device, and can also be understood as a software functional module that is independent of the electronic device or the processor 120 and implements the method for gray scale upgrade under the control of the electronic device.
As shown in fig. 9, the apparatus 130 for gray scale upgrading may include an obtaining module 131, an adding module 132, a determining module 133, and a saving module 134. The functions of the functional modules of the grayscale upgrading apparatus 130 are described in detail below.
An obtaining module 131, configured to obtain a target grayscale policy required by the task to be upgraded and defined in the grayscale policy table, where the target grayscale policy is different from the at least one stored grayscale policy in type.
It is understood that the obtaining module 131 can be used to execute the step S110, and for the detailed implementation of the obtaining module 131, reference can be made to the content related to the step S110.
An adding module 132, configured to add the target grayscale policy to the keyword field, and add an actual value corresponding to the target grayscale policy to a corresponding value field.
It is understood that the adding module 132 can be used to execute the step S120, and for the detailed implementation of the adding module 132, reference can be made to the contents related to the step S120.
The determining module 133 is configured to determine a gray scale range of the task to be upgraded based on an actual value corresponding to the target gray scale policy.
It is understood that the determining module 133 can be used to execute the step S130, and for the detailed implementation of the determining module 133, reference can be made to the contents related to the step S130.
A saving module 134, configured to obtain a target application program of the task to be upgraded, store the target application program in a database, and associate the target application program with the grayscale range.
It is understood that the saving module 134 can be used to execute the step S140, and for the detailed implementation of the saving module 134, reference can be made to the above-mentioned content related to the step S140.
In a possible implementation manner, the apparatus 130 for upgrading a gray scale further includes a response module, and the response module may specifically be configured to:
responding to a request from a user, and obtaining application program information carried in the request;
determining whether the user is within a grayscale range associated with the target application;
if the client side application program belongs to the target application program, judging whether the application program of the client side corresponding to the user needs to be upgraded or not according to the application program information and the target application program;
and if the application program of the client needs to be upgraded, feeding the target application program back to the client.
In a possible implementation manner, the determining module 133 may specifically be configured to:
obtaining a hit strategy required by the task to be upgraded and defined in the gray strategy table;
finding out the actual value of the corresponding hit strategy according to the actual value corresponding to the target gray strategy;
forming a gray scale range of the task to be upgraded based on the obtained actual value of the hit strategy;
the response module may be specifically configured to:
obtaining user information carried in the request, and obtaining a real value under the hit strategy contained in the user information;
and searching whether the gray scale range has an actual value matched with the real value, and if so, determining that the user belongs to the gray scale range associated with the target application program.
In a possible implementation manner, the actual value corresponding to the target grayscale policy is a count value, and the determining module 133 may specifically be configured to:
counting the number of the users which are determined currently and belong to the gray scale range;
if the counted number does not reach the counting value, determining that the user belongs to the gray scale range associated with the target application program;
and if the counted number reaches the counting value, determining that the user does not belong to the gray scale range associated with the target application program.
In a possible implementation manner, the target application program of the task to be upgraded includes a plurality of sub application programs with different version levels, and the response module may be specifically configured to:
determining a target sub-application program hit by the user according to the application program information and a plurality of sub-application programs with different version levels;
and feeding back the target sub-application program to the client.
In a possible implementation manner, the apparatus 130 for grayscale upgrading may further include a statistics module, and the statistics module may be specifically configured to:
and counting the times of respective feedback of each sub application program under the task to be upgraded.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Further, an embodiment of the present application also provides a computer-readable storage medium, where a machine-executable instruction is stored in the computer-readable storage medium, and when the machine-executable instruction is executed, the method for upgrading a grayscale provided by the foregoing embodiment is implemented.
In particular, the computer readable storage medium can be a general storage medium, such as a removable disk, a hard disk, etc., and the computer program on the computer readable storage medium can be executed to perform the above method for gray scale upgrading. With regard to the processes involved when the executable instructions in the computer-readable storage medium are executed, reference may be made to the related descriptions in the above method embodiments, which are not described in detail herein.
To sum up, in the method, the apparatus, the electronic device, and the readable storage medium for gray scale upgrading provided in the embodiments of the present application, an additional data table is preconfigured in the server 100, and the additional data table includes a keyword field and a value field, and when a target gray scale policy required by a task to be upgraded is obtained, and under the condition that the target gray scale policy is different from a gray scale policy stored in the additional data table, the target gray scale policy may also be added to the keyword field, and the corresponding actual value may be added to the corresponding value field. And on the basis, the gray scale range of the task to be upgraded can be determined based on the actual value of the target gray scale strategy, and the target application program of the task to be upgraded is stored in the database and then is associated with the gray scale range. In the scheme, an additional data table containing a keyword field and a value field is established, when the access of a new dimension of the gray strategy is needed, the field is not required to be expanded, the field can be added to the keyword field, the fast access of the new dimension of the gray strategy is realized, the gray range can be determined in advance and stored, and subsequently when a request of a user is received, whether the user hits corresponding content can be judged fast, and efficient gray matching is realized.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method for upgrading gray scale is applied to a server, a gray scale strategy table and an additional data table are prestored in the server, the additional data table comprises a keyword field and a value field, and the keyword field comprises at least one stored gray scale strategy, and the method comprises the following steps:
acquiring a target gray level strategy defined in the gray level strategy table and required by a task to be upgraded, wherein the type of the target gray level strategy is different from that of the at least one stored gray level strategy;
adding the target gray strategy to the keyword field, and adding an actual value corresponding to the target gray strategy to a corresponding value field;
determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy;
and acquiring a target application program of the task to be upgraded, storing the target application program into a database and associating the target application program with the gray scale range.
2. A method of gray scale upgrading according to claim 1, further comprising:
responding to a request from a user, and obtaining application program information carried in the request;
determining whether the user is within a grayscale range associated with the target application;
if the client side application program belongs to the target application program, judging whether the application program of the client side corresponding to the user needs to be upgraded or not according to the application program information and the target application program;
and if the application program of the client needs to be upgraded, feeding the target application program back to the client.
3. The method for upgrading gray scale according to claim 2, wherein the step of determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy comprises:
obtaining a hit strategy required by the task to be upgraded and defined in the gray strategy table;
finding out the actual value of the corresponding hit strategy according to the actual value corresponding to the target gray strategy;
forming a gray scale range of the task to be upgraded based on the obtained actual value of the hit strategy;
the step of determining whether the user is within the grayscale range associated with the target application includes:
obtaining user information carried in the request, and obtaining a real value under the hit strategy contained in the user information;
and searching whether the gray scale range has an actual value matched with the real value, and if so, determining that the user belongs to the gray scale range associated with the target application program.
4. The method for upgrading gray scales according to claim 2, wherein the actual value corresponding to the target gray scale strategy is a count value;
the step of determining whether the user is within the grayscale range associated with the target application includes:
counting the number of the users which are determined currently and belong to the gray scale range;
if the counted number does not reach the counting value, determining that the user belongs to the gray scale range associated with the target application program;
and if the counted number reaches the counting value, determining that the user does not belong to the gray scale range associated with the target application program.
5. The method for upgrading gray scale according to claim 2, wherein the target application program of the task to be upgraded comprises a plurality of sub application programs with different version levels;
the step of feeding back the target application to the client includes:
determining a target sub-application program hit by the user according to the application program information and a plurality of sub-application programs with different version levels;
and feeding back the target sub-application program to the client.
6. The method of gray scale upgrading of claim 5, further comprising:
and counting the times of respective feedback of each sub application program under the task to be upgraded.
7. An apparatus for upgrading gray scales, the apparatus being applied to a server, a gray scale policy table and an additional data table being pre-stored in the server, the additional data table including a key field and a value field, the key field including at least one stored gray scale policy, the apparatus comprising:
an obtaining module, configured to obtain a target grayscale policy required by a task to be upgraded and defined in the grayscale policy table, where the target grayscale policy is different from the at least one stored grayscale policy in type;
the adding module is used for adding the target gray strategy to the keyword field and adding an actual value corresponding to the target gray strategy to a corresponding value field;
the determining module is used for determining the gray scale range of the task to be upgraded based on the actual value corresponding to the target gray scale strategy;
and the storage module is used for obtaining the target application program of the task to be upgraded, storing the target application program into a database and associating the target application program with the gray scale range.
8. An electronic device comprising one or more storage media and one or more processors in communication with the storage media, the one or more storage media storing processor-executable machine-executable instructions that, when executed by the electronic device, are executed by the processors to perform the method steps of any of claims 1-6.
9. A computer-readable storage medium having stored thereon machine-executable instructions which, when executed, implement the method steps of any one of claims 1-6.
CN202110686015.8A 2021-06-21 2021-06-21 Gray scale upgrading method, device, electronic equipment and readable storage medium Active CN113282326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110686015.8A CN113282326B (en) 2021-06-21 2021-06-21 Gray scale upgrading method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110686015.8A CN113282326B (en) 2021-06-21 2021-06-21 Gray scale upgrading method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113282326A true CN113282326A (en) 2021-08-20
CN113282326B CN113282326B (en) 2023-05-16

Family

ID=77285272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110686015.8A Active CN113282326B (en) 2021-06-21 2021-06-21 Gray scale upgrading method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113282326B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN110532008A (en) * 2019-08-29 2019-12-03 深圳前海环融联易信息科技服务有限公司 A kind of product gray scale dissemination method, device, computer equipment and storage medium
CN110661835A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Gray level publishing method and processing method thereof, node and system and storage device
CN111381845A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Software gray scale upgrading method and device, storage medium, terminal and server
WO2020181684A1 (en) * 2019-03-12 2020-09-17 平安科技(深圳)有限公司 Grayscale release management method, system and device, and storage medium
CN111752597A (en) * 2020-06-29 2020-10-09 深圳前海微众银行股份有限公司 Method, device and equipment for issuing gray scale of service and computer readable storage medium
CN112346738A (en) * 2020-11-30 2021-02-09 深圳市欧瑞博科技股份有限公司 Intelligent gray level release method and device, electronic equipment and storage medium
CN112686519A (en) * 2020-12-25 2021-04-20 中国平安人寿保险股份有限公司 Gray scale adjusting method and device, electronic equipment and storage medium
CN112783868A (en) * 2021-02-10 2021-05-11 中国工商银行股份有限公司 Distributed database table structure gray scale upgrading method, device and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN110661835A (en) * 2018-06-29 2020-01-07 马上消费金融股份有限公司 Gray level publishing method and processing method thereof, node and system and storage device
CN111381845A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Software gray scale upgrading method and device, storage medium, terminal and server
WO2020181684A1 (en) * 2019-03-12 2020-09-17 平安科技(深圳)有限公司 Grayscale release management method, system and device, and storage medium
CN110532008A (en) * 2019-08-29 2019-12-03 深圳前海环融联易信息科技服务有限公司 A kind of product gray scale dissemination method, device, computer equipment and storage medium
CN111752597A (en) * 2020-06-29 2020-10-09 深圳前海微众银行股份有限公司 Method, device and equipment for issuing gray scale of service and computer readable storage medium
CN112346738A (en) * 2020-11-30 2021-02-09 深圳市欧瑞博科技股份有限公司 Intelligent gray level release method and device, electronic equipment and storage medium
CN112686519A (en) * 2020-12-25 2021-04-20 中国平安人寿保险股份有限公司 Gray scale adjusting method and device, electronic equipment and storage medium
CN112783868A (en) * 2021-02-10 2021-05-11 中国工商银行股份有限公司 Distributed database table structure gray scale upgrading method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
颜振东: "移动应用灰度发布***的设计与实现" *

Also Published As

Publication number Publication date
CN113282326B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN108768875B (en) Application gray level publishing method and device and computer readable storage medium
CN108632374B (en) Software gray level release method and device
CN110557284B (en) Data aggregation method and device based on client gateway
CN113364853B (en) Business service system, business request method and gateway equipment
CN108416199B (en) User permission control method and device of application and server
CN110213290B (en) Data acquisition method, API gateway and storage medium
US20130283274A1 (en) Method and system for discovering and activating an application in a computer device
CN111163072A (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN113591068B (en) Online login device management method and device and electronic device
CN111581502A (en) Information notification method and device
CN110851987A (en) Method, apparatus and storage medium for predicting calculated duration based on acceleration ratio
CN111930505B (en) Data resource management method and system for big data platform, server and medium
CN110737458A (en) code updating method and related device
CN113656098A (en) Configuration acquisition method and system
KR102205686B1 (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN110852603B (en) High-throughput wind control data processing method, device, equipment and storage medium
CN117130979A (en) Service resource migration method and device and electronic equipment
CN113282326B (en) Gray scale upgrading method, device, electronic equipment and readable storage medium
CN116151631A (en) Service decision processing system, service decision processing method and device
CN110727895A (en) Sensitive word sending method and device, electronic equipment and storage medium
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
CN114356330A (en) Page configuration method and device, electronic equipment and storage medium
CN108363614B (en) Application service module management method and device and server
CN115004667A (en) Information pushing method and device, electronic equipment and computer readable 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