CN108073508B - Compatibility detection method and device - Google Patents
Compatibility detection method and device Download PDFInfo
- Publication number
- CN108073508B CN108073508B CN201611026184.4A CN201611026184A CN108073508B CN 108073508 B CN108073508 B CN 108073508B CN 201611026184 A CN201611026184 A CN 201611026184A CN 108073508 B CN108073508 B CN 108073508B
- Authority
- CN
- China
- Prior art keywords
- detected
- target
- hardware
- terminal equipment
- terminal device
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/76—Adapting program code to run in a different environment; Porting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a compatibility detection method and a device, which achieve the purposes of improving the efficiency of software and hardware compatibility test and reducing the labor cost. Wherein the method comprises the following steps: running software to be detected on target terminal equipment, and determining that target hardware of the target terminal equipment supports a hardware function corresponding to the running of the software to be detected; the method comprises the steps of obtaining the support capability information of target hardware of the terminal equipment to be detected on the hardware function, and realizing compatibility test of the software to be detected and the terminal equipment to be detected, wherein the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected.
Description
Technical Field
The invention relates to the field of computers, in particular to a compatibility detection method and device.
Background
The software and hardware compatibility detection means whether a function designed in the software can be implemented on the terminal device, that is, whether the hardware function of the terminal device can support the normal operation of the software.
In the prior art, for the compatibility test of software on a terminal device, the compatibility of the software and the terminal device is often judged by downloading the software on the terminal device to be tested and running the software, and then detecting the actual running performance of the software on the terminal device.
For example, if a piece of game software is to be checked for compatibility with various types of mobile phones, the piece of game software and the compatibility check software need to be downloaded to the various types of mobile phones. And then the game software is respectively run on the mobile phones, and the running effect of the game software on the mobile phones is respectively detected through the compatibility detection software while the game software is run, so that the compatibility detection result is obtained.
However, in the case that there are many terminal devices for performing compatibility detection on the software, if each terminal device needs to run the software once, the detection time is inevitably long; however, in order to improve the testing efficiency, more testing personnel are needed, which results in higher labor cost.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a compatibility detection method and a device, and aims to improve the efficiency of software and hardware compatibility test and reduce the labor cost are fulfilled.
The embodiment of the invention provides a compatibility detection method, which comprises the following steps:
running software to be detected on target terminal equipment, and determining that target hardware of the target terminal equipment supports a hardware function corresponding to the running of the software to be detected;
the method comprises the steps of obtaining the support capability information of target hardware of the terminal equipment to be detected on the hardware function, and realizing compatibility test of the software to be detected and the terminal equipment to be detected, wherein the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected.
Preferably, the software to be detected comprises a program to be detected and an engine program, and the engine program is used for supporting the operation of the program to be detected;
the determining that the target hardware of the target terminal device supports the hardware function corresponding to the running of the software to be detected comprises:
determining the functions of the engine program used when the program to be detected runs on the target terminal equipment, wherein the functions of the engine program used are realized by the corresponding hardware function support of the target hardware of the target terminal equipment;
the acquiring the support capability information of the target hardware of the terminal equipment to be detected on the hardware function comprises:
and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
Preferably, when it is determined that the program to be detected runs on the target terminal device, the functions of the engine program used in the determining include:
acquiring interface information of a called interface called by the program to be detected of the engine program in the process of running the program to be detected on the target terminal equipment;
and obtaining the functions of the engine program used when the program to be detected runs on the target terminal equipment according to the matching relation between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program.
Preferably, in the process that the program to be detected runs on the target terminal device, the acquiring interface information of a called interface, called by the program to be detected, of the engine program includes:
acquiring an entry address of a process running on the target terminal equipment of the program to be detected;
obtaining an interface of the engine program according to the entry address of the process;
and monitoring the interface of the engine program, and acquiring interface information of a called interface called by the program to be detected of the engine program.
Preferably, the terminal device to be detected includes the target terminal device, and the method further includes:
and selecting the terminal equipment to be detected with the maximum hardware function number supported by target hardware from the terminal equipment to be detected as the target terminal equipment.
An embodiment of the present invention further provides a compatibility detection apparatus, where the apparatus includes:
a hardware function determining unit and a support capability information acquiring unit;
the hardware function determining unit is used for running the software to be detected on the target terminal equipment and determining that the target hardware of the target terminal equipment supports the hardware function corresponding to the running of the software to be detected;
the supporting capability information acquiring unit is used for acquiring the supporting capability information of the target hardware of the terminal equipment to be detected on the hardware function, so as to realize the compatibility test of the software to be detected and the terminal equipment to be detected, and the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected.
Preferably, the software to be detected comprises a program to be detected and an engine program, and the engine program is used for supporting the operation of the program to be detected;
the hardware function determining unit is specifically configured to: running software to be detected on target terminal equipment, and determining the functions of the engine program used when the program to be detected runs on the target terminal equipment, wherein the functions of the engine program used are realized by the support of corresponding hardware functions of target hardware of the target terminal equipment;
the support capability information obtaining unit is specifically configured to: and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
Preferably, the hardware function determining unit includes an interface information obtaining unit and a function determining subunit;
wherein, the interface information obtaining unit is configured to:
acquiring interface information of a called interface called by the program to be detected of the engine program in the process of running the program to be detected on the target terminal equipment;
and the function determining subunit is configured to obtain, according to the matching relationship between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program, a function of the engine program used when the program to be detected runs on the target terminal device.
Preferably, the interface information acquiring unit includes: the system comprises an entrance address acquisition unit, an interface determination unit and a monitoring unit;
the entry address acquisition unit is configured to acquire an entry address of a process running on the target terminal device of the program to be detected;
the interface determining unit is used for obtaining an interface of the engine program according to the entry address of the process;
the monitoring unit is used for monitoring the interface of the engine program and acquiring the interface information of the called interface called by the program to be detected of the engine program.
Preferably, the terminal device to be detected includes the target terminal device, and the apparatus further includes:
and the selection unit is used for selecting the terminal equipment to be detected with the maximum hardware function number supported by the target hardware from the terminal equipment to be detected as the target terminal equipment.
According to the method and the device, the target terminal device is determined to support the function related to the operation of the software to be detected by operating the software to be detected on the target terminal device, and then the information of the support capability of the terminal device to be detected on the function is acquired, so that the compatibility test of the software to be detected and the terminal device to be detected is realized. Compared with the prior art, the compatibility monitoring of the software to be detected and the plurality of terminal devices to be detected can be realized only by operating the software to be detected once no matter how many terminal devices to be detected exist, the operation times of the software to be detected are effectively reduced, the compatibility detection efficiency is improved, and the labor cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be 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 described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a compatibility detection method according to an embodiment of the present invention;
fig. 2 is a block diagram of a compatibility detection apparatus according to a second embodiment of the present invention;
fig. 3 is a block diagram of a terminal device according to a third embodiment of the present invention.
Detailed Description
In the prior art, for compatibility detection of software to be detected on a terminal device to be detected, the software to be detected is respectively installed on the terminal device to be detected, and whether functions of the software to be detected can be satisfied by the terminal device to be detected is judged by actually running the software to be detected on the terminal device to be detected, so that a compatibility detection result of the software to be detected and hardware to be detected is obtained. The compatibility detection method is low in detection efficiency and high in labor cost.
In order to overcome the technical problem, the invention provides a compatibility detection method, which includes the steps of running software to be detected on target terminal equipment, determining that target hardware of the target terminal equipment supports a hardware function corresponding to running of the software to be detected, acquiring support capability information of the target hardware of the terminal equipment to be detected on the hardware function, and realizing compatibility test of the software to be detected and the terminal equipment to be detected. And the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected.
According to the invention, no matter how many terminal devices to be detected are, the compatibility detection result of the software to be detected and the terminal devices to be detected can be realized only by running the software to be detected once, so that the compatibility detection efficiency is effectively improved, and the labor cost is reduced.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious 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.
The first embodiment is as follows:
referring to fig. 1, this figure is a flowchart of a compatibility detection method according to an embodiment of the present invention.
The compatibility detection method provided by the embodiment comprises the following steps:
step S101: and running the software to be detected on the target terminal equipment, and determining that the target hardware of the target terminal equipment supports the hardware function corresponding to the running of the software to be detected.
The present embodiment aims at: on the premise of detecting whether the target hardware of at least one terminal device to be detected can meet the normal operation of the software to be detected, namely detecting the compatibility of the software to be detected and the target hardware of the terminal device to be detected, the operation frequency of the software to be detected is reduced as much as possible.
In order to achieve this objective, in this embodiment, it is first determined which hardware functions need to be provided by target hardware of the terminal device to be detected when the software to be detected is operated, and then support capability information of whether the terminal device to be detected supports these hardware functions is obtained, so as to achieve compatibility detection between the software to be detected and the terminal device to be detected. When determining which hardware functions need to be provided by the target hardware of the terminal device to be detected when the software to be detected is operated, the result can be obtained without installing the software to be detected on the at least one terminal device to be detected one by one, and only once installation is needed on the target terminal device. The relationship between the target terminal device and the terminal device to be detected is as follows: the target hardware of the target terminal device is matched with the target hardware of the terminal device to be detected, for example, the target hardware of the terminal device to be detected is a display card, and the target hardware of the target terminal device is also a display card; the target hardware of the terminal equipment to be detected is a camera, and the target hardware of the target terminal equipment is also the camera. The target terminal device may be the terminal device to be detected, or one of the terminal devices to be detected, or not.
The target terminal device and the terminal device to be detected may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the invention is not particularly limited.
When the target terminal device is not the terminal device to be detected, the types of the target terminal device and the terminal device to be detected should be the same, so that the hardware function provided by the target hardware of the target terminal device is referential to the terminal device to be detected. For example, if the terminal device to be detected is a mobile phone, the target terminal device is preferably also a mobile phone, not a POS, because the hardware functions provided by the mobile phone video card are different from the hardware functions provided by the POS video card.
When the target terminal device is one of the terminal devices to be detected, in order to detect more hardware functions, hardware function information supported by target hardware of the terminal device to be detected may be acquired, and then the terminal device to be detected with the largest number of hardware functions supported by the target hardware is selected as the target terminal device.
In addition, different software to be detected may be different in a specific method of determining that the target hardware of the target terminal device supports the hardware function corresponding to the software to be detected to operate.
For example, many software applications currently have engine programs that typically provide the tools needed to write the application. For example, the engine program commonly used in 3D game software is Unity 3D, which provides game designers with various tools needed to write games, typically the core component of some interactive real-time image applications, and is present to enable game designers to easily and quickly complete the writing of applications without starting from scratch. The Unity 3D typically provides functions such as rendering, collision detection, sound effects, animation, etc.
That is to say, the software to be detected may include a program to be detected (the program to be detected is the application program) and an engine program, and in the running process of the software to be detected, the program to be detected calls the engine program, and the running of the engine program is supported by a hardware function provided by target hardware of the target terminal device.
The step of determining that the target hardware of the target terminal device supports the hardware function corresponding to the operation of the software to be detected may be: and acquiring interface information of a called interface called by the program to be detected of the engine program in the running process of the program to be detected on the target terminal equipment, and then acquiring the function of the engine program used when the program to be detected runs on the target terminal equipment according to the matching relation between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program.
For example, when the program to be detected calls the graphics.drawprocedural interface and/or the graphics.drawprocedural index interface of the engine program, both interfaces match the support function "support _ lnstance", that is, the program to be detected runs the "support _ lnstance" function that uses the engine program.
For another example, when the program to be detected calls the TextureWrapMode interface of the engine program, and the TextureWrapMode interface matches with the support function "npotSupport" function, it is determined that the program to be detected operates the npotSupport "function using the engine program.
There are many implementation manners for implementing and determining that the target terminal device supports the function of the target hardware related to the operation of the software to be detected, and this embodiment provides one of the possible implementation manners:
firstly, an entry address of a process of the program to be detected when the program runs on the target terminal device is obtained. The entry address of the process is a memory address, and an interface of the engine program is stored in the memory address. And then, obtaining an interface of the engine program according to the entry address of the process.
And finally, monitoring the interface of the engine program, and acquiring the interface information of the called interface called by the program to be detected of the engine program.
For example, a hook _ entry address (entry address) of a so file (dynamic link library) of a program to be detected can be acquired by setting a target process and executing a dlsym function. So file about the interface of the engine program is stored in the hook _ entry address. So that the called property.so file is monitored through the MSHOOKfunction.
And if the software to be detected does not have the engine program, directly determining that the target terminal equipment supports the function of target hardware related to the running of the software to be detected.
Step S102: and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the hardware function, and realizing the compatibility test of the software to be detected and the terminal equipment to be detected.
In this embodiment, there are many ways to obtain the support capability information of the target hardware of the terminal device to be detected on the hardware function, for example, the support capability information is obtained from data provided by a manufacturer or network search, a piece of software for obtaining the support capability information of the hardware function may be further programmed and uploaded to a server, and if the software is downloaded and run by the terminal device to be detected, the support capability information of the terminal device to be detected is extracted and sent to the server.
In addition, when the software to be detected includes the engine program, the obtaining of the support capability information of the target hardware of the terminal device to be detected on the hardware function may be: and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
For example, if the program to be detected operates the "support instruction" function using the engine program, the information of the support capability of the target hardware of the terminal device to be detected on the "support instruction" function may be acquired.
Referring to table 1, the table shows support capability information of a samsung mobile phone Galaxy S7 edge and a millet mobile phone MI 4LTE to a display card, where the samsung mobile phone is the target terminal device, the millet mobile phone is a terminal device to be detected, and the software to be detected is game software including an engine program.
TABLE 1
Hardware function | MI 4LTE | Galaxy S7 edge |
MAXTEXTURESIZE | YES | YES |
NPOTSUPPORT | NO | YES |
SUPPORTEDRENDERTARGETCOUNT | 3 | 5 |
SUPPORTS3DTEXTRUES | YES | YES |
SUPPORTSAUDIO | YES | YES |
SUPPORTSSTENCIL | NO | YES |
The hardware functions in table 1 are the hardware functions that the graphics card of the samsung mobile Galaxy S7 edge supports the game software to run, and the hardware functions that the millet mobile MI 4LTE can support include: MAXTEXTEXTURIZE, SUPPORTS3DTEXTRUES, and SUPPORTSAUDIIO, hardware functions that cannot be supported include NPOTSUPPORT, SUPPORTED REDDERTREGETECUTCOUNT, and SUPPORTSSTENCIL. The number of rendering targets of the samsung mobile phone display card is 5, while the number of rendering targets of the MI 4LTE display card of the millet mobile phone is only 3, which is more than the upper limit of the MI 4LTE display card of the millet mobile phone, and if the game software is run by using the MI 4LTE of the millet mobile phone, the screen may be blurred.
In practical applications, the compatibility detection method provided by this embodiment may be implemented as a file package, for example, an APP, and loaded in the target terminal device. When the software to be detected needs to be detected, the file package is executed, the software to be detected is selected, a start or determination button is pressed, the software to be detected is started to operate, compatibility detection is executed in the operation process of the software to be detected, and finally, a compatibility detection result (such as table 1) is output.
In summary, the compatibility detection method provided by this embodiment can realize the compatibility detection result between the software to be detected and the terminal device to be detected only by running the software to be detected once no matter how many terminal devices to be detected are, so that the compatibility detection efficiency is effectively improved, and the labor cost is reduced.
The compatibility detection method provided by the embodiment is specifically described below with the target terminal device as a target mobile phone, the terminal device to be detected as a mobile phone to be detected, the target hardware as a display card, and the software to be detected as game software as a specific application scenario.
Application scenario one (for game software not including engine program)
Typically, game software needs to call the interface of OpenGL to draw graphics. OpenGL (Open Graphics Library) is a set of Application Programming Interfaces (APIs) by which developers can develop programs with access to Graphics cards. When OpenGL is implemented through hardware, game software calls an interface of OpenGL to achieve the purpose of calling a display card driver, and then graphics are drawn through a display card. The interfaces of OpenGL represent various functions of rendering, such as rendering, texture processing, projective transformation, etc.
However, not all the vendor graphics drivers can support the call of all interfaces of OpenGL, that is, some OpenGL functions cannot be supported by some graphics cards. Therefore, when the game software runs on the target mobile phone, monitoring which interfaces of the OpenGL on the target mobile phone are called by the game software, and whether the calling can be successfully performed, if so, determining that the display card of the target mobile phone can support the hardware function corresponding to the called interface.
After determining the interface which is successfully called by the game software in the OpenGL of the target mobile phone, recording interface information of the interface, and then acquiring the support capability information of whether the display card of the mobile phone to be detected can successfully call the interface, so as to realize compatibility detection between the game software and the display card of the mobile phone to be detected.
Application scenario two (for game software including engine program)
If the game software comprises a Unity 3D and a program to be detected, it can be determined which interfaces of the Unity 3D are called by the program to be detected during the operation of the target mobile phone, and the information of the interfaces can be stored. The called interfaces of the Unity 3D further call the interface of OpenGL, and complete the drawing of the image through the driver of the graphics card. If all the called interfaces of Unity 3D can be successfully called, it is indicated that the corresponding interfaces of OpenGL are also successfully called, so as to indicate that the graphics card can support the functions used by OpenGL.
On the other hand, the support capability information of whether the Unity 3D interface can be successfully called in the mobile phone to be detected can be obtained, and then the support capability information of the interface called by the program to be detected is found from the support capability information, so that whether the video card of the mobile phone to be detected can provide the result of the required hardware function for the normal operation of the game software can be known.
Based on the compatibility detection method provided by the above embodiment, the embodiment of the present invention further provides a compatibility detection apparatus, and the working principle of the compatibility detection apparatus is described in detail below with reference to the accompanying drawings.
Example two
Referring to fig. 3, this figure is a block diagram of a compatibility detection apparatus according to a second embodiment of the present invention.
The compatibility detection device provided by the embodiment comprises: a hardware function determination unit 101 and a support capability information acquisition unit 102;
the hardware function determining unit 101 is configured to run software to be detected on a target terminal device, and determine that target hardware of the target terminal device supports a hardware function corresponding to running of the software to be detected;
the support capability information obtaining unit 102 is configured to obtain support capability information of a target hardware of a terminal device to be detected on the hardware function, so as to implement a compatibility test between the software to be detected and the terminal device to be detected, where the target hardware of the target terminal device is matched with the target hardware of the terminal device to be detected.
In this embodiment, the target terminal device is determined to support the function involved in the operation of the software to be detected by operating the software to be detected on the target terminal device, and then the information of the support capability of the terminal device to be detected on the function is acquired, so that the compatibility test between the software to be detected and the terminal device to be detected is realized. Compared with the prior art, the compatibility monitoring of the software to be detected and the plurality of terminal devices to be detected can be realized only by operating the software to be detected once no matter how many terminal devices to be detected exist, the operation times of the software to be detected are effectively reduced, the compatibility detection efficiency is improved, and the labor cost is reduced.
Optionally, the software to be detected comprises a program to be detected and an engine program, and the engine program is used for supporting the operation of the program to be detected;
the hardware function determining unit 101 is specifically configured to: running software to be detected on target terminal equipment, and determining the functions of the engine program used when the program to be detected runs on the target terminal equipment, wherein the functions of the engine program used are realized by the support of corresponding hardware functions of target hardware of the target terminal equipment;
the supporting capability information obtaining unit 102 is specifically configured to: and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
Optionally, the hardware function determining unit 101 includes an interface information obtaining unit and a function determining subunit;
wherein, the interface information obtaining unit is configured to:
acquiring interface information of a called interface called by the program to be detected of the engine program in the process of running the program to be detected on the target terminal equipment;
and the function determining subunit is configured to obtain, according to the matching relationship between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program, a function of the engine program used when the program to be detected runs on the target terminal device.
Optionally, the interface information obtaining unit includes: the system comprises an entrance address acquisition unit, an interface determination unit and a monitoring unit;
the entry address acquisition unit is configured to acquire an entry address of a process running on the target terminal device of the program to be detected;
the interface determining unit is used for obtaining an interface of the engine program according to the entry address of the process;
the monitoring unit is used for monitoring the interface of the engine program and acquiring the interface information of the called interface called by the program to be detected of the engine program.
Optionally, the terminal device to be detected includes the target terminal device, and the apparatus further includes:
and the selection unit is used for selecting the terminal equipment to be detected with the maximum hardware function number supported by the target hardware from the terminal equipment to be detected as the target terminal equipment.
EXAMPLE III
Correspondingly, an embodiment of the present invention further provides a terminal device, where the terminal device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the terminal device is taken as the mobile phone as an example:
fig. 3 is a block diagram illustrating a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present invention. Referring to fig. 3, the cellular phone includes: radio Frequency (RF) circuitry 1110, memory 1120, input unit 1130, display unit 1140, sensors 1150, audio circuitry 1160, wireless fidelity (WiFi) module 1170, processor 1180, and power supply 1190. Those skilled in the art will appreciate that the handset configuration shown in fig. 3 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 3:
The memory 1120 may be used to store software programs and modules, and the processor 1180 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 1100. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. Touch panel 1131, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 1131 (for example, operations of the user on or near touch panel 1131 by using any suitable object or accessory such as a finger or a stylus pen), and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1131 may include two parts, namely, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1180, and can receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented by using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1130 may include other input devices 1132 in addition to the touch panel 1131. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 1140 may include a Display panel 1141, and optionally, the Display panel 1141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1131 can cover the display panel 1141, and when the touch panel 1131 detects a touch operation on or near the touch panel, the touch panel is transmitted to the processor 1180 to determine the type of the touch event, and then the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of the touch event. Although in fig. 3, the touch panel 1131 and the display panel 1141 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 1100 can also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1141 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
WiFi belongs to short-distance wireless transmission technology, and the cell phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 1170, and provides wireless broadband internet access for the user. Although fig. 3 shows the WiFi module 1170, it is understood that it does not belong to the essential constitution of the handset 1100, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1180 is a control center of the mobile phone, and is connected to various parts of the whole mobile phone through various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the mobile phone. Optionally, processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated within processor 1180.
The cell phone 1100 also includes a power supply 1190 (e.g., a battery) for providing power to various components, which may be logically coupled to the processor 1180 via a power management system, such that the power management system may be configured to manage charging, discharging, and power consumption.
Although not shown, the mobile phone 1100 may further include a camera, a bluetooth module, etc., which will not be described herein.
In this embodiment of the present invention, the processor 1180 included in the terminal further has the following functions:
running software to be detected on target terminal equipment, and determining that target hardware of the target terminal equipment supports a hardware function corresponding to the running of the software to be detected;
the method comprises the steps of obtaining the support capability information of target hardware of the terminal equipment to be detected on the hardware function, and realizing compatibility test of the software to be detected and the terminal equipment to be detected, wherein the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected.
Optionally, the software to be detected comprises a program to be detected and an engine program, and the engine program is used for supporting the operation of the program to be detected;
the determining that the target hardware of the target terminal device supports the hardware function corresponding to the running of the software to be detected comprises:
determining the functions of the engine program used when the program to be detected runs on the target terminal equipment, wherein the functions of the engine program used are realized by the corresponding hardware function support of the target hardware of the target terminal equipment;
the acquiring the support capability information of the target hardware of the terminal equipment to be detected on the hardware function comprises:
and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
Optionally, when it is determined that the program to be detected runs on the target terminal device, the functions of the engine program used in the determining include:
acquiring interface information of a called interface called by the program to be detected of the engine program in the process of running the program to be detected on the target terminal equipment;
and obtaining the functions of the engine program used when the program to be detected runs on the target terminal equipment according to the matching relation between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program.
Optionally, the obtaining interface information of a called interface, called by the program to be detected, of the engine program in the process of running the program to be detected on the target terminal device includes:
acquiring an entry address of a process running on the target terminal equipment of the program to be detected;
obtaining an interface of the engine program according to the entry address of the process;
and monitoring the interface of the engine program, and acquiring interface information of a called interface called by the program to be detected of the engine program.
Optionally, the terminal device to be detected includes the target terminal device, and the method further includes:
and selecting the terminal equipment to be detected with the maximum hardware function number supported by target hardware from the terminal equipment to be detected as the target terminal equipment.
When introducing elements of various embodiments of the present invention, the articles "a," "an," "the," and "said" are intended to mean that there are one or more of the elements. The terms "comprising," "including," and "having" are intended to be inclusive and mean that there may be additional elements other than the listed elements.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the processes of the above method embodiments may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when executed, the computer program may include the processes of the above method embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the units and modules described as separate components may or may not be physically separate. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is directed to embodiments of the present invention, and it is understood that various modifications and improvements can be made by those skilled in the art without departing from the spirit of the invention.
Claims (12)
1. A compatibility detection method is applied to target terminal equipment, and comprises the following steps:
when the software to be detected needs to be detected, the software to be detected is operated on the target terminal equipment, and the target hardware of the target terminal equipment is determined to support the hardware function corresponding to the operation of the software to be detected, wherein the software to be detected comprises an application program to be detected;
acquiring the support capability information of target hardware of a terminal device to be detected on the hardware function, comparing the hardware function of the terminal device to be detected with the hardware function of the target terminal device in the process of running the software to be detected on the target terminal device, and comparing the support result of the hardware function of the terminal device to be detected with the hardware function of the target terminal device, so as to realize the compatibility test of the software to be detected and the terminal device to be detected, and outputting the compatibility test result; the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected;
the support capability information of the target hardware for the hardware function at least comprises: whether the target hardware supports the hardware function;
the target terminal equipment is the terminal equipment to be detected; or, the target terminal device is not the terminal device to be detected; or the target terminal device is one of the plurality of terminal devices to be detected;
if the target terminal equipment is not the terminal equipment to be detected, the type of the target terminal equipment is the same as that of the terminal equipment to be detected;
and if the target terminal equipment is one of the plurality of terminal equipment to be detected, acquiring hardware function information supported by target hardware of the plurality of terminal equipment to be detected, and taking the terminal equipment to be detected with the maximum number of hardware functions supported by the target hardware as the target terminal equipment.
2. The method according to claim 1, wherein the software to be detected further comprises an engine program, and the engine program is used for supporting the running of the application program to be detected;
the determining that the target hardware of the target terminal device supports the hardware function corresponding to the running of the software to be detected comprises:
determining the functions of the engine program used when the application program to be detected runs on the target terminal equipment, wherein the functions of the engine program used are realized by the corresponding hardware function support of the target hardware of the target terminal equipment;
the acquiring the support capability information of the target hardware of the terminal equipment to be detected on the hardware function comprises:
and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
3. The method according to claim 2, wherein the determining of the functions of the engine program used when the application to be detected runs on the target terminal device includes:
acquiring interface information of a called interface called by the application program to be detected of the engine program in the process of running the application program to be detected on the target terminal equipment;
and obtaining the functions of the engine program used when the application program to be detected runs on the target terminal equipment according to the matching relation between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program.
4. The method according to claim 3, wherein the obtaining interface information of a called interface, called by the application to be detected, of the engine program during the running process of the application to be detected on the target terminal device comprises:
acquiring an entry address of a process of the application program to be detected when the target terminal equipment runs;
obtaining an interface of the engine program according to the entry address of the process;
and monitoring the interface of the engine program, and acquiring interface information of a called interface called by the application program to be detected of the engine program.
5. The method according to claim 1, wherein the terminal device to be detected comprises the target terminal device, the method further comprising:
and selecting the terminal equipment to be detected with the maximum hardware function number supported by target hardware from the terminal equipment to be detected as the target terminal equipment.
6. A compatibility detection apparatus, applied to a target terminal device, the apparatus comprising:
a hardware function determining unit and a support capability information acquiring unit;
the hardware function determining unit is configured to, when software to be detected needs to be detected, run the software to be detected on the target terminal device, determine that target hardware of the target terminal device supports a hardware function corresponding to running of the software to be detected, where the software to be detected includes an application program to be detected;
the supporting capability information acquiring unit is used for acquiring supporting capability information of target hardware of the terminal device to be detected on the hardware function, comparing the hardware functions of the terminal device to be detected and the target terminal device in the process of running the software to be detected on the target terminal device, and comparing the supporting results of the hardware functions of the terminal device to be detected and the target terminal device, so as to realize compatibility test of the software to be detected and the terminal device to be detected, and output a compatibility test result; the target hardware of the target terminal equipment is matched with the target hardware of the terminal equipment to be detected;
the support capability information of the target hardware for the hardware function at least comprises: whether the target hardware supports the hardware function;
the target terminal equipment is the terminal equipment to be detected; or, the target terminal device is not the terminal device to be detected; or the target terminal device is one of the plurality of terminal devices to be detected;
if the target terminal equipment is not the terminal equipment to be detected, the type of the target terminal equipment is the same as that of the terminal equipment to be detected;
and if the target terminal equipment is one of the plurality of terminal equipment to be detected, acquiring hardware function information supported by target hardware of the plurality of terminal equipment to be detected, and taking the terminal equipment to be detected with the maximum number of hardware functions supported by the target hardware as the target terminal equipment.
7. The apparatus according to claim 6, wherein the software to be detected further comprises an engine program, and the engine program is configured to support the running of the application to be detected;
the hardware function determining unit is specifically configured to: running software to be detected on target terminal equipment, and determining that the function of the engine program is used when the application program to be detected runs on the target terminal equipment, wherein the used function of the engine program is realized by the support of the corresponding hardware function of target hardware of the target terminal equipment;
the support capability information obtaining unit is specifically configured to: and acquiring the support capability information of the target hardware of the terminal equipment to be detected on the used function of the engine program.
8. The apparatus according to claim 7, wherein the hardware function determining unit includes an interface information acquiring unit and a function determining subunit;
wherein, the interface information obtaining unit is configured to:
acquiring interface information of a called interface called by the application program to be detected of the engine program in the process of running the application program to be detected on the target terminal equipment;
and the function determining subunit is configured to obtain, according to the matching relationship between the interface information of the interface of the engine program and the support function and the interface information of the called interface of the engine program, a function of the engine program used when the application program to be detected runs on the target terminal device.
9. The apparatus according to claim 8, wherein the interface information obtaining unit includes: the system comprises an entrance address acquisition unit, an interface determination unit and a monitoring unit;
the entry address acquisition unit is configured to acquire an entry address of a process running on the target terminal device of the application to be detected;
the interface determining unit is used for obtaining an interface of the engine program according to the entry address of the process;
the monitoring unit is used for monitoring the interface of the engine program and acquiring the interface information of the called interface called by the application program to be detected.
10. The apparatus according to claim 6, wherein the terminal device to be detected comprises the target terminal device, and the apparatus further comprises:
and the selection unit is used for selecting the terminal equipment to be detected with the maximum hardware function number supported by the target hardware from the terminal equipment to be detected as the target terminal equipment.
11. A terminal device comprising a memory and a processor;
the memory is used for storing a software program;
the processor is configured to execute the software program to perform the compatibility detection method of any of claims 1-5.
12. A computer-readable storage medium, characterized in that a program is stored therein, which when executed, implements the compatibility detection method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611026184.4A CN108073508B (en) | 2016-11-18 | 2016-11-18 | Compatibility detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611026184.4A CN108073508B (en) | 2016-11-18 | 2016-11-18 | Compatibility detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108073508A CN108073508A (en) | 2018-05-25 |
CN108073508B true CN108073508B (en) | 2021-03-19 |
Family
ID=62160799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611026184.4A Active CN108073508B (en) | 2016-11-18 | 2016-11-18 | Compatibility detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108073508B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111797009A (en) * | 2020-06-22 | 2020-10-20 | 北京字节跳动网络技术有限公司 | Method and device for detecting code compatibility and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130275091A1 (en) * | 2010-07-22 | 2013-10-17 | Cogmation Robotics Inc. | Non-programmer method for creating simulation-enabled 3d robotic models for immediate robotic simulation, without programming intervention |
CN103902444B (en) * | 2012-12-27 | 2016-03-02 | 腾讯科技(深圳)有限公司 | 3D engine compatibility test method and device |
CN104598351B (en) * | 2014-02-11 | 2016-10-05 | 腾讯科技(深圳)有限公司 | The method of testing of 3D engine compatibility and device |
CN104268046A (en) * | 2014-10-17 | 2015-01-07 | 浪潮电子信息产业股份有限公司 | Linux manual interaction NVIDIA GPU automatic testing method |
-
2016
- 2016-11-18 CN CN201611026184.4A patent/CN108073508B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108073508A (en) | 2018-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106850978B (en) | Application program control method and related equipment | |
CN107402694B (en) | Application switching method, device and computer-readable storage medium | |
US20170147187A1 (en) | To-be-shared interface processing method, and terminal | |
CN108156508B (en) | Barrage information processing method and device, mobile terminal, server and system | |
CN104967896A (en) | Method for displaying bulletscreen comment information, and apparatus thereof | |
CN106911848B (en) | Method for outputting prompt message and terminal equipment | |
CN104571979B (en) | A kind of method and apparatus for realizing split view | |
CN106708530A (en) | Information processing method and terminal equipment | |
CN106255036A (en) | A kind of eSIM changing method and terminal unit | |
CN104809055B (en) | Application program testing method and device based on cloud platform | |
CN110705497A (en) | Image frame processing method and device, terminal equipment and computer readable storage medium | |
CN106709856B (en) | Graph rendering method and related equipment | |
CN104901992B (en) | A kind of method and apparatus of resource transfers | |
US20200125369A1 (en) | Method, device, and terminal for accelerating startup of application | |
CN106339391B (en) | Webpage display method and terminal equipment | |
US11327639B2 (en) | Split view exiting method, split view exiting device, and electronic device | |
CN106934003B (en) | File processing method and mobile terminal | |
CN111427644B (en) | Target behavior identification method and electronic equipment | |
CN110602766B (en) | Personal hotspot identification method and method for determining association relationship between terminals | |
CN109451295A (en) | A kind of method and system obtaining virtual information | |
CN104866288A (en) | Method, device and terminal for accessing application program | |
CN110908586B (en) | Keyboard display method and device and terminal equipment | |
CN108073508B (en) | Compatibility detection method and device | |
CN106201536A (en) | The replacing options of a kind of application icon and terminal unit | |
CN115794654A (en) | Test case distribution processing method, system, equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |