CN111309377A - Gray scale distribution control method and device, electronic equipment and storage medium - Google Patents

Gray scale distribution control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111309377A
CN111309377A CN202010103464.0A CN202010103464A CN111309377A CN 111309377 A CN111309377 A CN 111309377A CN 202010103464 A CN202010103464 A CN 202010103464A CN 111309377 A CN111309377 A CN 111309377A
Authority
CN
China
Prior art keywords
account
candidate
service function
candidate account
issuing
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.)
Pending
Application number
CN202010103464.0A
Other languages
Chinese (zh)
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.)
Reach Best Technology Co Ltd
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Reach Best 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 Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN202010103464.0A priority Critical patent/CN111309377A/en
Publication of CN111309377A publication Critical patent/CN111309377A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration 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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure relates to a method and apparatus for controlling distribution of gray scales, an electronic device, and a storage medium, which are used to solve at least the problem of poor usability of a gray scale distribution control method in the related art. The method comprises the following steps: traversing an account library, and acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts; acquiring a gray level release strategy of the service function; and determining the issuing user of the service function to be issued according to the gray level issuing strategy and the user identification of the candidate user in the candidate user set, wherein the gray level issuing strategy at least comprises a preset account identification, operation algorithm information for operating the account identification and a hit range of an operation result.

Description

Gray scale distribution control method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling gray scale release, an electronic device, and a storage medium.
Background
Gray scale distribution refers to a distribution method that can smoothly transition between black and white. In the development of the service function, it is often necessary to perform gray release control on some service functions, that is, the gray release control is not immediately effective after the development of the service function is completed, but a certain proportion of release is performed to observe whether the service function is normal or not, so as to avoid a serious problem after the service function is on-line.
In the related art, a modulo operation is usually performed on an account identifier of a user of an application program, and whether to open the service function to be issued to the user is determined according to a remainder obtained by the operation. However, this gray scale distribution control method determines that the user is random, and thus has a problem of poor usability.
Disclosure of Invention
The present disclosure provides a method and an apparatus for controlling distribution of gray scales, an electronic device, and a storage medium, so as to solve at least the problem of poor usability of the method for controlling distribution of gray scales in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a gray scale issuance control method including:
traversing an account library, and acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts;
acquiring a gray level release strategy of the service function;
and determining the issuing account of the service function to be issued according to the gray level issuing strategy and the account identification of the candidate account in the candidate account set, wherein the gray level issuing strategy at least comprises a preset account identification, operation algorithm information for operating the account identification and a hit range of an operation result.
Optionally, the determining, according to the gray scale publishing policy and the account identifier of the candidate account in the candidate account set, a publishing account of the service function to be published includes:
for each candidate account in the candidate account set, if the account identifier of the candidate account is matched with the preset account identifier, determining the candidate account as a release account of the service function to be released;
if the account identification of the candidate account is not matched with the preset account identification, calculating the account identification of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account;
and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the issuing account of the service function to be issued.
Optionally, the arithmetic algorithm information includes a modulus of a modulo operation;
for each candidate account in the candidate account set, the calculating the account identifier of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account includes:
performing modulus operation on the account identification of the candidate account according to the modulus to obtain the remainder of the account identification of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, the operation algorithm information includes a hash seed of the hash operation and a modulus of the modulo operation;
for each candidate account in the candidate account set, the calculating the account identifier of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account includes:
carrying out hash operation on the account identification of the candidate account according to the hash seed to obtain a hash value of the account identification of the candidate account;
performing modular operation on the hash value according to the modulus to obtain the remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, the method further comprises:
adding the account identification of the issuing account in the gray level issuing strategy; and/or the presence of a gas in the gas,
and updating the hit range of the operation result according to the proportion of the account identification of the issuing account in the candidate account set.
Optionally, the obtaining of the gray scale release policy of the service function includes:
and reading the gray level publishing strategy of the service function to be published from a preset database or zookeeper.
According to a second aspect of the embodiments of the present disclosure, there is provided a gradation issuance control apparatus including:
the screening unit is configured to execute traversing of an account library and acquire a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts;
an acquisition unit configured to execute a gray scale release policy for acquiring the service function;
and the determining unit is configured to execute the operation of determining the issuing account of the service function to be issued according to the gray issuing strategy and the account identifier of the candidate account in the candidate account set, wherein the gray issuing strategy at least comprises a preset account identifier, operation algorithm information for operating the account identifier and a hit range of an operation result.
Optionally, the determining unit is specifically configured to perform:
for each candidate account in the candidate account set, if the account identifier of the candidate account is matched with the preset account identifier, determining the candidate account as a release account of the service function to be released;
if the account identification of the candidate account is not matched with the preset account identification, calculating the account identification of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account;
and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the issuing account of the service function to be issued.
Optionally, the arithmetic algorithm information includes a modulus of a modulo operation;
the determining unit is further specifically configured to perform:
for each candidate account in the candidate account set, performing a modulus operation on the account identifier of the candidate account according to the modulus to obtain a remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, the operation algorithm information includes a hash seed of the hash operation and a modulus of the modulo operation;
the determining unit is further specifically configured to perform:
for each candidate account in the candidate account set, carrying out hash operation on the account identifier of the candidate account according to the hash seed to obtain a hash value of the account identifier of the candidate account;
performing modular operation on the hash value according to the modulus to obtain the remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, the apparatus further comprises:
an updating unit configured to perform adding the account identifier of the release account in the grayscale release policy; and/or updating the hit range of the operation result according to the proportion of the account identification of the issuing account in the candidate account set.
Optionally, the obtaining unit is specifically configured to perform:
and reading the gray level publishing strategy of the service function to be published from a preset database or zookeeper.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the gray scale issuance control method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the gradation issuance control method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising one or more instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the method of controlling greyscale issuance as set forth in the first aspect of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
traversing an account library, acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts, acquiring a gray scale issuing strategy of the service function, and finally determining an issuing account of the service function to be issued according to the gray scale issuing strategy and account identifications of the candidate accounts in the candidate account set.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating a gray scale issuance control method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a gray scale issuance control method according to another exemplary embodiment.
Fig. 3 is a block diagram illustrating a gradation issuance control apparatus according to an exemplary embodiment.
Fig. 4 is a block diagram illustrating a gradation issuance control apparatus according to another exemplary embodiment.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a gray scale issuance control method according to an exemplary embodiment, as shown in fig. 1, the method including the steps of:
in step S11, the account library is traversed to obtain a candidate account set of the service function to be issued.
Wherein the set of candidate accounts includes a plurality of candidate accounts. The account library may include accounts of all users using the application program, and the service function to be released is any service function of the application program, for example, taking the application program as a live webcast App, and the service function to be released may be recording a long video.
Optionally, all accounts in the account library can be used as candidate accounts of the service function to be issued to obtain a candidate account set; or, screening out a part of accounts from the account library as candidate accounts of the service function to be released, and obtaining a candidate account set, for example, according to historical usage data of each account in the account library about the application program. The historical usage data may include the type and usage frequency of the historical service function, which is not limited in this disclosure.
In step S12, a grayscale release policy for the business function is acquired.
The gray level issuing strategy at least comprises a preset account identifier, operation algorithm information for operating the account identifier and a hit range of an operation result.
For example, the preset account identifier may include an account identifier of the test account. It should be noted that the preset account identifiers corresponding to different service functions to be issued may be the same or different, and this is not limited in this disclosure.
In step S13, a publishing account of the service function to be published is determined according to the grayscale publishing policy and the account identifier of the candidate account in the candidate account set.
After the release account of the service function to be released is determined, the service function to be released can be opened to the release account.
Traversing an account library, acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts, acquiring a gray scale issuing strategy of the service function, and finally determining an issuing account of the service function to be issued according to the gray scale issuing strategy and account identifications of the candidate accounts in the candidate account set.
In order to make those skilled in the art understand the technical solution provided by the embodiment of the present disclosure, the following describes in detail the gray scale issue control method provided by the embodiment of the present disclosure.
First, referring to the step S12, in an alternative embodiment, the electronic device executing the gray scale distribution control method may locally preset the gray scale distribution policy of different service functions to be distributed. Correspondingly, the obtaining of the gray scale publishing policy of the service function to be published may include: and directly reading the gray level issuing strategy of the service function to be issued from the electronic equipment locally. Illustratively, different service functions to be issued are preset with a unique identifier, and the gray scale issuing strategy of the service function to be issued can be directly read from the electronic device locally based on the identifier of the service function to be issued.
It can be understood that, in this embodiment, by storing the grayscale release policies of different service functions to be released locally in the electronic device executing the grayscale release control method, the grayscale release policies of the service functions to be released are directly read locally from the electronic device, and thus the real-time performance is high.
In another optional implementation manner, in order to facilitate updating of the grayscale release policy of the business function, the grayscale release policies of different business functions to be released may be stored in a preset database or zookeeper. Correspondingly, the obtaining of the gray scale publishing policy of the service function to be published may include: and reading the gray level publishing strategy of the service function to be published from the database or the zookeeper. For example, the electronic device executing the grayscale release control method may query a database based on the identifier of the service function to be released, and read the grayscale release policy of the service function to be released from the database. Or, a communication connection may be established with the zookeeper, and a query request carrying the identifier of the service function to be published is sent to the zookeeper through the communication connection, so as to request the zookeeper to return the gray scale publishing policy of the service function to be published.
It can be understood that the zookeeper is essentially a distributed application coordination service with distributed and open source code, stores the gray release policy of the business function into the zookeeper and directly reads the gray release policy from the zookeeper when needed, and has high flexibility. And storing the gray level issuing strategy of the service function in the zookeeper or the database, reading the gray level issuing strategy of the service function to be issued from the zookeeper or the database when needed, and compared with storing the gray level issuing strategy of the service function in the local electronic equipment, reducing the occupation of storage resources of the electronic equipment and improving the performance of the electronic equipment.
Next, regarding step S13 above, in an optional implementation manner, as shown in fig. 2, the determining, according to the gray-scale distribution policy and the account identifier of the candidate account in the candidate account set and the gray-scale distribution policy, a distribution account of the service function to be distributed includes:
in step S131, for each candidate account in the candidate account set, if the account identifier of the candidate account matches the preset account identifier, determining the candidate account as the publishing account of the service function to be published.
In specific implementation, the account identifier of each candidate account in the candidate account set may be matched with the preset account identifier to obtain an account corresponding to the preset account identifier. Illustratively, the preset account id may include one or more, and in the case that the preset account id includes a plurality of account ids, the preset account id may be directly listed, for example, in the form of "123,234, …", where "123" and "234" respectively represent the preset account id.
It can be understood that in this embodiment, by setting the account identifier in the grayscale release policy, it is possible to open the service function to be released to a specific account, and the availability is high.
Further, if the account id of the candidate account does not match the preset account id, the steps S132 and S133 are continuously executed.
In step S132, if the account id of the candidate account is not matched with the preset account id, the account id of the candidate account is calculated according to the calculation algorithm information, so as to obtain a calculation result corresponding to the candidate account.
In step S133, if the operation result corresponding to the candidate account is located in the hit range, it is determined that the candidate account is the issue account of the service function to be issued.
In the embodiment of the present disclosure, the algorithm for operating the account id may be set by user according to the actual situation of the service function to be issued, and if the algorithm for operating the account id is different, the corresponding hit range is also different. In addition, different operation algorithms and hit ranges can be set for different service functions to be issued respectively.
Different arithmetic algorithms are described below in connection with three examples.
Example one: and carrying out modular operation on the account identification.
For this case, the arithmetic algorithm information includes a modulus of the modulo operation. Specifically, the modulus operation may be performed on the account identifier of each candidate account according to the modulus to obtain the remainder of the account identifier of each candidate account, and the remainder of the account identifier of each candidate account is used as the operation result corresponding to the corresponding candidate account. Further, for each candidate account, comparing the operation result corresponding to the candidate account with the hit range, and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the release account of the service function to be released, and further opening the service function to be released to the release account.
Illustratively, the hit ranges for the modulus and the remainder may be listed in the form of "modulus, hit range for remainder", such as "100; 0-9 ", wherein" 100 "represents the modulus; "0-9" indicates the hit range for the remainder.
It should be noted that, in practical application, the hit range of the modulus and the remainder may be set in a user-defined manner, for example, if the proportion of the gray release account needs to be enlarged, the hit range of the remainder may be set to a larger range; if the proportion of the gray scale issuing account is reduced, the hit range of the remainder can be set to a smaller range.
It can be understood that by adding the mode of the modulo operation and the hit range of the remainder on the basis of the preset account identifier and determining the candidate account with the remainder of the account identifier in the hit range as the issuing account of the service function to be issued, the service function to be issued can be opened for a specific account, the custom control of the proportion of the gray level issuing account can be realized, and the flexibility of gray level issuing is improved.
Example two: and carrying out hash operation on the account identification.
For this case, the arithmetic algorithm information includes a Hash Seed (Hash Seed) corresponding to the service function to be issued. The account identifier of each candidate account can be subjected to hash operation according to the set hash operation seed to obtain a hash value of the account identifier of each candidate account, and the nth of the hash value is taken as an operation result of the corresponding candidate account. Further, for each candidate account, if the operation result corresponding to the candidate account is located in the hit range, it may be determined that the candidate account is the release account of the service function to be released, and the service function to be released may be opened to the release account.
For example, the hash seed and the hit range corresponding to the nth bit of the hash value may be "a seed for hash operation; the hit range corresponding to the Nth bit is listed as "1; 0-9 ", wherein" 1 "represents the seed of the hash operation, and" 0-9 "represents the hit range corresponding to the nth bit of the hash value.
It can be understood that, since the hash value obtained by the hash operation has uniqueness, the issuing account of the service function to be issued is determined by performing the hash operation on the account identifier of the candidate account and judging the obtained hash value, so that duplication between issuing accounts of different service functions to be issued can be avoided, and further, the problem that data of the service function is difficult to analyze due to duplication of the issuing accounts can be avoided.
Example three: the hash operation is firstly carried out on the account identification, and the modulus operation is carried out on the obtained hash value.
For this case, the operation algorithm information may include a hash seed for hashing the account identifier and a modulus for performing a modulo operation. The method comprises the following steps of firstly carrying out hash operation on account identifications of all candidate accounts, and using obtained hash values as new account identifications of all candidate accounts; and then, carrying out modulus operation on the new account identification of each candidate account according to the modulus, and taking the obtained remainder as an operation result corresponding to each candidate account. Further, for each candidate account, the operation result of the candidate account is compared with the hit range to determine whether the operation result of the candidate account is within the hit range. Further, for each candidate account, if the operation result corresponding to the candidate account is within the hit range, the candidate account is determined as the release account of the service function to be released, and the service function to be released can be opened to the release account.
Illustratively, the hit range of the seed, modulus, and remainder of the hash operation may be "the seed of the hash operation; modulus; hit range of remainder "is listed as" 1; 100, respectively; 0-9 ", where" 1 "represents the seed of the hash operation,
"100" represents the modulus and "0-9" represents the hit range for the remainder.
It can be understood that by adding the modulo operation and the hit range of the remainder on the basis of the preset account identifier and determining the candidate account with the remainder of the account identifier in the hit range as the issuing account of the service function to be issued, the service function to be issued can be opened for a specific account, the custom control of the proportion of the gray level issuing account can be realized, and the flexibility of gray level issuing is improved. Moreover, because the hash value obtained by the hash operation has uniqueness, the issuing accounts of different business functions to be issued can be prevented from being repeated by performing the hash operation on the account identification of the candidate account and then performing the modulo operation on the obtained hash value, and further the problem that the data of the business functions are difficult to analyze due to the repeated issuing accounts can be avoided.
It should be noted that, the operation manner of the account identifier and the hit range of the operation result may be listed in sequence with the preset account identifier to represent the gray-scale posting policy, and in the third example, the gray-scale posting policy of the service function to be posted may be represented as "1; 100, respectively; 0 to 9; 123,234 ", where" 1 "denotes the seed of the hash operation and" 100 "denotes the modulus; "0-9" indicates the hit range of the remainder, "123" and "234" indicate the preset account id, respectively.
It can be understood that the operation algorithm information for operating the account identifier and the hit range of the operation result are added on the basis of the preset account identifier, and the issuing account of the service function to be issued is determined by processing the account identifier of each candidate account according to the operation mode, so that the service function to be issued can be opened for a specific account, the custom control of the proportion of the gray level issuing account can be realized, and the flexibility of gray level issuing is improved.
In another embodiment of the present disclosure, as shown in fig. 2, the gray scale issuance control method may further include:
in step S14, the grayscale issuing policy of the service function to be issued is updated according to the account identifier of the issuing account of the service function to be issued.
For example, the account identifier of the publishing account may be added to the gray-scale publishing policy of the service function to be published, and/or the hit range of the operation result may be updated according to the proportion of the account identifier of the publishing account in the candidate account set.
For example, if the service function to be released needs to be opened to more accounts and the account identifier of the releasing account occupies a smaller proportion in the candidate account set, the hit range of the operation result may be increased, so that more candidate accounts can be hit; if the service function to be issued needs to be opened to fewer accounts and the account identifier of the issuing account occupies a larger proportion in the candidate account set, the hit range of the operation result can be reduced, so that fewer candidate accounts can be hit.
It can be understood that, by the embodiment, the gray scale release policy corresponding to the service function to be released can be automatically updated, on one hand, the efficiency can be improved compared with a mode of manually updating the gray scale release policy, and on the other hand, by adding the account identifier of the release account in the gray scale release policy, the account identifier of the release account can be prevented from being repeatedly verified when the release account of the service function to be released accesses the service function to be released repeatedly, so that the gray scale release efficiency can be improved; and updating the hit range of the operation result according to the proportion of the account identification of the issuing account in the candidate account set, so that the adaptive automatic control of the issuing account proportion of the service function to be issued can be realized.
Fig. 3 is a block diagram illustrating a gray scale issuance control apparatus according to an exemplary embodiment of the present disclosure, and as shown in fig. 3, the apparatus 300 may include a screening unit 301, an acquisition unit 302, and a determination unit 303.
The screening unit 301 is configured to perform traversal of the account library, and obtain a candidate account set of the service function to be issued, where the candidate account set includes a plurality of candidate accounts.
The obtaining unit 302 is configured to execute a gray release policy for obtaining the business function.
The determining unit 303 is configured to execute determining the issuing account of the service function to be issued according to the gray-scale issuing policy and the account identifier of the candidate account in the candidate account set, where the gray-scale issuing policy at least includes a preset account identifier, operation algorithm information for operating the account identifier, and a hit range of an operation result.
It can be understood that, by traversing the account library, the gray scale issuance control apparatus provided in the embodiment of the present disclosure obtains a candidate account set of the service function to be issued, where the candidate account set includes a plurality of candidate accounts, obtains the gray scale issuance policy of the service function, and finally determines the issuance account of the service function to be issued according to the gray scale issuance policy and the account identifier of the candidate account in the candidate account set, where the gray scale issuance policy at least includes a preset account identifier, operation algorithm information for operating the account identifier, and a hit range of an operation result, so that not only can custom control the issuance account proportion of the service function to be issued be realized, but also can open the service function to be issued to a specific account, compared with randomly selecting an issuance account for the service function to be issued in the related art, the usability is strong.
Optionally, the determining unit 303 is configured to specifically perform:
for each candidate account in the candidate account set, if the account identifier of the candidate account is matched with the preset account identifier, determining the candidate account as a release account of the service function to be released;
if the account identification of the candidate account is not matched with the preset account identification, calculating the account identification of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account;
and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the issuing account of the service function to be issued.
Optionally, the arithmetic algorithm information includes a modulus of a modulo operation;
the determining unit 303 is further configured to specifically perform:
for each candidate account in the candidate account set, performing a modulus operation on the account identifier of the candidate account according to the modulus to obtain a remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, the arithmetic algorithm information includes a hash seed of the hash operation and a modulus of the modulo operation
The determining unit 303 is further configured to specifically perform:
for each candidate account in the candidate account set, carrying out hash operation on the account identifier of the candidate account according to the hash seed to obtain a hash value of the account identifier of the candidate account;
performing modular operation on the hash value according to the modulus to obtain the remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
Optionally, as shown in fig. 4, the apparatus 300 further includes:
an updating unit 304 configured to perform adding the account identifier of the publishing account in the grayscale publishing policy; and/or updating the hit range of the operation result according to the proportion of the account identification of the issuing account in the candidate account set.
It can be understood that the embodiment can automatically update the gray scale release policy corresponding to the service function to be released, on one hand, the efficiency can be improved compared with a mode of manually updating the gray scale release policy, on the other hand, the repeated verification of the account identifier of the release account when the release account of the service function to be released repeatedly accesses the service function to be released can be avoided, and further, the efficiency of gray scale release can be improved.
Optionally, the obtaining unit 302 is configured to specifically perform:
and reading the gray level publishing strategy of the service function to be published from a preset database or zookeeper.
It can be understood that the zookeeper is essentially a distributed application coordination service with distributed and open source code, stores the gray release policy of the business function into the zookeeper and directly reads the gray release policy from the zookeeper when needed, and has high flexibility. And storing the gray level issuing strategy of the service function in the zookeeper or the database, reading the gray level issuing strategy of the service function to be issued from the zookeeper or the database when needed, and compared with storing the gray level issuing strategy of the service function in the local electronic equipment, reducing the occupation of storage resources of the electronic equipment and improving the performance of the electronic equipment.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram illustrating an electronic device 500 in accordance with an example embodiment. For example, the apparatus 500 may be a pc (personal computer), a portable computer (e.g., a notebook computer), a desktop computer, or other terminal equipment. As shown in fig. 5, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505.
The processor 501 is configured to control the overall operation of the electronic device 500, so as to complete all or part of the steps in the gray scale issue control method. The memory 502 is used to store various types of data to support operation at the electronic device 500, such as instructions for any application or method operating on the electronic device 500 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 502 or transmitted through the communication component 505. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 504 provides an interface between the processor 501 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 505 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the above-mentioned gray scale release control method.
In another exemplary embodiment, there is also provided a computer-readable storage medium including program instructions which, when executed by a processor, implement the steps of the gray scale issuance control method described above. For example, the computer readable storage medium may be the memory 502 described above including program instructions that are executable by the processor 501 of the electronic device 500 to perform the gray scale issuance control method described above.
The embodiment of the disclosure also provides a computer program product, which includes instructions, and when the computer program product is executed by a computer, the instructions make the computer execute the gray scale issue control method. For example, the gradation issuance control method includes the steps of:
traversing an account library, and acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts;
acquiring a gray level release strategy of the service function;
and determining the issuing account of the service function to be issued according to the gray level issuing strategy and the account identification of the candidate account in the candidate account set, wherein the gray level issuing strategy at least comprises a preset account identification, operation algorithm information for operating the account identification and a hit range of an operation result.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A gray scale issuance control method, comprising:
traversing an account library, and acquiring a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts;
acquiring a gray level release strategy of the service function;
and determining the issuing account of the service function to be issued according to the gray level issuing strategy and the account identification of the candidate account in the candidate account set, wherein the gray level issuing strategy at least comprises a preset account identification, operation algorithm information for operating the account identification and a hit range of an operation result.
2. The method according to claim 1, wherein the determining the release account of the service function to be released according to the gray release policy and the account identifier of the candidate account in the candidate account set comprises:
for each candidate account in the candidate account set, if the account identifier of the candidate account is matched with the preset account identifier, determining the candidate account as a release account of the service function to be released;
if the account identification of the candidate account is not matched with the preset account identification, calculating the account identification of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account;
and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the issuing account of the service function to be issued.
3. The method of claim 2, wherein the arithmetic algorithm information includes a modulus of a modulo operation;
for each candidate account in the candidate account set, the calculating the account identifier of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account includes:
performing modulus operation on the account identification of the candidate account according to the modulus to obtain the remainder of the account identification of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
4. The method of claim 2, wherein the arithmetic algorithm information includes a hash seed for the hash operation and a modulus for the modulo operation;
for each candidate account in the candidate account set, the calculating the account identifier of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account includes:
carrying out hash operation on the account identification of the candidate account according to the hash seed to obtain a hash value of the account identification of the candidate account;
performing modular operation on the hash value according to the modulus to obtain the remainder of the account identifier of the candidate account;
and determining the obtained remainder as an operation result corresponding to the candidate account.
5. The method according to any one of claims 1 to 4, further comprising:
adding the account identification of the issuing account in the gray level issuing strategy; and/or the presence of a gas in the gas,
and updating the hit range of the operation result according to the proportion of the account identification of the issuing account in the candidate account set.
6. The method according to any one of claims 1 to 4, wherein the obtaining of the gray release policy of the service function comprises:
and reading the gray level publishing strategy of the service function to be published from a preset database or zookeeper.
7. A gradation issuance control apparatus comprising:
the screening unit is configured to execute traversing of an account library and acquire a candidate account set of a service function to be issued, wherein the candidate account set comprises a plurality of candidate accounts;
an acquisition unit configured to execute a gray scale release policy for acquiring the service function;
and the determining unit is configured to execute the operation of determining the issuing account of the service function to be issued according to the gray issuing strategy and the account identifier of the candidate account in the candidate account set, wherein the gray issuing strategy at least comprises a preset account identifier, operation algorithm information for operating the account identifier and a hit range of an operation result.
8. The apparatus according to claim 7, wherein the determining unit is specifically configured to perform:
for each candidate account in the candidate account set, if the account identifier of the candidate account is matched with the preset account identifier, determining the candidate account as a release account of the service function to be released;
if the account identification of the candidate account is not matched with the preset account identification, calculating the account identification of the candidate account according to the calculation algorithm information to obtain a calculation result corresponding to the candidate account;
and if the operation result corresponding to the candidate account is located in the hit range, determining that the candidate account is the issuing account of the service function to be issued.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the greyscale issuance control method of any of claims 1 to 6.
10. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the gradation issuance control method according to any one of claims 1 to 6.
CN202010103464.0A 2020-02-18 2020-02-18 Gray scale distribution control method and device, electronic equipment and storage medium Pending CN111309377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010103464.0A CN111309377A (en) 2020-02-18 2020-02-18 Gray scale distribution control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010103464.0A CN111309377A (en) 2020-02-18 2020-02-18 Gray scale distribution control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111309377A true CN111309377A (en) 2020-06-19

