Function enabling method, device, and electronic device

By selecting test terminals on mobile terminals, obtaining performance data and establishing a whitelist, the problem of functional crashes or lags caused by device performance differences is solved, and the stable operation of functions on terminals that meet performance standards is achieved.

CN114816978BActive Publication Date: 2025-07-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110129669.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-29
Publication Date
2025-07-18
Estimated Expiration
2041-01-29

AI Technical Summary

Technical Problem

When enabling new features on mobile terminal devices, there are problems with APP crashes or stutters caused by device performance differences.

Method used

By selecting the test terminal, sending function start commands to enable and running the first function, obtaining performance data, adding terminal type information to the whitelist according to preset standards, and sending the whitelist to the terminal to determine whether the function is enabled.

Benefits of technology

Solve the problem of crashes or lags caused by running functions on all terminals to ensure that the functions run stably on terminals with performance standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816978B_ABST
    Figure CN114816978B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a method, apparatus, electronic device, and computer-readable storage medium for enabling a first function on a terminal. The method for enabling the first function on the terminal includes: selecting a test terminal; sending a function start instruction, where the function start instruction instructs the test terminal to enable and run the first function; obtaining performance data of the test terminal during the running of the first function; adding the type information of the test terminal to the whitelist corresponding to the first function when the performance data reaches a preset standard; and sending the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist. The above method solves the problem of crashes or lags caused by running functions on all terminals by establishing a whitelist corresponding to the function and type information and enabling the function in the terminal through the whitelist.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of testing, and in particular, to a method, apparatus, electronic device, and computer-readable storage medium for enabling a first function on a terminal. Background Art

[0002] With the continuous development of computer technology, the continuous progress of digital information and the accelerated update of mobile terminal devices have been triggered. With the wide popularity of mobile terminal devices such as tablet computers, mobile phones, and e-readers, various APPs (Applications) are usually installed on current mobile terminals. Among them, the APPs have many functions, and new functions can be added during subsequent upgrades.

[0003] However, the devices on which APPs are installed are diverse. When new functions of APPs are developed, these new functions can often run normally on some devices, but cannot run normally on some devices; if the functions are enabled on all devices, the APP may crash or freeze due to the performance of some devices. Summary of the Invention

[0004] This Summary of the Invention section is provided to introduce concepts in a brief form, which will be described in detail in the subsequent Detailed Description section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for enabling a first function on a terminal, including:

[0006] Selecting a test terminal;

[0007] Sending a function start instruction, where the function start instruction instructs the test terminal to enable and run the first function;

[0008] Obtaining performance data of the test terminal during the running of the first function;

[0009] When the performance data reaches a preset standard, adding the type information of the test terminal to a whitelist corresponding to the first function;

[0010] Sending the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist.

[0011] In a second aspect, an embodiment of the present disclosure provides a device for enabling a first function on a terminal, including:

[0012] A selection module, configured to select a test terminal;

[0013] A startup module for sending a function startup instruction, where the function startup instruction instructs the test terminal to enable and run a first function;

[0014] A performance data acquisition module for acquiring performance data of the test terminal during the running of the first function;

[0015] A whitelist module for adding the type information of the test terminal to the whitelist corresponding to the first function when the performance data reaches a preset standard;

[0016] A sending module for sending the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist.

[0017] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and,

[0018] A memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods in the foregoing first aspect.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute any one of the methods in the foregoing first aspect.

[0020] Embodiments of the present disclosure disclose a method, apparatus, electronic device, and computer-readable storage medium for enabling a first function on a terminal. The method for enabling the first function on the terminal includes: selecting a test terminal; sending a function startup instruction, where the function startup instruction instructs the test terminal to enable and run the first function; acquiring performance data of the test terminal during the running of the first function; adding the type information of the test terminal to the whitelist corresponding to the first function when the performance data reaches a preset standard; and sending the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist. By establishing a whitelist corresponding to the function and type information and enabling the function in the terminal through the whitelist, the above method solves the problem of crashes or lags caused by running the function on all terminals.

[0021] The above description is only an overview of the technical solutions of the present disclosure. In order to understand the technical means of the present disclosure more clearly, it can be implemented according to the content of the specification. In order to make the above and other purposes, features, and advantages of the present disclosure more obvious and understandable, the following preferred embodiments are specifically given and described in detail in conjunction with the drawings as follows. Description of the Drawings

[0022] In conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and components are not necessarily drawn to scale.

[0023] Figure 1 Schematic flowchart of a method for enabling a first function on a terminal provided by an embodiment of the present disclosure;

[0024] Figure 2 Further schematic flowchart of a method for enabling a first function on a terminal provided by an embodiment of the present disclosure;

