CN108228437B - Method and device for improving evaluation accuracy, electronic device and storage medium - Google Patents

Method and device for improving evaluation accuracy, electronic device and storage medium Download PDF

Info

Publication number
CN108228437B
CN108228437B CN201711484209.XA CN201711484209A CN108228437B CN 108228437 B CN108228437 B CN 108228437B CN 201711484209 A CN201711484209 A CN 201711484209A CN 108228437 B CN108228437 B CN 108228437B
Authority
CN
China
Prior art keywords
database
application program
full mode
mode
evaluating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711484209.XA
Other languages
Chinese (zh)
Other versions
CN108228437A (en
Inventor
莫斯挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711484209.XA priority Critical patent/CN108228437B/en
Publication of CN108228437A publication Critical patent/CN108228437A/en
Application granted granted Critical
Publication of CN108228437B publication Critical patent/CN108228437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3428Benchmarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method and a device for improving evaluation accuracy, an electronic device and a storage medium, wherein the method comprises the following steps: when the database is in a FULL mode, monitoring whether an application program accessing the database exists, if so, determining whether the application program is the application program for evaluating the database, and if so, switching the database from the FULL mode to a non-FULL mode. Compared with the prior art, in the embodiment of the invention, when the database is in the FULL mode, if it is monitored that the application program for evaluating the database accesses the database, the database is switched from the FULL mode to the non-FULL mode, so that the database is in the best state, the evaluation obtained by the application program through evaluation can accurately reflect the best performance of the database, and the evaluation accuracy is effectively improved.

Description

Method and device for improving evaluation accuracy, electronic device and storage medium
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method and an apparatus for improving evaluation accuracy, an electronic device, and a storage medium.
Background
With the rapid development of electronic devices such as mobile terminals, applications for evaluating the performance of the electronic devices are increasing, and when the electronic devices need to be evaluated, only the relevant evaluation applications need to be installed in the electronic devices and then run. For example, AndroBench is used as an evaluation application program, which can evaluate the storage performance of an electronic device.
At present, in order to ensure the stability of the database in the electronic device, each manufacturer properly reduces the performance of the database in daily use, so that when an evaluation application program is used to evaluate the performance of the database in the electronic device, the obtained score is often lower than the score corresponding to the actual performance of the database, that is, the accuracy of the existing database evaluation mode is relatively low.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method, a device, an electronic device and a storage medium for improving the evaluation accuracy, and can solve the technical problem that the accuracy of a database evaluation mode in the prior art is low.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for improving evaluation accuracy, where the method includes:
monitoring whether an application program accessing the database exists or not when the database is in a FULL mode;
if the application program accessing the database is monitored, determining whether the application program is an application program for evaluating the database;
and if the application program is used for evaluating the database, switching the database from the FULL mode to the non-FULL mode.
Optionally, the step of determining whether the application is an application for evaluating a database includes:
determining a type of the application;
searching a preset type set of an application program for evaluating a database, and determining whether the type of the application program belongs to the type set;
and if the type of the application program belongs to the type set, determining the application program as the application program for evaluating the database.
Optionally, the step of switching the database from FULL mode to non-FULL mode includes:
determining the amount of data stored in the database;
and determining the synchronous mode after the database is switched according to the data volume.
Optionally, the step of determining the synchronization mode after the database is switched according to the data volume includes:
if the data volume is larger than a preset threshold value, switching the database from the FULL mode to an OFF mode;
and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
Optionally, the step of switching the database from the FULL mode to the non-FULL mode further includes:
monitoring the access process of the application program to the database;
and when the access process is monitored to be finished, switching the database from the non-FULL mode back to the FULL mode.
In order to achieve the above object, a second aspect of the embodiments of the present invention provides an apparatus for improving evaluation accuracy, the apparatus including:
the monitoring module is used for monitoring whether an application program accessing the database exists or not when the database is in a FULL mode;
the determining module is used for determining whether the application program is the application program for evaluating the database if the application program accessing the database is monitored;
and the switching module is used for switching the database from the FULL mode to the non-FULL mode if the application program is the application program used for evaluating the database.
Optionally, the determining module includes:
a first determining module for determining the type of the application program;
the searching module is used for searching a preset type set of the application program for evaluating the database and determining whether the type of the application program belongs to the type set;
and the second determining module is used for determining the application program as the application program for evaluating the database if the type of the application program belongs to the type set.
Optionally, the switching module is configured to:
and determining the data volume stored in the database, and determining the synchronization mode after the database is switched according to the data volume.
Optionally, the switching module is configured to:
if the data volume is larger than a preset threshold value, switching the database from the FULL mode to an OFF mode;
and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
Optionally, the apparatus further comprises:
the process monitoring module is used for monitoring the access process of the database by the application program after the database is switched from the FULL mode to the non-FULL mode;
and the recovery module is used for switching the database from the non-FULL mode back to the FULL mode when the access process is monitored to be finished.
In order to achieve the above object, a third aspect of embodiments of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for improving the evaluation accuracy of the first aspect.
In order to achieve the above object, a fourth aspect of the embodiments of the present invention provides a readable storage medium, which is a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the method for improving evaluation accuracy of the first aspect.
The method for improving the evaluation accuracy provided by the embodiment of the invention comprises the following steps: when the database is in a FULL mode, monitoring whether an application program accessing the database exists, if so, determining whether the application program is the application program for evaluating the database, and if so, switching the database from the FULL mode to a non-FULL mode. Compared with the prior art, in the embodiment of the invention, when the database is in the FULL mode, if it is monitored that the application program for evaluating the database accesses the database, that is, when it is monitored that the application program for evaluating the database evaluates the database, the database is switched from the FULL mode to the non-FULL mode, so that the database is in the best state, and the evaluation obtained by the application program through evaluation can accurately reflect the best performance of the database, thereby effectively improving the evaluation accuracy.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of an electronic device;
FIG. 2 is a schematic flow chart illustrating a method for improving the evaluation accuracy according to a first embodiment of the present invention;
FIG. 3 is a flow chart illustrating a refinement step of step 202 in the first embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a refinement step of step 203 in the first embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for improving the evaluation accuracy according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating program modules of an apparatus for improving evaluation accuracy according to a third embodiment of the present invention;
FIG. 7 is a schematic diagram of a refinement procedure module of the determination module 602 according to a third embodiment of the present invention;
fig. 8 is a schematic diagram illustrating program modules of an apparatus for improving evaluation accuracy according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Referring to fig. 1, fig. 1 shows a block diagram of an electronic device. The method for improving the evaluation accuracy provided by the embodiment of the invention can be applied to the electronic device 10 shown in fig. 1, and the electronic device 10 can include but is not limited to: the system is a smart phone, a notebook, a tablet computer, a wearable smart device and the like which need to maintain normal operation by depending on a battery and support network and downloading functions.
As shown in fig. 1, the electronic device 10 includes a memory 101, a memory controller 102, one or more processors 103 (only one of which is shown), a peripheral interface 104, and a touch screen 105. These components communicate with each other via one or more communication buses/signal lines 106.
It is to be understood that the structure shown in fig. 1 is merely an illustration and is not intended to limit the structure of the electronic device. The electronic device 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The memory 101 may be used to store software programs and modules, such as program instructions/modules corresponding to the method for improving the evaluation accuracy and the electronic device in the embodiment of the present invention, and the processor 103 executes various functional applications and data processing by operating the software programs and modules stored in the memory 101, that is, the method for improving the evaluation accuracy is implemented.
Memory 101 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 101 may further include memory located remotely from the processor 103, which may be connected to the electronic device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 101 by the processor 103 and possibly other components may be under the control of the memory controller 102.
The peripheral interface 104 couples various input/output devices to the CPU and to the memory 101. The processor 103 executes various software, instructions within the memory 101 to perform various functions of the electronic device 10 and to perform data processing.
In some embodiments, the peripheral interface 104, the processor 103, and the memory controller 102 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The touch screen 105 provides both an output and an input interface between the electronic device and the user. In particular, the touch screen 105 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some of the output results are for some of the user interface objects. The touch screen 105 also receives user inputs, such as user clicks, swipes, and other gesture operations, so that the user interface objects respond to these user inputs. The technique of detecting user input may be based on resistive, capacitive, or any other possible touch detection technique. Specific examples of touch screen 105 display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.
The method for improving the evaluation accuracy in the embodiment of the invention is described based on the electronic device.
In the prior art, in order to ensure the stability of the database in the electronic device, each manufacturer properly reduces the performance of the database in daily use, so that the accuracy of the database evaluation mode is low.
In order to solve the technical problem, the invention provides a method for improving the evaluation accuracy, in the method, when a database is in a FULL mode, if it is monitored that an application program for evaluating the database accesses the database, namely when the application program for evaluating the database evaluates the database, the database is switched from the FULL mode to a non-FULL mode, so that the database is in an optimal state, and the evaluation obtained by the application program through evaluation can accurately reflect the optimal performance of the database, thereby effectively improving the evaluation accuracy.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a method for improving evaluation accuracy according to a first embodiment of the present invention, the method including:
step 201, when a database is in a FULL mode, monitoring whether an application program accessing the database exists;
in the embodiment of the invention, after the electronic device is started or unlocked, whether the database in the electronic device is in the FULL mode or not is detected, and if the database is detected to be in the FULL mode, whether an application program accessing the database exists in the electronic device or not is monitored.
Among them, the database in the electronic device generally has the following three data synchronization modes:
(1) the FULL mode: writing the content in the memory back to the database every commit;
(2) normal mode: writing the content in the memory back into the database every 30 commit times;
(3) OFF mode: the contents in the memory will not be written back into the database.
In order to provide the electronic device with high stability, the database synchronization mode of most electronic devices at present is the default FULL mode.
Step 202, if the application program accessing the database is monitored, determining whether the application program is an application program for evaluating the database;
in the embodiment of the invention, if the situation that the application program accessing the database exists in the electronic device is monitored, whether the application program is the application program for evaluating the database is determined.
The application program for evaluating the database is an application program capable of evaluating database performance (such as storage performance, data read-write performance, and the like), and for example, the AndroBench is used as an evaluation application program, and can evaluate the storage performance of the database.
Step 203, if the application program is an application program for evaluating the database, switching the database from the FULL mode to the non-FULL mode.
In an embodiment of the present invention, if it is determined that the application is an application for evaluating a database, the database is switched from a FULL mode to a non-FULL mode.
It is understood that, when the database is in the FULL mode, although the stability of the database is the best, the performance of the database is relatively poor, and when the database is in the FULL mode, the database is evaluated by using the above application program for evaluating the database, and the evaluation accuracy is low because the evaluation score of the database performance is lower than the real performance score of the database.
In an embodiment of the present invention, when it is determined that a database of an electronic device is in a FULL mode, and when it is detected that an application for evaluating the database accesses the database, a synchronization mode of the database is switched from the FULL mode to a non-FULL mode, so that performance of the database is in an optimal state, and thus, performance scores obtained by the application for evaluating the database can be more similar to the optimal performance of the database.
It should be understood that the process of accessing the database by the application program for evaluating the database can be regarded as a process of evaluating the performance of the database.
In addition, if the application is not an application for evaluating a database, the database in the electronic device normally operates in a FULL mode.
Compared with the prior art, in the method for improving the evaluation accuracy provided by the embodiment of the invention, when the database is in the FULL mode, if it is monitored that the application program for evaluating the database accesses the database, that is, when it is monitored that the application program for evaluating the database evaluates the database, the database is switched from the FULL mode to the non-FULL mode, so that the database is in the optimal state, and the evaluation obtained by the application program through evaluation can accurately reflect the optimal performance of the database, thereby effectively improving the evaluation accuracy.
Further, based on the first embodiment of the present invention, referring to fig. 3, fig. 3 is a schematic flowchart of a step of refining step 202 in the first embodiment of the present invention, in the embodiment of the present invention, the step of determining whether the application is an application for evaluating a database described in step 202 includes:
step 301, determining the type of the application program;
it is understood that when the application program is released to the "application store", each application program is set to have a corresponding type according to its main function, such as "game", "shopping", "database evaluation", etc., in order to facilitate the user's search or download.
In this case, the type corresponding to each application program is usually recorded in the application tag or the application introduction information of each application program, and thus, the embodiment of the present invention may determine the type of the application program by analyzing the application tag or the application information of the application program.
Step 302, searching a preset type set of an application program for evaluating a database, and determining whether the type of the application program belongs to the type set;
in the embodiment of the invention, a type set can be preset, the type set comprises all published types of application programs which can be used for evaluating the database, and the type set is updated regularly. After the type of the application program is determined, the type set can be searched to determine whether the type corresponding to the application program belongs to the application type, so as to determine whether the application program is an application program for evaluating a database.
Step 303, if the type of the application program belongs to the type set, determining that the application program is an application program for evaluating a database.
In the embodiment of the present invention, if the type corresponding to the application program exists in the type set, it may be determined that the application program is an application program for evaluating a database; otherwise, it may be determined that the application is not an application for evaluating the database.
According to the method for improving the evaluation accuracy, provided by the embodiment of the invention, if the application program accessing the database is monitored, the type of the application program is determined firstly, then the preset type set of the application program for evaluating the database is searched, whether the type of the application program belongs to the type set is determined, and if the type of the application program belongs to the type set, the application program is determined to be the application program for evaluating the database, so that whether the application program accessing the database is the application program for evaluating the database can be accurately judged.
Further, based on the first embodiment of the present invention, referring to fig. 4, fig. 4 is a flowchart illustrating a detailed step of step 203 in the first embodiment of the present invention, and in the embodiment of the present invention, the step of switching the database from the FULL mode to the non-FULL mode described in step 203 includes:
step 401, determining the amount of data stored in the database;
and step 402, determining the synchronization mode after the database is switched according to the data volume.
In an embodiment of the present invention, the non-FULL mode includes a Normal mode and an OFF mode, and when the database is switched from the FULL mode to the non-FULL mode, it is required to determine the amount of data stored in the database first, and then determine the synchronization mode after the database is switched according to the amount of data stored in the database.
Specifically, the step of determining the synchronization mode after the database switching according to the data amount in step 402 includes:
step A: if the data volume is larger than a preset threshold value, switching the database from the FULL mode to an OFF mode;
and B: and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
It can be understood that, when the database is in the Normal mode, the electronic device writes back the contents in the memory into the database every 30 commit, so that when the amount of data stored in the database is large, if the contents in the memory are still written back into the database every 30 commit, the performance of the data is affected, and the accuracy of the database evaluation is affected; when the database is in the OFF mode, the electronic device will not write back the contents in the memory to the database, so that the performance of the database will not be affected when the amount of data stored in the database is large.
According to the method for improving the evaluation accuracy, when the database is switched from the FULL mode to the non-FULL mode, the data quantity stored in the database is determined, and then the synchronization mode after the database is switched is determined according to the data quantity, so that the influence of the data quantity stored in the database on the performance of the database can be effectively reduced, the performance of the database is in the best state in the performance evaluation process, and the evaluation accuracy can be effectively improved.
Further, based on the first embodiment of the present invention, referring to fig. 5, fig. 5 is a schematic flow chart of a method for improving an evaluation accuracy in a second embodiment of the present invention, in an embodiment of the present invention, the method for improving an evaluation accuracy includes:
step 501, when the database is in a FULL mode, monitoring whether an application program accessing the database exists;
step 502, if the application program accessing the database is monitored, determining whether the application program is the application program for evaluating the database;
step 503, if the application program is an application program for evaluating a database, switching the database from a FULL mode to a non-FULL mode;
in the embodiment of the present invention, the contents described in steps 501 to 503 are similar to the contents described in steps 201 to 203 in the first embodiment, please refer to steps 201 to 203, which are not described herein again.
Step 504, monitoring the access process of the application program to the database;
and 505, when the access process is monitored to be finished, switching the database from the non-FULL mode back to the FULL mode.
In the embodiment of the present invention, in order to ensure the stability of the database, after the evaluation is finished, the database needs to be switched from the non-FULL mode to the FULL mode.
Specifically, the access process of the application program for evaluating the database is monitored, and when the end of the access process is detected, the database is switched from the non-FULL mode back to the FULL mode, so that the stability of the database is guaranteed.
According to the method for improving the evaluation accuracy, when the fact that the access process of the application program for evaluating the database is finished is monitored, the database is switched back to the FULL mode from the non-FULL mode, so that the evaluation result has high accuracy, and the stability of the database can be guaranteed.
Further, in order to solve the above technical problem, an embodiment of the present invention further provides an apparatus for improving an evaluation accuracy, please refer to fig. 6, where fig. 6 is a schematic diagram of a program module of the apparatus for improving an evaluation accuracy in a third embodiment of the present invention, and the apparatus includes:
the monitoring module 601 is configured to monitor whether an application accessing the database exists when the database is in a FULL mode;
in the embodiment of the present invention, after the electronic device is turned on or unlocked, it is first detected whether the database in the electronic device is in the FULL mode, and if the database is detected to be in the FULL mode, the monitoring module 601 monitors whether an application program accessing the database exists in the electronic device.
Among them, the database in the electronic device generally has the following three data synchronization modes:
(1) the FULL mode: writing the content in the memory back to the database every commit;
(2) normal mode: writing the content in the memory back into the database every 30 commit times;
(3) OFF mode: the contents in the memory will not be written back into the database.
In order to provide the electronic device with high stability, the database synchronization mode of most electronic devices at present is the default FULL mode.
A determining module 602, configured to determine, if an application accessing the database is monitored, whether the application is an application for evaluating the database;
in the embodiment of the invention, if the situation that the application program accessing the database exists in the electronic device is monitored, whether the application program is the application program for evaluating the database is determined.
The application program for evaluating the database is an application program capable of evaluating database performance (such as storage performance, data read-write performance, and the like), and for example, the AndroBench is used as an evaluation application program, and can evaluate the storage performance of the database.
The switching module 603 is configured to switch the database from the FULL mode to the non-FULL mode if the application is an application for evaluating the database.
In an embodiment of the present invention, if it is determined that the application is an application for evaluating a database, the database is switched from a FULL mode to a non-FULL mode.
It is understood that, when the database is in the FULL mode, although the stability of the database is the best, the performance of the database is relatively poor, and when the database is in the FULL mode, the database is evaluated by using the above application program for evaluating the database, and the evaluation accuracy is low because the evaluation score of the database performance is lower than the real performance score of the database.
In an embodiment of the present invention, when it is determined that a database of an electronic device is in a FULL mode, and when it is detected that an application for evaluating the database accesses the database, a synchronization mode of the database is switched from the FULL mode to a non-FULL mode, so that performance of the database is in an optimal state, and thus, performance scores obtained by the application for evaluating the database can be more similar to the optimal performance of the database.
It should be understood that the process of accessing the database by the application program for evaluating the database can be regarded as a process of evaluating the performance of the database.
In addition, if the application is not an application for evaluating a database, the database in the electronic device normally operates in a FULL mode.
Compared with the prior art, when the database is in the FULL mode, if it is monitored that the application program for evaluating the database accesses the database, that is, when the application program for evaluating the database evaluates the database, the device for improving the evaluation accuracy switches the database from the FULL mode to the non-FULL mode, so that the database is in the optimal state, and the evaluation obtained by the application program through evaluation can accurately reflect the optimal performance of the database, thereby effectively improving the evaluation accuracy.
Further, based on the third embodiment of the present invention, referring to fig. 7, fig. 7 is a schematic diagram of a detailed program module of a determining module 602 in the third embodiment of the present invention, in an embodiment of the present invention, the determining module 602 includes:
a first determining module 701, configured to determine a type of the application;
it is understood that when the application program is released to the "application store", each application program is set to have a corresponding type according to its main function, such as "game", "shopping", "database evaluation", etc., in order to facilitate the user's search or download.
In this case, the type corresponding to each application program is usually recorded in the application tag or the application introduction information of each application program, and thus, the embodiment of the present invention may determine the type of the application program by analyzing the application tag or the application information of the application program.
A searching module 702, configured to search a preset type set of an application program for evaluating a database, and determine whether the type of the application program belongs to the type set;
in the embodiment of the invention, a type set can be preset, the type set comprises all published types of application programs which can be used for evaluating the database, and the type set is updated regularly. After the type of the application program is determined, the type set can be searched to determine whether the type corresponding to the application program belongs to the application type, so as to determine whether the application program is an application program for evaluating a database.
A second determining module 703, configured to determine that the application is an application for evaluating a database if the type of the application belongs to the type set.
In the embodiment of the present invention, if the type corresponding to the application program exists in the type set, it may be determined that the application program is an application program for evaluating a database; otherwise, it may be determined that the application is not an application for evaluating the database.
According to the device for improving the evaluation accuracy, provided by the embodiment of the invention, if the application program accessing the database is monitored, the type of the application program is determined, then the preset type set of the application program for evaluating the database is searched, whether the type of the application program belongs to the type set is determined, and if the type of the application program belongs to the type set, the application program is determined to be the application program for evaluating the database, so that whether the application program accessing the database is the application program for evaluating the database can be accurately determined.
Further, based on the first embodiment of the present invention, in the embodiment of the present invention, the switching module 603 is configured to:
and determining the data volume stored in the database, and determining the synchronization mode after the database is switched according to the data volume.
In an embodiment of the present invention, the non-FULL mode includes a Normal mode and an OFF mode, and when the database is switched from the FULL mode to the non-FULL mode, it is required to determine the amount of data stored in the database first, and then determine the synchronization mode after the database is switched according to the amount of data stored in the database.
Specifically, the switching module 603 is configured to:
if the data volume is larger than a preset threshold value, switching the database from the FULL mode to an OFF mode;
and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
It can be understood that, when the database is in the Normal mode, the electronic device writes back the contents in the memory into the database every 30 commit, so that when the amount of data stored in the database is large, if the contents in the memory are still written back into the database every 30 commit, the performance of the data is affected, and the accuracy of the database evaluation is affected; when the database is in the OFF mode, the electronic device will not write back the contents in the memory to the database, so that the performance of the database will not be affected when the amount of data stored in the database is large.
According to the device for improving the evaluation accuracy, when the database is switched from the FULL mode to the non-FULL mode, the data quantity stored in the database is determined, and then the synchronization mode after the database is switched is determined according to the data quantity, so that the influence of the data quantity stored in the database on the performance of the database can be effectively reduced, the performance of the database is in the best state in the performance evaluation process, and the evaluation accuracy can be effectively improved.
Further, based on the third embodiment of the present invention, referring to fig. 8, fig. 8 is a schematic diagram of a program module of an apparatus for improving an evaluation accuracy in a fourth embodiment of the present invention, in which the apparatus for improving an evaluation accuracy in the embodiment of the present invention includes:
the monitoring module 601 is configured to monitor whether an application accessing the database exists when the database is in a FULL mode;
a determining module 602, configured to determine, if an application accessing the database is monitored, whether the application is an application for evaluating the database;
a switching module 603, configured to switch the database from a FULL mode to a non-FULL mode if the application is an application for evaluating a database;
a process monitoring module 801, configured to monitor an access process of the application program to the database;
a recovery module 802, configured to switch the database from the non-FULL mode back to the FULL mode when it is monitored that the access process is ended.
In the embodiment of the present invention, in order to ensure the stability of the database, after the evaluation is finished, the database needs to be switched from the non-FULL mode to the FULL mode.
Specifically, the access process of the application program for evaluating the database is monitored, and when the end of the access process is detected, the database is switched from the non-FULL mode back to the FULL mode, so that the stability of the database is guaranteed.
According to the device for improving the evaluation accuracy, when the fact that the access process of the application program for evaluating the database is finished is monitored, the database is switched back to the FULL mode from the non-FULL mode, so that the evaluation result has high accuracy, and the stability of the database can be guaranteed.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, each step of the method for improving the evaluation accuracy in any one of the first embodiment to the second embodiment is implemented.
The embodiment of the present invention further provides a readable storage medium, which is a computer-readable storage medium, and the computer program is stored on the readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for improving the evaluation accuracy in any one of the first to second embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above 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.
In view of the above description of the method, the apparatus, the electronic apparatus and the storage medium for improving the evaluation accuracy provided by the present invention, those skilled in the art will recognize that the idea of the embodiment of the present invention may be changed in the specific implementation manner and the application scope.

Claims (8)

1. A method for improving evaluation accuracy, the method comprising:
monitoring whether an application program accessing the database exists or not when the database is in a FULL mode;
if the application program accessing the database is monitored, determining whether the application program is an application program for evaluating the database;
switching the database from a FULL mode to a non-FULL mode if the application is an application for evaluating a database, wherein,
the switching the database from FULL mode to non-FULL mode comprises:
determining the amount of data stored in the database;
determining a synchronous mode after the database is switched according to the data volume;
the determining the synchronization mode after the database switching according to the data volume comprises:
if the data volume is larger than a preset threshold value, switching the database from the FULL mode to an OFF mode;
and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
2. The method of claim 1, wherein the step of determining whether the application is an application for evaluating a database comprises:
determining a type of the application;
searching a preset type set of an application program for evaluating a database, and determining whether the type of the application program belongs to the type set;
and if the type of the application program belongs to the type set, determining the application program as the application program for evaluating the database.
3. The method of any of claims 1-2, wherein the step of switching the database from FULL mode to non-FULL mode further comprises:
monitoring the access process of the application program to the database;
and when the access process is monitored to be finished, switching the database from the non-FULL mode back to the FULL mode.
4. An apparatus for improving evaluation accuracy, the apparatus comprising:
the monitoring module is used for monitoring whether an application program accessing the database exists or not when the database is in a FULL mode;
the determining module is used for determining whether the application program is the application program for evaluating the database if the application program accessing the database is monitored;
a switching module for switching the database from a FULL mode to a non-FULL mode if the application is an application for evaluating the database,
the switching module is specifically used for determining the data volume stored in the database and determining the synchronization mode of the database after switching according to the data volume;
the switching module is specifically configured to switch the database from the FULL mode to an OFF mode if the data amount is greater than a preset threshold;
and if the data volume is less than or equal to the preset threshold, switching the database from the FULL mode to a Normal mode.
5. The apparatus of claim 4, wherein the determining module comprises:
a first determining module for determining the type of the application program;
the searching module is used for searching a preset type set of the application program for evaluating the database and determining whether the type of the application program belongs to the type set;
and the second determining module is used for determining the application program as the application program for evaluating the database if the type of the application program belongs to the type set.
6. The apparatus of any one of claims 4 to 5, further comprising:
the process monitoring module is used for monitoring the access process of the database by the application program after the database is switched from the FULL mode to the non-FULL mode;
and the recovery module is used for switching the database from the non-FULL mode back to the FULL mode when the access process is monitored to be finished.
7. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the method of any one of claims 1 to 3.
8. A readable storage medium, which is a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for improving evaluation accuracy of any one of claims 1 to 3.
CN201711484209.XA 2017-12-29 2017-12-29 Method and device for improving evaluation accuracy, electronic device and storage medium Active CN108228437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711484209.XA CN108228437B (en) 2017-12-29 2017-12-29 Method and device for improving evaluation accuracy, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711484209.XA CN108228437B (en) 2017-12-29 2017-12-29 Method and device for improving evaluation accuracy, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108228437A CN108228437A (en) 2018-06-29
CN108228437B true CN108228437B (en) 2021-08-31

Family

ID=62646323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711484209.XA Active CN108228437B (en) 2017-12-29 2017-12-29 Method and device for improving evaluation accuracy, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN108228437B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093462A (en) * 2006-06-22 2007-12-26 上海全成通信技术有限公司 Automatization method for testing schooling pressure on database application
CN103198010A (en) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 Software testing method, device and system
CN104112003A (en) * 2014-07-14 2014-10-22 广州华多网络科技有限公司 Method and system for detecting performance of game terminals
CN105446825A (en) * 2014-06-12 2016-03-30 阿里巴巴集团控股有限公司 Database test method and device
CN105975603A (en) * 2016-05-11 2016-09-28 深圳市永兴元科技有限公司 Database performance test method and device
CN106681867A (en) * 2015-11-09 2017-05-17 阿里巴巴集团控股有限公司 Testing method and device
CN107145432A (en) * 2017-03-30 2017-09-08 华为技术有限公司 A kind of method and client for setting up model database

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9529698B2 (en) * 2010-07-13 2016-12-27 Salesforce.Com, Inc. Method and system for multi-mode testing through operation interface and scenario abstraction in a multi-tenant database environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093462A (en) * 2006-06-22 2007-12-26 上海全成通信技术有限公司 Automatization method for testing schooling pressure on database application
CN103198010A (en) * 2012-01-06 2013-07-10 腾讯科技(深圳)有限公司 Software testing method, device and system
CN105446825A (en) * 2014-06-12 2016-03-30 阿里巴巴集团控股有限公司 Database test method and device
CN104112003A (en) * 2014-07-14 2014-10-22 广州华多网络科技有限公司 Method and system for detecting performance of game terminals
CN106681867A (en) * 2015-11-09 2017-05-17 阿里巴巴集团控股有限公司 Testing method and device
CN105975603A (en) * 2016-05-11 2016-09-28 深圳市永兴元科技有限公司 Database performance test method and device
CN107145432A (en) * 2017-03-30 2017-09-08 华为技术有限公司 A kind of method and client for setting up model database

Also Published As

Publication number Publication date
CN108228437A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
US9348508B2 (en) Automatic detection of user preferences for alternate user interface model
CN108874289B (en) Application history record viewing method and device and electronic equipment
CN107463627B (en) Picture loading method and terminal
KR102047568B1 (en) Measuring web page rendering time
US20130219338A1 (en) Automatic Magnification and Selection Confirmation
WO2019184490A1 (en) Method for use in displaying icons of hosted applications, and device and storage medium
CN103703454A (en) On-demand tab rehydration
CN106991179B (en) Data deleting method and device and mobile terminal
US10346321B2 (en) Method to trigger NVDIMM save from remote management interface
CN108984089B (en) Touch operation method and device, storage medium and electronic equipment
WO2017219524A1 (en) Page saving method and electronic device
CN111930277A (en) Method and equipment for providing presence information
CN113051493A (en) Application program display method and device, storage medium and terminal
CN111949457A (en) Server fault chip detection method and device
CN109117013A (en) Electronic equipment, false-touch prevention method and system
CN105378604A (en) Trending suggestions
CN111046112A (en) Method and device for displaying class knowledge graph and electronic equipment
CN111597009A (en) Application program display method and device and terminal equipment
CN108228437B (en) Method and device for improving evaluation accuracy, electronic device and storage medium
CN108563744B (en) Slow query method and device based on Redis database and terminal equipment
CN108415656B (en) Display control method, device, medium and electronic equipment in virtual scene
CN110058938B (en) Memory processing method and device, electronic equipment and readable medium
CN108268298B (en) Desktop icon generation method and device, storage medium and electronic equipment
CN111198830A (en) Identification method and device of mobile storage equipment, electronic equipment and storage medium
CN107609119B (en) File processing method, mobile terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant