Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides an online testing method, as shown in fig. 1, the method includes:
101. and after sending a login request to the server, receiving an online test condition sent by the server.
When the current user inputs an account number and a password, the client sends a login request to the server. In order to judge whether the current user has the right to perform online test on the preset application, after the server receives a login request sent by the client, the server sends an online test condition to the client, so that the client authenticates the current user according to the online test condition to determine whether the current user has the right of online test. The preset application may be an application software or a function in the application. For example, the default application may be antivirus software, or may be a custom scan function on the antivirus software.
It should be noted that, no matter the preset application is an application software or a function on the application, the preset application is a new application, that is, an application that needs to be online after the developer has developed and performed internal testing.
102. And judging whether the current user meets the online test condition.
After receiving the online test condition sent by the server, the client performs matching operation with the content in the online test condition, so as to judge whether the current user meets the online test condition.
Specifically, the on-line test condition may be one or a combination of any more of the following conditions: the method comprises the steps that a test file exists locally at a client, the version of the test file accords with a preset version, the grade of a current user accords with a preset grade condition, the current user is a preset white list user, and a preset associated application is installed locally.
For example, the client may only determine whether the test file exists locally at the client, may also only determine whether the level of the current user meets the preset level condition, may also first determine whether the test file exists locally at the client, and when the test file exists locally at the client, then determine whether the level of the current user meets the preset level condition.
It should be noted that the online test condition may also include other conditions besides the above conditions, and the content of the online test condition is not limited in the embodiment of the present invention.
103. And if the current user meets the online test condition, displaying the preset application so that the current user performs online test on the preset application.
In practical applications, the client often implements different functions in a nested web page manner. For the client, after the user logs in successfully, the user firstly enters a client top page, and the preset application is not necessarily displayed on the client top page, so that display information related to the preset application needs to be sent to a page corresponding to the preset application, and the corresponding application is displayed or not displayed by the corresponding page.
Specifically, after the client determines that the current user meets the online test condition, a display identifier is added to the preset application, and then preset application information carrying the display identifier is sent to the page corresponding to the preset application, so that the page displays the preset application according to the display identifier in the preset application information, and therefore the current user can see the preset application on the page, and further has the right to perform online test on the preset application.
104. And if the current user does not meet the online test condition, hiding the preset application so that the current user cannot perform online test on the preset application.
Similar to the display of the preset application, for the implementation mode of the client-side nested webpage, after the client determines that the current user does not meet the online test condition, the hidden identifier is added to the preset application, and then the preset application information carrying the hidden identifier is sent to the page corresponding to the preset application, so that the preset application is hidden by the page according to the hidden identifier in the preset application information, and therefore the current user cannot see the preset application at the page and further cannot perform online test on the preset application.
For example, if "1" indicates display, "0" indicates hiding, and the application is preset as application X, when the current user meets the online test condition, the client may add an identifier "1" to the application X, and send application information of the application X to the page, where the application information carries an application name of the application X, the identifier "1", a size of the application X, and the like. When the user opens the page, the page displays the application X according to the mark '1', so that the current user performs online test on the application X. Similar to the implementation manner of satisfying the online test condition, when the current user does not satisfy the online test condition, the client adds an identifier "0" to the application X and sends the application information of the application X to the page, and when the user opens the page, the page hides the application X according to the identifier "0" so that the current user cannot perform the online test on the application X.
The online test method provided by the embodiment of the invention can receive the online test condition issued by the server after sending the login request to the server, and determine whether to display the preset application by judging whether the current user meets the online test condition, so that the current user has the right to perform online test on the preset application only under the condition that the current user is visible to the preset application. Compared with the prior art that the preset application is directly operated online, the method and the device can only display the preset application to the client of the user meeting the online test condition after the preset application is operated online, so that the preset application can be tested online only by the user who is authorized to see the preset application, the problems generated in the online operation process can be timely found and solved, and the preset application can be further ensured to be normally operated online when being visible to all users.
Further, in step 102 of the above embodiment, it is mentioned that the online test condition may include only one condition, or a plurality of conditions may be combined to jointly restrict the online test right of the current user. The following is a description of a specific implementation manner when the online test conditions include different contents:
the first condition is as follows: when the online test condition includes that the client locally has a test file, the specific implementation manner of judging whether the current user meets the online test condition is as follows:
and detecting whether the test file exists locally at the client. If the test file exists, determining that the current user meets the online test condition; and if the test file does not exist, determining that the current user does not meet the online test condition.
In practical application, when a preset application causes a problem in an online running process, virtual property may be involved, even loss of physical property and the like may cause damage to benefits of a user, so in order to enable the user participating in online testing to be a tester of a developer or other users who voluntarily participate in online testing, a test file may be installed at a client of the user participating in online testing, and authentication of online testing of a current user is performed by judging whether the test file exists locally at the client.
It should be noted that the online test condition includes not only the file name of the test file, but also the storage path of the test file. For example, after receiving the online test condition sent by the server, the client determines whether the file y exists in the path of c:// m/n/z. If the file y exists, determining that the current user meets the online test condition; and if the file y does not exist, determining that the current user does not meet the online test condition.
However, when different preset applications or different versions of the same preset application are authenticated by determining whether a test file exists for an online test, a plurality of test files exist locally at the client, even if the file names are the same, so that the version of the test file needs to be continuously determined, and the test file corresponding to the preset application can be correctly determined. The specific implementation mode is as follows:
case two: when the online test condition further includes that the version of the test file conforms to the preset version, in case one, after the test file locally exists in the client is judged, whether the version of the test file conforms to the preset version needs to be judged. If the version of the test file accords with the preset version, determining that the current user meets the online test condition; and if the version of the test file does not accord with the preset version, determining that the current user does not meet the online test condition.
The preset version is the version of the test file corresponding to the preset application. For example, after detecting that the client locally has 5 different versions of the test file y (e.g., the test file y1.0, the test file y2.0, the test file y3.0, the test file y4.0, and the test file y5.0), it is further necessary to continuously determine whether the test file with the same version as the preset version exists in the 5 test files y. If the preset version is 4.0, the test file y4.0 can be determined to be the same test file as the preset version, so that the current user can be determined to meet the online test condition.
Except that the current user can be authenticated by judging whether the test file exists or not, the authentication of the online test can be performed on the current user according to the grade of the user because the account grades of different users are different. The specific implementation manner is as follows:
case three: when the online test condition includes that the grade of the current user meets the preset grade condition, the specific implementation mode for judging whether the current user meets the online test condition is as follows:
and judging whether the grade of the current user meets a preset grade condition or not. If the grade of the current user meets the preset grade condition, determining that the current user meets the online test condition; and if the grade of the current user does not meet the preset grade condition, determining that the current user does not meet the online test condition.
In practical application, the server can obtain the grades of the users, so that the highest grade of the current user can be counted, a tester of a developer can set the grade of the user to be higher than the highest grade, and further the preset grade condition set by the server end can be higher than the highest grade. Therefore, when the online test condition comprises that the grade of the current user meets the preset grade condition, only a tester can be ensured to have the right to perform online test on the preset application.
Illustratively, if the highest level of all the current users obtained by the server is 35, and the level of the user of the developer is changed to 43 by a tester of the developer, the preset level condition may be set to be that the level of the current user is greater than 40, so that when the client determines whether the level of the current user meets the preset level condition, only the user with the level greater than 40 may be authorized to perform online testing on the preset application, and further, the tester may test the preset application and timely find a problem in the online running process of the preset application.
It should be noted that the preset level condition may be greater than one level value, may also be equal to one level value, may also be greater than one level value and smaller than another level value, and may also be in other level ranges, as long as a specific part of users can perform an online test on the preset application, so the condition range of the preset level condition is not limited in this embodiment.
Optionally, in order to enable the specified user to have the right to perform the online test on the preset application, a black and white list may be configured for the server, and a black and white list file is issued while the online test condition is issued to each client, so that the client may determine whether the current user has the right to perform the online test on the preset application according to the black and white list file. The specific implementation mode is as follows:
case four: when the online test condition includes that the current user is the preset white list user, whether the current user is the preset white list user needs to be judged. If the current user is a preset white list user, determining that the current user meets an online test condition; and if the current user is not the preset white list user, determining that the current user does not meet the online test condition.
In practical applications, the black-and-white list file may be a black-and-white list table, and the black-and-white list table includes a user name, a user rating, a black-and-white list identifier, and the like. The black and white list mark is used for marking whether the current user is a white list user or a black list user. If the current user is a white list user, the current user meets the online test condition; and if the current user is the blacklist user, the current user does not meet the online test condition.
For example, if table 1 is a black and white list table, the user name of the current user is abc, and the level is 10, the black and white list identifier corresponding to the current user may be looked up in the black and white list table. If "0" represents a blacklist user and "1" represents a white list user, the user abc is known by searching the black and white list identifier of abc, and the user abc is the white list user, so that the user abc can be determined to meet the online test condition.
TABLE 1
User name |
User's rank |
Black and white list identification |
… |
aaa |
14 |
0 |
… |
bbb |
20 |
0 |
… |
ccc |
5 |
1 |
… |
abc |
10 |
1 |
… |
… |
… |
… |
… |
In practical applications, an application generally relates to one or more associated applications, and all functions of the application can be completed only when the application and the associated applications exist, so that when performing online testing, it is also necessary to ensure that the application associated with a preset application exists locally, and all functions of the preset application can be tested online. Therefore, the specific implementation manner for determining whether the current user satisfies the online test condition further includes the following cases:
case five: when the online test condition includes that the preset associated application is installed locally, it is required to determine whether the preset associated application is installed locally. If the preset associated application is installed, determining that the current user meets the online test condition; and if the preset associated application is not installed, determining that the current user does not meet the online test condition.
Illustratively, if the preset application has a function of getting gift certificates, the function is implemented by entering a preset associated application (such as a game platform application) to complete downloading and experience the task of game 1 to get the gift certificates. Therefore, the preset associated application needs to be installed, so that the preset application can be tested on line comprehensively.
It should be noted that, when the on-line test condition includes a plurality of conditions, the specific determination order of the plurality of conditions is not limited in this embodiment. However, only if all conditions are satisfied can it be determined that the current user has the right to perform an online test on the preset application. Therefore, in order to improve the judging efficiency, as long as the current condition is not met, the current user is determined not to meet the online test condition, and the next condition is not judged.
For example, if the online test condition includes 3 conditions, and the 3 conditions are that the client has a test file locally (condition 1), the level of the current user meets the preset level condition (condition 2), and the current user is a preset white list user (condition 3), it may be sequentially determined whether the current user meets the conditions 1, 2, and 3. Only if 3 conditions are met can it be determined that the current user is authorized to perform an online test on the preset application. And if the current user is judged not to meet the condition 1, determining that the current user does not meet the online test condition, and not judging the conditions 2 and 3.
In addition, after a period of testing, the tester knows that there is no problem in the online running process of the preset application or has solved the found problem, and then can delete the online testing condition configured at the server side, so that the preset application is visible to all users, and all users can experience the preset application.
Further, as an implementation of the foregoing embodiments, an embodiment of the present invention further provides an apparatus for online testing, as shown in fig. 2, the apparatus includes: a receiving unit 21, a judging unit 22, a display unit 23, and a hiding unit 24. Wherein,
the receiving unit 21 is configured to receive an online test condition issued by the server after sending the login request to the server, where the online test condition is used to determine whether the current user has the right to perform online test on the preset application;
a judging unit 22, configured to judge whether the current user meets the online test condition received by the receiving unit 21;
a display unit 23, configured to display the preset application when the determination result of the determining unit 22 is that the current user meets the online test condition, so that the current user performs an online test on the preset application;
and a hiding unit 24, configured to hide the preset application when the judging unit 22 judges that the current user does not satisfy the online test condition, so that the current user cannot perform the online test on the preset application.
Further, the on-line test condition received by the receiving unit 21 is one or a combination of any more of the following conditions:
the method comprises the steps that a test file exists locally at a client, the version of the test file accords with a preset version, the grade of a current user accords with a preset grade condition, the current user is a preset white list user, and a preset associated application is installed locally.
Further, as shown in fig. 3, the determining unit 22 includes:
the detecting module 221 is configured to detect whether the test file locally exists at the client when the online test condition includes that the test file locally exists at the client;
the first determining module 222 is configured to determine that the current user meets the online test condition when the detection result of the detecting module 221 is that the test file exists, and determine that the current user does not meet the online test condition when the detection result of the detecting module 221 is that the test file does not exist.
Further, as shown in fig. 4, the determining unit 22 includes:
the first judging module 223 is configured to judge whether the version of the test file conforms to the preset version when the online test condition further includes that the version of the test file conforms to the preset version and the detection result of the detecting module 221 is that the test file exists;
the first determining module 222 is further configured to determine that the current user meets the online test condition when the first determining module 223 determines that the version of the test file meets the preset version.
Further, as shown in fig. 5, the judging unit 22 includes:
a second determining module 224, configured to determine whether the level of the current user meets the preset level condition when the online test condition includes that the level of the current user meets the preset level condition;
a second determining module 225, configured to determine that the current user meets the online test condition when the second determining module 224 determines that the level of the current user meets the preset level condition, and determine that the current user does not meet the online test condition when the second determining module 224 determines that the level of the current user does not meet the preset level condition.
Further, as shown in fig. 6, the judging unit 22 includes:
a third determining module 226, configured to determine whether the current user is a preset white list user when the online test condition includes that the current user is the preset white list user;
a third determining module 227, configured to determine that the current user satisfies the online test condition when the third determining module 226 determines that the current user is the preset white list user, and determine that the current user does not satisfy the online test condition when the third determining module 226 determines that the current user is not the preset white list user.
Further, as shown in fig. 7, the judging unit 22 includes:
a fourth determining module 228, configured to determine whether the preset associated application is installed locally or not when the online test condition includes that the preset associated application is installed locally;
a fourth determining module 229, configured to determine that the current user meets the online test condition when the fourth determining module 228 determines that the preset associated application is installed, and determine that the current user does not meet the online test condition when the fourth determining module 228 determines that the preset associated application is not installed.
Further, as shown in fig. 8, the hiding unit 24 includes:
the adding module 241 is configured to add a hidden identifier to a preset application when the current user does not meet the online test condition;
a sending module 242, configured to send the preset application information to which the hidden identifier added by the adding module 241 is added to the page, so that the page hides the preset application according to the hidden identifier.
The online testing device provided by the embodiment of the invention can receive the online testing condition issued by the server after sending the login request to the server, and determine whether to display the preset application by judging whether the current user meets the online testing condition, so that the current user has the right to perform online testing on the preset application only under the condition that the current user is visible to the preset application. Compared with the prior art that the preset application is directly operated online, the method and the device can only display the preset application to the client of the user meeting the online test condition after the preset application is operated online, so that the preset application can be tested online only by the user who is authorized to see the preset application, the problems generated in the online operation process can be timely found and solved, and the preset application can be further ensured to be normally operated online when being visible to all users.
The embodiment of the invention discloses:
a1, a method for on-line testing, the method comprising:
after a login request is sent to a server, receiving an online test condition sent by the server, wherein the online test condition is used for judging whether a current user has the right to perform online test on a preset application;
judging whether the current user meets the online test condition or not;
if the current user meets the online test condition, displaying the preset application so that the current user can perform online test on the preset application;
and if the current user does not meet the online test condition, hiding the preset application so that the current user cannot perform online test on the preset application.
A2, the method of A1, wherein the on-line test conditions are one or a combination of any more of the following conditions:
the method comprises the steps that a test file exists locally at a client, the version of the test file accords with a preset version, the grade of a current user accords with a preset grade condition, the current user is a preset white list user, and a preset associated application is installed locally.
A3, according to the method of a2, if the online test condition includes that the client locally has the test file, the determining whether the current user satisfies the online test condition includes:
detecting whether the test file exists locally at the client;
if the test file exists, determining that the current user meets the online test condition;
and if the test file does not exist, determining that the current user does not meet the online test condition.
A4, according to the method of A3, if the online test condition further includes that the version of the test file conforms to the preset version, when the test file exists, the method further includes:
judging whether the version of the test file conforms to the preset version or not;
and if the version of the test file conforms to the preset version, determining that the current user meets the online test condition.
A5, according to the method in a2, if the online test condition includes that the level of the current user meets the preset level condition, the determining whether the current user meets the online test condition includes:
judging whether the grade of the current user meets the preset grade condition or not;
if the grade of the current user meets the preset grade condition, determining that the current user meets the on-line test condition;
and if the grade of the current user does not meet the preset grade condition, determining that the current user does not meet the on-line test condition.
A6, according to the method in a2, if the online test condition includes that the current user is the preset white list user, the determining whether the current user meets the online test condition includes:
judging whether the current user is the preset white list user or not;
if the current user is the preset white list user, determining that the current user meets the online test condition;
and if the current user is not the preset white list user, determining that the current user does not meet the online test condition.
A7, according to the method in a2, if the online test condition includes that the preset associated application is locally installed, the determining whether the current user meets the online test condition includes:
judging whether the preset associated application is installed locally;
if the preset associated application is installed, determining that the current user meets the online test condition;
and if the preset associated application is not installed, determining that the current user does not meet the online test condition.
A8, the hiding the preset application according to the method of A1, comprising:
adding a hidden identifier to the preset application;
and sending the preset application information added with the hidden identifier to a page so that the page can hide the preset application according to the hidden identifier.
B9, an apparatus for in-line testing, the apparatus comprising:
the device comprises a receiving unit and a processing unit, wherein the receiving unit is used for receiving an online test condition issued by a server after a login request is sent to the server, and the online test condition is used for judging whether a current user has the right to perform online test on a preset application;
a judging unit, configured to judge whether the current user meets the online test condition received by the receiving unit;
the display unit is used for displaying the preset application when the judgment result of the judgment unit shows that the current user meets the online test condition so that the current user can carry out online test on the preset application;
and the hiding unit is used for hiding the preset application when the judgment result of the judging unit is that the current user does not meet the online test condition, so that the current user can not carry out online test on the preset application.
B10, the device according to B9, wherein the on-line test condition received by the receiving unit is one or a combination of any more of the following conditions:
the method comprises the steps that a test file exists locally at a client, the version of the test file accords with a preset version, the grade of a current user accords with a preset grade condition, the current user is a preset white list user, and a preset associated application is installed locally.
B11, the device according to B10, the judging unit includes:
the detection module is used for detecting whether the test file exists locally at the client side or not when the online test condition comprises that the test file exists locally at the client side;
the first determining module is configured to determine that the current user satisfies the online test condition when the detection result of the detecting module indicates that the test file exists, and determine that the current user does not satisfy the online test condition when the detection result of the detecting module indicates that the test file does not exist.
B12, the device according to B11, the judging unit further includes:
the first judgment module is used for judging whether the version of the test file conforms to the preset version or not when the online test condition further comprises that the version of the test file conforms to the preset version and the detection result of the detection module indicates that the test file exists;
the first determining module is further configured to determine that the current user meets the online test condition when the first determining module determines that the version of the test file meets the preset version.
B13, the device according to B10, the judging unit includes:
the second judging module is used for judging whether the grade of the current user meets the preset grade condition or not when the on-line test condition comprises that the grade of the current user meets the preset grade condition;
a second determining module, configured to determine that the current user meets the online test condition when the second determining module determines that the level of the current user meets the preset level condition, and determine that the current user does not meet the online test condition when the second determining module determines that the level of the current user does not meet the preset level condition.
B14, the device according to B10, the judging unit includes:
a third judging module, configured to, when the online test condition includes that the current user is the preset white list user, judge whether the current user is the preset white list user;
a third determining module, configured to determine that the current user meets the online test condition when the third determining module determines that the current user is the preset white list user, and determine that the current user does not meet the online test condition when the third determining module determines that the current user is not the preset white list user.
B15, the device according to B10, the judging unit includes:
the fourth judging module is used for judging whether the preset associated application is installed locally or not when the online testing condition comprises that the preset associated application is installed locally;
a fourth determining module, configured to determine that the current user meets the online test condition when the fourth determining module determines that the preset associated application is installed, and determine that the current user does not meet the online test condition when the fourth determining module determines that the preset associated application is not installed.
B16, the apparatus of B9, the hidden unit comprising:
the adding module is used for adding a hidden identifier to the preset application when the current user does not meet the online test condition;
and the sending module is used for sending the preset application information added with the hidden identifier added by the adding module to a page so that the page can hide the preset application according to the hidden identifier.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method, device, server and system for status detection of a walk-on electronic anti-loss device according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.