[0025] Figure 3 Schematic diagram of an application scenario example of a method for enabling a first function on a terminal provided by an embodiment of the present disclosure;

[0026] Figure 4 Schematic structural diagram of an embodiment of a device for enabling a first function on a terminal provided by an embodiment of the present disclosure;

[0027] Figure 5 Schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure. Detailed Description

[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0029] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit steps shown. The scope of the present disclosure is not limited in this regard.

[0030] As used herein, the term "comprising" and its variations are open-ended, i.e., "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0031] It should be noted that the concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0032] It should be noted that the modification of "one" and "multiple" mentioned in this disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0033] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0034] Figure 1 The flowchart of the method for enabling the first function on a terminal provided for the embodiments of this disclosure. The method for enabling the first function on a terminal provided in this embodiment can be executed by a device for enabling the first function on a terminal. The device for enabling the first function on a terminal can be implemented as software, or as a combination of software and hardware. The device for enabling the first function on a terminal can be integrally provided in a certain device in the system for enabling the first function on a terminal, such as a server for enabling the first function on a terminal or a terminal device for enabling the first function on a terminal. As Figure 1 shown, the method includes the following steps:

[0035] Step S101, select a test terminal.

[0036] Wherein, the test terminal is used to run the function to be tested.

[0037] Optionally, step S101 includes:

[0038] Randomly select a preset number of test terminals from the set of test terminals.

[0039] Among them, the set of test terminals includes multiple different types of test terminals, and there can be multiple test terminals of each type; or, the set of test terminals includes multiple test terminals of the same type, and the types of terminals corresponding to different sets of test terminals are different. Among them, the types of the test terminals include one or more of the type of CPU, the type of GPU, the type of operating system, the type of memory, the device model, and so on. Optionally, the preset quantity is greater than or equal to the quantity of the types of the test terminals, and randomly selecting a preset quantity of test terminals includes randomly selecting a preset quantity of test terminals from the set of test terminals so that each type has a test terminal selected. Specifically, when randomly selecting a preset quantity of test terminals, a selection criterion can be set, such as at least one test terminal of each type, or at least including a preset number of types of terminals, to ensure that when randomly selecting a preset quantity of test terminals, the types of terminals to be tested can be covered.

[0040] Optionally, data for implementing the function to be tested is pre-installed in the test terminal. Such as the code of the function to be tested or an APP with the function to be tested, etc.

[0041] Return Figure 1 , the method for enabling a first function on a terminal in the embodiments of the present disclosure further includes step S102 of sending a function start instruction, and the function start instruction instructs the test terminal to enable and run the first function.

[0042] Optionally, data for implementing the first function is pre-installed in the test terminal. In this step, a function start instruction is sent to the test terminal to be tested, and the function start instruction includes an enable switch component or an enable signal of the first function so that the test terminal can enable and run the first function. Exemplarily, the enable switch component is an enable button, and the enable button is displayed in the test terminal so that the user of the test terminal can enable and run the first function by triggering the enable button; or directly send an enable signal to the test terminal so that the test terminal can enable and run the first function.

[0043] Optionally, when the test terminal enables and runs the first function, the terminal can perform the following steps:

[0044] The test terminal obtains the data corresponding to the first function;

[0045] Run the first function according to the data.

[0046] In this alternative embodiment, the operation of the first function requires corresponding data, such as the resources needed to run the first function. Taking the big-eye and face-thinning special effect as an example of the first function, the data corresponding to the operation of the first function includes resources such as the filters and stickers used in the big-eye and face-thinning special effect. Then, the test terminal first pulls the filters, stickers, etc. used in the big-eye and face-thinning special effect from the server, and then uses these resources such as filters and stickers to run the big-eye and face-thinning special effect.

[0047] Return Figure 1 , the method for enabling the first function on the terminal in the embodiments of the present disclosure further includes step S103 of obtaining performance data of the test terminal during the operation of the first function.

[0048] Optionally, the performance data includes one or more of: CPU occupancy rate, memory usage rate, frame rate, and GPU occupancy rate. The above performance data can be obtained by calling the interface of the test terminal, which will not be elaborated here.

[0049] Optionally, the performance data includes one or more of: the increase rate of CPU occupancy rate, the increase rate of memory usage rate, the increase rate of frame rate, and the increase rate of GPU occupancy rate. In order to make the performance data more accurate, in this alternative embodiment, the increase rate performance data is used to measure the performance data of the test terminal during the operation of the first function. In the case of using the increase rate performance data, step S103 includes:

[0050] Step S201 of obtaining the first performance parameter of the test terminal before running the first function;

