Information processing method and electronic equipmentTechnical Field
The present invention relates to information processing technologies, and in particular, to an information processing method and an electronic device.
Background
In the initial development stage of the mobile terminal, the screen size of the mobile terminal is smaller, the resolution of the screen is lower, an operating system of the mobile terminal such as an Android system can only provide an application function of a single window, and only one application program can be displayed in the single window; i.e., the operating system allows only one application to be in the foreground and interact with the user. However, with the rapid development of mobile terminal hardware, especially the improvement of the resolution and the increase of the size of the screen, such a single-window application of the Android system has failed to meet the needs of the user, and the user urgently needs that the operating system of the mobile terminal can provide the application function of the small window.
Therefore, when the application is displayed through the small window, the user often calls the display area of the small window, so that resources can be rearranged by the mobile terminal, and some resource controls on the small window can be incompletely displayed.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide an information processing method and an electronic device, which can automatically match optimal application resource data according to a window display size.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides an information processing method, which is applied to electronic equipment with a display unit; the electronic device is capable of running an application; the method comprises the following steps:
detecting a first window, and obtaining a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window;
selecting resource data matched with the first parameter from the resource data set of the first application according to a preset rule based on the first parameter, and controlling the display of the first application on the first window based on the resource data; wherein the resource data includes display attribute data of the first application when the first window is displayed.
In the above scheme, the resource data set includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
In the above solution, the resource data includes a resolution parameter of the first application when the first window is displayed; the at least two resource data have different resolution parameters, respectively.
In the foregoing solution, the selecting, according to a preset rule, resource data matched with the first parameter from the resource data set of the first application based on the first parameter includes:
searching a first mapping set based on the first parameter to obtain a resource data identifier matched with the first parameter; the first mapping set comprises a mapping relation between a first parameter and a resource data identifier;
and searching the resource data set of the first application based on the resource data identifier to obtain first resource data matched with the resource data identifier.
In the foregoing solution, the searching for the first mapping set based on the first parameter to obtain the resource data identifier matched with the first parameter includes:
searching the first mapping set based on the first parameter, and obtaining a first resource data identifier matched with a first preset threshold interval when the first parameter is determined to be in the first preset threshold interval;
the first mapping set comprises mapping relations between at least two preset threshold intervals and at least two resource data; the first preset threshold interval is any one of at least two preset threshold intervals; the number of the at least two preset threshold intervals is consistent with the number of the at least two resource data.
In the above solution, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data.
In the foregoing solution, when the first parameter indicates that the size of the first window is the size of the full-screen window, the selecting, according to a preset rule based on the first parameter, resource data matched with the first parameter from the resource data set of the first application includes: selecting second resource data in a set of resource data of the first application based on the first parameter; wherein a resolution parameter in the second resource data is maximum.
The embodiment of the invention also provides the electronic equipment, which is provided with a display unit; the electronic device further includes: the device comprises a detection unit, a selection unit and a control unit; wherein,
the detection unit is used for detecting a first window and obtaining a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window;
the selecting unit is configured to select, according to a preset rule, resource data matched with the first parameter from the resource data set of the first application based on the first parameter obtained by the detecting unit; wherein the resource data comprises display attribute data of the first application when the first window is displayed;
the control unit is used for controlling the display of the first application in the first window based on the resource data selected by the selection unit.
In the above scheme, the resource data set includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
In the above solution, the resource data includes a resolution of the first application when the first window is displayed; the at least two resource data have different resolution parameters, respectively.
In the foregoing solution, the selecting unit is configured to search a first mapping set based on the first parameter, and obtain a resource data identifier matched with the first parameter; the first mapping set comprises a mapping relation between a first parameter and a resource data identifier; and searching the resource data set of the first application based on the resource data identifier to obtain first resource data matched with the resource data identifier.
In the foregoing solution, the selecting unit is configured to search the first mapping set based on the first parameter, and when it is determined that the first parameter is within a first preset threshold interval, obtain a first resource data identifier matched with the first preset threshold interval; the first mapping set comprises mapping relations between at least two preset threshold intervals and at least two resource data; the first preset threshold interval is any one of at least two preset threshold intervals; the number of the at least two preset threshold intervals is consistent with the number of the at least two resource data.
In the foregoing solution, the selecting unit is further configured to select, when the first parameter indicates that the size of the first window is the size of the full-screen window, second resource data in the resource data set of the first application based on the first parameter; wherein a resolution parameter in the second resource data is maximum.
The embodiment of the invention provides an information processing method and electronic equipment, wherein detected first parameters of a first window are used for selecting resource data matched with the first parameters from a resource data set of a first application according to a preset rule, and the display of the first application on the first window is controlled based on the resource data; wherein the resource data comprises display attribute data of the first application when the first window is displayed; the first parameter characterizes a display size of the first window. Therefore, the optimal application resource data can be automatically matched according to the window display size, the application resources can be prevented from being rearranged when the window size is adjusted, and therefore the incomplete display of part of controls in the application is avoided.
Drawings
Fig. 1 is a schematic flowchart of an information processing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating an information processing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating an information processing method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Example one
The embodiment of the invention provides an information processing method which is applied to electronic equipment with a display unit. Fig. 1 is a schematic flowchart of an information processing method according to a first embodiment of the present invention; as shown in fig. 1, the information processing method includes:
step 101: detecting a first window, and obtaining a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window.
The information processing method described in the embodiment is applied to an electronic device having a display unit; in this step, the detecting the first window and obtaining the first parameter of the first window specifically include: the electronic equipment detects a first window and obtains a first parameter of the first window. Here, the electronic device is capable of running an application, which is displayable through a full screen window or a small window of a display unit of the electronic device; and the display area of the small window is smaller than that of the full-screen window. The electronic device may specifically be an electronic device without a touch function, such as a desktop computer and a notebook computer, and may also be an electronic device with a touch function, such as a smart phone, a tablet computer and a desktop computer.
Here, when the first window is detected, that is, when the trigger start of the first application is detected, it is detected that the window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Step 102: selecting resource data matched with the first parameter from the resource data set of the first application according to a preset rule based on the first parameter; wherein the resource data includes display attribute data of the first application when the first window is displayed.
In this embodiment, each application has a corresponding resource data set, and the first application is any one of the applications, that is, the resource data set of the first application includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by a main body of the first application in the display unit, but also a resolution size occupied by a User Interface (UI) control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
In this embodiment, the selecting, according to a preset rule, the resource data matched with the first parameter from the resource data set of the first application based on the first parameter is that the selecting, according to a preset rule, the resource data matched with the display size of the first window from the resource data set of the first application based on the display size of the first window. Namely, the resource data matched with the resolution parameter of the first application when the first window is displayed is selected from the resource data set of the first application according to a preset rule based on the resolution parameter of the first application when the first window is displayed. The preset rule described in this embodiment is: the larger the display size of the first window characterized by the first parameter is, the larger the resolution parameter of the first application included in the selected resource data when the first window is displayed is, and conversely, the smaller the display size of the first window characterized by the first parameter is, the smaller the resolution parameter of the first application included in the selected resource data when the first window is displayed is, that is, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data. In practical applications, at least two resource data in the resource data set of the first application have different resolution parameters, for example, the resource data set includes two resource data, where a first resource data has a resolution parameter of High resolution (HDPI), and a second resource data has a resolution parameter of ultra High resolution (XHDPI); assuming that the size of the first window characterized by the first parameter is only two, one is that the display size of the first window is equal to the size of a full-screen window, and the other is that the display size of the first window is equal to the size of a small window, and the display area of the small window is smaller than the display area of the full-screen window, when it is detected that the display size of the first window characterized by the first parameter is equal to the size of the full-screen window, the resource data of the larger resolution parameter, that is, the resource data of XHDPI, is selected; and when the first parameter is detected to represent that the display size of the first window is equal to the size of the small window, selecting the resource data of the smaller resolution parameter, namely selecting the resource data of the HDPI.
Step 103: controlling display of the first application in the first window based on the resource data.
In this embodiment, the resource data includes not only a resolution size occupied by the main body of the first application in the display unit but also a resolution size occupied by the UI control in the first application in the display unit, that is, in this step, the electronic device controls display of the main body of the first application in the first window based on the resolution size occupied by the main body of the first application in the display unit in the resource data, and controls display of the UI control in the first application in the first window based on the resolution size occupied by the UI control in the first application in the display unit in the resource data.
By adopting the technical scheme of the embodiment of the invention, the optimal application resource data can be automatically matched according to the size of the window display size, and the situation that the application resources are rearranged when the window size is adjusted can be avoided; on the other hand, because the resource data comprises the display size occupied by the UI control of the application in the display unit, by adopting the technical scheme of the embodiment of the invention, the display size of the UI control in the application in the display unit can be self-adapted according to the display size of the window, and the problem of incomplete display of part of the controls in the application is avoided.
Example two
The embodiment of the invention provides an information processing method which is applied to electronic equipment with a display unit. FIG. 2 is a flowchart illustrating an information processing method according to a second embodiment of the present invention; as shown in fig. 2, the information processing method includes:
step 201: detecting a first window, and obtaining a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window.
The information processing method described in the embodiment is applied to an electronic device having a display unit; in this step, the detecting the first window and obtaining the first parameter of the first window specifically include: the electronic equipment detects a first window and obtains a first parameter of the first window. Here, the electronic device is capable of running an application, which is displayable through a full screen window or a small window of a display unit of the electronic device; and the display area of the small window is smaller than that of the full-screen window. The electronic device may specifically be an electronic device without a touch function, such as a desktop computer and a notebook computer, and may also be an electronic device with a touch function, such as a smart phone, a tablet computer and a desktop computer.
Here, when the first window is detected, that is, when the trigger start of the first application is detected, it is detected that the window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Step 202: searching a first mapping set based on the first parameter to obtain a resource data identifier matched with the first parameter; and the first mapping set comprises a mapping relation between a first parameter and a resource data identifier.
Specifically, the searching for the first mapping set based on the first parameter to obtain the resource data identifier matched with the first parameter includes: searching the first mapping set based on the first parameter, and obtaining a first resource data identifier matched with a first preset threshold interval when the first parameter is determined to be in the first preset threshold interval; the first mapping set comprises mapping relations between at least two preset threshold intervals and at least two resource data; the first preset threshold interval is any one of at least two preset threshold intervals; the number of the at least two preset threshold intervals is consistent with the number of the at least two resource data.
In this embodiment, a first mapping set is stored in the electronic device, where a mapping relationship between a first parameter and a resource data identifier is stored in the first mapping set, for example, the first parameter indicates that the first window is a first resource data identifier corresponding to a large window, the first parameter indicates that the first window is a second resource data identifier corresponding to a middle window, and the first parameter indicates that the first window is a third resource data identifier corresponding to a small window; in practical application, the sizes of the first window are represented by a first preset threshold, a second preset threshold and a third preset threshold, namely the first preset threshold corresponds to a first resource data identifier, the second preset threshold corresponds to a second resource data identifier, and the third preset threshold corresponds to a third resource data identifier, namely when the first parameter is greater than or equal to the first preset threshold, the first resource data identifier corresponding to the first preset threshold is selected; when the first parameter is between the first preset threshold and the second preset threshold, selecting a second resource data identifier corresponding to the second preset threshold; and when the first parameter is between the second preset threshold and the third preset threshold, selecting a third resource data identifier corresponding to the third preset threshold.
Step 203: searching a resource data set of the first application based on the resource data identifier to obtain first resource data matched with the resource data identifier; wherein the first resource data includes display attribute data of the first application when the first window is displayed.
In this embodiment, each application has a corresponding resource data set, and the first application is any one of the applications, that is, the resource data set of the first application includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values. Here, the at least two resource data in the resource data set each include a resource data identifier, and at least two resource data identifiers of the at least two resource data correspond to the resource data identifiers in the first mapping set instep 202. In this step, the resource data identifier of each resource data in the resource data set is searched based on the obtained resource data identifier, and the resource data matched with the resource data identifier is obtained as the first resource data.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
Step 204: controlling display of the first application in the first window based on the first resource data.
In this embodiment, the resource data includes not only a resolution size occupied by the main body of the first application in the display unit but also a resolution size occupied by the UI control in the first application in the display unit, that is, in this step, the electronic device controls display of the main body of the first application in the first window based on the resolution size occupied by the main body of the first application in the display unit in the resource data, and controls display of the UI control in the first application in the first window based on the resolution size occupied by the UI control in the first application in the display unit in the resource data.
By adopting the technical scheme of the embodiment of the invention, the optimal application resource data can be automatically matched according to the size of the window display size, and the situation that the application resources are rearranged when the window size is adjusted can be avoided; on the other hand, because the resource data comprises the display size occupied by the UI control of the application in the display unit, by adopting the technical scheme of the embodiment of the invention, the display size of the UI control in the application in the display unit can be self-adapted according to the display size of the window, and the problem of incomplete display of part of the controls in the application is avoided.
EXAMPLE III
The embodiment of the invention provides an information processing method which is applied to electronic equipment with a display unit. FIG. 3 is a flowchart illustrating an information processing method according to a third embodiment of the present invention; as shown in fig. 3, the information processing method includes:
step 301: detecting a first window, and obtaining a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window.
The information processing method described in the embodiment is applied to an electronic device having a display unit; in this step, the detecting the first window and obtaining the first parameter of the first window specifically include: the electronic equipment detects a first window and obtains a first parameter of the first window. Here, the electronic device is capable of running an application, which is displayable through a full screen window or a small window of a display unit of the electronic device; and the display area of the small window is smaller than that of the full-screen window. The electronic device may specifically be an electronic device without a touch function, such as a desktop computer and a notebook computer, and may also be an electronic device with a touch function, such as a smart phone, a tablet computer and a desktop computer.
Here, when the first window is detected, that is, when the trigger start of the first application is detected, it is detected that the window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Step 302: when the first parameter characterizes that the size of the first window is the size of the full-screen window, selecting second resource data in a resource data set of the first application based on the first parameter; wherein a resolution parameter in the second resource data is maximum.
In this embodiment, each application has a corresponding resource data set, and the first application is any one of the applications, that is, the resource data set of the first application includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
In this embodiment, when the first parameter indicates that the size of the first window is the size of the full-screen window, that is, when the first parameter is the maximum, second resource data matched with the first parameter is selected from the resource data set of the first application, where the second resource data is the resource data with the maximum resolution parameter of the at least two resource data.
In this embodiment, resource data matched with the display size of the first window is selected from the resource data set of the first application according to a preset rule based on the display size of the first window. Namely, the resource data matched with the resolution parameter of the first application when the first window is displayed is selected from the resource data set of the first application according to a preset rule based on the resolution parameter of the first application when the first window is displayed. The preset rule described in this embodiment is: the larger the display size of the first window characterized by the first parameter is, the larger the resolution parameter of the first application included in the selected resource data when the first window is displayed is, and conversely, the smaller the display size of the first window characterized by the first parameter is, the smaller the resolution parameter of the first application included in the selected resource data when the first window is displayed is, that is, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data. In practical applications, at least two resource data in the resource data set of the first application have different resolution parameters, for example, the resource data set includes two resource data, where a first resource data has a resolution parameter of HDPI and a second resource data has a resolution parameter of ultra high resolution (XHDPI); assuming that the size of the first window characterized by the first parameter is only two, one is that the display size of the first window is equal to the size of a full-screen window, and the other is that the display size of the first window is equal to the size of a small window, and the display area of the small window is smaller than the display area of the full-screen window, when it is detected that the display size of the first window characterized by the first parameter is equal to the size of the full-screen window, the resource data of the larger resolution parameter, that is, the resource data of XHDPI, is selected; and when the first parameter is detected to represent that the display size of the first window is equal to the size of the small window, selecting the resource data of the smaller resolution parameter, namely selecting the resource data of the HDPI.
Step 303: controlling display of the first application in the first window based on the second resource data.
In this embodiment, the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, in this step, the electronic device controls display of the main body of the first application in the first window based on the resolution size occupied by the main body of the first application in the display unit in the resource data, and controls display of the UI control in the first application in the first window based on the resolution size occupied by the UI control in the first application in the display unit in the resource data; wherein a resolution size occupied by the main body of the first application in the display unit and a resolution size occupied by the UI control in the first application in the display unit are the largest of the at least two resource data in the resource data set.
By adopting the technical scheme of the embodiment of the invention, the optimal application resource data can be automatically matched according to the size of the window display size, and the situation that the application resources are rearranged when the window size is adjusted can be avoided; on the other hand, because the resource data comprises the display size occupied by the UI control of the application in the display unit, by adopting the technical scheme of the embodiment of the invention, the display size of the UI control in the application in the display unit can be self-adapted according to the display size of the window, and the problem of incomplete display of part of the controls in the application is avoided.
Example four
An embodiment of the present invention provides an electronic device, and fig. 4 is a schematic diagram of a composition structure of the electronic device according to the embodiment of the present invention, as shown in fig. 4, the electronic device has a display unit 40; the electronic device further includes: a detection unit 41, a selection unit 42, and a control unit 43; wherein,
the detecting unit 41 is configured to detect a first window and obtain a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window;
the selecting unit 42 is configured to select, according to a preset rule, resource data matched with the first parameter from the resource data set of the first application based on the first parameter obtained by the detecting unit 41; wherein the resource data comprises display attribute data of the first application when the first window is displayed;
the control unit 43 is configured to control display of the first application in the first window based on the resource data selected by the selection unit 42.
In this embodiment, the detecting unit 41 detects a first window, that is, when it is detected that the first application is triggered and started, it is detected that a window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Specifically, the resource data set includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
As one embodiment, the resource data includes a resolution of the first application when the first window is displayed; the at least two resource data have different resolution parameters, respectively.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
The control unit 43 selects, based on the first parameter and according to a preset rule, resource data that matches the first parameter from the resource data set of the first application, that is, selects, based on the display size of the first window and according to a preset rule, resource data that matches the display size of the first window from the resource data set of the first application. Namely, the resource data matched with the resolution parameter of the first application when the first window is displayed is selected from the resource data set of the first application according to a preset rule based on the resolution parameter of the first application when the first window is displayed. The preset rule described in this embodiment is: the larger the display size of the first window characterized by the first parameter is, the larger the resolution parameter of the first application included in the selected resource data when the first window is displayed is, and conversely, the smaller the display size of the first window characterized by the first parameter is, the smaller the resolution parameter of the first application included in the selected resource data when the first window is displayed is, that is, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data.
It should be understood by those skilled in the art that the functions of each processing unit in the electronic device according to the embodiment of the present invention may be understood by referring to the description of the information processing method, and each processing unit in the electronic device according to the embodiment of the present invention may be implemented by an analog circuit that implements the functions described in the embodiment of the present invention, or may be implemented by running software that executes the functions described in the embodiment of the present invention on an intelligent terminal.
EXAMPLE five
An embodiment of the present invention provides an electronic device, as shown in fig. 4, having a display unit 40; the electronic device further includes: a detection unit 41, a selection unit 42, and a control unit 43; wherein,
the detecting unit 41 is configured to detect a first window and obtain a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window;
the selecting unit 42 is configured to search a first mapping set based on the first parameter obtained by the detecting unit 41, and obtain a resource data identifier matching the first parameter; the first mapping set comprises a mapping relation between a first parameter and a resource data identifier; searching a resource data set of the first application based on the resource data identifier to obtain first resource data matched with the resource data identifier;
the control unit 43 is configured to control display of the first application in the first window based on the resource data selected by the selection unit 42.
In this embodiment, the detecting unit 41 detects a first window, that is, when it is detected that the first application is triggered and started, it is detected that a window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Specifically, the resource data set includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values.
As one embodiment, the resource data includes a resolution of the first application when the first window is displayed; the at least two resource data have different resolution parameters, respectively.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
Specifically, as an implementation manner, the selecting unit 42 is configured to search the first mapping set based on the first parameter, and when it is determined that the first parameter is within a first preset threshold interval, obtain a first resource data identifier matched with the first preset threshold interval; the first mapping set comprises mapping relations between at least two preset threshold intervals and at least two resource data; the first preset threshold interval is any one of at least two preset threshold intervals; the number of the at least two preset threshold intervals is consistent with the number of the at least two resource data.
The control unit 43 selects, based on the first parameter and according to a preset rule, resource data that matches the first parameter from the resource data set of the first application, that is, selects, based on the display size of the first window and according to a preset rule, resource data that matches the display size of the first window from the resource data set of the first application. Namely, the resource data matched with the resolution parameter of the first application when the first window is displayed is selected from the resource data set of the first application according to a preset rule based on the resolution parameter of the first application when the first window is displayed. The preset rule described in this embodiment is: the larger the display size of the first window characterized by the first parameter is, the larger the resolution parameter of the first application included in the selected resource data when the first window is displayed is, and conversely, the smaller the display size of the first window characterized by the first parameter is, the smaller the resolution parameter of the first application included in the selected resource data when the first window is displayed is, that is, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data.
It should be understood by those skilled in the art that the functions of each processing unit in the electronic device according to the embodiment of the present invention may be understood by referring to the description of the information processing method, and each processing unit in the electronic device according to the embodiment of the present invention may be implemented by an analog circuit that implements the functions described in the embodiment of the present invention, or may be implemented by running software that executes the functions described in the embodiment of the present invention on an intelligent terminal.
EXAMPLE six
An embodiment of the present invention provides an electronic device, as shown in fig. 4, having a display unit 40; the electronic device further includes: a detection unit 41, a selection unit 42, and a control unit 43; wherein,
the detecting unit 41 is configured to detect a first window and obtain a first parameter of the first window; the first window is a window for displaying a first application; the first parameter characterizes a display size of the first window;
the selecting unit 42 is configured to select, when the first parameter indicates that the size of the first window is the size of the full-screen window, second resource data in the resource data set of the first application based on the first parameter; wherein a resolution parameter in the second resource data is maximum;
the control unit 43 is configured to control display of the first application in the first window based on the second resource data selected by the selection unit 42.
In this embodiment, the detecting unit 41 detects a first window, that is, when it is detected that the first application is triggered and started, it is detected that a window displayed by the first application is the first window. In this embodiment, the first window may be a full-screen window or a small window. The first parameter represents a display size of the first window, and specifically, the first parameter may be a display size of the first window in the display unit, and the display area may be specifically represented by a resolution or a display area.
Specifically, the resource data set includes at least two resource data, where the at least two resource data belong to the same parameter attribute but have different parameter values; the resource data includes display attribute data of the first application when the first window is displayed.
As one embodiment, the resource data includes a resolution of the first application when the first window is displayed; the at least two resource data have different resolution parameters, respectively.
In this embodiment, the resource data includes a resolution parameter of the first application when the first window is displayed, that is, the resource data includes a resolution size occupied by the first window in the display unit when the first application is displayed in the first window; the resource data includes not only a resolution size occupied by the main body of the first application in the display unit, but also a resolution size occupied by the UI control in the first application in the display unit, that is, at least two resource data of the first application are resolution parameters of the first application when the first window is displayed, and include a resolution size occupied by the main body of the first application in the display unit and also include a resolution size occupied by the UI control in the first application in the display unit.
The control unit 43 selects, based on the first parameter and according to a preset rule, resource data that matches the first parameter from the resource data set of the first application, that is, selects, based on the display size of the first window and according to a preset rule, resource data that matches the display size of the first window from the resource data set of the first application. Namely, the resource data matched with the resolution parameter of the first application when the first window is displayed is selected from the resource data set of the first application according to a preset rule based on the resolution parameter of the first application when the first window is displayed. The preset rule described in this embodiment is: the larger the display size of the first window characterized by the first parameter is, the larger the resolution parameter of the first application included in the selected resource data when the first window is displayed is, and conversely, the smaller the display size of the first window characterized by the first parameter is, the smaller the resolution parameter of the first application included in the selected resource data when the first window is displayed is, that is, the first parameter characterizing the size of the first window has a positive correlation with the resolution parameter in the resource data.
It should be understood by those skilled in the art that the functions of each processing unit in the electronic device according to the embodiment of the present invention may be understood by referring to the description of the information processing method, and each processing unit in the electronic device according to the embodiment of the present invention may be implemented by an analog circuit that implements the functions described in the embodiment of the present invention, or may be implemented by running software that executes the functions described in the embodiment of the present invention on an intelligent terminal.
In the fourth to sixth embodiments of the present invention, the detecting Unit 41, the selecting Unit 42 and the controlling Unit 43 in the electronic device may be implemented by a Central Processing Unit (CPU), a Digital Signal Processor (DSP) or a Programmable Gate Array (FPGA) in the electronic device in practical applications.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.