Family

ID=71152814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010103464.0A Pending CN111309377A (en) 2020-02-18 2020-02-18 Gray scale distribution control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111309377A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039866A (en) * 2021-10-08 2022-02-11 中移(杭州)信息技术有限公司 Gray scale distribution method, equipment, storage medium and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160048384A1 (en) * 2014-08-12 2016-02-18 Xiaomi Inc. Method and device for grayscale-upgrading
CN109558162A (en) * 2017-09-26 2019-04-02 腾讯科技(深圳)有限公司 Application issued method, apparatus, computer equipment and storage medium
CN109871224A (en) * 2019-02-13 2019-06-11 北京炎黄新星网络科技有限公司 A kind of gray scale dissemination method, system, medium and equipment based on user identifier
CN110489133A (en) * 2019-08-23 2019-11-22 亿企赢网络科技有限公司 A kind of gray scale dissemination method, system and electronic equipment and storage medium
CN110489131A (en) * 2018-05-15 2019-11-22 中国移动通信集团浙江有限公司 A kind of gray scale user choosing method and device
CN110569057A (en) * 2019-09-12 2019-12-13 北京字节跳动网络技术有限公司 gray scale distribution method and device, electronic equipment and computer readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160048384A1 (en) * 2014-08-12 2016-02-18 Xiaomi Inc. Method and device for grayscale-upgrading
CN109558162A (en) * 2017-09-26 2019-04-02 腾讯科技(深圳)有限公司 Application issued method, apparatus, computer equipment and storage medium
CN110489131A (en) * 2018-05-15 2019-11-22 中国移动通信集团浙江有限公司 A kind of gray scale user choosing method and device
CN109871224A (en) * 2019-02-13 2019-06-11 北京炎黄新星网络科技有限公司 A kind of gray scale dissemination method, system, medium and equipment based on user identifier
CN110489133A (en) * 2019-08-23 2019-11-22 亿企赢网络科技有限公司 A kind of gray scale dissemination method, system and electronic equipment and storage medium
CN110569057A (en) * 2019-09-12 2019-12-13 北京字节跳动网络技术有限公司 gray scale distribution method and device, electronic equipment and computer readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039866A (en) * 2021-10-08 2022-02-11 中移(杭州)信息技术有限公司 Gray scale distribution method, equipment, storage medium and device