[0051] Step S202 of obtaining the second performance parameter of the test terminal during the operation of the first function;

[0052] Step S203 of determining the performance data of the test terminal during the operation of the first function according to the first performance parameter and the second performance parameter.

[0053] In the above steps, the first performance parameter includes one or more of the CPU occupancy rate, memory usage rate, frame rate, and GPU occupancy rate of the test terminal before running the first function; the second performance parameter includes one or more of the CPU occupancy rate, memory usage rate, frame rate, and GPU occupancy rate of the test terminal during the running of the first function; it can be understood that the first performance parameter and the second performance parameter are of the same type of performance parameter. Optionally, after obtaining the first performance parameter and the second performance parameter, the performance data of the test terminal during the running of the first function is obtained by the difference between the second performance parameter and the first performance parameter. At this time, the performance data is the performance increase during the running of the first function. Since this performance increase is caused by running the first function, the load condition of the test terminal running the first function can be measured more accurately.

[0054] Optionally, in order to reduce the deviation of single - time performance data, step S103 includes:

[0055] Obtain multiple first performance data obtained by the test terminal running the first function multiple times;

[0056] Calculate the average value of the multiple first performance data as the performance data;

[0057] Alternatively, the average value of the first performance data after removing the maximum value and the minimum value in the first performance data can be calculated as the performance data.

[0058] That is, calculate the average value of the multiple first performance data obtained by running the first function multiple times as the determined performance data. This can reduce the deviation of single - time performance data and make the performance data closer to the true performance of the test terminal. Alternatively, the average value of the first performance data after removing the maximum value and the minimum value in the first performance data can be calculated as the performance data.

[0059] Optionally, after step S103, it further includes:

[0060] Receive information related to the first function and the performance data.

[0061] The information related to the first function includes one or more of product information, device information, and first function information. Among them, the product includes an APP with the first function, etc. The product information includes: the ID of the APP, the name of the first function data packet; the device information includes the type information of the above - mentioned test terminal, such as one or more of the type of CPU, the type of GPU, the type of operating system, the type of memory, the device model, etc.; the first function information includes the name of the first function or the ID of the function.

[0062] Return Figure 1 , the method for enabling the first function on the terminal in the embodiments of the present disclosure further includes step S104. When the performance data reaches the preset standard, add the type information of the test terminal to the whitelist of the first function.

[0063] Wherein the performance data reaching the preset standard includes: the performance data is not greater than the first performance threshold corresponding to the first function. Among them, for different performance data, there are corresponding different first performance thresholds, such as the CPU occupancy rate not being greater than the first CPU occupancy rate threshold, the memory usage rate not being greater than the first memory usage rate threshold, etc., which will not be elaborated here one by one. When the performance data is not greater than the preset standard, it means that the test terminal can run the first function smoothly, and then add the type information of the test terminal to the whitelist of the first function. Optionally, the type information of the test terminal includes the type information of the above devices, that is, it means that the first function can be enabled in the terminal devices corresponding to the type information of the above devices.

[0064] Further, the performance data reaching the preset standard further includes:

[0065] The number of performance data corresponding to the type information of the test terminal is not less than the first quantity threshold corresponding to the first function.

[0066] Among them, the first quantity threshold represents the minimum number of performance data obtained. Only when the number of performance data obtained is not less than the first quantity threshold, the type information of the test terminal will be added to the whitelist of the first function. Optionally, the server receives the performance data. When the number of performance data reaching the preset standard is not less than the first quantity threshold, add the type information of the test terminal to the whitelist of the first function. The first quantity threshold can reduce the influence of the deviation of the performance data of a single test terminal. When the performance data of the first quantity threshold of the same type of test terminals all reach the preset standard, it means that the test terminals of this type can run the first function smoothly. Or, after obtaining no less than the first quantity threshold of performance data, then judge whether the performance data meets the preset standard, which will not be elaborated here.

[0067] Return Figure 1 , the method for enabling the first function on the terminal in the embodiments of the present disclosure further includes step S105, sending the whitelist to the first terminal so that the first terminal determines whether to enable the first function according to the whitelist.

[0068] Optionally, step S105 includes:

[0069] Send the whitelist to the first terminal; wherein, the first terminal receives and stores the whitelist, and obtains the identifier of the first function and the corresponding type information from the whitelist; wherein, when the first terminal determines that the type of the first terminal is consistent with the type information in the whitelist, enable the first function.

[0070] In this alternative embodiment, send the whitelist of the first function to the first terminal; then the first terminal obtains the identifier of the first function and the corresponding type information from the whitelist, and the first terminal compares the type information with the type of the first terminal. When the two are the same or corresponding, enable the first function in the first terminal according to the identifier of the first function. In this alternative embodiment, send the whitelist to all terminals, and determine on the terminal whether to enable the first function.

