An application adaptation method and device for a device and an electronic device
By determining the compatibility between the user's device and the application through the server and sending a reminder message, the problem of users accidentally installing incompatible applications is solved, thereby improving the stability of application operation and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-12
- Publication Date
- 2026-03-20
AI Technical Summary
Because different user devices have different operating environments, users may accidentally install incompatible applications on their devices, causing the applications to lag, crash, and display abnormalities, thus reducing the user experience.
The server determines whether the device type is the same by obtaining the user's device information and the version information of the target application. If the devices are incompatible, the server sends a reminder message to the user, prompting them to install the compatible version of the application.
This avoids issues such as lag, crashes, and display abnormalities caused by applications running on incompatible devices, thus improving the user experience.
Smart Images

Figure CN116302051B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an application program and device adaptation method and device and electronic device. BACKGROUND
[0002] With the development of computer technology, the functions provided by the client for the user are also more and more. The user can install the client providing different functions in the user device used by the user. For example, different APPs (Application) can be installed in the mobile phone and computer used by the user. Then, the user can input operation instruction to the application program, and then the application program can respond to the operation instruction input by the user. For example, the application program can be a video playing application program, the user can click the operation button for playing video in the display interface of the application program, and the application program can play the video after detecting the click operation of the user on the operation button.
[0003] In the related art, because the running environments of different user devices are different, different versions of application programs need to be installed in different user devices to realize the adaptation of the application program and the user device. When the user installs the application program in the user device, the user may misoperate and install the application program not adapted to the user device in the user device. For example, the user installs the application program adapted to the mobile phone in the television.
[0004] However, the application program and the user device are not adapted, which can cause the application program to have problems such as lag, crash, display abnormality and the like in the running process, and thus the user experience is reduced. SUMMARY
[0005] The purpose of the embodiment of the present application is to provide an application program and device adaptation method, device and electronic device, so as to improve the user experience. The specific technical solutions are as follows:
[0006] In the first aspect of the present application, an application program and device adaptation method is first provided, the method is applied to a server, and the method comprises:
[0007] obtaining first device information of a first user device installed with a target application program;
[0008] obtaining second device information of a second user device adapted to the target application program based on version information of the target application program; wherein the version information of the target application program is used to determine the identification of the user device adapted to the target application program;
[0009] judging whether the device types of the first user device and the second user device are the same based on the first device information and the second device information;
[0010] If the device type of the first user device is different from the device type of the second user device, it is determined that the target application program is not adapted to the first user device, and a prompt message indicating that the target application program is not adapted to the first user device is sent to the first user device to prompt a user to install a version of the target application program adapted to the first user device.
[0011] Optionally, the device information of a user device comprises hardware configuration information and software configuration information of the user device.
[0012] The determining whether the device type of the first user device is the same as the device type of the second user device based on the first device information and the second device information comprises:
[0013] For each hardware configuration information of the first user device, an evaluation result corresponding to the hardware configuration information is obtained; wherein the evaluation result corresponding to one hardware configuration information indicates a probability that the device type of the first user device is different from the device type of the second user device based on the hardware configuration information.
[0014] For each software configuration information of the first user device, an evaluation result corresponding to the software configuration information is obtained; wherein the evaluation result corresponding to one software configuration information indicates a probability that the device type of the first user device is different from the device type of the second user device based on the software configuration information.
[0015] A sum value of the evaluation results corresponding to the hardware configuration information and the evaluation results corresponding to the software configuration information is calculated to obtain an evaluation result of the first user device.
[0016] If the evaluation result of the first user device is greater than a first preset threshold, it is determined that the device type of the first user device is different from the device type of the second user device.
[0017] If the evaluation result of the first user device is not greater than the first preset threshold, it is determined that the device type of the first user device is the same as the device type of the second user device.
[0018] Optionally, the obtaining, for each hardware configuration information of the first user device, an evaluation result corresponding to the hardware configuration information comprises:
[0019] For each hardware configuration information of the first user device, an evaluation result corresponding to the hardware configuration information is obtained from a first correspondence relationship between preset hardware configuration information and evaluation results.
[0020] The evaluation result corresponding to each software configuration information of the first user equipment is obtained from a preset second correspondence relationship between software configuration information and evaluation results.
[0021] The evaluation result corresponding to each software configuration information of the first user equipment is obtained from a preset second correspondence relationship between software configuration information and evaluation results.
[0022] Optionally, the evaluation result in the first correspondence relationship is obtained based on a first device type prediction model, wherein sample hardware configuration information of a sample device and an evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, and an output of the first device type prediction model is a sample device type of the sample device.
[0023] The evaluation result in the second correspondence relationship is obtained based on a second device type prediction model, wherein sample software configuration information of a sample device and an evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, and an output of the second device type prediction model is a sample device type of the sample device.
[0024] Optionally, before the first device information of the first user equipment installed with the target application program is obtained, the method further comprises:
[0025] The resource acquisition request for obtaining a target network resource sent by the first user equipment is received, wherein the first device information is carried in the resource acquisition request.
[0026] The first device information of the first user equipment installed with the target application program is obtained, comprising:
[0027] If the server does not store locally the evaluation information recording whether the target application program is adapted to the first user equipment, the first device information is obtained from the resource acquisition request.
[0028] Optionally, after it is judged whether the device type of the first user equipment and the device type of the second user equipment are the same based on the first device information and the second device information, the method further comprises:
[0029] If the device type of the first user equipment and the device type of the second user equipment are the same, it is determined that the target application program is adapted to the first user equipment, and the target network resource requested by the first user equipment is sent to the first user equipment, so that the first user equipment receives the target network resource.
[0030] Optionally, the first device information is obtained from the resource acquisition request, comprising:
[0031] obtaining target data carried in the resource acquisition request sent by the first user equipment; wherein, the target data comprises data obtained by compressing and encrypting the first equipment information;
[0032] decrypting and decompressing the target data to obtain the first equipment information.
[0033] Optionally, after receiving the resource acquisition request sent by the first user equipment for acquiring target network resources, the method further comprises:
[0034] if the server has locally stored evaluation information about whether the target application program is suitable for the first user equipment, querying the evaluation information stored locally by the server;
[0035] if the evaluation information records that the target application program is not suitable for the first user equipment, sending the first user equipment the reminder message to remind the user to install a version of the target application program that is suitable for the first user equipment;
[0036] if the evaluation information records that the target application program is suitable for the first user equipment, sending the first user equipment the target network resource requested by the first user equipment, so that the first user equipment receives the target network resource.
[0037] In a second aspect of the embodiment of the present application, an application program and device adaptation device is provided, which is applied to a server and comprises:
[0038] a first equipment information acquisition module, configured to acquire first equipment information of a first user equipment installed with a target application program;
[0039] a second equipment information acquisition module, configured to acquire second equipment information of a second user equipment suitable for the target application program based on version information of the target application program; wherein, the version information of the target application program is an identifier used to determine the user equipment suitable for the target application program;
[0040] a judgment module, configured to judge whether the device type of the first user equipment and the device type of the second user equipment are the same based on the first equipment information and the second equipment information;
[0041] The reminding message sending module is configured to: if the device type of the first user equipment is different from the device type of the second user equipment, determine that the target application program is not adapted to the first user equipment, and send a reminding message indicating that the target application program is not adapted to the first user equipment to the first user equipment to remind a user to install a version of the target application program adapted to the first user equipment.
[0042] Optionally, the device information of a user equipment comprises hardware configuration information and software configuration information of the user equipment.
[0043] The judging module is specifically configured to:
[0044] For each hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained, wherein the evaluation result corresponding to one hardware configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information.
[0045] For each software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained, wherein the evaluation result corresponding to one software configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information.
[0046] A sum value of the evaluation results corresponding to the hardware configuration information and the evaluation results corresponding to the software configuration information is calculated to obtain an evaluation result of the first user equipment.
[0047] If the evaluation result of the first user equipment is greater than a first preset threshold, it is determined that the device type of the first user equipment is different from the device type of the second user equipment.
[0048] If the evaluation result of the first user equipment is not greater than the first preset threshold, it is determined that the device type of the first user equipment is the same as the device type of the second user equipment.
[0049] Optionally, the judging module is specifically configured to:
[0050] For each hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained from a first preset correspondence relationship between hardware configuration information and evaluation results.
[0051] The judging module is specifically configured to:
[0052] For each software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained from a second preset correspondence relationship between software configuration information and evaluation results.
[0053] Optionally, the evaluation result in the first correspondence is obtained based on a first device type prediction model; wherein, the sample hardware configuration information of the sample device and the evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, and an output of the first device type prediction model is the sample device type of the sample device.
[0054] The evaluation result in the second correspondence is obtained based on a second device type prediction model; wherein, the sample software configuration information of the sample device and the evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, and an output of the second device type prediction model is the sample device type of the sample device.
[0055] Optionally, the apparatus further comprises:
[0056] The resource acquisition request receiving module is configured to, before the first device information obtaining module executes the acquisition of the first device information of the first user device on which the target application program is installed, execute the reception of a resource acquisition request for acquiring a target network resource sent by the first user device; wherein, the resource acquisition request carries the first device information.
[0057] The first device information obtaining module is specifically configured to:
[0058] If the server does not locally store the evaluation information about whether the target application program is adapted to the first user device, the first device information is acquired from the resource acquisition request.
[0059] Optionally, the apparatus further comprises:
[0060] The target network resource sending module is configured to, after the judgment module executes the judgment about whether the device type of the first user device is the same as the device type of the second user device based on the first device information and the second device information, execute the following: if the device type of the first user device is the same as the device type of the second user device, it is determined that the target application program is adapted to the first user device, and the target network resource requested by the first user device is sent to the first user device, so that the first user device receives the target network resource.
[0061] Optionally, the first device information obtaining module is specifically configured to:
[0062] The target data carried in the resource acquisition request sent by the first user device is acquired; wherein, the target data includes data obtained by compressing and encrypting the first device information.
[0063] Decrypt and decompress the target data to obtain the first device information.
[0064] Optionally, the apparatus further comprises:
[0065] The evaluation information query module is configured to, after the resource acquisition request receiving module receives the resource acquisition request for acquiring target network resources sent by the first user device, query the evaluation information stored in the server locally if the server has stored the evaluation information about whether the target application program is suitable for the first user device.
[0066] The query result processing module is configured to, if the evaluation information records that the target application program is not suitable for the first user device, send the first user device the prompt message to remind the user to install the target application program of a version suitable for the first user device.
[0067] If the evaluation information records that the target application program is suitable for the first user device, the query result processing module is configured to send the first user device the target network resource requested by the first user device, so that the first user device receives the target network resource.
[0068] In a third aspect of the present application, an electronic device is provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus.
[0069] The memory is configured to store a computer program.
[0070] The processor is configured to execute the program stored in the memory, so as to implement the steps of the application program and device adaptation method according to any one of the first aspect.
[0071] In a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the application program and device adaptation method according to any one of the first aspect.
[0072] In another aspect of the present application, a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the application program and device adaptation method according to any one of the above aspects.
[0073] The application embodiment provides an application program and device adaptation method, a server acquires first device information of a first user device installed with a target application program; based on version information of the target application program, acquires second device information of a second user device adapted by the target application program; wherein the version information of the target application program is used to determine the identification of the user device adapted by the target application program; based on the first device information and the second device information, judges whether the device type of the first user device and the device type of the second user device are the same; if the device type of the first user device and the device type of the second user device are different, determines that the target application program is not adapted to the first user device, and sends a prompt message indicating that the target application program is not adapted to the first user device to the first user device, to remind the user to install the version of the target application program adapted to the first user device.
[0074] Based on the above processing, the server can determine whether the device type of the first user device and the device type of the second user device are the same according to the first device information of the first user device and the second device information of the second user device adapted by the target application program. When the device type of the first user device and the device type of the second user device are different, the server determines that the target application program is not adapted to the first user device, and sends a prompt message indicating that the target application program is not adapted to the first user device to the first user device, so as to remind the user to install the version of the target application program adapted to the first user device. Subsequently, the user can install the version of the target application program adapted to the first user device, so as to avoid the problems of lag, crash, display abnormality and the like of the target application program due to the inadaptation of the target application program to the first user device, and further improve the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description.
[0076] Figure 1 The first flowchart of the application program and device adaptation method provided by the present application embodiment;
[0077] Figure 2 The second flowchart of the application program and device adaptation method provided by the present application embodiment;
[0078] Figure 3 The third flowchart of the application program and device adaptation method provided by the present application embodiment;
[0079] Figure 4 The fourth flowchart of the application program and device adaptation method provided by the present application embodiment;
[0080] Figure 5 The fifth flowchart of the application program and device adaptation method provided by the embodiment of the present application;
[0081] Figure 6 The sixth flowchart of the application program and device adaptation method provided by the embodiment of the present application;
[0082] Figure 7 The structure diagram of the application program and device adaptation device provided by the embodiment of the present application;
[0083] Figure 8 The structure diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0084] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0085] Since the running environments of different user devices are different, and the user may misoperate when installing the application program in the user device, the application program that is not adapted to the user device may be installed in the user device. Therefore, when the application program is not adapted to the user device, the application program may appear to be stuck, crash, and display abnormally in the running process, thereby reducing the user experience. For example, the display screen of a mobile phone is generally vertical, and the display screen of a television is generally horizontal. When the user installs the application program adapted to the mobile phone in the television, since the display screen of the television is different from that of the mobile phone, the problem of display abnormality may occur, thereby reducing the user experience.
[0086] In order to solve the above problems, refer to Figure 1 , Figure 1 The first flowchart of the application program and device adaptation method provided by the embodiment of the present application, which can be applied to a server. The method can include the following steps:
[0087] S101: Obtain the first device information of the first user device installed with the target application program.
[0088] S102: Obtain the second device information of the second user device adapted to the target application program based on the version information of the target application program.
[0089] The version information of the target application program is used to determine the identity of the user device adapted to the target application program.
[0090] S103: Determine whether the device types of the first user device and the second user device are the same based on the first device information and the second device information.
[0091] S104: If the device type of the first user device is different from the device type of the second user device, it is determined that the target application program is not adapted to the first user device, and a prompt message indicating that the target application program is not adapted to the first user device is sent to the first user device to prompt the user to install a version of the target application program adapted to the first user device.
[0092] Based on the application program and device adaptation method provided in the embodiments of the present application, the server can determine whether the device type of the first user device is the same as the device type of the second user device according to the first device information of the first user device and the second device information of the second user device to which the target application program is adapted. When the device type of the first user device is different from the device type of the second user device, the server determines that the target application program is not adapted to the first user device, and sends a prompt message indicating that the target application program is not adapted to the first user device to the first user device, so as to prompt the user to install a version of the target application program adapted to the first user device. Subsequently, the user can install a version of the target application program adapted to the first user device, so as to avoid problems such as lag, crash, display abnormalities, etc. of the target application program due to the fact that the target application program is not adapted to the first user device, and thus the user experience can be improved.
[0093] In the present embodiment, the first user device can be a mobile phone, a computer, a television, etc. The user can install multiple application programs in the first user device. The target application program can be any one of the application programs installed in the first user device. The server can be a server that provides services for the user through the target application program. For example, the target application program is a video playing application program. When the user needs to browse a video, the target application program can obtain the video that the user needs to browse from the server, and play the video obtained from the server for the user in the target application program for the user to browse.
[0094] For step S101, the first device information of the first user device can indicate the device type of the first user device. The device information of a user device includes hardware configuration information and software configuration information. The hardware configuration information includes the battery configuration of the user device, the sensor configuration of the user device, the SIM card slot configuration of the user device, the height and width of the display screen of the user device, etc. without specific limitation. The sensor includes at least one of the following: an acceleration sensor, a magnetic force sensor, and a gyroscope sensor. The software configuration information of the user device includes the name of the user device, the name of the input method of the user device, the maximum value of the volume value of the user device, the screen-off time of the user device, etc. without specific limitation.
[0095] For example, if the name of the first user device includes an identifier of a television, such as a TV (Television) character, the device type of the first user device is a television; if the first user device includes a battery, the device type of the first user device is a mobile phone.
[0096] In some embodiments, in order to improve the security of the first device information and avoid leakage of the first device information, the first user device requests authorization of the user before obtaining the first device information, and obtains the first device information after obtaining the authorization of the user. The first device information can be pre-stored in the first user device by a technician.
[0097] In an implementation manner, the first user device can obtain the first device information of the first user device when receiving a starting instruction of the target application program by the user, and then directly send the first device information to the server. Correspondingly, the server can receive the first device information sent by the first user device.
[0098] In another implementation manner, the first user device can obtain the first device information of the first user device when reaching a preset period, and then send the first device information to the server. Correspondingly, the server can receive the first device information sent by the first user device. The preset period can be 10 minutes, but is not limited thereto.
[0099] In another implementation manner, the first user device can also obtain the first device information of the first user device when requesting the target network resource from the server. Correspondingly, on the basis of Figure 1 Figure 2 Before step S101, the method can further include the following steps:
[0100] S105: receiving a resource acquisition request for acquiring the target network resource sent by the first user device.
[0101] The resource acquisition request carries the first device information.
[0102] Correspondingly, step S101 includes the following steps:
[0103] S1011: If the server does not locally store evaluation information recording whether the target application program is adapted to the first user device, the first device information is obtained from the resource acquisition request.
[0104] When the user needs to obtain the target network resource, the user can input an obtaining instruction for the target network resource (which can be referred to as a target obtaining instruction) to a target application program running in the first user device. After detecting the target obtaining instruction, the first user device can obtain first device information of the first user device, and send a resource obtaining request for obtaining the target network resource to the server, and the resource obtaining request carries the first device information. For example, the target application program can be a video playing application program, and the user can click an operation button for playing a video. When the first user device detects the click operation, the first user device can send a resource obtaining request for obtaining the video to the server. The resource obtaining request can carry an identifier of the target network resource. The identifier of the target network resource can be a name of the target network resource.
[0105] After the server receives the resource obtaining request sent by the first user device, it is indicated that the first user device needs to obtain the target network resource indicated by the resource obtaining request. In order to avoid the problem that the target application program installed in the first user device appears to be stuck, crashes, and display abnormities during running when the first user device loads the target network resource, the server can obtain evaluation information recording whether the target application program is adapted to the first user device.
[0106] If the server does not locally store the evaluation information recording whether the target application program is adapted to the first user device, the server can obtain first device information of the first user device. Subsequently, the server can determine whether the target application program is adapted to the first user device based on the first device information according to the method provided in the embodiments of the present application.
[0107] The adaptation of the application program to the user device means that a specified version of the target application program is installed in a user device of a specified device type. For example, a mobile phone version of the application program is installed in a mobile phone, and a television version of the application program is installed in a television.
[0108] The inadaptation of the application program to the user device means that a specified version of the target application program is installed in a user device of another device type. For example, a mobile phone version of the application program is installed in a television, and a television version of the application program is installed in a mobile phone.
[0109] In an implementation manner, if the resource obtaining request sent by the first user device carries the first device information, the server can directly extract the first device information from the received resource obtaining request.
[0110] In another implementation manner, in order to improve the efficiency of sending the resource obtaining request to the server and improve the security of the first device information, the first user device can send the resource obtaining request carrying the first device information to the server in the following manner.
[0111] In the first mode, the first user equipment can encrypt the first device information by using an encryption algorithm to obtain target data, and send a resource acquisition request carrying the target data to the server. Correspondingly, the server can decrypt the target data to obtain the first device information.
[0112] For example, the encryption algorithm can be an AES (Advanced Encryption Standard) algorithm, or an RSA (Ron Rivest, Adi Shamir, Leonard Adleman) algorithm.
[0113] In the second mode, the first user equipment can compress the first device information by using a compression algorithm to obtain target data, and send a resource acquisition request carrying the target data to the server. Correspondingly, the server can decompress the target data to obtain the first device information.
[0114] For example, the compression algorithm can be an RLE (Run-Length Encoding) algorithm.
[0115] In the third mode, the first user equipment can compress and encrypt the first device information by using a compression algorithm and an encryption algorithm to obtain target data, and send a resource acquisition request carrying the target data to the server. Correspondingly, on the basis of Figure 2 Figure 3 Step S1011 includes the following steps:
[0116] S10111: Obtain the target data carried in the resource acquisition request sent by the first user equipment.
[0117] The target data includes data obtained by compressing and encrypting the first device information.
[0118] S10112: Decrypt and decompress the target data to obtain the first device information.
[0119] After receiving the resource acquisition request carrying the target data sent by the first user equipment, the server can decrypt and decompress the target data carried in the resource acquisition request to obtain the first device information of the first user equipment.
[0120] Based on the above processing, the first user equipment can send a resource acquisition request carrying the first device information to the server when the user needs to acquire the target network resource. Correspondingly, after receiving the resource acquisition request, the server can directly acquire the first device information from the resource acquisition request when the server does not locally store the evaluation information, and then judge whether the target application program is adapted to the first user equipment, without the first user equipment sending the first device information to the server again, so that the efficiency of resource acquisition can be improved.
[0121] For step S102, the server acquires the version information of the target application program, and acquires the device information (i.e., second device information) of the user equipment (i.e., second user equipment) adapted to the target application program according to the version information of the target application program.
[0122] The version information of the target application program is used to determine the identity of the user equipment adapted to the target application program. The electronic device can determine the device type of the user equipment adapted to the target application program based on the version information of the target application program. For example, the version information can be a version number, and the server locally records the correspondence between the version number and the device type. When the server acquires the version number of the target application program, the server can determine the device type corresponding to the version number of the target application program in the correspondence between the version number and the device type, and the device type is the device type of the second user equipment adapted to the target application program.
[0123] Further, the server can acquire the second device information of the second user equipment. For example, the second user equipment is a mobile phone, and the hardware configuration information of the second user equipment includes that the second user equipment includes a battery, the second user equipment includes a sensor, the second user equipment includes a SIM card slot, and the height of the display screen of the second user equipment is greater than the width. The software configuration information of the second user equipment includes that the name of the second user equipment does not include a television identifier, the name of the input method of the second user equipment does not include a television identifier, the maximum value of the volume value of the second user equipment is not greater than 80 decibels, and the screen-off time of the second user equipment is not greater than 120 minutes.
[0124] For step S103, in an implementation mode, the device information of the first user equipment includes hardware configuration information and software configuration information of the first user equipment. The second device information of the second user equipment includes hardware configuration information and software configuration information. For each hardware configuration information of the first user equipment, the electronic device can judge whether the hardware configuration information is the same as the hardware configuration information corresponding to the second user equipment, and for each software configuration information of the first user equipment, the electronic device can judge whether the software configuration information is the same as the software configuration information corresponding to the second user equipment.
[0125] If there is at least one item in the first device information different from the second device information, it indicates that the device type of the first user equipment is different from the device type of the second user equipment. If the first device information is the same as the second device information, it indicates that the device type of the first user equipment is the same as the device type of the second user equipment.
[0126] For example, if the second user equipment is a mobile phone, the second device information of the second user equipment includes that the second user equipment includes a SIM card slot and the name of the second user equipment does not include a television identifier.
[0127] If the first device information of the first user equipment includes that the first user equipment does not include a SIM card slot and the name of the first user equipment does not include a television identifier, there is one item in the first device information different from the second device information, and the server determines that the device type of the first user equipment is different from the device type of the second user equipment.
[0128] If the first device information of the first user equipment includes that the first user equipment includes a SIM card slot and the name of the first user equipment does not include a television identifier, the first device information is the same as the second device information, and the server determines that the device type of the first user equipment is the same as the device type of the second user equipment.
[0129] In another implementation, the server can determine whether the device type of the first user equipment is the same as the device type of the second user equipment according to each hardware configuration information and each software configuration information in the first user equipment. Correspondingly, in the step S103, the step S1031 and the step S1032 are included. Figure 1 Figure 4 The step S1031 includes the following steps.
[0130] S1031: Obtain an evaluation result corresponding to each hardware configuration information of the first user equipment.
[0131] The evaluation result corresponding to one hardware configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information.
[0132] S1032: Obtain an evaluation result corresponding to each software configuration information of the first user equipment.
[0133] The evaluation result corresponding to one software configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information.
[0134] S1033: Calculate a sum value of the evaluation results corresponding to the hardware configuration information and the evaluation results corresponding to the software configuration information to obtain an evaluation result of the first user equipment.
[0135] S1034: If the evaluation result of the first user equipment is greater than the first preset threshold, it is determined that the device type of the first user equipment is different from the device type of the second user equipment; if the evaluation result of the first user equipment is not greater than the first preset threshold, it is determined that the device type of the first user equipment is the same as the device type of the second user equipment.
[0136] In an implementation manner, for each hardware configuration information of the first user equipment, the server can obtain an evaluation result corresponding to the hardware configuration information according to the hardware configuration information corresponding to the second user equipment. The evaluation result corresponding to one hardware configuration information represents the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information. The higher / lower the evaluation result corresponding to the hardware configuration information is, the higher / lower the probability that the device type of the first user equipment is different from the device type of the second user equipment is. The higher the evaluation result corresponding to the hardware configuration information is, the higher the probability that the device type of the first user equipment is different from the device type of the second user equipment is; the lower the evaluation result corresponding to the hardware configuration information is, the lower the probability that the device type of the first user equipment is different from the device type of the second user equipment is.
[0137] For each hardware configuration information of the first user equipment, the server judges the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information, and obtains an evaluation result corresponding to the hardware configuration information.
[0138] For example, the second user equipment is a mobile phone, and the hardware configuration information of the second user equipment includes that the second user equipment includes a battery. If the hardware configuration information of the first user equipment includes that the first user equipment does not include a battery, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is high, and the electronic device records the evaluation result corresponding to the hardware configuration information of the first user equipment as 1.
[0139] The hardware configuration information of the second user equipment includes that the second user equipment includes a SIM card slot. If the hardware configuration information of the first user equipment includes that the first user equipment includes a SIM card slot, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is low, and the electronic device records the evaluation result corresponding to the hardware configuration information of the first user equipment as 0.
[0140] For each software configuration piece of the first user device, the server can obtain an evaluation result based on the software configuration piece of the second user device. The evaluation result for each software configuration piece represents the probability that the device type of the first user device is different from that of the second user device, based on that software configuration piece. The level of the evaluation result indicates the probability that the device type of the first user device is different from that of the second user device. A higher evaluation result indicates a higher probability that the device type of the first user device is different from that of the second user device; a lower evaluation result indicates a lower probability that the device type of the first user device is different from that of the second user device.
[0141] For each piece of software configuration information of the first user device, the server determines the probability that the device type of the first user device is different from that of the second user device based on the software configuration information, and obtains the evaluation result corresponding to the software configuration information.
[0142] For example, the second user device is a mobile phone, and the software configuration information of the second user device includes: the maximum volume value of the second user device is 80 decibels. If the software configuration information of the first user device includes: the maximum volume value of the first user device is 120 decibels, it indicates that the device type of the first user device is more likely to be different from that of the second user device, and the electronic device will record the evaluation result corresponding to the software configuration information of the first user device as 1.
[0143] The software configuration information of the second user device includes: the name of the second user device does not include the character "TV". If the software configuration information of the first user device includes: the name of the first user device does not include the character "TV", it indicates that the probability that the device type of the first user device is different from that of the second user device is low, and the electronic device will record the evaluation result corresponding to the software configuration information of the first user device as 0.
[0144] Then, the server calculates the sum of the evaluation results corresponding to each hardware configuration information and the evaluation results corresponding to each software configuration information to obtain the evaluation result of the first user device. That is, it counts the number of hardware configuration information entries in the first user device whose evaluation result represents the probability that the device type of the first user device is different from that of the second user device (this can be called the first number), and the number of software configuration information entries in the first user device whose evaluation result represents the probability that the device type of the first user device is different from that of the second user device (this can be called the second number). The sum of the first number and the second number is then used as the evaluation result of the first user device.
[0145] Correspondingly, the evaluation result corresponding to each hardware configuration information can represent the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information; and the evaluation result corresponding to each software configuration information can represent the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information. Therefore, the sum of the evaluation result corresponding to each hardware configuration information and the evaluation result corresponding to each software configuration information, i.e., the evaluation result of the first user equipment, can represent the probability that the device type of the first user equipment is different from the device type of the second user equipment. The higher the evaluation result of the first user equipment is, the higher the probability that the device type of the first user equipment is different from the device type of the second user equipment is; and the lower the evaluation result of the first user equipment is, the lower the probability that the device type of the first user equipment is different from the device type of the second user equipment is.
[0146] In another implementation manner, the step S1031 can include the following steps: for each hardware configuration information of the first user equipment, obtaining the evaluation result corresponding to the hardware configuration information from the preset first correspondence between the hardware configuration information and the evaluation result.
[0147] Correspondingly, the step S1032 can include the following steps: for each software configuration information of the first user equipment, obtaining the evaluation result corresponding to the software configuration information from the preset second correspondence between the software configuration information and the evaluation result.
[0148] In the first correspondence, the higher the probability that the device type of the first user equipment is different from the device type of the second user equipment based on one hardware configuration information is, the higher the evaluation result corresponding to the hardware configuration information is; and the lower the probability that the device type of the first user equipment is different from the device type of the second user equipment based on one hardware configuration information is, the lower the evaluation result corresponding to the hardware configuration information is.
[0149] For example, the second user equipment is a mobile phone, and the first correspondence includes: the hardware configuration information not containing a battery corresponds to an evaluation result of 20; the hardware configuration information not containing a sensor corresponds to an evaluation result of 10; and the hardware configuration information not containing a SIM card slot corresponds to an evaluation result of 15.
[0150] The numerical value of the evaluation result corresponding to the hardware configuration information can be set by a technician.
[0151] If the second user equipment is a mobile phone, since mobile phones basically contain a battery, while other equipment, such as a television, does not contain a battery, according to the battery configuration of the first user equipment, it can be more accurately judged whether the device type of the first user equipment and the device type of the second user equipment are the same, and then the evaluation result corresponding to the battery configuration of the first user equipment in the first correspondence relationship can be set to a larger value, such as 20. Correspondingly, the first correspondence relationship includes: if the first user equipment does not contain a battery, the corresponding evaluation result is 20.
[0152] If the second user equipment is a mobile phone, since mobile phones basically contain a sensor, while other equipment, such as a television, is fixed and does not contain a sensor, according to the sensor configuration of the first user equipment, it can be more accurately judged whether the device type of the first user equipment and the device type of the second user equipment are the same, and then the evaluation result corresponding to the battery configuration of the first user equipment in the first correspondence relationship can be set to a larger value, such as 10. Correspondingly, the first correspondence relationship includes: if the first user equipment does not contain a sensor, the corresponding evaluation result is 10.
[0153] If the second user equipment is a mobile phone, since mobile phones basically contain a SIM card slot, while other equipment, such as a television, does not necessarily contain a SIM card slot, according to the SIM card slot configuration of the first user equipment, it can be more accurately judged whether the device type of the first user equipment and the device type of the second user equipment are the same, and then the evaluation result corresponding to the SIM card slot configuration of the first user equipment in the first correspondence relationship can be set to a larger value, such as 15. Correspondingly, the first correspondence relationship includes: if the first user equipment does not contain a SIM card slot, the corresponding evaluation result is 15.
[0154] If the second user equipment is a mobile phone, since the display screen of the mobile phone is generally vertical, that is, the height of the display screen of the mobile phone is greater than the width, while other equipment, such as a television, is horizontal, that is, the width of the display screen of the television is greater than the height, according to the height and width of the display screen of the first user equipment, it can be judged whether the device type of the first user equipment and the device type of the second user equipment are the same, and then the evaluation result corresponding to the height and width of the display screen of the first user equipment in the first correspondence relationship can be set to a smaller value, such as 5. Correspondingly, the first correspondence relationship includes: if the height of the display screen of the first user equipment is not greater than the width, the corresponding evaluation result is 5.
[0155] In some embodiments, the evaluation result in the first correspondence relationship can be obtained based on a first device type prediction model. Wherein the sample hardware configuration information of the sample device and the evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, and the output of the first device type prediction model is the sample device type of the sample device.
[0156] For example, the electronic device can obtain initial evaluation results corresponding to preset per-sample hardware configuration information, such as the sample hardware configuration information not including a battery, the corresponding initial evaluation result being 20; the sample hardware configuration information not including a sensor, the corresponding initial evaluation result being 10, and the sample device type being a television.
[0157] After the sample hardware configuration information of the sample device and the initial evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, if the sample device type output by the first device type prediction model is a television, that is, the output sample device type is correct, the initial evaluation result corresponding to the sample hardware configuration information at this time can be used as the evaluation result in the first correspondence. That is, the first correspondence at this time includes: the hardware configuration information not including a battery, the corresponding evaluation result being 20, and the hardware configuration information not including a sensor, the corresponding evaluation result being 10.
[0158] If the sample device type output by the first device type prediction model is a mobile phone, that is, the output sample device type is incorrect, the initial evaluation result corresponding to the sample hardware configuration information can be adjusted, such as being adjusted to: the sample hardware configuration information not including a battery, the corresponding evaluation result being 25; and the sample hardware configuration information not including a sensor, the corresponding evaluation result being 15.
[0159] Subsequently, the sample device type output by the first device type prediction model is continued to be output according to the adjusted evaluation result corresponding to the sample hardware configuration information, and so on, until the sample device type output by the first device type prediction model is correct. Correspondingly, the evaluation result corresponding to the sample hardware configuration information at this time can be used as the evaluation result in the first correspondence.
[0160] If the initial evaluation result corresponding to the sample hardware configuration information is adjusted to: the sample hardware configuration information not including a battery, the corresponding evaluation result being 25; and the sample hardware configuration information not including a sensor, the corresponding evaluation result being 15, and the sample device type output by the first device type prediction model is a television, the output sample device type is correct, and the first correspondence at this time includes: the hardware configuration information not including a battery, the corresponding evaluation result being 25, and the hardware configuration information not including a sensor, the corresponding evaluation result being 15.
[0161] In the second correspondence, the higher the probability that the device type of the first user device is different from the device type of the second user device based on one software configuration information, the higher the evaluation result corresponding to the software configuration information; and the lower the probability that the device type of the first user device is different from the device type of the second user device based on one software configuration information, the lower the evaluation result corresponding to the software configuration information.
[0162] For example, the second user equipment is a mobile phone, the second corresponding relationship includes: the software configuration information is the name including the identification of the television, the corresponding evaluation result is 15; the software configuration information is the name including the identification of the television, the corresponding evaluation result is 5; the software configuration information is the maximum value of the volume value greater than 80 decibels, the corresponding evaluation result is 5.
[0163] The value of the corresponding evaluation result of the software configuration information can be set by the technician.
[0164] If the second user equipment is a mobile phone, since the name of the mobile phone does not include the identification of the television, the name of the television includes the identification of the television, according to the name of the first user equipment, the device type of the first user equipment can be more accurately judged to be the same as the device type of the second user equipment, and the corresponding evaluation result of the name of the first user equipment in the second corresponding relationship can be set to a larger value, such as 15. Correspondingly, the second corresponding relationship includes: if the name of the first user equipment includes the identification of the television, the corresponding evaluation result is 15.
[0165] If the second user equipment is a mobile phone, since the name of the mobile phone does not include the identification of the television, the name of the television includes the identification of the television, according to the name of the first user equipment, the device type of the first user equipment can be more accurately judged to be the same as the device type of the second user equipment, and the corresponding evaluation result of the name of the first user equipment in the second corresponding relationship can be set to a larger value, such as 15. Correspondingly, the second corresponding relationship includes: if the name of the first user equipment includes the identification of the television, the corresponding evaluation result is 15.
[0166] If the second user equipment is a mobile phone, since the maximum value of the volume value of the mobile phone is generally small, such as 80 decibels, and the maximum value of the volume value of the television is generally large, such as 120 decibels, according to the maximum value of the volume value of the first user equipment, the device type of the first user equipment can be judged to be the same as the device type of the second user equipment, and the corresponding evaluation result of the maximum value of the volume value of the first user equipment in the second corresponding relationship can be set to a smaller value, such as 5. Correspondingly, the second corresponding relationship includes: if the maximum value of the volume value of the first user equipment is greater than 80 decibels, the corresponding evaluation result is 5.
[0167] If the second user equipment is a mobile phone, since mobile phones basically have a screen-off time, and televisions basically do not have a screen-off time, the screen-off time of the first user equipment can be used to determine whether the device type of the first user equipment and the device type of the second user equipment are the same, and the evaluation result corresponding to the screen-off time of the first user equipment in the second correspondence relationship can be set to a smaller value, for example, 5. Correspondingly, the second correspondence relationship includes: if the screen-off time of the first user equipment is greater than 120 minutes, the corresponding evaluation result is 5.
[0168] In some embodiments, the evaluation result in the second correspondence relationship can be obtained based on a second device type prediction model. Wherein the sample software configuration information of the sample device and the evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, and the output of the second device type prediction model is the sample device type of the sample device.
[0169] For example, the electronic device can obtain the initial evaluation result corresponding to each sample software configuration information, such as: the sample software configuration information is the name including the identifier of the television, and the corresponding initial evaluation result is 15; the sample software configuration information is the name of the input method including the identifier of the television, and the corresponding initial evaluation result is 5, and the sample device type is a television.
[0170] After the sample software configuration information of the sample device and the initial evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, if the sample device type output by the second device type prediction model is a television, that is, the output sample device type is correct, the initial evaluation result corresponding to the sample software configuration information at this time can be used as the evaluation result in the second correspondence relationship. That is, the second correspondence relationship at this time includes: the software configuration information is the name including the identifier of the television, and the corresponding evaluation result is 15; the software configuration information is the name of the input method including the identifier of the television, and the corresponding evaluation result is 5.
[0171] If the sample device type output by the second device type prediction model is a mobile phone, that is, the output sample device type is incorrect, the initial evaluation result corresponding to the sample software configuration information can be adjusted, such as: the sample software configuration information is the name including the identifier of the television, and the corresponding evaluation result is 20; the sample software configuration information is the name of the input method including the identifier of the television, and the corresponding evaluation result is 10.
[0172] Subsequently, the sample device type output by the second device type prediction model is continued to be used according to the adjusted evaluation result corresponding to the sample software configuration information, and so on, until the sample device type output by the second device type prediction model is correct. Correspondingly, the evaluation result corresponding to the sample software configuration information at this time can be used as the evaluation result in the second correspondence relationship.
[0173] If the initial evaluation result corresponding to the sample software configuration information is adjusted as: the sample software configuration information is the name including the identifier of the television, and the corresponding evaluation result is 20; the sample software configuration information is the name of the input method including the identifier of the television, and the corresponding evaluation result is 10, the sample device type output by the second device type prediction model is the television, and the sample device type output is correct, the second corresponding relationship at this time includes: the software configuration information is the name including the identifier of the television, and the corresponding evaluation result is 20; and the software configuration information is the name of the input method including the identifier of the television, and the corresponding evaluation result is 10.
[0174] For each hardware configuration information of the first user equipment, the evaluation result corresponding to the hardware configuration information is obtained from the preset first corresponding relationship between the hardware configuration information and the evaluation result.
[0175] For example, if the second user equipment is a mobile phone, and the second device information includes that the second user equipment contains a SIM card slot, if the hardware configuration information of the first user equipment is that the first user equipment contains a SIM card slot, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is low, and the electronic device records the evaluation result corresponding to the SIM card slot configuration of the first user equipment as 0.
[0176] If the hardware configuration information of the first user equipment is that the first user equipment does not contain a SIM card slot, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is high, and the server determines the evaluation result corresponding to the hardware configuration information from the first corresponding relationship. For example, according to the first corresponding relationship in the above embodiment, the evaluation result corresponding to the SIM card slot configuration of the first user equipment is 15.
[0177] If the second user equipment is a mobile phone, and the second device information includes that the second user equipment contains a battery, if the hardware configuration information of the first user equipment is that the first user equipment contains a battery, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is low, and the electronic device records the evaluation result corresponding to the battery configuration of the first user equipment as 0.
[0178] If the hardware configuration information of the first user equipment is that the first user equipment does not contain a battery, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is high, and the server determines the evaluation result corresponding to the hardware configuration information from the first corresponding relationship. For example, according to the first corresponding relationship in the above embodiment, the evaluation result corresponding to the battery configuration of the first user equipment is 20.
[0179] For each software configuration information of the first user equipment, the evaluation result corresponding to the software configuration information is obtained from the preset second corresponding relationship between the software configuration information and the evaluation result.
[0180] For example, if the second user equipment is a mobile phone, the second equipment information includes: the maximum value of the volume value of the second user equipment is 80 decibels. If the software configuration information of the first user equipment is: the maximum value of the volume value of the first user equipment is 80 decibels, it indicates that the probability of the device type of the first user equipment being different from the device type of the second user equipment is low, and the electronic device records the evaluation result corresponding to the maximum value of the volume value of the first user equipment as 0.
[0181] If the software configuration information of the first user equipment is: the maximum value of the volume value of the first user equipment is 120 decibels, it indicates that the probability of the device type of the first user equipment being different from the device type of the second user equipment is high, and the server can determine the evaluation result corresponding to the maximum value of the volume value of the first user equipment from the second correspondence. For example, for the second correspondence in the above embodiment, the evaluation result corresponding to the maximum value of the volume value of the first user equipment is 5.
[0182] If the second user equipment is a mobile phone, the second equipment information includes: the screen-off time of the second user equipment is less than 120 minutes. If the software configuration information of the first user equipment is: the screen-off time of the first user equipment is 120 minutes, it indicates that the probability of the device type of the first user equipment being different from the device type of the second user equipment is low, and the electronic device records the evaluation result corresponding to the screen-off time of the first user equipment as 0.
[0183] If the software configuration information of the first user equipment is: the screen-off time of the first user equipment is greater than 120 minutes, it indicates that the probability of the device type of the first user equipment being different from the device type of the second user equipment is high, and the server can determine the evaluation result corresponding to the screen-off time of the first user equipment from the second correspondence. For example, for the second correspondence in the above embodiment, the evaluation result corresponding to the screen-off time of the first user equipment is 5.
[0184] After the server obtains the evaluation results corresponding to the hardware configuration information of the first user equipment and the evaluation results corresponding to the software configuration information of the first user equipment, the server can calculate the sum of the evaluation results corresponding to the hardware configuration information and the evaluation results corresponding to the software configuration information to obtain the evaluation result of the first user equipment. The higher the evaluation result of the first user equipment is, the higher the probability of the device type of the first user equipment being different from the device type of the second user equipment is; the lower the evaluation result of the first user equipment is, the lower the probability of the device type of the first user equipment being different from the device type of the second user equipment is.
[0185] Further, the server can determine whether the evaluation result of the first user equipment is greater than a first preset threshold. If the evaluation result of the first user equipment is greater than the first preset threshold, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is relatively high. If the evaluation result of the first user equipment is not greater than the first preset threshold, it indicates that the probability that the device type of the first user equipment is different from the device type of the second user equipment is relatively low. The first preset threshold can be set by a technician. For example, when the evaluation result of the first user equipment is determined based on the first correspondence relationship and the second correspondence relationship, the first preset threshold can be 30.
[0186] Based on the above processing, if the server determines whether the device type of the first user equipment is the same as the device type of the second user equipment based on only one item of first device information of the first user equipment, the accuracy of the determination result is relatively low. For example, the first user equipment can be a mobile phone with a detachable battery. After the battery is detached, the first user equipment can be normally used when connected to a charging device. At this time, since the battery is not included in the first user equipment, the server can determine that the first user equipment is a television based on the battery configuration of the first user equipment, that is, the accuracy of the determination result can be relatively low. Therefore, the server can comprehensively determine whether the device type of the first user equipment is the same as the device type of the second user equipment based on each hardware configuration information and each software configuration information included in the first device information, which can improve the accuracy of the determination result.
[0187] In some embodiments, the server can store evaluation information recording whether the evaluation result of the first user equipment is greater than the first preset threshold locally on the server. Subsequently, when the resource acquisition request sent by the first user equipment is received again, the server can directly obtain the stored evaluation information of the first user equipment from the server locally, and perform subsequent processing according to the determination result recorded in the evaluation information, without the need to obtain the first device information of the first user equipment and determine whether the device type of the first user equipment is the same as the device type of the second user equipment based on the first device information, which can improve the resource acquisition efficiency.
[0188] In some embodiments, the first device information sent by the first user equipment can carry an identifier of the first user equipment. Correspondingly, the server can store the identifier of the first user equipment and the evaluation information of the first user equipment correspondingly. Subsequently, the server can directly obtain the evaluation information corresponding to the identifier of the first user equipment from the evaluation information stored locally on the server. The identifier of the first user equipment can be a Datas Forward Protocol (DFP) string.
[0189] If the device type of the first user device is different from the device type of the second user device, it is determined that the target application is not adapted to the first user device, indicating that the target application may be stuck, crashed, and display abnormality, etc. during running in the first user device, resulting in a decrease in user experience. Therefore, the server can send a prompt message indicating that the target application is not adapted to the first user device to the first user device. After receiving the prompt message, the first user device can display the prompt message. Accordingly, the user can know that the target application is not adapted to the first user device through the prompt message displayed by the first user device, and subsequently, the user can install a version of the target application adapted to the first user device in the first user device. Further, the user can run the version of the target application adapted to the first user device in the first user device.
[0190] The prompt message can be a text for reminding the user that the target application is not adapted to the first user device, for example, "the current version of APP is not adapted to the user device, please download the correct version of APP", or can also be a download address of the version of the target application adapted to the first user device.
[0191] In some embodiments, based on the above, Figure 2 Figure 5 After step S103, the method can further include the following steps:
[0192] S106: If the device type of the first user device is the same as the device type of the second user device, it is determined that the target application is adapted to the first user device, and the target network resource requested by the first user device is sent to the first user device, so that the first user device receives the target network resource.
[0193] If the server determines that the device type of the first user device is the same as the device type of the second user device based on the first device information, it is determined that the target application is adapted to the first user device, and the target application is continued to run in the first user device, which will not cause the target application to be stuck, crashed, and display abnormality, etc. during running, and will not cause a decrease in user experience. Therefore, the server can send the target network resource requested by the first user device to the first user device, and the first user device can receive the target network resource and show the target network resource to the user for browsing after receiving the target network resource. For example, if the target network resource is a video, the video can be played in the first user device for the user to browse.
[0194] Based on the above processing, the server can send the target network resource requested by the first user equipment to the first user equipment when the target application program is adapted to the first user equipment, so as to meet the user demand.
[0195] In some embodiments, after step S1011, the method further comprises the following steps:
[0196] Step 1: If the server's local storage has evaluation information recording whether the target application program is adapted to the first user equipment, query the evaluation information stored in the server's local storage.
[0197] Step 2: If the evaluation information records that the target application program is not adapted to the first user equipment, send a reminder message to the first user equipment to remind the user to install a version of the target application program adapted to the first user equipment; if the evaluation information records that the target application program is adapted to the first user equipment, send the target network resource requested by the first user equipment to the first user equipment, so that the first user equipment receives the target network resource.
[0198] If the server's local storage has evaluation information recording whether the target application program is adapted to the first user equipment, the server can directly query the evaluation information stored in the server's local storage to determine whether the target application program is adapted to the first user equipment.
[0199] The evaluation information stored in the server's local storage can be stored when the server first determines whether the target application program is adapted to the first user equipment, or can be stored when the server last receives the resource acquisition request sent by the first user equipment and determines whether the target application program is adapted to the first user equipment.
[0200] If the evaluation information stored in the server's local storage records that the target application program is not adapted to the first user equipment, it indicates that running the target application program in the first user equipment may cause the target application program to appear to be stuck, crash, and display abnormally during running, and thus reduce the user experience. Therefore, the server can send a reminder message to the first user equipment. After receiving the reminder message, the first user equipment can display the reminder message. Accordingly, the user can know from the reminder message displayed by the first user equipment that the target application program is not adapted to the first user equipment, and the user can subsequently install a version of the target application program adapted to the first user equipment in the first user equipment. Further, the user can run the version of the target application program adapted to the first user equipment in the first user equipment.
[0201] If the server locally stores the evaluation information recording that the target application program is adapted to the first user device, it indicates that when the target application program continues to run in the first user device, it will not cause the target application program to appear problems such as freezing, crashing, and display abnormalities during running, and will not cause the user experience to be reduced. Therefore, the server can send the target network resource requested by the first user device to the first user device, and the first user device can receive the target network resource, and after receiving the target network resource, show the target network resource to the user for browsing.
[0202] Based on the above processing, if the server locally stores the evaluation information recording whether the target application program is adapted to the first user device, the server can directly use the evaluation information stored locally by the server, and perform subsequent processing according to the judgment result recorded in the evaluation information, without the need to obtain the first device information of the first user device, and without the need to judge whether the target application program is adapted to the first user device according to the first device information, so that the efficiency of the application program and device adaptation method can be improved.
[0203] In some embodiments, referring to Figure 6 , Figure 6 A sixth flowchart of an application program and device adaptation method provided by an embodiment of the application can include the following steps:
[0204] S601: The first user device performs device information collection (battery status, name, input method, volume, sensor, SIM (subscriber identity module) card slot, screen size, screen-off time).
[0205] The client running in the first user device is the target application program in the foregoing embodiments. After starting the target application program in the first user device, the first user device can obtain the first device information of the first user device. The first device information includes hardware configuration information and software configuration information of the first user device. The hardware configuration information of the first user device includes: battery configuration of the first user device, sensor configuration of the first user device; SIM card slot configuration of the first user device; height and width of the display screen of the first user device, etc., which are not specifically limited; wherein the sensor includes at least one of: an acceleration sensor, a magnetic sensor, and a gyroscope sensor. The software configuration information of the first user device includes: the name of the first user device; the name of the input method of the first user device; the maximum value of the volume value of the first user device; the screen-off time of the first user device, etc., which are not specifically limited.
[0206] S602: The first user device performs data encryption and compression transmission.
[0207] After the first user equipment obtains the first device information, in order to improve the efficiency of the first user equipment sending the first device information to the server and improve the security of the first device information, the first user equipment can compress and encrypt the first device information to obtain target data. Then, the first user equipment can send the target data carrying the identifier of the first user equipment to the server. The identifier of the first user equipment can be a DFP string.
[0208] S603: The server performs data decryption and decompression receiving.
[0209] After the server receives the target data sent by the first user equipment, the target data can be decrypted and decompressed to obtain the first device information.
[0210] S604: The server performs calculation of whether it is cross-end installation by using a scoring algorithm.
[0211] After the server obtains the first device information, it can determine whether the target application program is cross-end installation by using a scoring algorithm. That is, the server determines whether the device type of the first user equipment is the same as the device type of the second user equipment according to the first device information and the second device information of the second user equipment adapted to the target application program, and further determines whether the target application program is adapted to the first user equipment, that is, the server can obtain the evaluation information of the first user equipment. If the target application program is adapted to the first user equipment, that is, the target application program is not cross-end installation; if the target application program is not adapted to the first user equipment, that is, the target application program is cross-end installation.
[0212] S605: The server saves the result in the disk and the memory, which is convenient for next extraction.
[0213] After the server obtains the evaluation information of the first user equipment, the identifier of the first user equipment and the evaluation information of the first user equipment are stored in the disk or the memory of the server, that is, the identifier of the first user equipment and the evaluation information of the first user equipment are stored in the local server. Subsequently, the server can obtain the evaluation information corresponding to the identifier of the first user equipment from the evaluation information stored in the local server.
[0214] S606: The first user equipment enters a scene requiring judgment of whether the client is adapted to the first user equipment.
[0215] When the user enters a scene requiring judgment of whether the target application program is adapted to the first user equipment, the user can input a target acquisition instruction for acquiring a target network resource to the first user equipment. For example, the scene can be that the user needs to browse a video, and the user can click an operation button for playing the video.
[0216] S607: The first user equipment executes to inquire whether the server can play.
[0217] After detecting the target acquisition instruction input by the user, the first user equipment can send a resource acquisition request carrying the identification of the first user equipment and the target data to the server.
[0218] S608: The server executes data decryption and decompression reception.
[0219] After receiving the resource acquisition request sent by the first user equipment, the server can perform corresponding decryption and decompression on the target data to obtain the first device information.
[0220] S609: The server executes to judge whether the cross-end information of the user is contained in the disk and the memory.
[0221] After obtaining the first device information, the server can query whether the evaluation information corresponding to the identification of the first user equipment is stored in the server according to the identification of the first user equipment carried in the resource acquisition request. If the server locally stores the evaluation information of the first user equipment, the server can directly obtain the judgment result of whether the target application program is suitable for the first user equipment according to the evaluation information. If the server does not store the evaluation information of the first user equipment, the server can judge whether the target application program is suitable for the first user equipment according to the first device information.
[0222] S610: The server executes result return.
[0223] If the server determines that the target application program is not suitable for the first user equipment, the server sends a prompt message to the first user equipment. If the server determines that the target application program is suitable for the first user equipment, the server sends the target network resource requested by the first user equipment to the first user equipment.
[0224] S611: The first user equipment executes to play the video or output the prompt message.
[0225] After receiving the prompt message, the first user equipment displays the prompt message to remind the user to install the target application program of the version suitable for the first user equipment; after receiving the target network resource, the first user equipment can display the target network resource to the user.
[0226] Based on the above processing, the server can determine whether the target application program is adapted to the first user device according to the first device information of the first user device and the second device information of the second user device to which the target application program is adapted. When the target application program is not adapted to the first user device, the server sends a prompt message indicating that the target application program is not adapted to the first user device to the first user device. After receiving the prompt message, the first user device can display the prompt message to remind the user to install a version of the target application program adapted to the first user device. Subsequently, the user can install the version of the target application program adapted to the first user device, thereby avoiding problems such as lag, crash, display abnormalities, and the like of the target application program due to the fact that the target application program is not adapted to the first user device, and improving user experience.
[0227] In addition, since the first user device sends the first device information to the server each time the resource acquisition request is sent, when the server receives the resource acquisition request sent by the first user device each time and the server does not store the evaluation information locally, the server can directly obtain the first device information carried in the resource acquisition request and determine whether the target application program is adapted to the first user device according to the first device information, that is, the first device information can be prevented from being tampered with, and the accuracy of the determination result can be improved.
[0228] Based on the same inventive concept as the above application program and device adaptation method, the embodiments of the present application also provide an application program and device adaptation apparatus. The apparatus is applied to a server, and the apparatus comprises Figure 7 , and the apparatus comprises:
[0229] The first device information acquisition module 701 is configured to acquire first device information of a first user device on which a target application program is installed.
[0230] The second device information acquisition module 702 is configured to acquire second device information of a second user device to which the target application program is adapted based on version information of the target application program. The version information of the target application program is used to determine an identifier of a user device to which the target application program is adapted.
[0231] The determination module 703 is configured to determine whether a device type of the first user device and a device type of the second user device are the same based on the first device information and the second device information.
[0232] The reminding message sending module 704 is configured to: if the device type of the first user equipment is different from the device type of the second user equipment, determining that the target application program is not adapted to the first user equipment, and sending a reminding message indicating that the target application program is not adapted to the first user equipment to the first user equipment to remind a user to install a version of the target application program adapted to the first user equipment.
[0233] Optionally, the device information of a user equipment comprises hardware configuration information and software configuration information of the user equipment.
[0234] The judging module 703 is specifically configured to:
[0235] For each hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained, wherein the evaluation result corresponding to one hardware configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information.
[0236] For each software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained, wherein the evaluation result corresponding to one software configuration information indicates a probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information.
[0237] A sum value of the evaluation results corresponding to the hardware configuration information and the evaluation results corresponding to the software configuration information is calculated to obtain an evaluation result of the first user equipment.
[0238] If the evaluation result of the first user equipment is greater than a first preset threshold, it is determined that the device type of the first user equipment is different from the device type of the second user equipment.
[0239] If the evaluation result of the first user equipment is not greater than the first preset threshold, it is determined that the device type of the first user equipment is the same as the device type of the second user equipment.
[0240] Optionally, the judging module 703 is specifically configured to:
[0241] For each hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained from a first preset correspondence relationship between hardware configuration information and evaluation results.
[0242] The judging module 703 is specifically configured to:
[0243] For each software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained from a second preset correspondence relationship between software configuration information and evaluation results.
[0244] Optionally, the evaluation result in the first correspondence is obtained based on a first device type prediction model; wherein, the sample hardware configuration information of the sample device and the evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, and an output of the first device type prediction model is the sample device type of the sample device.
[0245] The evaluation result in the second correspondence is obtained based on a second device type prediction model; wherein, the sample software configuration information of the sample device and the evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, and an output of the second device type prediction model is the sample device type of the sample device.
[0246] Optionally, the apparatus further comprises:
[0247] The resource acquisition request receiving module is configured to, before the first device information acquisition module 701 executes the acquisition of the first device information of the first user device on which the target application program is installed, execute the reception of a resource acquisition request for acquiring a target network resource sent by the first user device; wherein, the resource acquisition request carries the first device information.
[0248] The first device information acquisition module 701 is specifically configured to:
[0249] If the server does not locally store the evaluation information about whether the target application program is adapted to the first user device, the first device information is acquired from the resource acquisition request.
[0250] Optionally, the apparatus further comprises:
[0251] The target network resource sending module is configured to, after the judgment module 703 executes the judgment about whether the device type of the first user device is the same as the device type of the second user device based on the first device information and the second device information, execute the following: if the device type of the first user device is the same as the device type of the second user device, it is determined that the target application program is adapted to the first user device, and the target network resource requested by the first user device is sent to the first user device, so that the first user device receives the target network resource.
[0252] Optionally, the first device information acquisition module 701 is specifically configured to:
[0253] The target data carried in the resource acquisition request sent by the first user device is acquired; wherein, the target data includes data obtained by compressing and encrypting the first device information.
[0254] decrypt and decompress the target data to obtain the first device information.
[0255] Optionally, the apparatus further comprises:
[0256] an evaluation information query module, configured to, after the resource acquisition request receiving module receives the resource acquisition request for acquiring target network resources sent by the first user device, query the evaluation information stored in the server locally if the server has the evaluation information about whether the target application program is suitable for the first user device;
[0257] a query result processing module, configured to, if the evaluation information records that the target application program is not suitable for the first user device, send the reminding message to the first user device to remind the user to install the target application program of a version suitable for the first user device;
[0258] if the evaluation information records that the target application program is suitable for the first user device, send the target network resource requested by the first user device to the first user device to enable the first user device to receive the target network resource.
[0259] The application program and device adaptation apparatus provided in the embodiment of the application can enable the server to determine whether the device type of the first user device is the same as the device type of the second user device according to the first device information of the first user device and the second device information of the second user device to which the target application program is suitable. When the device type of the first user device is not the same as the device type of the second user device, the server determines that the target application program is not suitable for the first user device, and sends the reminding message indicating that the target application program is not suitable for the first user device to the first user device, so as to remind the user to install the target application program of a version suitable for the first user device. Subsequently, the user can install the target application program of a version suitable for the first user device, so as to avoid problems such as lag, crash, display abnormality and the like of the target application program due to the fact that the target application program is not suitable for the first user device, and further improve user experience.
[0260] The embodiment of the application further provides an electronic device, as shown in the figure, Figure 8 the processor 801, the communication interface 802 and the memory 803 can communicate with each other through the communication bus 804,
[0261] the memory 803 is used for storing a computer program;
[0262] The processor 801 is configured to implement the steps of the adaptation method of the application program and the device in any of the above embodiments when executing the program stored in the memory 803.
[0263] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0264] The communication interface is used for communication between the above electronic device and other devices.
[0265] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the above processor.
[0266] The above processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0267] In another embodiment provided by the application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the adaptation method of the application program and the device in any of the above embodiments is implemented.
[0268] In another embodiment provided by the application, a computer program product containing instructions is also provided, and when the computer program product is run on a computer, the computer is caused to execute the adaptation method of the application program and the device in any of the above embodiments.
[0269] In the embodiments described above, all or some of the steps can be implemented by software, hardware or firmware, or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program can be stored in any computer readable medium, and loaded into the computer system for execution. The computer readable medium includes: a computer storage medium and a computer communication medium. The computer storage medium includes: volatile media (such as random access memory (RAM) and others) and non-volatile media (such as read-only memory (ROM), floppy disks, CD-ROMs, optical disks, hard disks, etc.). The computer communication medium includes: computer networks and other media.
[0270] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In addition, the terms "comprise", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or other elements inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article or device that includes the element.
[0271] Each of the embodiments in the specification is described in a related manner, and the same or similar parts between each of the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device, electronic device, computer readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0272] The above merely provides the preferred embodiments of the application, and not intended to limit the protection scope of the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the application shall fall within the protection scope of the application.
Claims
1. A method for adapting an application to a device, characterized in that, The method is applied to a server, and the method includes: Obtain first device information for the first user device that has the target application installed; Based on the version information of the target application, second device information of the second user device to which the target application is adapted is obtained; wherein, the version information of the target application is used to determine the identifier of the user device to which the target application is adapted; Based on the first device information and the second device information, determine whether the device type of the first user device is the same as the device type of the second user device; If the device type of the first user device is different from that of the second user device, it is determined that the target application is not compatible with the first user device, and a reminder message indicating that the target application is not compatible with the first user device is sent to the first user device to remind the user to install the version of the target application that is compatible with the first user device. The device information of a user device includes the hardware configuration information and software configuration information of the user device; The step of determining whether the device type of the first user equipment and the device type of the second user equipment are the same based on the first device information and the second device information includes: For each piece of hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained; wherein, the evaluation result corresponding to a piece of hardware configuration information represents the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information. For each piece of software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained; wherein, the evaluation result corresponding to a piece of software configuration information represents the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information. The sum of the evaluation results corresponding to each hardware configuration information and the evaluation results corresponding to each software configuration information is calculated to obtain the evaluation result of the first user equipment. If the evaluation result of the first user equipment is greater than the first preset threshold, it is determined that the device type of the first user equipment is different from the device type of the second user equipment. If the evaluation result of the first user equipment is not greater than the first preset threshold, it is determined that the device type of the first user equipment is the same as the device type of the second user equipment.
2. The method according to claim 1, characterized in that, The step of obtaining the evaluation result corresponding to each hardware configuration information of the first user equipment includes: For each piece of hardware configuration information of the first user equipment, the evaluation result corresponding to that hardware configuration information is obtained from the first correspondence between the preset hardware configuration information and the evaluation result. The step of obtaining the evaluation result corresponding to each software configuration information of the first user equipment includes: For each software configuration information of the first user equipment, the evaluation result corresponding to that software configuration information is obtained from the second correspondence between the preset software configuration information and the evaluation result.
3. The method according to claim 2, characterized in that, The evaluation result in the first correspondence is obtained based on the first device type prediction model; wherein, the sample hardware configuration information of the sample device and the evaluation result corresponding to the sample hardware configuration information are input into the first device type prediction model, and the output of the first device type prediction model is the sample device type of the sample device; The evaluation result in the second correspondence is obtained based on the second device type prediction model; wherein, the sample software configuration information of the sample device and the evaluation result corresponding to the sample software configuration information are input into the second device type prediction model, and the output of the second device type prediction model is the sample device type of the sample device.
4. The method according to claim 1, characterized in that, Before obtaining the first device information of the first user device with the target application installed, the method further includes: Receive a resource acquisition request sent by the first user equipment for acquiring target network resources; wherein the resource acquisition request carries information about the first device; The step of obtaining the first device information of the first user device with the target application installed includes: If the server does not locally store evaluation information on whether the target application is compatible with the first user device, the first device information is obtained from the resource acquisition request.
5. The method according to claim 4, characterized in that, After determining whether the device type of the first user device and the device type of the second user device are the same based on the first device information and the second device information, the method further includes: If the device type of the first user equipment is the same as that of the second user equipment, it is determined that the target application is compatible with the first user equipment, and the target network resource requested by the first user equipment is sent to the first user equipment so that the first user equipment can receive the target network resource.
6. The method according to claim 4, characterized in that, Obtaining the first device information from the resource acquisition request includes: Obtain the target data carried in the resource acquisition request sent by the first user equipment; wherein, the target data includes: data obtained by compressing and encrypting the information of the first device; The target data is decrypted and decompressed to obtain the information of the first device.
7. The method according to claim 4, characterized in that, After receiving the resource acquisition request sent by the first user equipment for acquiring target network resources, the method further includes: If the server's local storage contains evaluation information on whether the target application is compatible with the first user device, query the evaluation information stored locally on the server. If the evaluation information records that the target application is incompatible with the first user device, the reminder message is sent to the first user device to remind the user to install the version of the target application that is compatible with the first user device. If the evaluation information records that the target application is compatible with the first user equipment, the target network resource requested by the first user equipment is sent to the first user equipment so that the first user equipment can receive the target network resource.
8. An application and device adaptation device, characterized in that, The device is used in a server, and the device includes: The first device information acquisition module is used to acquire the first device information of the first user device that has the target application installed. The second device information acquisition module is used to acquire second device information of the second user device adapted to the target application based on the version information of the target application; wherein, the version information of the target application is used to identify the user device adapted to the target application. The judgment module is used to determine whether the device type of the first user device is the same as the device type of the second user device based on the first device information and the second device information; The reminder message sending module is used to determine that the target application is incompatible with the first user device if the device type of the first user device is different from that of the second user device, and to send a reminder message to the first user device indicating that the target application is incompatible with the first user device, so as to remind the user to install the version of the target application that is compatible with the first user device; The device information of a user device includes the hardware configuration information and software configuration information of the user device; The judgment module is specifically used for: For each piece of hardware configuration information of the first user equipment, an evaluation result corresponding to the hardware configuration information is obtained; wherein, the evaluation result corresponding to a piece of hardware configuration information represents the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the hardware configuration information. For each piece of software configuration information of the first user equipment, an evaluation result corresponding to the software configuration information is obtained; wherein, the evaluation result corresponding to a piece of software configuration information represents the probability that the device type of the first user equipment is different from the device type of the second user equipment based on the software configuration information. The sum of the evaluation results corresponding to each hardware configuration information and the evaluation results corresponding to each software configuration information is calculated to obtain the evaluation result of the first user equipment. If the evaluation result of the first user equipment is greater than the first preset threshold, it is determined that the device type of the first user equipment is different from the device type of the second user equipment. If the evaluation result of the first user equipment is not greater than the first preset threshold, it is determined that the device type of the first user equipment is the same as the device type of the second user equipment.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Method, device and system for downloading application program from on-line application repository
CN101799765A