Similar Documents

Publication Publication Date Title
CN110826071B (en) Software vulnerability risk prediction method, device, equipment and storage medium
CN108073519B (en) Test case generation method and device
US8255991B1 (en) Computer application pre-permissioning
US11232017B2 (en) System for refreshing and sanitizing testing data in a low-level environment
CN109450771B (en) Method and device for adding friends, computer equipment and storage medium
EP3574430A1 (en) Continuous learning for intrusion detection
US8984151B1 (en) Content developer abuse detection
US20150019560A1 (en) Content activity feedback into a reputation system
CN113268336B (en) Service acquisition method, device, equipment and readable medium
CN111160624B (en) User intention prediction method, user intention prediction device and terminal equipment
CN110717509B (en) Data sample analysis method and device based on tree splitting algorithm
CN115238247A (en) Data processing method based on zero trust data access control system
CN111309377A (en) Gray scale distribution control method and device, electronic equipment and storage medium
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
CN105162931B (en) The sorting technique and device of a kind of communicating number
CN112685799B (en) Device fingerprint generation method and device, electronic device and computer readable medium
CN112633619A (en) Risk assessment method and device
CN110580200B (en) Data synchronization method and device
CN111401395B (en) Data processing method, terminal equipment and storage medium
US20100312816A1 (en) Terminal, server and method for determining and processing contents as spams
CN113254837A (en) Application program evaluation method, device, system, equipment and medium
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN110874305A (en) User operation recording method and device and server
CN111277638A (en) Control method and server
CN110659979A (en) Method and apparatus for predicting loss rate of default, storage medium, and electronic device

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