[0071] Optionally, after the step S104, it further includes:

[0072] Obtain the target terminal corresponding to the type information in the whitelist;

[0073] Send the enabling instruction of the first function to the target terminal so as to enable the first function in the target terminal.

[0074] In this alternative embodiment, store the corresponding relationship between the type information and the target terminal in a database. When obtaining the target terminal, query all target terminals with the type information in the whitelist as an index; then send the enabling instruction of the first function to the target terminal. In this alternative embodiment, first determine the target terminal that needs to enable the first function, and then send the enabling instruction. The step of determining the target terminal can be executed in the server or the terminal that executes the method of enabling the first function on the terminal.

[0075] Figure 3 This is an application scenario example of the method for enabling the first function on the terminal in the embodiments of the present disclosure. Such as Figure 3As shown, this application scenario example includes a test terminal and a server. The server randomly selects multiple test terminals and sends the enable switch of the first function to the selected test terminals. After obtaining the enable switch, the test terminal enables the switch to enable the first function on the test terminal. When the first function requires resources, it first pulls the resources and then runs the first function test script. When the function does not require resources, it directly runs the first function test script. Then the test terminal starts to run the first function, obtains the performance data in the test terminal, and reports the performance data to the server. When the server obtains enough performance data, the server further determines whether the performance data meets the standard. If it meets the standard, the model of the test terminal is added to the white list of the first function models, and the white list is sent to the terminal. For the terminals of the models in the white list, the function is enabled.

[0076] An embodiment of the present disclosure discloses a method for enabling a first function on a terminal. The method for enabling the first function on the terminal includes: selecting a test terminal; sending a function start instruction, where the function start instruction instructs the test terminal to enable and run the first function; obtaining performance data of the test terminal during the running of the first function; adding the type information of the test terminal to the white list corresponding to the first function when the performance data reaches a preset standard; and sending the white list to the first terminal so that the first terminal determines whether to enable the first function according to the white list. The above method solves the problem of crashes or lags caused by running functions on all terminals by establishing a white list corresponding to the function and type information and enabling the first function in the terminal through the white list.

[0077] In the above text, although the steps in the above method embodiments are described in the above order, those skilled in the art should clearly understand that the steps in the embodiments of the present disclosure do not necessarily need to be executed in the above order. They can also be executed in reverse order, in parallel, in cross, or other orders. Moreover, based on the above steps, those skilled in the art can also add other steps. These obvious variations or equivalent replacement methods should also be included in the protection scope of the present disclosure and will not be elaborated here.

[0078] Figure 4 It is a schematic structural diagram of an embodiment of a device for enabling a first function on a terminal provided by an embodiment of the present disclosure. As Figure 4 shown, the device 400 includes: a selection module 401, a start module 402, a performance data acquisition module 403, a white list module 404, and a sending module 405. Among them,

[0079] The selection module 401 is used to select a test terminal;

[0080] The startup module 402 is used to send a function startup instruction, and the function startup instruction instructs the test terminal to enable and run the first function;

[0081] The performance data acquisition module 403 is used to acquire the performance data of the test terminal during the operation of the first function;

[0082] The whitelist module 404 is used to add the type information of the test terminal to the whitelist corresponding to the first function when the performance data reaches a preset standard;

[0083] The sending module 405 is used to send the whitelist to the first terminal so that the first terminal determines whether to enable the first function according to the whitelist.

[0084] Furthermore, the performance data acquisition module 403 is further used to:

[0085] Acquire the first performance parameter of the test terminal before running the first function;

[0086] Acquire the second performance parameter of the test terminal during the operation of the first function;

[0087] Determine the performance data of the test terminal during the operation of the first function according to the first performance parameter and the second performance parameter.

[0088] Furthermore, the performance data reaching the preset standard includes:

[0089] The performance data is not greater than the first performance threshold corresponding to the first function.

[0090] Furthermore, the performance data reaching the preset standard also includes:

[0091] The number of performance data corresponding to the type information of the test terminal is not less than the first quantity threshold corresponding to the first function.

[0092] Furthermore, the sending module 405 is further used to:

[0093] Send the whitelist to the first terminal; wherein, the first terminal receives and stores the whitelist, and obtains the identifier of the first function and the corresponding type information from the whitelist;

[0094] Wherein, when the first terminal determines that the type of the first terminal is consistent with the type information in the whitelist, the first function is enabled.

[0095] Furthermore, the selection module 401 is further used to:

[0096] Randomly select a preset number of test terminals from the set of test terminals.

