Gray scale publishing method and device
Technical Field
The invention relates to the technical field of mobile application, in particular to a gray level publishing method and device.
Background
In the current internet application field, gray scale release is an important test form for user participation. The gray scale distribution is also called experiential distribution, and refers to a distribution form capable of smooth transition between black and white. The main idea of gray release is to concentrate the influence on one point and then diffuse the influence on one surface, so that the effect is very easy to return when an accident occurs, thereby avoiding the influence in a large range, and some target functions can be tested through gray release, so that the stability of the test function and the terminal function data are controlled, and the target on the product is achieved.
In the prior art, the gray release of an application program (APP) end is based on a localized (native) developed function, and is based on version iteration, a user is allowed to obtain a corresponding gray test function through the release, and the user obtains an installation package of a gray test and can only download the installation package through an application market.
The gray level test is carried out through version issuing, a user is required to update the whole installation package of the APP, the user flow is consumed, the test period is long and inflexible, and a target user of gray level issuing is difficult to control depending on whether the user allows the latest installation package to be downloaded.
Disclosure of Invention
The invention provides a gray scale release method and a gray scale release device, which are used for solving at least one problem that the test period is long and inflexible because the conventional gray scale release needs to be realized through plate release.
In a first aspect, the present invention provides a gray scale publishing method, including:
receiving a gray file acquisition request sent by a client, wherein the gray file acquisition request carries an identifier of the client and software configuration information of the client, and the gray file is a gray test file in an application program APP installation package;
sending a gray file address to the client according to the software configuration information of the client, so that the client downloads the gray file according to the gray file address, and returning a downloading success log after downloading is successful;
and determining whether to open a gray function entrance of the client according to preset gray release configuration information and the download success log of the client.
Further, the software configuration information of the client includes an installed application name and a version number, and the sending of the grayscale file address to the client according to the software configuration information of the client includes:
and according to the installed application name and the version number, when the gray file corresponding to the installed application version exists, sending a gray file address to the client.
Further, the download success log includes the geographic location of the client, the identification of the client, and the grayscale file version of download success.
Further, the gray release configuration information includes the number N of gray releases and the time of the gray release, where N is a positive integer, and the determining whether to open the gray function entry of the client according to the preset gray release configuration information and the download success log of the client includes:
and determining that the time for receiving the downloading success log is within the gray scale release time and the serial number of the client is less than N, and opening a gray scale function entrance of the client.
Further, the determining whether to open the gray scale function entry of the client according to the preset gray scale release configuration information and the download success log of the client includes:
and determining that the geographic position of the client and the gray file version which is carried in the log of successful downloading meet the geographic position and the gray file version in the preset gray release configuration information, and opening a gray function entry of the client.
Further, after the gray-scale function entrance of the client is opened, the method further includes:
receiving gray level test data sent by the client;
and determining whether a preset test target is met or not according to all the received gray scale test data during the gray scale test period, if so, opening the gray scale function entries of all the clients which download the gray scale files successfully, and if not, closing the gray scale function entries of the clients which open the gray scale function entries.
In a second aspect, the present invention provides a gray scale publishing method, including:
sending a gray file acquisition request to a server, wherein the gray file acquisition request carries an identification of a client and software configuration information of the client, and the gray file is a gray test file in an application program APP installation package;
receiving a gray file address sent by the server according to the software configuration information of the client;
downloading the gray file according to the gray file address, and returning a downloading success log to the server after downloading is successful, so that the server determines whether to open a gray function entry of the client according to preset gray release configuration information and the downloading success log of the client.
Further, the download success log includes the geographic location of the client, the identification of the client, and the grayscale file version of download success.
Further, the gray scale distribution configuration information includes:
the number N of gray-scale releases and the time of the gray-scale releases; or,
and casting the geographic position and the gray file version of the object.
Further, still include:
and receiving an instruction for opening a gray function entrance sent by the server, performing gray test, and returning gray test data.
Further, still include:
and receiving an instruction of closing the gray function entrance, which is sent by the server when the server determines that the gray test data does not meet the preset test target according to all the gray test data received during the gray test.
In a third aspect, the present invention provides a server, comprising:
the system comprises a receiving module, a processing module and a sending module, wherein the receiving module is used for receiving a gray file acquisition request sent by a client, the gray file acquisition request carries an identifier of the client and software configuration information of the client, and the gray file is a gray test file in an application program APP installation package;
the sending module is used for sending a gray file address to the client according to the software configuration information of the client so that the client downloads the gray file according to the gray file address and returns a downloading success log after downloading is successful;
and the processing module is used for determining whether to open the gray function entrance of the client according to preset gray release configuration information and the downloading success log of the client.
Further, the software configuration information of the client includes an installed application name and a version number, and the sending module is specifically configured to:
and according to the installed application name and the version number, when the gray file corresponding to the installed application version exists, sending a gray file address to the client.
Further, the download success log includes the geographic location of the client, the identification of the client, and the grayscale file version of download success.
Further, the gray scale publishing configuration information includes a number N of gray scale publishing and a time of gray scale publishing, where N is a positive integer, and the processing module is specifically configured to:
and determining that the time for receiving the downloading success log is within the gray scale release time and the serial number of the client is less than N, and opening a gray scale function entrance of the client.
Further, the preset grayscale release configuration information includes a geographic location of the delivered object and a grayscale file version, and the processing module is specifically configured to:
and determining that the geographic position of the client and the gray file version which is carried in the log of successful downloading meet the geographic position and the gray file version in the preset gray release configuration information, and opening a gray function entry of the client.
Further, the receiving module is further configured to:
after the processing module opens the gray scale function entrance of the client, receiving gray scale test data sent by the client;
the processing module is further configured to: and determining whether a preset test target is met or not according to all the received gray scale test data during the gray scale test period, if so, opening the gray scale function entries of all the clients which download the gray scale files successfully, and if not, closing the gray scale function entries of the clients which open the gray scale function entries.
In a fourth aspect, the present invention provides a client, including:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending a gray file obtaining request to a server, the gray file obtaining request carries an identification of a client and software configuration information of the client, and the gray file is a gray test file in an application program APP installation package;
the receiving module is used for receiving the gray file address sent by the server according to the software configuration information of the client;
and the processing module is used for downloading the gray file according to the gray file address and returning a downloading success log to the server after the downloading is successful so that the server determines whether to open the gray function entrance of the client according to preset gray release configuration information and the downloading success log of the client.
Further, the download success log includes the geographic location of the client, the identification of the client, and the grayscale file version of download success.
Further, the gray scale distribution configuration information includes:
the number N of gray-scale releases and the time of the gray-scale releases; or,
and casting the geographic position and the gray file version of the object.
Further, the receiving module is further configured to:
receiving an instruction for opening a gray function entrance sent by the server;
the processing module is also used for carrying out gray level test;
the sending module is also used for returning the gray test data.
Further, the receiving module is further configured to:
and receiving an instruction of closing the gray function entrance, which is sent by the server when the server determines that the gray test data does not meet the preset test target according to all the gray test data received during the gray test.
According to the gray scale publishing method and device, the gray scale file of the gray scale function interface can be rendered under the control of the server, all clients can download the gray scale file, the gray scale function of a target test user is controlled to be opened through the preset gray scale publishing configuration information, the user is not required to update the whole installation package of the APP, so that the effect that the gray scale test can be carried out without publishing is achieved, the test period is shortened, and the gray scale publishing target user can be flexibly controlled.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without inventive labor.
FIG. 1 is a flowchart of a gray scale publishing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a second embodiment of a gray level publishing method according to the present invention;
FIG. 3 is a schematic structural diagram of a server according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a client according to a first embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture applied to the embodiment of the application can comprise a terminal device, a network and a server, a user can use the terminal device to interact with the server through the network so as to access various services, such as browsing a webpage, downloading a mobile application and the like, and various client applications, such as an application store, a social application, various games and the like, can be installed on the terminal device. The terminal device may be various electronic devices. The server may be a server providing various services, and the servers referred to in the embodiments described below of the present application may include, but are not limited to, application store servers. The gray scale publishing method of the following embodiment of the application is completed based on the upgrading process of the application program (APP).
Fig. 1 is a flowchart of a first embodiment of a gray scale publishing method according to the present invention, as shown in fig. 1, this embodiment is described by taking an interaction between a server and a client as an example, and the method of this embodiment may include:
s101, a client sends a gray file acquisition request to a server, wherein the gray file acquisition request carries an identification of the client and software configuration information of the client, and the gray file is a gray test file in an APP installation package.
The client is various client APPs installed on the terminal equipment, the server is a server processing background published in a gray scale, and files downloaded in the server processing background are files capable of constructing APP functional interfaces on the terminal equipment, such as JavaScript/CSS files based on an Html5 interface; JSBUDLE file based on reach Native; lua-based lua scripts, and so on. After the files are downloaded to the APP end, an APP function interface can be constructed through Native written carrier page codes and operated at the APP end. The client sends a gray file acquisition request to the client through an Application Programming Interface (API), which is provided by the server, and the gray file acquisition request may be sent when the APP is started and is switched from a background to a foreground.
The gray file acquisition request carries an identifier of the client and software configuration information of the client, the software configuration information of the client comprises an installed application name and a version number, and the gray file is a gray test file in the APP installation package, namely a file corresponding to the function of updating the APP version.
S102, the server receives a gray file acquisition request sent by the client and sends a gray file address to the client according to the software configuration information of the client.
Specifically, the server sends the address of the gray file to the client when determining that the gray file corresponding to the installed application version exists according to the installed application name and the version number. Namely, the gray file url is sent to the client according to the server background configuration.
S103, the client downloads the gray file according to the gray file address, and returns a download success log to the server after the download is successful.
Specifically, the client downloads the gray file into the APP storage directory according to the gray file url. And after the downloading is successful, returning a downloading success log to the server. The download success log comprises the geographic position of the client, the identification of the client and the gray file version of the download success.
And S104, the server determines whether to open the gray function entrance of the client according to preset gray release configuration information and the downloading success log of the client.
After receiving the successful downloading log of the client, the server can acquire the geographic position, the identification and the successfully downloaded gray file version of the client, and determine whether to open the gray function entry of the client according to the preset gray release configuration information and the information. The gray scale function is a target test function and is also a function which is locally rendered by downloading a gray scale file.
Optionally, the preset grayscale release configuration information includes the number N of grayscale releases and the time of grayscale releases, where N is a positive integer, the server determines that the time of receiving the download success log is within the grayscale release time, and when the serial number of the client is less than N, the grayscale function entry of the client is opened. For example, the first 1000 clients that download the gray file successfully within two weeks of the gray release time are preset as clients of the target test user, and a gray function entry is opened for the clients that satisfy the two conditions.
Optionally, the preset grayscale release configuration information includes a geographic position and a grayscale file version of the launched object, and the server determines that the geographic position of the client and the grayscale file version that are carried in the download success log satisfy the geographic position and the grayscale file version in the preset grayscale release configuration information, and opens the grayscale function entry of the client. If the gray function entrance can be opened only when the gray file is in the latest version and in a first-line city, the target test user can be obtained. The preset gray release configuration information can also be other limiting conditions, and the opening condition of the gray function entrance can be flexibly set, which is not limited by the invention.
For the client, on a certain function interface of the APP, a certain button is clicked to access a certain gray scale function entrance, and the jump data clicked by the button is acquired from the server, so that the server can control whether the gray scale function entrance is opened or not. And if the server determines that the gray function entry opening condition is met, sending an instruction for opening the gray function entry to the client, enabling the client to enter a corresponding gray function interface for gray test, and returning gray test data. And if the gray function entrance opening condition is not met, the client enters a function interface before updating. The function before update is a backup function, a function corresponding to the gradation function.
Further, after the gray function entrance of the client is opened, the method further comprises the following steps:
receiving gray level test data sent by a client, determining whether a preset test target is met or not according to all the gray level test data received during the gray level test, if so, opening all the gray level function entries of the client which has downloaded the gray level files successfully, and if not, closing the gray level function entries of the client which has opened the gray level function entries.
For example, when the number of problems generated during the gray scale period is too large, for example, when the breakdown rate is too high, the gray scale function entrance must be quickly closed, so as to avoid causing more influence to the user; when some key data in the gray scale period, such as the generated performance income, does not reach the preset target, the gray scale entrance is closed, and the gray scale function attempt is ended; when the data generated in the gray scale period is good and meets the expected target, opening a gray scale function entrance for all the APPs which have successfully downloaded the gray scale files, and enabling the product functions to be on-line comprehensively.
The gray level publishing method provided by the embodiment is suitable for a framework capable of loading the whole APP installation package file according to the gray level file, such as a Hybrid framework based on Html5, a technical framework based on read Native, and a technical framework based on lua.
According to the gray scale release method provided by the embodiment, the gray scale file of a gray scale function interface can be rendered through server control, all clients can download the gray scale file, the gray scale function of a target test user is controlled to be opened through preset gray scale release configuration information, the user is not required to update the whole installation package of the APP, so that the effect that the gray scale test can be performed without releasing a edition is achieved, the test period is shortened, and the target user can be flexibly controlled to release the gray scale.
Furthermore, the gray scale test data returned by the client can also flexibly control the gray scale function to be turned on and off, and the risk of the gray scale function during the operation period can be effectively controlled.
The following describes the technical solution of the embodiment of the method shown in fig. 1 in detail by using a specific embodiment.
Fig. 2 is a flowchart of a second embodiment of the gray scale publishing method of the present invention, and as shown in fig. 2, the method of this embodiment may include:
s201, a client sends a gray file acquisition request to a server, wherein the gray file acquisition request carries an identification of the client and software configuration information of the client, and the gray file is a gray test file in an APP installation package.
S202, the server receives a gray file acquisition request sent by the client and sends a gray file address to the client according to the software configuration information of the client.
And S203, the client downloads the gray file according to the gray file address, and returns a download success log to the server after the download is successful.
S204, the server determines whether the condition for opening the gray function entrance is met.
The method specifically comprises the following steps: the server determines whether to open a gray function entrance of the client according to preset gray release configuration information and a downloading success log of the client.
And secondly, receiving the gray level test data sent by the client, determining whether a preset test target is met according to all the gray level test data received during the gray level test, if so, opening the gray level function entries of all the clients downloading the gray level files successfully, and if not, closing the gray level function entries of the clients opening the gray level function entries.
And S205, the client enters a gray scale function interface.
S206, the client enters a functional interface before updating.
And S207, the client sends the gray test data to the server.
Fig. 3 is a schematic structural diagram of a server according to a first embodiment of the present invention, and as shown in fig. 3, the apparatus according to this embodiment may include: a receiving module 11, a sending module 12 and a processing module 13, wherein,
the receiving module 11 is configured to receive a gray file acquisition request sent by a client, where the gray file acquisition request carries an identifier of the client and software configuration information of the client, and the gray file is a gray test file in an APP installation package of an application program;
the sending module 12 is configured to send a grayscale file address to the client according to the software configuration information of the client, so that the client downloads the grayscale file according to the grayscale file address, and returns a download success log after downloading succeeds;
the processing module 13 is configured to determine whether to open the grayscale function entry of the client according to preset grayscale release configuration information and a download success log of the client.
Optionally, the software configuration information of the client includes a name and a version number of the installed application, and the sending module 12 is specifically configured to: and according to the installed application name and the version number, when determining that the gray file corresponding to the installed application version exists, sending a gray file address to the client.
Optionally, the download success log includes a geographic location of the client, an identifier of the client, and a grayscale file version of download success.
Optionally, the gray scale publishing configuration information includes a number N of gray scale publishing and a time of gray scale publishing, where N is a positive integer, and the processing module 13 is specifically configured to: and determining that the time of receiving the downloading success log is within the gray scale release time and the serial number of the client is less than N, and opening a gray scale function entrance of the client.
Optionally, the preset grayscale release configuration information includes a geographic location of the delivered object and a grayscale file version, and the processing module 13 is specifically configured to: and determining that the geographic position of the client and the gray file version which is carried in the log with successful downloading meet the geographic position and the gray file version in the preset gray release configuration information, and opening a gray function entry of the client.
Optionally, the receiving module 11 is further configured to: after the processing module 13 opens the grayscale function entry of the client, the grayscale test data sent by the client is received. The processing module 13 is further configured to: and determining whether a preset test target is met or not according to all the received gray scale test data during the gray scale test period, if so, opening the gray scale function entries of all the clients which download the gray scale files successfully, and if not, closing the gray scale function entries of the clients which open the gray scale function entries.
The apparatus of this embodiment may be configured to execute the technical solutions of the method embodiments shown in fig. 1 or fig. 2, and the implementation principles thereof are similar and will not be described herein again.
According to the gray scale release method provided by the embodiment, the gray scale file of a gray scale function interface can be rendered through server control, all clients can download the gray scale file, the gray scale function of a target test user is controlled to be opened through preset gray scale release configuration information, the user is not required to update the whole installation package of the APP, so that the effect that the gray scale test can be performed without releasing a edition is achieved, the test period is shortened, and the target user can be flexibly controlled to release the gray scale.
Furthermore, the gray scale test data returned by the client can also flexibly control the gray scale function to be turned on and off, and the risk of the gray scale function during the operation period can be effectively controlled.
Fig. 4 is a schematic structural diagram of a first embodiment of the client terminal of the present invention, and as shown in fig. 4, the apparatus of this embodiment may include: a receiving module 21, a transmitting module 22 and a processing module 23, wherein,
the sending module 21 is configured to send a gray file obtaining request to the server, where the gray file obtaining request carries an identifier of the client and software configuration information of the client, and the gray file is a gray test file in the APP installation package of the application program;
the receiving module 22 is configured to receive a gray file address sent by the server according to the software configuration information of the client;
the processing module 23 is configured to download the grayscale file according to the grayscale file address, and return a download success log to the server after the download is successful, so that the server determines whether to open the grayscale function entry of the client according to preset grayscale release configuration information and the download success log of the client.
Optionally, the download success log includes a geographic location of the client, an identifier of the client, and a grayscale file version of download success.
Optionally, the gray scale distribution configuration information includes: the number N of gray-scale releases and the time of the gray-scale releases; or, the geographic location and the grayscale file version of the object are delivered.
Optionally, the receiving module 21 is further configured to: and receiving an instruction for opening a gray scale function entrance sent by the server, wherein the processing module 23 is further configured to perform a gray scale test, and the sending module 23 is further configured to return gray scale test data.
Optionally, the receiving module 21 is further configured to: and receiving an instruction sent by the server for closing the gray function entrance when the gray test data received during the gray test period does not meet the preset test target.
The apparatus of this embodiment may be configured to execute the technical solutions of the method embodiments shown in fig. 1 or fig. 2, and the implementation principles thereof are similar and will not be described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.