Disclosure of Invention
The embodiment of the disclosure provides a content rendering method and device, electronic equipment and a storage medium.
In a first aspect, a content rendering method is provided in the disclosed embodiments.
Specifically, the content rendering method includes:
in response to detecting that the user client ancestor mode is turned on, rendering the current page at a default scaling corresponding to the current page, wherein the scaling corresponds to rendering pixel density;
receiving a zooming control command sent by a user through a zooming control component displayed on a current page, wherein the zooming control command carries a zooming proportion;
and rendering the current page according to the zoom ratio carried by the zoom control command.
With reference to the first aspect, in a first implementation manner of the first aspect, the rendering the current page at a default scaling corresponding to the current page includes:
determining a default scaling corresponding to the current page;
searching a storage space according to the default scaling;
if the storage space stores a default rendering pixel density corresponding to the default scaling, rendering the current page by using the default rendering pixel density, wherein the rendering pixel density refers to the number of pixels used for rendering the unit object;
if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, calculating to obtain the default rendering pixel density corresponding to the default scaling ratio according to the default scaling ratio, rendering the current page by using the default rendering pixel density, and storing the corresponding relation between the default scaling ratio and the default rendering pixel density in the storage space.
With reference to the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the rendering a current page according to a zoom ratio carried by the zoom control command includes:
searching a storage space according to the scaling carried by the scaling control command;
if the rendering pixel density corresponding to the scaling ratio is stored in the storage space, the rendering pixel density is used for rendering the current page;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the current page is rendered through the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
With reference to the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect, an embodiment of the present disclosure further includes:
responding to a received target page jump command sent by a user, jumping to a target page, and rendering the target page at a default scaling corresponding to the target page, or rendering the target page at a scaling carried by the received scaling control command, wherein the scaling control command is sent by the user through a scaling control component displayed by the target page.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the rendering the target page includes:
searching a storage space according to the scaling;
if the storage space stores the rendering pixel density corresponding to the scaling, rendering the target page by using the rendering pixel density;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the target page is rendered by using the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, and the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, an embodiment of the present disclosure further includes:
and displaying a closing prompt of the elder mode on a preset page.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, the fourth implementation manner of the first aspect, and the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, an embodiment of the present disclosure further includes:
closing the ancestor mode in response to receiving the ancestor mode close command; or
Jumping to a grandparent mode setup page in response to receiving a grandparent mode close command;
displaying ancestor mode selection information in the ancestor mode setting page;
the ancestor mode is closed in response to receiving the ancestor mode close confirmation command.
In a second aspect, an embodiment of the present disclosure provides a content rendering apparatus.
Specifically, the content rendering apparatus includes:
a first rendering module configured to, in response to detecting that a user client ancestor mode is turned on, render a current page at a default scaling corresponding to the current page, wherein the scaling corresponds to rendering pixel density;
the receiving module is configured to receive a zooming control command sent by a zooming control component displayed on a current page by a user, wherein the zooming control command carries a zooming proportion;
and the second rendering module is configured to render the current page according to the scaling carried by the scaling control command.
With reference to the second aspect, in a first implementation manner of the second aspect, the rendering, by the first rendering module, a portion of the current page at a default scaling corresponding to the current page is configured to:
determining a default scaling corresponding to the current page;
searching a storage space according to the default scaling;
if the storage space stores a default rendering pixel density corresponding to the default scaling, rendering the current page by using the default rendering pixel density, wherein the rendering pixel density refers to the number of pixels used for rendering the unit object;
if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, calculating to obtain the default rendering pixel density corresponding to the default scaling ratio according to the default scaling ratio, rendering the current page by using the default rendering pixel density, and storing the corresponding relation between the default scaling ratio and the default rendering pixel density in the storage space.
With reference to the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the second rendering module is configured to:
searching a storage space according to the scaling carried by the scaling control command;
if the rendering pixel density corresponding to the scaling ratio is stored in the storage space, the rendering pixel density is used for rendering the current page;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the current page is rendered through the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
With reference to the second aspect, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the embodiment of the present disclosure further includes:
and the third rendering module is configured to jump to a target page in response to receiving a target page jump command sent by a user, render the target page at a default scaling corresponding to the target page, or render the target page at a scaling carried by a received scaling control command, where the scaling control command is sent by the user through a scaling control component displayed by the target page.
With reference to the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, and the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, an embodiment of the present disclosure provides that, in a portion of the third rendering module that renders the target page, the portion is configured to:
searching a storage space according to the scaling;
if the storage space stores the rendering pixel density corresponding to the scaling, rendering the target page by using the rendering pixel density;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the target page is rendered by using the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
With reference to the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, and the fourth implementation manner of the second aspect, in a fifth implementation manner of the second aspect, the embodiment of the present disclosure further includes:
and the display module is configured to display the elder mode closing prompt on a preset page.
With reference to the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, and the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the embodiment of the present disclosure further includes:
a shutdown module configured to shutdown the ancestor mode in response to receiving the ancestor mode shutdown command; or, in response to receiving the ancestor mode close command, jumping to the ancestor mode setup page; displaying the ancestor mode selection information in the ancestor mode setting page; the ancestor mode is closed in response to receiving the ancestor mode close confirmation command.
In a third aspect, the disclosed embodiments provide an electronic device comprising a memory and at least one processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor to implement the method steps of the content rendering method described above.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium for storing computer instructions for a content rendering apparatus, which includes computer instructions for executing the content rendering method described above as a content rendering apparatus.
In a fifth aspect, the disclosed embodiments provide a computer program product comprising computer programs/instructions, wherein the computer programs/instructions, when executed by a processor, implement the content rendering method described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the technical scheme provides an operation mode suitable for the old and a technical scheme capable of flexibly adjusting the size of the display content in the operation mode. This technical scheme is with strong points, can make things convenient for old person's information to look over and use, realizes simply, need not to go deep into every page or every subassembly and carries out the adaptation, also need not redevelop one set of page data and interactive data, neither can increase the size of application data package, can not improve system stability risk again, also can not increase later stage application's maintenance cost.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
The technical scheme provided by the embodiment of the disclosure provides an operation mode suitable for the old people and a technical scheme capable of flexibly adjusting the size of the display content in the operation mode. This technical scheme is with strong points, can make things convenient for old person's information to look over and use, realizes simply, need not to go deep into every page or every subassembly and carries out the adaptation, also need not redevelop one set of page data and interactive data, neither can increase the size of application data package, can not improve system stability risk again, also can not increase later stage application's maintenance cost.
Fig. 1 illustrates a flowchart of a content rendering method according to an embodiment of the present disclosure, as illustrated in fig. 1, the content rendering method including the following steps S101 to S103:
in step S101, in response to detecting that the user client ancestor mode is turned on, rendering the current page at a default scaling corresponding to the current page, wherein the scaling corresponds to a rendered pixel density;
in step S102, a zoom control command sent by a user through a zoom control component displayed on a current page is received, where the zoom control command carries a zoom scale;
in step S103, the current page is rendered according to the zoom ratio carried by the zoom control command.
As mentioned above, with the progress of society and the development of data technology, people's clothes and eating habits increasingly rely on internet technology, for example, people can purchase needed articles on a certain retail website and also can purchase food that people want to eat on a certain meal website, which provides great convenience for the elderly who are not convenient to move. However, the old people usually have poor eyesight and certain difficulty in viewing page data, and in order to solve the problem, a set of page data and interactive data suitable for the old people to view can be redeveloped, and each display component can be amplified on the basis of the original page data and interactive data. However, no matter the components are re-developed or enlarged, each component of each page needs to be adapted, and at the same time, the size of an application program data packet is greatly increased, the risk of system stability is increased, and the maintenance cost of the later-stage application program is increased.
In view of the above-mentioned drawbacks, in this embodiment, a content rendering method is proposed that provides an operation mode suitable for the elderly, and a technical solution capable of flexibly adjusting the size of display content in this mode. This technical scheme is with strong points, can make things convenient for old person's information to look over and use, realizes simply, need not to go deep into every page or every subassembly and carries out the adaptation, also need not redevelop one set of page data and interactive data, neither can increase the size of application data package, can not improve system stability risk again, also can not increase later stage application's maintenance cost.
In an embodiment of the present disclosure, the content rendering method may be applied to clients such as computers, computing devices, electronic devices, and intelligent terminals, especially clients of elderly users.
In an embodiment of the present disclosure, the ancestor mode refers to a display mode and an operation mode that are convenient for the elderly to view, use and operate information, and the user client ancestor mode may refer to a ancestor mode in which a common user client is different from the common mode, or a ancestor user client different from the common version. The user that opens the grandparent mode may be a grandparent user or may not be a grandparent user, and the disclosure is not particularly limited to the user that opens the grandparent mode.
Specifically, in the elder mode, considering that most of the old people have hyperopia, the displayed font will be a little bit larger, for example, the displayed font size is greater than or equal to a preset font size, wherein the size of the displayed font can be set according to the needs of the actual application program, and a specific setting method will be described below; considering that the elderly usually do not like too much vivid and too disordered color matching, the color used for displaying the content is a preset color suitable for elders below a preset number, for example, three basic colors of red, green and blue are used; considering that the old people usually pay little attention to the advertisement content, are not willing to try new or higher-price things and prefer things close to daily life, the display content will remove the advertisement content and the floating window display content, and is adjusted to the content which is interesting and often viewed by the old people, such as supermarket preference information like one-out egg, one-out fresh Chinese cabbage 5, 8-out common medicine and the like, daily food purchasing information like vegetables, fruits and meat, medicine preference information, dining information of old restaurants and the like; considering that the old people usually only pay attention to the information of dishes, supermarkets, drug stores and old restaurants, occasionally take out of service and do not pay much attention to the dining information of restaurants, particularly high-grade restaurants, the display components only comprise components of old meal, supermarket shopping, dish buying, medicine buying, taking out of service, weather checking and the like; considering that the understanding ability and the understanding speed of the old people are limited in different degrees, the displayed icons are as concise and understandable as possible, and are set to be preset icons suitable for being viewed by elders by using the expression form of function verbs and nouns, for example, a supermarket icon is set to be 'shopping supermarket' instead of 'supermarket convenience' or 'supermarket/convenience store', a dish buying icon is set to be 'buying dish' instead of 'fresh/dish market', a medicine buying icon is set to be 'buying medicine' instead of 'medicine supermarket', and a takeout icon is set to be 'spot takeout' instead of 'food takeout'; in consideration of the fact that the old people often have difficulty in understanding and operating the content of each component on the page, the old people are also provided with a one-key help function button, and when the user of the old people clicks the one-key help function button, a page for dialing the service phone can be displayed, so that the old people can make a telephone consultation on the difficulty.
That is, in the ancestor mode, the display font size is equal to or greater than the preset font size, the display content is the preset ancestor interest content, the display component is the preset ancestor interest component, the display color is the preset ancestor viewing color, the display icon is the preset ancestor viewing icon, and a one-key help function button is provided, as shown in fig. 2A.
In an embodiment of the present disclosure, the zoom ratio refers to a zoom ratio of the page display, and the zoom ratio determines a size of the page display content, for example, when the zoom ratio is greater than 100%, the page display content is greater than a standard size, when the zoom ratio is less than 100%, the page display content is less than the standard size, and when the zoom ratio is equal to 100%, the page display content is equal to the standard size. Each page can be correspondingly provided with a default scaling, the default scaling corresponding to different pages can be the same or different, and the scaling corresponding to each page can be modified to meet the requirements of users, and the following description can be specifically seen.
In an embodiment of the present disclosure, the rendering pixel density refers to the number of pixels used for rendering a unit object, where the unit object refers to the minimum unit of objects to be rendered, such as a chinese character, a foreign character, and the like. For example, assuming that the unit object is a chinese character, for a terminal with a fixed screen size and a fixed resolution, if a 16 × 16 pixel lattice is used to render a chinese character for the normal mode, the rendering pixel density is 16 × 16, and for the elder mode, the rendering pixel density is greater than that in the normal mode, for example, the rendering pixel density in the elder mode may be set to be 1.3 times, 1.5 times, 2 times or even 3 times that in the normal mode. As mentioned above, each page may be correspondingly provided with a default scaling ratio, the default scaling ratios corresponding to different pages may be the same or different, and the scaling ratio corresponding to each page may be modified. The scaling and the rendered pixel density corresponding to different pages can be stored in the storage space all the time, and the corresponding relation between the scaling and the rendered pixel density can not be changed so as to be called when a subsequent page is displayed. It should be noted that the default rendering pixel density corresponding to each page is greater than the rendering pixel density in the normal mode, so that the size of the display content can be flexibly adjusted without going deep into each page or adapting each component, or redeveloping a set of page data and interactive data, and the size of an application program data packet can not be increased, the risk of system stability can not be increased, and the maintenance cost of the application program in the later period can not be increased.
The storage space can be arranged locally at the client, or arranged at a remote end such as a server end. If the storage space is arranged locally at the client, the reading speed of the scaling, the rendering pixel density and the corresponding relation thereof can be accelerated; if the storage space is arranged at a remote end such as a server end, the scaling ratio, the rendering pixel density and the corresponding relation thereof can be shared by a plurality of client ends, and compared with the storage space stored locally, the reading speed of the scaling ratio, the rendering pixel density and the corresponding relation thereof is slightly slower, but the problem can be solved by downloading the scaling ratio, the rendering pixel density and the corresponding relation thereof to the local in advance.
And the scaling corresponds to the density of the rendering pixels, and the corresponding density of the rendering pixels can be calculated according to the scaling. For example, the rendered pixel density may be calculated based on the scaling, the size of the terminal display screen, and the resolution of the terminal display screen, where it should be noted that the method for calculating the rendered pixel density based on the scaling may be selected according to the needs of practical applications, and the disclosure is not limited thereto.
In an embodiment of the present disclosure, the zoom control component refers to a component that can be displayed or loaded on a certain page and can be provided for a user to adjust and control the zoom ratio, and the zoom control component may be, for example, a drag bar whose drag position may represent different zoom ratios, a drag component whose drag area may represent different zoom ratios, and a zoom input component. The user can send a zoom control command through the control of the zoom control component to adjust the zoom ratio, so as to control the font size of a certain page, wherein the zoom control command at least carries a zoom ratio value, and the zoom ratio of the current page can be modified according to the zoom control command subsequently.
In the above embodiment, if it is detected that the user client lifetime mode is turned on, first, a default scaling corresponding to a current page is obtained, where the current page may be a top page of the user client lifetime mode or other pages of the user client lifetime mode; then, rendering the current page according to the default scaling corresponding to the current page; if a zooming control command sent by a user through a zooming control component displayed on the current page is subsequently received, the zooming ratio of the current page can be modified according to the zooming ratio carried by the zooming control command; and finally, rendering the current page by using the modified scaling so as to meet the control requirement of the user on the size of the display font.
In an embodiment of the present disclosure, the step of rendering the current page at the default scaling ratio corresponding to the current page in step S101 may include the following steps:
determining a default scaling ratio corresponding to the current page;
searching a storage space according to the default scaling;
if the storage space stores a default rendering pixel density corresponding to the default scaling, rendering the current page by using the default rendering pixel density, wherein the rendering pixel density refers to the number of pixels used for rendering the unit object;
if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, calculating to obtain the default rendering pixel density corresponding to the default scaling ratio according to the default scaling ratio, rendering the current page by using the default rendering pixel density, and storing the corresponding relation between the default scaling ratio and the default rendering pixel density in the storage space.
As mentioned above, the scaling ratio corresponds to the density of the rendered pixels, the scaling ratio and the density of the rendered pixels corresponding to different pages may be stored in the storage space all the time, and the correspondence between the scaling ratio and the density of the rendered pixels may not be changed, so as to be called when the subsequent page is displayed. Therefore, in order to save the calculation time of the rendered pixel density and improve the page rendering efficiency, in this embodiment, when the current page is rendered at the default scaling corresponding to the current page, after the default scaling corresponding to the current page is determined, first, a storage space is searched according to the default scaling, and it is determined whether the storage space has a correspondence between the calculated scaling and the rendered pixel density; if the default rendering pixel density corresponding to the default scaling ratio is stored in the storage space, the current page can be rendered by directly using the default rendering pixel density; if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, it is indicated that the corresponding default rendering pixel density is not calculated based on the default scaling ratio before, at this time, the default rendering pixel density corresponding to the default rendering pixel density can be calculated according to the default scaling ratio, and then the current page is rendered by using the default rendering pixel density. Meanwhile, in order to save the calculation time of the subsequent rendering pixel density, the corresponding relation between the default scaling ratio and the default rendering pixel density obtained by the calculation is stored in the storage space.
Similarly, when a subsequent user modifies the scaling through the scaling control component, the storage space may be searched according to the current scaling, if the storage space has a correspondence between the scaling that has been calculated and the density of the rendering pixel, the density of the rendering pixel may be directly extracted for use, and if the storage space does not have a correspondence between the scaling that has been calculated and the density of the rendering pixel, the density of the rendering pixel may be recalculated.
That is, in an embodiment of the present disclosure, the step S103, that is, the step of rendering the current page according to the zoom ratio carried by the zoom control command, may include the following steps:
searching a storage space according to the scaling carried by the scaling control command;
if the rendering pixel density corresponding to the scaling ratio is stored in the storage space, the rendering pixel density is used for rendering the current page;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the current page is rendered through the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
In an embodiment of the present disclosure, the method may further include the steps of:
responding to a received target page jump command sent by a user, jumping to a target page, and rendering the target page at a default scaling corresponding to the target page, or rendering the target page at a scaling carried by the received scaling control command, wherein the scaling control command is sent by the user through a scaling control component displayed by the target page.
In the embodiment, after a target page jump command sent by a user is received, jumping to a target page firstly, when it is confirmed that a zoom control command sent by the user is not received, acquiring a default zoom ratio corresponding to the target page, and rendering the target page by using the default zoom ratio corresponding to the target page; and when the zoom control command sent by the user is confirmed to be received, rendering the target page by using the zoom scale carried by the received zoom control command.
Similarly, no matter the target page is rendered by using the default scaling corresponding to the target page or the scaling carried by the scaling control command sent by the user, in order to save the calculation time of the rendered pixel density and improve the page rendering efficiency, a storage space can be searched according to the current scaling, if the corresponding relationship between the scaling which is already calculated and the rendered pixel density exists in the storage space, the rendered pixel density can be directly taken out for use, if the corresponding relationship between the scaling which is already calculated and the rendered pixel density does not exist in the storage space, the rendered pixel density is recalculated, and finally the corresponding relationship between the scaling which is obtained by the calculation and the rendered pixel density is stored in the storage space for subsequent use.
That is, in an embodiment of the present disclosure, the step of rendering the target page may include the steps of:
searching a storage space according to the scaling;
if the storage space stores the rendering pixel density corresponding to the scaling, rendering the target page by using the rendering pixel density;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the target page is rendered by using the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
In an embodiment of the present disclosure, the method may further include the steps of:
and displaying a elder mode closing prompt on a preset page.
In order to facilitate the user to switch back to the normal display mode, in this embodiment, an ancestor mode close prompt, such as "go to close the ancestor mode", may also be displayed on a preset page, as shown in fig. 2B, where the preset page may be one or several preset pages, or may be the current page. If the user confirms the lifetime mode close indication, for example, clicks "go to close the lifetime mode", it may be assumed that the user issues a lifetime mode close command, that is, the lifetime mode may be directly closed, and the display mode is switched back to the normal display mode to display the content in the preset range near the target position.
That is, in an embodiment of the present disclosure, the method may further include the steps of:
the ancestor mode is closed in response to receiving the ancestor mode close command.
In another embodiment of the present disclosure, upon receiving the grandparent mode close command, instead of closing the grandparent mode directly, a jump is made to the grandparent mode setup page, and then a determination is made as to whether to close the grandparent mode based on the user's selection of the grandparent mode.
That is, in another embodiment of the present disclosure, the method may further include the steps of:
after receiving a grandparent mode closing command sent by a user, jumping to a grandparent mode setting page;
displaying ancestor mode selection information in the ancestor mode setting page;
the ancestor mode is closed in response to receiving the ancestor mode close confirmation command.
Similar to the example above, assuming that the ancestor mode selection information appears as a click, when the user selects the ancestor mode, the ancestor mode click is green, and if the user clicks on the ancestor mode click, the user is considered to confirm that the ancestor mode is closed, at which time the ancestor mode click changes back to gray.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 3 illustrates a block diagram of a content rendering apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 3, the content rendering apparatus includes:
a first rendering module 301 configured to, in response to detecting that a user client ancestor mode is turned on, render the current page at a default zoom ratio corresponding to the current page, wherein the zoom ratio corresponds to a rendered pixel density;
a receiving module 302, configured to receive a zoom control command sent by a user through a zoom control component displayed on a current page, where the zoom control command carries a zoom ratio;
a second rendering module 303 configured to render the current page according to the scaling carried by the scaling control command.
As mentioned above, with the progress of society and the development of data technology, people's clothes and eating habits increasingly rely on internet technology, for example, people can purchase needed articles on a certain retail website and also can purchase food that people want to eat on a certain meal website, which provides great convenience for the elderly who are not convenient to move. However, the old people usually have poor eyesight and certain difficulty in viewing page data, and in order to solve the problem, a set of page data and interactive data suitable for the old people to view can be redeveloped, and each display component can be amplified on the basis of the original page data and interactive data. However, no matter the components are re-developed or enlarged, each component of each page needs to be adapted, and at the same time, the size of an application program data packet is greatly increased, the risk of system stability is increased, and the maintenance cost of the later-stage application program is increased.
In view of the above-mentioned drawbacks, in this embodiment, a content rendering apparatus is proposed that provides an operation mode suitable for use by the elderly, and a technical solution that enables flexible adjustment of the size of display content in this mode. The technical scheme has strong pertinence, can be convenient for the old people to check and use the information, is simple to realize, does not need to go deep into each page or each component to carry out adaptation, does not need to redevelop one set of page data and interactive data, does not increase the size of an application program data packet, does not improve the system stability risk, and does not increase the maintenance cost of later-stage application programs.
In an embodiment of the present disclosure, the content rendering apparatus may be implemented as a client of a computer, a computing device, an electronic device, an intelligent terminal, and the like, especially a client of an elderly user.
In an embodiment of the present disclosure, the ancestor mode refers to a display mode and an operation mode that are convenient for the elderly to view, use and operate information, and the user client ancestor mode may refer to both an ancestor mode in which a common user client is different from a common mode and an ancestor user client different from a common version. The user that opens the grandparent mode may be a grandparent user or may not be a grandparent user, and the disclosure is not particularly limited to the user that opens the grandparent mode.
Specifically, in the elder mode, considering that most of the old people have hyperopia, the displayed font will be a little bit larger, for example, the displayed font size is greater than or equal to a preset font size, wherein the size of the displayed font can be set according to the needs of the actual application program, and a specific setting method will be described below; considering that the elderly usually do not like too much vivid and too disordered color matching, the color used for displaying the content is a preset color suitable for elders to watch below a preset number, for example, three basic colors of red, green and blue are used; considering that the old people usually pay little attention to the advertisement content, are not willing to try new or higher-price things and prefer things close to daily life, the display content will remove the advertisement content and the floating window display content, and is adjusted to the content which is interesting and often viewed by the old people, such as supermarket preference information like one-out egg, one-out fresh Chinese cabbage 5, 8-out common medicine and the like, daily food purchasing information like vegetables, fruits and meat, medicine preference information, dining information of old restaurants and the like; considering that the old people usually only pay attention to the information of dishes, supermarkets, drug stores and old restaurants, occasionally take out of service and do not pay much attention to the dining information of restaurants, particularly high-grade restaurants, the display components only comprise components of old meal, supermarket shopping, dish buying, medicine buying, taking out of service, weather checking and the like; considering that the understanding ability and the understanding speed of the old people are limited in different degrees, the displayed icons are as concise and understandable as possible, and are set to be preset icons suitable for being viewed by elders by using the expression form of function verbs and nouns, for example, a supermarket icon is set to be 'shopping supermarket' instead of 'supermarket convenience' or 'supermarket/convenience store', a dish buying icon is set to be 'buying dish' instead of 'fresh/dish market', a medicine buying icon is set to be 'buying medicine' instead of 'medicine supermarket', and a takeout icon is set to be 'spot takeout' instead of 'food takeout'; in consideration of the fact that the old people often have difficulty in understanding and operating the content of each component on the page, the old people are also provided with a one-key help function button, and when the user of the old people clicks the one-key help function button, a page for dialing the service phone can be displayed, so that the old people can make a telephone consultation on the difficulty.
That is, in the grandparent mode, the display font size is greater than or equal to the preset font size, the display content is the preset grandparent interest content, the display component is the preset grandparent interest component, the display color is the preset suitable grandparent viewing color, the display icon is the preset suitable grandparent viewing icon, and the one-key help function button is provided, as shown in fig. 2A.
In an embodiment of the present disclosure, the zoom ratio refers to a zoom ratio of the page display, and the zoom ratio determines a size of the page display content, for example, when the zoom ratio is greater than 100%, the page display content is greater than a standard size, when the zoom ratio is less than 100%, the page display content is less than the standard size, and when the zoom ratio is equal to 100%, the page display content is equal to the standard size. Each page can be correspondingly provided with a default scaling, the default scaling corresponding to different pages can be the same or different, and the scaling corresponding to each page can be modified to meet the requirements of users, and the following description can be specifically seen.
In an embodiment of the present disclosure, the rendering pixel density refers to the number of pixels used for rendering a unit object, where the unit object refers to the minimum unit of objects to be rendered, such as a chinese character, a foreign character, and the like. For example, assuming that the unit object is a chinese character, for a terminal with a fixed screen size and a fixed resolution, if a 16 × 16 pixel lattice is used to render a chinese character for the normal mode, the rendering pixel density is 16 × 16, and for the elder mode, the rendering pixel density is greater than that in the normal mode, for example, the rendering pixel density in the elder mode may be set to be 1.3 times, 1.5 times, 2 times or even 3 times that in the normal mode. As mentioned above, each page may be correspondingly provided with a default scaling ratio, the default scaling ratios corresponding to different pages may be the same or different, and the scaling ratio corresponding to each page may be modified. The scaling and the rendered pixel density corresponding to different pages can be stored in the storage space all the time, and the corresponding relation between the scaling and the rendered pixel density can not be changed, so that the scaling and the rendered pixel density can be called when a subsequent page is displayed. It should be noted that the default rendering pixel density corresponding to each page is greater than the rendering pixel density in the normal mode, so that the size of the display content can be flexibly adjusted without going deep into each page or adapting each component, or redeveloping a set of page data and interaction data, the size of an application program data packet cannot be increased, the risk of system stability cannot be increased, and the maintenance cost of the application program in the later period cannot be increased.
The storage space can be arranged locally at the client, or arranged at a remote end such as a server end. If the storage space is arranged locally at the client, the reading speed of the scaling, the rendering pixel density and the corresponding relation thereof can be accelerated; if the storage space is arranged at a remote end such as a server end, the scaling ratio, the rendering pixel density and the corresponding relation thereof can be shared by a plurality of client ends, and compared with the storage space stored locally, the reading speed of the scaling ratio, the rendering pixel density and the corresponding relation thereof is slightly slower, but the problem can be solved by downloading the scaling ratio, the rendering pixel density and the corresponding relation thereof to the local in advance.
And the scaling corresponds to the density of the rendering pixels, and the corresponding density of the rendering pixels can be calculated according to the scaling. For example, the rendered pixel density may be calculated based on the scaling, the size of the terminal display screen, and the resolution of the terminal display screen, where it should be noted that the method for calculating the rendered pixel density based on the scaling may be selected according to the needs of practical applications, and the disclosure is not limited thereto.
In an embodiment of the present disclosure, the zoom control component refers to a component that can be displayed or loaded on a certain page and can be provided for a user to adjust and control the zoom ratio, and the zoom control component may be, for example, a drag bar whose drag position may represent different zoom ratios, a drag component whose drag area may represent different zoom ratios, and a zoom input component. The user can send a zoom control command through the control of the zoom control component to adjust the zoom ratio, so as to control the font size of a certain page, wherein the zoom control command at least carries a zoom ratio value, and the zoom ratio of the current page can be modified according to the zoom control command subsequently.
In the above embodiment, if it is detected that the user client lifetime mode is turned on, first, a default scaling corresponding to a current page is obtained, where the current page may be a top page of the user client lifetime mode or other pages of the user client lifetime mode; then, rendering the current page according to the default scaling corresponding to the current page; if a zooming control command sent by a user through a zooming control component displayed on the current page is subsequently received, the zooming ratio of the current page can be modified according to the zooming ratio carried by the zooming control command; and finally, rendering the current page by using the modified scaling so as to meet the control requirement of the user on the size of the display font.
In an embodiment of the present disclosure, the portion of the first rendering module 301 that renders the current page at the default scaling corresponding to the current page may be configured to:
determining a default scaling corresponding to the current page;
searching a storage space according to the default scaling;
if the storage space stores a default rendering pixel density corresponding to the default scaling, rendering the current page by using the default rendering pixel density, wherein the rendering pixel density refers to the number of pixels used for rendering the unit object;
if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, calculating to obtain the default rendering pixel density corresponding to the default scaling ratio according to the default scaling ratio, rendering the current page by using the default rendering pixel density, and storing the corresponding relation between the default scaling ratio and the default rendering pixel density in the storage space.
As mentioned above, the scaling ratio corresponds to the density of the rendered pixels, the scaling ratio and the density of the rendered pixels corresponding to different pages may be stored in the storage space all the time, and the correspondence between the scaling ratio and the density of the rendered pixels may not be changed, so as to be called when the subsequent page is displayed. Therefore, in order to save the calculation time of the rendered pixel density and improve the page rendering efficiency, in this embodiment, when the current page is rendered at the default scaling corresponding to the current page, after the default scaling corresponding to the current page is determined, first, a storage space is searched according to the default scaling, and it is determined whether the storage space has a correspondence between the calculated scaling and the rendered pixel density; if the default rendering pixel density corresponding to the default scaling ratio is stored in the storage space, the current page can be rendered by directly using the default rendering pixel density; if the default rendering pixel density corresponding to the default scaling ratio is not stored in the storage space, it is indicated that the corresponding default rendering pixel density is not calculated based on the default scaling ratio before, at this time, the default rendering pixel density corresponding to the default rendering pixel density can be calculated according to the default scaling ratio, and then the current page is rendered by using the default rendering pixel density. Meanwhile, in order to save the calculation time of the subsequent rendering pixel density, the corresponding relation between the default scaling ratio and the default rendering pixel density obtained by the calculation is stored in the storage space.
Similarly, when a subsequent user modifies the scaling through the scaling control component, the storage space may be searched according to the current scaling, if the storage space has a correspondence between the scaling that has been calculated and the density of the rendering pixel, the density of the rendering pixel may be directly extracted for use, and if the storage space does not have a correspondence between the scaling that has been calculated and the density of the rendering pixel, the density of the rendering pixel may be recalculated.
That is, in an embodiment of the present disclosure, the second rendering module 303 may be configured to:
searching a storage space according to the scaling carried by the scaling control command;
if the rendering pixel density corresponding to the scaling ratio is stored in the storage space, the rendering pixel density is used for rendering the current page;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the current page is rendered through the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
In an embodiment of the present disclosure, the apparatus may further include:
and the third rendering module is configured to jump to a target page in response to receiving a target page jump command sent by a user, render the target page at a default scaling corresponding to the target page, or render the target page at a scaling carried by a received scaling control command, where the scaling control command is sent by the user through a scaling control component displayed by the target page.
In the embodiment, after a target page jump command sent by a user is received, jumping to a target page firstly, when it is confirmed that a zoom control command sent by the user is not received, acquiring a default zoom ratio corresponding to the target page, and rendering the target page by using the default zoom ratio corresponding to the target page; and when the zoom control command sent by the user is confirmed to be received, rendering the target page by using the zoom scale carried by the received zoom control command.
Similarly, no matter the target page is rendered by using the default scaling corresponding to the target page or the scaling carried by the scaling control command sent by the user, in order to save the calculation time of the rendered pixel density and improve the page rendering efficiency, a storage space can be searched according to the current scaling, if the corresponding relationship between the scaling which is already calculated and the rendered pixel density exists in the storage space, the rendered pixel density can be directly taken out for use, if the corresponding relationship between the scaling which is already calculated and the rendered pixel density does not exist in the storage space, the rendered pixel density is recalculated, and finally the corresponding relationship between the scaling which is obtained by the calculation and the rendered pixel density is stored in the storage space for subsequent use.
That is, in an embodiment of the present disclosure, the portion of the third rendering module that renders the target page may be configured to:
searching a storage space according to the scaling;
if the storage space stores the rendering pixel density corresponding to the scaling, rendering the target page by using the rendering pixel density;
if the rendering pixel density corresponding to the scaling ratio is not stored in the storage space, the rendering pixel density corresponding to the scaling ratio is obtained through calculation according to the scaling ratio, the target page is rendered by using the rendering pixel density, and the corresponding relation between the scaling ratio and the rendering pixel density is stored in the storage space.
In an embodiment of the present disclosure, the apparatus may further include:
and the display module is configured to display the elder mode closing prompt on a preset page.
In order to facilitate the user to switch back to the normal display mode, in this embodiment, an ancestor mode close prompt, such as "go to close the ancestor mode", may also be displayed on a preset page, as shown in fig. 2B, where the preset page may be one or several preset pages, or may be the current page. If the user confirms the lifetime mode close indication, for example, clicks "go to close the lifetime mode", it may be assumed that the user issues a lifetime mode close command, that is, the lifetime mode may be directly closed, and the display mode is switched back to the normal display mode to display the content in the preset range near the target position.
That is, in an embodiment of the present disclosure, the apparatus may further include:
a shutdown module configured to shutdown the ancestor mode in response to receiving the ancestor mode shutdown command.
In another embodiment of the present disclosure, upon receiving the grandparent mode close command, instead of closing the grandparent mode directly, a jump is made to the grandparent mode setup page, and a determination is made as to whether to close the grandparent mode based on the user's selection of the grandparent mode.
That is, in another embodiment of the present disclosure, the apparatus may further include:
the closing module is configured to jump to a grandparent mode setting page after receiving a grandparent mode closing command sent by a user; displaying ancestor mode selection information in the ancestor mode setting page; the ancestor mode is closed in response to receiving the ancestor mode close confirmation command.
Similar to the example above, assuming that the ancestor mode selection information appears as a click, when the user selects the ancestor mode, the ancestor mode click is green, and if the user clicks on the ancestor mode click, the user is considered to confirm that the ancestor mode is closed, at which time the ancestor mode click changes back to gray.
The present disclosure also discloses an electronic device, fig. 4 shows a block diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 4, the electronic device 400 includes a memory 401 and a processor 402; wherein,
the memory 401 is used to store one or more computer instructions that are executed by the processor 402 to implement the above-described method steps.
Fig. 5 is a schematic structural diagram of a computer system suitable for implementing a content rendering method according to an embodiment of the present disclosure.
As shown in fig. 5, the computer system 500 includes a processing unit 501 that can execute various processes in the above-described embodiments according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the computer system 500 are also stored. The processing unit 501, the ROM502, and the RAM503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary. The processing unit 501 may be implemented as a CPU, a GPU, a TPU, an FPGA, an NPU, or other processing units.
In particular, the above described methods may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the clear information determination method. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation on the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.