[0097] Further, the performance data acquisition module 403 is further configured to:

[0098] Obtain multiple first performance data obtained by the test terminals running the first function multiple times;

[0099] Calculate the average value of the multiple first performance data as the performance data; or, when there are three first performance data, use the first performance data after removing the maximum value and the minimum value among the three first performance data as the performance data.

[0100] Figure 4 The shown device can execute Figure 1 - Figure 2 The method of the shown embodiment. For parts not described in detail in this embodiment, reference can be made to the relevant descriptions of Figure 1 - Figure 2 The shown embodiment. For the execution process and technical effects of this technical solution, refer to the descriptions in Figure 1 - Figure 2 The shown embodiment and will not be elaborated here.

[0101] Next, refer to Figure 5 , which shows a schematic structural diagram of an electronic device (such as a terminal device or a server) 500 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The shown electronic device is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0102] As Figure 5 shown, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may execute the methods shown in the above flowcharts with various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 502 or the programs loaded from the storage device 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.

[0103] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 5 the electronic device 500 with various devices is shown, it should be understood that it is not required to implement or include all the shown devices. Instead, more or fewer devices may be implemented or included.

[0104] According to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for performing the methods shown in the above flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the methods of the embodiments of the present disclosure are performed.

[0105] It should be noted that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, apparatus, or device to execute the method shown in the above flowchart. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0106] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0107] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.

[0108] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to: execute the method for enabling the first function on the terminal described in any of the above embodiments.

[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or alternatively, may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0111] The units described in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself.

[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and the like.

[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0114] The foregoing description is only a preferred embodiment of the present disclosure and an illustration of the technical principles applied. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

Claims

1. A method for enabling a first function on a terminal, characterized in that, Including: Select a test terminal; Send a function start instruction, the function start instruction instructing the test terminal to enable and run a first function; Obtain performance data of the test terminal during the running of the first function; The performance data of the test terminal during the running of the first function is determined according to a first performance parameter and a second performance parameter; The first performance parameter is obtained by the test terminal before running the first function; The second performance parameter is obtained by the test terminal during the running of the first function; When the performance data reaches a preset standard, add the type information of the test terminal to the whitelist corresponding to the first function; Send the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist; Wherein, the performance data reaching the preset standard includes: The performance data is not greater than a first performance threshold corresponding to the first function; and The number of performance data corresponding to the type information of the test terminal is not less than a first quantity threshold corresponding to the first function.

2. The method according to claim 1, wherein The sending the whitelist to the first terminal so that the first terminal determines whether to enable the first function according to the whitelist includes: Send the whitelist to the first terminal; wherein, the first terminal receives and stores the whitelist, and obtains the identifier of the first function and the corresponding type information from the whitelist; Wherein, when the first terminal determines that the type of the first terminal is consistent with the type information in the whitelist, enable the first function.

3. The method according to claim 1, characterized in that The selecting the test terminal includes: Randomly select a preset number of test terminals from a set of test terminals.

4. The method according to claim 1, wherein The obtaining the performance data of the test terminal during the running of the first function includes: Obtain multiple first performance data obtained by the test terminal running the first function multiple times; Calculate the average value of the multiple first performance data as the performance data; or, calculate the average value of the first performance data after removing the maximum value and the minimum value in the first performance data as the performance data.

5. A device for enabling a first function on a terminal, characterized in that, Including: A selection module for selecting a test terminal; A start module for sending a function start instruction, the function start instruction instructing the test terminal to enable and run a first function; A performance data acquisition module for obtaining performance data of the test terminal during the running of the first function; The performance data of the test terminal during the running of the first function is determined according to a first performance parameter and a second performance parameter; The first performance parameter is obtained by the test terminal before running the first function; The second performance parameter is obtained by the test terminal during the running of the first function; A whitelist module for adding the type information of the test terminal to the whitelist corresponding to the first function when the performance data reaches a preset standard; A sending module for sending the whitelist to a first terminal so that the first terminal determines whether to enable the first function according to the whitelist; Wherein, the whitelist module is further configured to: The performance data is not greater than the first performance threshold corresponding to the first function; and The quantity of the performance data corresponding to the type information of the test terminal is not less than the first quantity threshold corresponding to the first function.

6. An electronic device, comprising: a memory for storing computer-readable instructions; and a processor for running the computer-readable instructions, so that when the processor runs, the method according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium for storing computer-readable instructions, which when executed by a computer, cause the computer to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Terminal artificial intelligence performance benchmark test method and device

    CN110515811A

  • Mobile APP power consumption test method, device and system, acquisition terminal and test terminal

    CN112148559A