Page display method, communication system and electronic equipment

By integrating page configuration information of different screen statuses on the server side, the folding screen phone only needs to obtain it once after startup to display the page that is adapted to the current status, which solves the problems of performance degradation and poor user experience during frequent switching, and achieves the improvement Efficient information acquisition and better user experience.

CN119166247AActive Publication Date: 2024-12-20HUAWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310731466.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2024-12-20
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

When folding screen phones frequently switch screen status, repeatedly obtaining page configuration information from the server leads to performance degradation and poor user experience.

Method used

The server combines the page configuration information in different screen states into a unified target page configuration information. After starting, the terminal device only needs to obtain it once to display the page that is adapted to the current screen state.

Benefits of technology

Reduces the information acquisition time of terminal devices when switching screen status, and improves performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166247A_ABST
    Figure CN119166247A_ABST
Patent Text Reader

Abstract

The invention discloses a page display method, a communication system and electronic equipment, relates to the technical field of terminals, and aims to reduce the process of repeatedly acquiring corresponding page configuration information from a server when terminal equipment switches a screen state, greatly save the information acquisition time, improve the performance of the terminal equipment and also improve the use experience of a user. In the method, a server fuses different page configuration information corresponding to a target application in different screen states of a terminal device to obtain target page configuration information. The target terminal device obtains target page configuration information from the server in response to the starting operation of the target application, and displays an application page matched with the current first screen state according to the target page configuration information; if the target terminal device is switched from the current first screen state to the second screen state, the target terminal device continues to display the application page matched with the current second screen state according to the obtained target page configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a page display method, a communication system and an electronic device. Background Art

[0002] In order to make the application pages displayed on different electronic devices adapt to the screen size of the electronic devices, the server side usually configures the corresponding page configuration information for electronic devices with different screen sizes. Also, electronic devices with different screen sizes are such as mobile phones, tablets, etc. Or, the electronic device includes different screen states, such as folded state, unfolded state; for example, horizontal screen state, vertical screen state; for example, from full screen display state, split screen display state, etc.

[0003] For example, when the screen state of a foldable screen mobile phone switches or changes, it will send a request to the server, and the request includes indication information indicating the current state of the foldable screen mobile phone. The server determines the current state of the foldable screen mobile phone based on the indication information in the request. If it is in the folded state, the page configuration information corresponding to the folded state is sent to the foldable screen mobile phone. The foldable screen mobile phone receives the page configuration information and then lays out and displays the corresponding application page on the screen in the folded state according to the page configuration information. If it is in the unfolded state, the server sends the page configuration information corresponding to the unfolded state to the foldable screen mobile phone. The foldable screen mobile phone receives the page configuration information and then lays out and displays the corresponding application page on the screen in the unfolded state according to the page configuration information.

[0004] However, if the foldable screen mobile phone switches states frequently, the foldable screen mobile phone repeatedly requests page configuration information from the server, which will also result in poor performance of the foldable screen mobile phone and affect the user experience. Summary of the invention

[0005] The embodiments of the present application provide a page display method, a communication system and an electronic device, which can reduce the process of repeatedly obtaining corresponding page configuration information from a server when the screen state of the terminal device is switched, thereby greatly saving the time for information acquisition, improving the performance of the terminal device, and improving the user experience.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a page display method is provided, which is applied to a server in a communication system, wherein the communication system further includes at least one terminal device, and the server communicates with at least one terminal device respectively. In the method, the server obtains different page configuration information corresponding to the target application in different screen states of the terminal device, and merges the different page configuration information corresponding to the different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application. After receiving a first page information request sent by the target terminal device after the target application is started, the server sends the target page configuration information and the first page content corresponding to the target application to the target terminal device. After receiving a second page information request sent by the target terminal device after the target application is started, the server sends the second page content corresponding to the target application to the target terminal device.

[0008] The above-mentioned screen status indicates that the screen of the terminal device is in a folded state or in an expanded state; the page configuration information is used to configure the application page of the target application; the target page configuration information includes configuration information for displaying the application page under multiple screen states; the first page content is used for the target terminal device to display the application page of the target application that matches the current screen state according to the target page configuration information; the second page content is used for the target terminal device to display the application page of the target application that matches the current screen state according to the target page configuration information that has been acquired.

[0009] In the above method, the server can merge the different page configuration information corresponding to the target application in different screen states of the terminal device into a unified target page configuration information. The target terminal device does not need to obtain the page configuration information for the current screen state from the server multiple times, but only needs to obtain the unified target page configuration information from the server once after the target application is started. Afterwards, the target terminal device displays the application page that matches the current screen state according to the target page configuration information. In this way, the process of repeatedly obtaining the corresponding page configuration information from the server when the screen state is switched can be reduced, which greatly saves the time for obtaining information, thereby improving the performance of the terminal device, reducing the waiting time of the user, and improving the user experience.

[0010] In an implementation manner of the first aspect, the page configuration information includes hypertext markup language HTML information and cascading style sheet CSS information for displaying the application page, and the target page configuration information includes merged target HTML information and merged target CSS information.

[0011] In an implementable manner of the first aspect, the target application corresponds to the first page configuration information when the screen of the terminal device is in a folded state, and corresponds to the second page configuration information when the screen of the terminal device is in an unfolded state; the first page configuration information includes the first HTML information and the first CSS information, and the second page configuration information includes the second HTML information and the second CSS information. When the server merges different page configuration information to obtain the target page configuration information of the terminal device corresponding to the target application, the server may first merge the first HTML information in the first page configuration information with the second HTML information in the second page configuration information to obtain the target HTML information, and then merge the first CSS information in the first page configuration information with the second CSS information in the second page configuration information to obtain the target CSS information.

[0012] The target HTML information includes HTML information for configuring the application page of the target application in multiple screen states; the target CSS information includes CSS information for configuring the application page of the target application in multiple screen states.

[0013] In the above implementation, the server can integrate different page configuration information into unified target page configuration information, so that when the target terminal device installed with the target application requests the configuration information of the target application from the server after the target application is started, the server can send the corresponding target page configuration information to the target terminal device at one time. During the normal operation of the target application after it is started, the target terminal device does not need to request the page configuration information from the server again, saving time for information or data transmission.

[0014] In an implementation of the first aspect, when obtaining the target HTML information, the server may first obtain the first syntax tree corresponding to the target application according to the first HTML information, and obtain the second syntax tree corresponding to the target application according to the second HTML information. Afterwards, the server obtains the first node set according to the same nodes in the first syntax tree and the second syntax tree, and obtains the second node set according to the different nodes in the first syntax tree and the second syntax tree. The server then inserts the nodes in the second node set into the first node set to generate the target syntax tree, and obtains the target HTML information according to the target syntax tree.

[0015] Among them, the first syntax tree and the second syntax tree are respectively used to represent the syntax structure corresponding to the application page of the target application when the screen of the terminal device is in a folded state and the syntax structure corresponding to the application page of the target application when the screen of the terminal device is in an expanded state; the first syntax tree and the second syntax tree respectively include at least one node with a hierarchical relationship, and at least one node in the first syntax tree is respectively used to represent at least one syntax content in the first syntax tree, and at least one node in the second syntax tree is respectively used to represent at least one syntax content in the second syntax tree; the target syntax tree includes nodes corresponding to multiple screen states.

[0016] In the above implementation, when the server merges the page configuration information corresponding to different screen states (or screen sizes), it can merge the different syntax trees in the different page configuration information, so that the merged target syntax tree can be applicable to terminal devices with different screen states (or screen sizes).

[0017] In an implementation manner of the first aspect, when the server obtains the target CSS information, it may first obtain, based on the first CSS information, a first rule for displaying an application page when the terminal device is in a folded state, and obtain, based on the second CSS information, a second rule for displaying an application page when the terminal device is in an expanded state. Afterwards, the server merges the first rule and the second rule into a target rule, and obtains the target CSS information based on the target rule.

[0018] Among them, the target rules include rules for displaying application pages that meet preset display conditions of the terminal device.

[0019] In the above implementation, when the server merges the page configuration information corresponding to different screen states (or screen sizes), it can merge the different display rules in the different page configuration information, so that the merged target rules can be applicable to terminal devices with different screen states (or screen sizes).

[0020] In an implementation manner of the first aspect, the preset display condition includes that the page width is constant, the page width changes linearly, or the page width changes in segments.

[0021] It is understandable that a page width being a constant may indicate that the width of the page that the terminal device is pre-configured to display is fixed, and the page width will not change with changes in the screen state (or screen size). A linear change in the page width may indicate that the width of the page that the terminal device is pre-configured to display changes with changes in the screen size. For example, the larger the width of the screen, the larger the width of the page, and the page width changes linearly. A segmented change in the page width indicates that the width of the page that the terminal device is pre-configured to display is related to the screen size. For example, when the width of the screen is greater than or equal to a preset threshold, the width of the page is a fixed value, and when the width of the screen is less than the preset threshold, the width of the page is another fixed value.

[0022] In an implementable manner of the first aspect, the server may also mark the nodes that match the folded state of the terminal device screen in the target syntax tree, and mark the nodes that match the expanded state of the terminal device screen, to obtain the marking information of each node in the target syntax tree. The marking information is used by the target terminal device to determine the node that matches the current screen state from the target syntax tree, so that the ownership of the nodes in the target syntax tree can be better distinguished. It can be understood that since a part of the nodes in the target syntax tree are the same nodes between the first syntax tree and the second syntax tree, there may be nodes in the target syntax tree that belong to both the first syntax tree and the second syntax tree.

[0023] In an implementation manner of the first aspect, when the server sends the target page configuration information corresponding to the target application to the target terminal device, what is sent is the target page configuration information corresponding to the target terminal device and the target application.

[0024] In a second aspect, a page display method is provided, which is applied to a terminal device in a communication system, wherein the communication system includes a server and at least one terminal device, and the server communicates with at least one terminal device respectively. In the method, the terminal device sends a first page information request to the server in response to a startup operation of a target application, and receives target page configuration information and first page content. The terminal device displays an application page of the target application that matches the current first screen state according to the target page configuration information and the first page content. If the terminal device switches from the current first screen state to the second screen state, a second page request information is sent to the server, and the second page content is received. The terminal device displays an application page of the target application that matches the current second screen state according to the target page configuration information and the second page content.

[0025] The above-mentioned target page configuration information is integrated according to the different page configuration information corresponding to the application page of the target application in different screen states of the terminal device; the first screen state indicates that the screen of the terminal device is in a folded state or in an expanded state; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

[0026] It can be seen that in the above page display method, the terminal device can obtain the target page configuration information from the server once after the target application is started, without having to obtain the page configuration information for the current screen state from the server multiple times. Afterwards, the terminal device displays the application page that matches the current screen state according to the target page configuration information. In this way, the process of repeatedly obtaining the corresponding page configuration information from the server when the screen state is switched can be reduced, which greatly saves the time for obtaining information, thereby improving the performance of the terminal device, reducing the waiting time of the user, and improving the user experience.

[0027] In an implementation manner of the second aspect, the terminal device obtains target HTML information and target CSS information from the target page configuration information, and obtains a target syntax tree according to the target HTML information; the target syntax tree includes nodes corresponding to multiple screen states. The terminal device obtains at least one target node matching the first screen state from the target syntax tree according to the tag information of each node. The terminal device obtains a target rule that meets the preset display conditions of the terminal device according to the target CSS information. The terminal device displays the application page of the target application according to the hierarchical relationship between at least one target node, the syntax content of at least one target node, the target rule, and the first page content.

[0028] There is a hierarchical relationship between at least one target node, and at least one target node in the target syntax tree is used to represent at least one grammatical content in the target syntax tree.

[0029] In this implementation method, since the target page configuration information includes target HTML information and target CSS information, and the nodes in the target syntax tree corresponding to the target HTML information have their own affiliations, and the target rules corresponding to the target CSS information include rules that meet the preset display conditions of the terminal device, the terminal device can directly obtain the configuration information that matches the current screen state from the target page configuration information.

[0030] In a third aspect, a page display method is provided, which is applied to a communication system, wherein the communication system includes a server and at least one terminal device, and the server communicates with the at least one terminal device. In the method,

[0031] The server obtains different page configuration information corresponding to the target application in different screen states of the terminal device; the page configuration information is used to configure the application page of the target application.

[0032] The server merges the different page configuration information corresponding to the different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application; the target page configuration information includes configuration information for displaying the application page in multiple screen states.

[0033] The target terminal device sends a first page information request to the server in response to a start-up operation of the target application; the at least one terminal device includes the target terminal device.

[0034] The server receives the first page information request, and sends the target page configuration information and the first page content corresponding to the target application to the target terminal device.

[0035] The target terminal device receives the target page configuration information and the first page content, and displays the application page of the target application matching the current first screen state according to the target page configuration information and the first page content; the first screen state indicates that the screen of the terminal device is in a folded state or in an expanded state.

[0036] If the target terminal device switches from the current first screen state to the second screen state, the target terminal device sends second page request information to the server.

[0037] The server receives the second page information request and sends the second page content corresponding to the target application to the target terminal device.

[0038] The target terminal device receives the second page content and displays the application page of the target application matching the current second screen state according to the target page configuration information and the second page content; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

[0039] According to a fourth aspect, a communication system is provided, comprising a server and at least one terminal device, wherein the at least one terminal device comprises a target terminal device.

[0040] The server is used to obtain different page configuration information corresponding to the target application in different screen states of the terminal device, and to merge the different page configuration information corresponding to the different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application; the page configuration information is used to configure the application page of the target application; the target page configuration information includes configuration information for displaying the application page in multiple screen states.

[0041] The target terminal device is used to send a first page information request to the server in response to a start-up operation of the target application.

[0042] The server is further configured to receive a first page information request and send target page configuration information and first page content corresponding to a target application to a target terminal device.

[0043] The target terminal device is also used to receive target page configuration information and first page content, and display the application page of the target application matching the current first screen state according to the target page configuration information and the first page content; the first screen state indicates that the screen of the terminal device is in a folded state or in an expanded state.

[0044] If the target terminal device switches from the current first screen state to the second screen state, the target terminal device is further configured to send second page request information to the server.

[0045] The server is further configured to receive a second page information request and send the second page content corresponding to the target application to the target terminal device.

[0046] The target terminal device is also used to receive the second page content and display the application page of the target application matching the current second screen state according to the target page configuration information and the second page content; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

[0047] In a fifth aspect, an electronic device is provided, comprising a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes a page display method as in the first aspect and any implementation thereof, or executes a page display method as in the second aspect and any implementation thereof.

[0048] In a sixth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a page display method as in the first aspect and any implementation thereof, or executes a page display method as in the second aspect and any implementation thereof.

[0049] In the seventh aspect, a computer program product is provided. When the computer program product runs on a computer, it enables the computer to execute the page display method as in the first aspect and any implementation thereof, or execute the page display method as in the second aspect and any implementation thereof.

[0050] It can be understood that the beneficial effects that can be achieved by the page display method described in the third aspect, the communication system described in the fourth aspect, the electronic device described in the fifth aspect, the computer-readable storage medium described in the sixth aspect, and the computer program product described in the seventh aspect can refer to the beneficial effects in the first aspect and any possible design method thereof or the second aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Schematic diagram of obtaining page configuration information for a currently commonly used folding screen mobile phone shown in an embodiment of the present application Figure 1 ;

[0052] Figure 2 Schematic diagram of obtaining page configuration information for a currently commonly used folding screen mobile phone shown in an embodiment of the present application Figure 2 ;

[0053] Figure 3 A schematic diagram of a communication system shown in an embodiment of the present application;

[0054] Figure 4 Schematic diagram of a terminal device shown in an embodiment of the present application Figure 1 ;

[0055] Figure 5 Schematic diagram of a terminal device shown in an embodiment of the present application Figure 2 ;

[0056] Figure 6 Schematic diagram of the process of the page display method shown in the embodiment of the present application Figure 1 ;

[0057] Figure 7 Schematic diagram of the process of the page display method shown in the embodiment of the present application Figure 2 ;

[0058] Figure 8 A schematic diagram of a target syntax tree shown in an embodiment of the present application;

[0059] Fig. 9 Schematic diagram of the process of the page display method shown in the embodiment of the present application Figure 3 ;

[0060] Fig.10 A schematic diagram of a target rule shown in an embodiment of the present application;

[0061] Fig.11 A schematic diagram of an application page shown in an embodiment of the present application;

[0062] Fig.12 This is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the differences. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0064] In addition, the business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0065] At present, in order to make the application pages displayed on different electronic devices adapt to the screen size of the electronic devices, the server side usually configures corresponding page configuration information for electronic devices with different screen sizes, wherein the page configuration information includes hypertext markup language (HTML) and cascading style sheets (CSS). Also, electronic devices with different screen sizes, such as mobile phones, tablet computers, etc. Or, the electronic device includes different screen states, such as folded state, unfolded state; for example, horizontal screen state, vertical screen state; for example, from full screen display state, split screen display state, etc.

[0066] For example, see Figure 1 As shown, when the screen state of the foldable screen mobile phone switches or changes, it will send a request to the server, and the request includes indication information indicating the current state of the foldable screen mobile phone. The server determines the current state of the foldable screen mobile phone based on the indication information in the request. If it is in the folded state, the page configuration information corresponding to the folded state is sent to the foldable screen mobile phone. The foldable screen mobile phone receives the page configuration information and then lays out and displays the corresponding application page on the screen in the folded state according to the HTML and CSS in the page configuration information. If it is in the unfolded state, the server sends the page configuration information corresponding to the unfolded state to the foldable screen mobile phone. The foldable screen mobile phone receives the page configuration information and then lays out and displays the corresponding application page on the screen in the unfolded state according to the HTML and CSS in the page configuration information.

[0067] See also Figure 2 As shown, each time the foldable screen mobile phone switches its state, it must re-acquire the corresponding page configuration information from the server and re-display the application page. Although this method can ensure that the foldable screen mobile phone can display the correct application page in both the folded and unfolded states, it takes a certain amount of time for the foldable screen mobile phone to re-acquire new page configuration information. At the same time, the user also needs to spend a long time waiting for the application page to be redisplayed. If the foldable screen mobile phone switches its state many times, the foldable screen mobile phone repeatedly requests page configuration information from the server, which will also cause the foldable screen mobile phone to have poor performance and affect the user experience.

[0068] Based on the above content, an embodiment of the present application provides a page display method. On the one hand, the server obtains different page configuration information corresponding to the target application in different screen states of the terminal device, and then merges the different page configuration information corresponding to the different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application. Afterwards, after receiving the first page information request sent by the target terminal device after the target application is started, the server sends the target page configuration information and the first page content to the target terminal device, and the first page content is used for the target terminal device to display the application page of the target application that matches the current screen state according to the target page configuration information. After receiving the second page information request sent by the target terminal device after the target application is started, the server sends the second page content to the target terminal device, and the second page content is used for the target terminal device to display the application page of the target application that matches the current screen state according to the target page configuration information that has been obtained.

[0069] The above page configuration information is used to configure the application page of the target application, and the target page configuration information includes configuration information for displaying the application page in multiple screen states.

[0070] On the other hand, the target terminal device sends a first page information request to the server in response to the start-up operation of the target application. After receiving the first page information request, the server sends the target page configuration information and the first page content to the target terminal device. And, after receiving the target page configuration information and the first page content, the target terminal device displays the application page of the target application that matches the current first screen state according to the target page configuration information and the first page content. If the target terminal device switches from the current first screen state to the second screen state, the target terminal device sends a second page information request to the server, and the server sends the second page content to the target terminal device. And, according to the acquired target page configuration information and the currently acquired second page content, the target terminal device displays the application page of the target application that matches the current second screen state.

[0071] The above-mentioned first screen state indicates that the screen of the target terminal device is in a folded state or in an unfolded state. The first screen state indicates that the screen of the target terminal device is in an unfolded state or in a folded state.

[0072] In the above method, the server can integrate the different page configuration information corresponding to the target application in different screen states of the terminal device into a unified target page configuration information. The target terminal device does not need to obtain the page configuration information for the current screen state from the server multiple times, but only needs to obtain the unified target page configuration information from the server once after the target application is started. Afterwards, the target terminal device displays the application page of the target application that matches the current screen state according to the target page configuration information. In this way, the process of repeatedly obtaining the corresponding page configuration information from the server when the screen state is switched can be reduced, which greatly saves the time for obtaining information, thereby improving the performance of the terminal device, reducing the waiting time of the user, and improving the user experience.

[0073] The page display method provided in the embodiment of the present application can be applied to a communication system. Figure 3 As shown, the communication system includes a server 300 and at least one terminal device 301. The at least one terminal device 301 is connected to the server 300 for communication.

[0074] The server 300 may refer to a single server or a server cluster. The server cluster includes multiple servers, and information, data, etc. between the multiple servers may be shared.

[0075] In some possible application scenarios, the server 300 can be used as a kind of "application market" to provide corresponding configuration information, data, resources, etc. for the application software in the "application market". Among them, the application software in the application market can include browsers, videos, music, navigation, maps, telephones and other applications.

[0076] When the developer of an application puts the application on the shelf and registers it in the "application market", the developer will upload the relevant information of the application in the "application market" accordingly. The relevant information of the application includes page configuration information for displaying the application page on the screen of the terminal device 301, etc.

[0077] The application page of the same target application may be displayed in different forms, methods, styles, etc. on screens of different sizes. Different terminal devices 301 may have different screen sizes, or a foldable terminal device 301 may have different screen sizes in the folded state and the unfolded state. In order to make the application page of the target application displayed on the terminal device 301 adapt to the screen size of the terminal device 301, the developer will often set corresponding page configuration information for the terminal devices 301 of different screen sizes.

[0078] For example, for terminal device A1 with a screen size of 300px, the page configuration information corresponding to the application page of the target application is X1; for terminal device A2 with a screen size of 350px, the page configuration information corresponding to the application page of the target application is X2; for terminal device A3 with an expanded screen size of 677px, the page configuration information corresponding to the application page of the target application is X3; and for terminal device A3 with a folded screen size of 375px, the page configuration information corresponding to the application page of the target application is X4.

[0079] The application page of the target application 1 is displayed on the terminal device A3 with a screen size of 375px according to the page configuration information X4 as follows: Figure 4 As shown in (a) of FIG. 1 ; the application page of the target application 1 is displayed on the terminal device A3 with a screen size of 677px according to the page configuration information X3 as shown in FIG. Figure 4 As shown in (b) in FIG. 1 , it can be understood that, for the foldable terminal device A3, different screen states may correspond to different page configuration information of the application page, and different screen states indicate that the screen of the terminal device A3 is in an expanded state or in a folded state, and the screen size of the folded state is smaller than the screen size of the expanded state.

[0080] After obtaining the page configuration information of the target application's application page in different screen sizes or screen states, the server 300 can merge different page configuration information corresponding to a target application into unified target page configuration information. For example, the server 300 merges the page configuration information X3 and the page configuration information X4 corresponding to the target application 1 into the target page configuration information X5 corresponding to the target application 1.

[0081] When the target application is started, the terminal device 301 sends a request for application page information to the server 300, and the server 300 responds to the request and sends the target page configuration information of the target application to the terminal device 301. The terminal device 301 obtains the page configuration information matching the current screen state from the target page configuration information, and displays the application page of the target application according to the page configuration information.

[0082] In some possible application scenarios, after receiving the page information request, the server 300 may also send other information related to the application page, such as page resources, page content, etc., to the terminal device 301. Thus, the terminal device 301 can display the complete application page content according to the above target page configuration information and page content.

[0083] Among them, the terminal device 301 can layout the content of the application page (such as content location, resource location, content display method, resource display method, etc.) and configure the style of the application page (such as font, background color, font color, etc.) according to the page configuration information.

[0084] In some possible application scenarios, the page configuration information corresponding to the application page of the target application may include hypertext markup language (HTML) information and cascading style sheets (CSS) information. The merged target page configuration information includes target HTML information and target CSS information.

[0085] When different page configuration information is merged, the HTML information in the different page configuration information is merged to obtain target HTML information, and the CSS information in the different page configuration information is merged to obtain target CSS information. The target HTML information includes HTML information for configuring the application page of the target application under multiple screen sizes (or multiple screen states); the target CSS information includes CSS information for configuring the application page of the target application under multiple screen sizes (or multiple screen states).

[0086] Among them, the HTML information can be parsed to obtain the syntax tree or abstract syntax tree (AST) corresponding to the application page. The syntax tree or AST is a tree representation of the abstract syntax structure of the source code of the application page. The syntax tree includes at least one node with a hierarchical relationship, and each node represents a structure or a syntax content in the source code. The abstract syntax tree does not depend on the syntax of the source language.

[0087] The CSS information can indicate how the terminal device 301 displays the elements in the HTML on the screen, or in other words, the CSS information can define the style of the application page, including the design and layout for different terminal devices 301 and screen sizes. Accordingly, the rules for displaying the application page can be obtained by parsing the CSS information. The rules here refer to the display rules for the application page configured for the specific screen size of the terminal device 301. Specifically, the elements in the HTML can be displayed, thereby further displaying the application page.

[0088] When merging HTML information, the server 300 can parse different HTML information corresponding to the application pages into corresponding syntax trees, merge the different syntax trees corresponding to the application pages, and finally merge them into a target syntax tree, and then use the target syntax tree to generate target HTML information. The merged target syntax tree includes nodes corresponding to multiple screen sizes (or multiple screen states).

[0089] When fusing CSS information, the server 300 can parse different CSS information corresponding to the application pages into corresponding rules, and fuse the different rules corresponding to the application pages, and finally fuse them into target rules, and then use the target rules to generate target CSS information. Among them, the fused target rules include rules that meet the preset display conditions of the terminal device 301. The preset display conditions represent the preset display conditions or requirements for the terminal device 301, and specifically can include that the width of the application page is constant, the width of the application page changes linearly, or the width of the application page changes in segments.

[0090] Exemplarily, taking the terminal device 301 with a foldable screen as an example, the constant width of the application page means that for the terminal device 301, even if the screen state or screen size of the terminal device 301 changes, the width of the displayed application page is always constant. The linear change of the width of the application page means that for the terminal device 301, if the screen state or screen size of the terminal device 301 changes, the width of the displayed application page changes linearly, for example, if the width in the screen size increases, then the width of the application page also increases accordingly. The segmented change of the width of the application page means that for the terminal device 301, if the screen state or screen size of the terminal device 301 changes, the width of the displayed application page is a fixed value when the screen width is greater than or equal to a preset threshold, and another fixed value when the screen width is less than the preset threshold. For example, if the screen width is less than 350px after the screen size changes, the width of the displayed application page is 100px, and if the screen width is greater than 350px after the screen size changes, then the width of the displayed application page is 120px.

[0091] It is understandable that the screen width in the embodiment of the present application refers to the screen width that can present the content in the current screen state. Figure 4 As shown in (a) of FIG. 1 , the screen of the terminal device is currently in a folded state. At this time, the width L1 shown in the figure represents the screen size. Figure 4 As shown in (b), the terminal device is in the unfolded state. At this time, the width L2 shown in the figure represents the screen size.

[0092] In some possible application scenarios, in response to the start of the target application, after the terminal device 301 sends a first page information request to the server 300, the target page configuration information and the first page content can be obtained from the server 300, and the application page can be displayed in the current screen state according to the information in the target page configuration information that matches the current screen state and the first page content. Afterwards, during the operation of the target application, the terminal device 301 will not obtain the target page configuration information from the server 300 again. When the screen state of the terminal device 301 changes, the terminal device 301 can send a second page information request to the server 300, and the server 300 sends the second page content to the terminal device 301, but will not send the target page configuration information again. Then, the terminal device 301 can re-layout the application page in the current screen state according to the already obtained target page configuration information and the currently obtained second page content.

[0093] In some other possible application scenarios, the first page information request can be regarded as the first page information request sent by the terminal device 301 to the server 300 after the target application is started, and the second page information request can be regarded as the non-first or second page information request sent by the terminal device 301 to the server 300 during the operation of the target application. When the application page of the target application needs to jump or refresh, the terminal device 301 can send the page request information to the server 300 again, so as to obtain the page content matching the application page to be displayed from the server 300.

[0094] Referring to the contents of the aforementioned embodiment, the target page configuration information includes target HTML information and target CSS information, and the target syntax tree corresponding to the target HTML information includes nodes corresponding to multiple screen states (or screen sizes) of the terminal device 301. And, the target rules corresponding to the target CSS information include rules that meet the preset display conditions of the terminal device 301. The terminal device 301 can obtain the corresponding nodes and the rules that meet the preset display conditions from the target page configuration information according to the current screen state, and display the application page that matches the current screen state according to the hierarchical relationship between the obtained nodes, the syntax content, the obtained rules and the page content, etc.

[0095] In some possible application scenarios, the process of the above-mentioned screen state (or screen size) changing or switching can be, for example, switching from a folded state to an unfolded state, from an unfolded state to a folded state, from a horizontal screen state to a vertical screen state, from a vertical screen state to a horizontal screen state, from a full-screen display state to a split-screen display state, from a split-screen display state to a full-screen display state, etc.

[0096] Exemplarily, if the current screen state of the terminal device 301 is the expanded state, the terminal device 301 obtains the syntax tree node corresponding to the expanded state from the target HTML information in the target page configuration information, and obtains the corresponding target rule from the target CSS information, thereby displaying the application page of the target application in the expanded state according to the hierarchical relationship, syntax content, target rule, and page content of the obtained syntax tree node. When the screen state of the terminal device 301 is switched to the folded state, the terminal device 301 again obtains the syntax tree node corresponding to the folded state from the target HTML information in the target page configuration information, and obtains the corresponding target rule from the target CSS information, thereby displaying the application page of the target application in the folded state according to the hierarchical relationship, syntax content, target rule, and page content of the currently obtained syntax tree node.

[0097] In some possible application scenarios, the screen sizes of at least one terminal device 301 in the above communication system may be the same or different. If the terminal device 301 is not a folding screen, after the terminal device 301 obtains the target page configuration information from the server 300, the application page can be displayed according to the configuration information corresponding to the current screen size in the target page configuration information (such as the node content in the syntax tree, the target rule, etc.). Since the screen size or screen state of the terminal device 301 will not change, the terminal device 301 does not need to display the application page according to the change of the screen size.

[0098] In some other possible application scenarios, the terminal device 301 in the above communication system may also include at least two screen states, namely, an unfolded state and a folded state. Among them, the terminal device 301 including at least two screen states may be a folding screen terminal device such as a folding screen mobile phone, a folding screen computer, a folding screen display, etc. In addition, the screen folding direction of the folding screen terminal device may be horizontal folding or vertical folding.

[0099] In some possible application scenarios, the folding screen terminal device may include two screens, one of which is a foldable screen. Figure 5 Taking (a) and (b) in the figure as an example, when the screen folding direction of the folding screen terminal device is horizontal folding, the folding screen terminal device includes a screen 501 and a foldable screen 502. In the folded state, the screen 502 is folded inward, and the screen 501 is used to display content when the screen 502 is in the folded state. When the screen 502 is in the unfolded state, the screen 501 can be turned off and no content is displayed.

[0100] In some other possible application scenarios, the folding screen terminal device may include a screen, and the screen is foldable. Figure 5Taking (c) and (d) in the figure as examples, when the screen folding direction of the folding screen terminal device is horizontal folding, in the folded state, the foldable screen 503 folds outward, and the folded half or part of the screen can display content.

[0101] It is understandable that the screen size mentioned in the embodiment of the present application refers to the size of the screen currently being used or currently displaying content on the terminal device 301. For example, when the above-mentioned screen 502 is in a folded state, the screen size indicates the size of the screen 501, and when the above-mentioned screen 502 is in an unfolded state, the screen size indicates the size of the screen 502. When the above-mentioned screen 503 is in a folded state, the screen size indicates the size of half or a part of the screen displaying content on the screen 503, and when the above-mentioned screen 503 is in an unfolded state, the screen size indicates the size of the screen 503.

[0102] In some possible application scenarios, after receiving different page configuration information corresponding to the target application, the server 300 can respectively integrate the corresponding target page configuration information for different manufacturers and different models of terminal devices 301. When the terminal device 301 needs to obtain the target page configuration information from the server 300, the page information request sent by the terminal device 301 to the server 300 can also include the model information or manufacturer information of the terminal device 301, so that the server 300 sends the corresponding target page configuration information to the terminal device 301 according to the model information or manufacturer information.

[0103] In some other possible application scenarios, after the server 300 merges the corresponding target page configuration information for the terminal devices 301 of different manufacturers and different models, it can send all the target page configuration information to the terminal device 301. Then, the terminal device 301 can obtain the target page configuration information corresponding to its own manufacturer and model from all the target page configuration information.

[0104] When the page display method in the embodiment of the present application is implemented based on the above-mentioned communication system, the above-mentioned server can merge the different page configuration information corresponding to the target application in different screen states of the terminal device into a unified target page configuration information. The terminal device does not need to obtain the page configuration information for the current screen state from the server multiple times, but only obtains the unified target page configuration information from the server once after the target application is started. After that, the terminal device displays the application page that matches the current screen state according to the target page configuration information. In this way, the process of repeatedly obtaining the corresponding page configuration information from the server when the screen state is switched can be reduced, which greatly saves the time for obtaining information, thereby improving the performance of the terminal device, reducing the waiting time of the user, and improving the user experience.

[0105] The following is the terminal device mentioned above Figure 5 Taking the folding screen mobile phones shown in (a) and (b) in the figure as an example, the page display method in the embodiment of the present application is described. Figure 6 As shown, the page display method includes the following steps S601-S608.

[0106] S601. The server obtains different page configuration information corresponding to the target application in different screen states of the foldable screen mobile phone.

[0107] The page configuration information is used to configure the application page of the target application. The page size of the application page of the target application displayed on foldable screen mobile phones with different screen sizes may be different. For example, when the screen of a foldable screen mobile phone is in a folded state, the screen size is smaller than when it is in an unfolded state. Therefore, the page size of the application page of the target application displayed on the folded screen is smaller than the page size displayed on the unfolded screen.

[0108] Based on this, in order to make the application page displayed on the foldable screen mobile phone adapt to the screen size of the foldable screen mobile phone in different screen states, developers often set the page configuration information corresponding to the target application according to the different screen states or screen sizes of the foldable screen mobile phone. The page configuration information can instruct the foldable screen mobile phone to layout and construct the application page accordingly. For example, for the folded screen state of the foldable screen mobile phone, the application page corresponds to the first page configuration information, and for the unfolded screen state of the foldable screen mobile phone, the application page corresponds to the second page configuration information.

[0109] It is understandable that because the target application can be acquired and installed by multiple terminal devices, when the server acquires different page configuration information, the different page configuration information may include not only the configuration information corresponding to the folding screen mobile phone, but also the page configuration information corresponding to some other folding screen terminal devices. The folding screen mobile phones and folding screen terminal devices here are all terminal devices that can install the above-mentioned target application.

[0110] In some embodiments, the screen state of the foldable screen mobile phone may include at least a folded state and an unfolded state. Also, when the foldable screen mobile phone is in the folded state, the angle of the foldable screen after folding is less than or equal to a preset angle, wherein the preset angle is no more than 90 degrees at most and 0 degrees at least. For example, the preset angle may be 60 degrees, 50 degrees, 45 degrees, etc. If the angle of the foldable screen after folding is greater than the preset angle, it means that the foldable screen mobile phone is in the unfolded state. When the foldable screen mobile phone is in the unfolded state, the maximum angle of the foldable screen after unfolding is 180 degrees.

[0111] When the developer of the target application puts the target application on the server such as the "App Market", the developer will also upload the relevant information of the target application to the server accordingly. The relevant information of the target application includes the page configuration information for displaying the application page when the foldable screen mobile phone is in different screen states.

[0112] The above-mentioned page configuration information includes HTML information and CSS information for displaying the application page. For example, if the folded state corresponds to the first page configuration information, the first page configuration information includes first HTML information and first CSS information; if the expanded state corresponds to the second page configuration information, the second page configuration information includes second HTML information and second CSS information.

[0113] S602. The server integrates different page configuration information corresponding to different screen states of the foldable screen mobile phone to obtain target page configuration information of the terminal device corresponding to the target application.

[0114] The target page configuration information includes the merged target HTML information and the merged target CSS information.

[0115] For example, if the target application corresponds to the first page configuration information and the second page configuration information respectively, the server may merge the first HTML information in the first page configuration information with the second HTML information in the second page configuration information to obtain the target HTML information. Also, the server may merge the first CSS information in the first page configuration information with the second CSS information in the second page configuration information to obtain the target CSS information.

[0116] The server can integrate different page configuration information into unified target page configuration information, so that when a folding screen mobile phone with a target application installed requests relevant information of the target application from the server after the target application is started, the server can send the corresponding target page configuration information to the folding screen mobile phone at one time. During the normal operation of the target application after it is started, the folding screen mobile phone does not need to request page configuration information from the server again, saving time for information or data transmission.

[0117] In some embodiments, when the server merges different HTML information into unified target HTML information, it may first parse the different HTML information separately to obtain different syntax trees (or abstract syntax trees), and then merge the different syntax trees.

[0118] For example, if the target application corresponds to the first page configuration information and the second page configuration information respectively, see Figure 7As shown, the server can obtain the first syntax tree corresponding to the application page of the target application according to the first HTML information, and obtain the second syntax tree corresponding to the application page of the target application according to the second HTML information. After that, the server continues to obtain the first node set according to the same nodes in the first syntax tree and the second syntax tree, and obtains the second node set according to the different nodes in the first syntax tree and the second syntax tree. Finally, the server inserts the nodes in the second node set into the first node set to generate the target syntax tree, and obtains the target HTML information according to the target syntax tree.

[0119] The same nodes mentioned above refer to the same grammatical content in the nodes and / or the same class and node id of the nodes. In some possible application scenarios, the grammatical content of the nodes can reflect the role and purpose of the nodes, and the class and node id of the nodes can reflect the level, position, and hierarchical relationship of the nodes with other nodes in the syntax tree. Different nodes refer to the different grammatical content in the nodes and the different class and / or node id of the nodes.

[0120] Exemplarily, when determining whether the nodes in the first syntax tree and the second syntax tree are the same, the server may use, for example, a diff algorithm. The structures of the first syntax tree and the second syntax tree can be found in Figure 8 As shown in , the server can first compare the root node S11 in the first syntax tree and the root node S21 in the second syntax tree. If the syntax contents in the two nodes are the same, it can be determined that the two nodes are the same node. If the syntax contents of S11 and S21 are different, the server compares whether the class and id of S11 and S12 are the same. If the class and id of the two nodes are the same, it can be determined that the two nodes are the same node. After that, the server can continue to compare the child node S12 in the first syntax tree and the child node S22 in the second syntax tree.

[0121] If the grammatical content of S11 and S21 is different, and the class and / or id of S11 and S21 are different, S11 and S21 are considered to be different. In this case, the server can determine whether S12 under the S11 node is the same as S22 under the S21 node. If S12 is the same as S21, the server can still consider S11 and S21 to be the same node.

[0122] like Figure 8As shown, in the two syntax trees, nodes S11 and S21, nodes S12 and S22, nodes S13 and S24, nodes S14 and S25, nodes S15 and S26, nodes S18 and S28, nodes S19 and S29 are the same nodes, and these nodes constitute a first node set; while nodes S23, S27, S16, and S17 are different nodes, and these nodes constitute a second node set.

[0123] Furthermore, if the nodes in the node set have a hierarchical relationship, a logical relationship, etc., these nodes can also be saved in the node set according to the hierarchical relationship, the logical relationship, etc., for example, saving a tree structure composed of nodes, etc. Alternatively, the node set can also include individual nodes.

[0124] For example, Figure 8 As shown, when the server generates a target syntax tree, the same nodes in the first node set and the different nodes in the second node set can be merged into a target syntax tree. In addition, in order to better distinguish the ownership of the nodes in the target syntax tree, the nodes belonging to the first syntax tree can be marked in the target syntax tree, that is, the nodes that match the folding state are marked, and the nodes belonging to the second syntax tree can be marked in the target syntax tree, that is, the nodes that match the expansion state are marked. It can be understood that since a part of the nodes in the target syntax tree are the same nodes between the first syntax tree and the second syntax tree, there can be nodes in the target syntax tree that belong to both the first syntax tree and the second syntax tree. Among them, the marked node includes corresponding tag information, and the tag information specifically indicates the ownership of the node.

[0125] After obtaining the target syntax tree, the server compresses and compiles the target syntax tree to obtain target HTML information that is easy to transmit.

[0126] In the above embodiment, when the server merges the page configuration information corresponding to different screen states (or screen sizes), it can merge the different syntax trees in the different page configuration information, so that the merged target syntax tree can be applicable to folding screen mobile phones with different screen states (or screen sizes).

[0127] In some embodiments, when the server merges different CSS information into unified target CSS information, it may first parse the different CSS information separately to obtain different rules, and then merge the different rules.

[0128] For example, if the application page corresponds to the first page configuration information and the second page configuration information respectively, see Fig. 9As shown, the server can obtain the first rule according to the first CSS information, and obtain the second rule according to the second CSS information. The server then merges the first rule and the second rule into a target rule that meets the preset display conditions of the folding screen mobile phone, and obtains the target CSS information according to the target rule.

[0129] The first rule may represent the rule for displaying an application page when the foldable screen mobile phone is in a folded state, and the second rule may represent the rule for displaying an application page when the foldable screen mobile phone is in an unfolded state. For example, a foldable screen mobile phone displays an application page with a width of 16px when the screen is in a folded state, and this rule may represent the first rule; a foldable screen mobile phone displays an application page with a width of 120px when the screen is in an unfolded state, and this rule may represent the second rule.

[0130] And, the above-mentioned preset display conditions include at least three, among which the first condition can indicate that the page width is a constant, the second condition can indicate that the page width changes linearly, and the third condition can indicate that the page width changes segmentally. Among them, the page width is a constant, which can indicate that the page width pre-configured for display by the folding screen mobile phone is fixed, and the page width will not change with the screen state (or screen size). The linear change of the page width can indicate that the page width pre-configured for display by the folding screen mobile phone changes with the screen size. For example, the larger the width of the screen, the larger the width of the page, and the page width changes linearly. The segmented change of the page width indicates that the page width pre-configured for display by the folding screen mobile phone is related to the screen size. For example, when the width of the screen is greater than or equal to the preset threshold, the width of the page is a fixed value, and when the width of the screen is less than the preset threshold, the width of the page is another fixed value. In addition, in the fused target rule, the page width displayed by the folding screen mobile phone is jointly determined according to the widths required in the first rule and the second rule respectively.

[0131] For example, Fig.10The rule fusion method that meets various preset display conditions is shown. If the impact of screen length changes on page display is not considered, for multiple rules of application pages with display sizes of 300px*16px, 350px*16px, and 400px*16px, after the rules are fused based on the first condition, the target rule obtained is an application page with a display width of 16px. For multiple rules of application pages with display sizes of 300px*270px, 350px*320px, and 400px*370px, after the rules are fused based on the second condition, the target rule obtained is an application page with a display width of 100vw-30px, where vw represents the width unit of the visible window and 100vx can represent the screen width of the currently displayed application page. For multiple rules for displaying application pages with sizes of 300px*100px, 350px*120px, and 400px*120px respectively, after fusing the rules based on the third condition above, the target rule obtained is to display application pages with segmented width changes, that is, when the screen width is greater than or equal to 350px, the displayed page width is 120px, and when the screen width is less than 350px, the displayed page width is 100px.

[0132] It is understandable that the server obtains the preset display conditions of different folding screen mobile phones, and then integrates unified target rules according to different folding screen mobile phones.

[0133] After obtaining the target rules, the server compresses and compiles the target syntax tree to obtain target CSS information that is easy to transmit.

[0134] In the above embodiment, when the server integrates the page configuration information corresponding to different screen states (or screen sizes), it can integrate the different display rules in the different page configuration information, so that the integrated target rules can be applicable to folding screen mobile phones with different screen states (or screen sizes).

[0135] In addition, since the embodiment of the present application takes a horizontally foldable folding screen mobile phone as an example, when integrating the display rules, the impact of changes in screen length on the application page display can be temporarily ignored or neglected, while the impact of changes in screen width on the application page display can be considered.

[0136] S603. The target foldable screen mobile phone sends a first page information request to the server in response to the start operation of the target application.

[0137] The target foldable screen mobile phone refers to the mobile phone that has installed the target application. In order to provide the application page to the user as quickly as possible when the target application is started and ensure the user's usage experience, the target foldable screen mobile phone needs to send a first page information request to the server when the target application is started, thereby requesting the server to send the relevant information of the target application to ensure that the target foldable screen mobile phone displays the application page according to the relevant information of the target application.

[0138] S604. The server receives the first page information request and sends the target page configuration information and the first page content corresponding to the target application to the target folding screen mobile phone.

[0139] The first page content represents the content and resources that need to be displayed on the current application page of the target application, such as pictures, videos, texts, search boxes, icons, etc.

[0140] It can be understood that the first page information request represents the first page information request sent by the target folding screen mobile phone to the server after the target application is started.

[0141] In some possible application scenarios, when the target application is started and running, the application page may jump, refresh, etc. according to the user's operation or the configuration of the target application. When the application page jumps or refreshes, the target folding screen mobile phone can send a second page information request to the server.

[0142] In some embodiments, the server can merge the page configuration information of each application in different terminal devices in different screen states. It can be understood that the merged target page configuration information not only has the corresponding application, but also the corresponding terminal device. Therefore, the target page configuration information sent by the server to the target folding screen mobile phone is the target page configuration information corresponding to the target folding screen mobile phone and the target application. This ensures that the target folding screen mobile phone can obtain accurate configuration information.

[0143] S605. The target folding screen mobile phone receives the target page configuration information and the first page content, and displays the application page of the target application matching the current first screen state according to the target page configuration information and the first page content.

[0144] Among them, the first screen state may indicate that the screen of the target folding screen mobile phone is in a folded state or in an unfolded state.

[0145] Referring to the aforementioned embodiment, the target page configuration information includes target HTML information and target CSS information, and the nodes in the target syntax tree corresponding to the target HTML information also have their own affiliations, and the target rules corresponding to the target CSS information include rules that meet the preset display conditions of the folding screen mobile phone. In this way, the target folding screen mobile phone can directly obtain the configuration information that matches the current screen state from the target page configuration information. In addition, when the target folding screen mobile phone displays the application page, it can first determine its current screen state, for example, the first screen state, and then obtain the information corresponding to the first screen state from the target page configuration information, and then display the application page based on this information.

[0146] In some embodiments, when the target foldable screen mobile phone displays an application page that matches the current first screen state, the target HTML information and the target CSS information can be obtained from the target page configuration information, and then the target foldable screen mobile phone obtains the target syntax tree according to the target HTML information, and obtains at least one target node that matches the first screen state from the target syntax tree according to the tag information of each node. The target foldable screen mobile phone then obtains the target rule that meets the preset display conditions of the target foldable screen mobile phone according to the target CSS information, and displays the application page of the target application according to the hierarchical relationship between at least one target node, the syntax content of at least one target node, the target rule and the first page content.

[0147] Exemplarily, when the first screen state indicates a folded state, the target node matching the first screen state represents a node matching the folded state in a target syntax tree corresponding to the target HTML information, such as a node whose marking information is a folded state in a target syntax tree corresponding to the target HTML information; and, if the current preset display condition of the target folding screen mobile phone is the aforementioned first condition, then the target rule that meets the first condition in the target rules corresponding to the target CSS information is obtained.

[0148] When the first screen state indicates the expanded state, the above-mentioned target node matching the first screen state represents the node matching the expanded state in the target syntax tree corresponding to the target HTML information, for example, the node whose marking information is the expanded state in the target syntax tree corresponding to the target HTML information; and, if the current preset display condition of the target folding screen mobile phone is the aforementioned third condition, then the target rule that meets the third condition in the target rules corresponding to the target CSS information is obtained.

[0149] S606. If the target foldable screen mobile phone switches from the current first screen state to the second screen state, the target foldable screen mobile phone sends a second page information request to the server.

[0150] The second screen state indicates that the screen of the target foldable screen mobile phone is in the unfolded state or in the folded state. It is understandable that the first screen state is different from the second screen state, and the target foldable screen mobile phone switches from the first screen state to the second screen state, which can mean switching from the folded state to the unfolded state, or from the unfolded state to the folded state.

[0151] When the screen state of the target foldable screen mobile phone changes, the screen size will also change. The size of the original displayed application page cannot match the changed screen size, and the displayed page content, resources, etc. may also change. Therefore, in this case, the target foldable screen mobile phone will also send a second page information request to the server to obtain new page content from the server.

[0152] S607. The server receives the second page information request and sends the second page content corresponding to the target application to the target folding screen mobile phone.

[0153] In the embodiment of the present application, after the target application is started, even if the screen state of the target foldable screen mobile phone changes, the target foldable screen mobile phone will not request page configuration information from the server again. Exemplarily, the first page information request sent by the target foldable screen mobile phone to the server for the first time after the target application is started may include a request for the target page configuration information, while the second page information request subsequently sent to the server does not include a request for the target page configuration information. Thus, the server will send the target page configuration information to the target foldable screen mobile phone in response to the first page information request, but will not send the target page configuration information to the target foldable screen mobile phone in response to the second page information request.

[0154] S608. The target foldable screen mobile phone displays an application page of the target application that matches the current second screen state according to the target page configuration information and the second page content.

[0155] When the screen state of the target foldable screen mobile phone is switched, the target foldable screen mobile phone does not need to obtain the corresponding target page configuration information from the server again, but still obtains the configuration information corresponding to the current screen state from the previously obtained target page configuration information, and then displays the application page in the current screen state according to the configuration information corresponding to the current screen state. For details, please refer to Fig.11 shown.

[0156] In some possible application scenarios, since the device that displays the application page (i.e., the target foldable screen mobile phone itself) has not changed or replaced, even if the screen state of the target foldable screen mobile phone changes, the preset display conditions pre-configured for the target foldable screen mobile phone may not change, and thus when the screen state of the target foldable screen mobile phone changes, the target rules obtained from the target page configuration information may not change. For example, when the screen of the target foldable screen mobile phone is in a folded state, the target rules obtained from the target page configuration information are rules that meet the first condition. When the screen of the target foldable screen mobile phone is switched to an unfolded state, the target rules obtained from the target page configuration information may also be rules that meet the first condition.

[0157] In other possible application scenarios, even if the device that displays the application page (i.e., the target foldable screen mobile phone itself) has not changed or replaced, when the screen state of the target foldable screen mobile phone changes, the preset display conditions pre-configured for the target foldable screen mobile phone may also change, and then when the screen state of the target foldable screen mobile phone changes, the target rules obtained from the target page configuration information may also change again. For example, when the screen of the target foldable screen mobile phone is in a folded state, the target rules obtained from the target page configuration information are rules that meet the first condition, and when the screen of the target foldable screen mobile phone is switched to an unfolded state, the target rules obtained from the target page configuration information are rules that meet the second condition.

[0158] It can be seen from the above content that in the page display method provided in the embodiment of the present application, the server can integrate the different page configuration information corresponding to the target application in different screen states of the folding screen mobile phone into a unified target page configuration information. The target folding screen mobile phone does not need to obtain the page configuration information for the current screen state from the server multiple times, but only obtains the unified target page configuration information from the server once after the target application is started. Afterwards, the target folding screen mobile phone displays the application page that matches the current screen state according to the target page configuration information. In this way, the process of repeatedly obtaining the corresponding page configuration information from the server when the screen state of the target folding screen mobile phone is switched can be reduced, which greatly saves the time for obtaining information, thereby improving the performance of the folding screen mobile phone, reducing the waiting time of the user, and improving the user experience.

[0159] In the above embodiments, Figure 5 The folding screen mobile phone shown in (a) and (b) is taken as an example to illustrate the above page display method. In some other embodiments, the above page display method can also be applied to Figure 5In terminal devices such as foldable screen mobile phones shown in (c) and (d) of the figure, or terminal devices such as mobile phones with vertically foldable screens. In some other embodiments, the above page display method can be applied to other non-foldable screen terminal devices, but the terminal device can implement the following screen state switching in one or more ways: switching from horizontal screen state to vertical screen state, switching from vertical screen state to horizontal screen state, switching from full screen display state to split screen display state, switching from split screen display state to full screen display state, etc.

[0160] When the above page display method is applied to a mobile phone with a vertically foldable screen, the server may temporarily not consider or ignore the impact of screen width changes on application page display when integrating display rules, but consider the impact of screen length changes on application page display. Further, when considering the impact of screen length changes on application page display, the method for obtaining the integrated target rule can refer to the method for obtaining the target rule when considering the impact of screen width changes on application page display in the aforementioned embodiment, which will not be repeated here.

[0161] Regardless of the type of folding screen device mobile phone or folding screen terminal device on which the page display method in the embodiment of the present application is applied, it can reduce the process of the folding screen terminal device repeatedly obtaining the corresponding page configuration information from the server when the screen state is switched, thereby improving the performance of the folding screen terminal device, greatly saving the time for information acquisition, reducing the user's waiting time, and improving the user's experience.

[0162] In some possible application scenarios, when the screen state of the foldable screen mobile phone is switched, the foldable screen mobile phone may not send a second page information request to the server, but still re-display the application page of the target application based on the previously obtained target page configuration information and page content.

[0163] In some schemes, multiple embodiments of the present application can be combined, and the combined scheme can be implemented. Optionally, some operations in the process of each method embodiment are optionally combined, and / or the order of some operations is optionally changed. In addition, the execution order between the steps of each process is only exemplary and does not constitute a restriction on the execution order between the steps. There can also be other execution orders between the steps. It is not intended to show that the execution order is the only order in which these operations can be performed. A person of ordinary skill in the art will think of a variety of ways to reorder the operations described in the embodiments of the present application. In addition, it should be noted that the process details involved in a certain embodiment of the present application are also applicable to other embodiments in a similar manner, or different embodiments can be used in combination.

[0164] In addition, some steps in the method embodiment may be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiment may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiment.

[0165] Furthermore, the various method embodiments may be implemented separately or in combination.

[0166] It is understandable that in order to achieve the above functions, the aforementioned servers, terminal devices and other electronic devices include hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0167] In this embodiment, the functional modules of electronic devices such as servers and terminal devices can be divided according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0168] The present application also provides an electronic device, such as Fig.12 As shown, the electronic device may include one or more processors 1201, a memory 1202 and a communication interface 1203. The electronic device may also be used as the above-mentioned server, terminal device, etc.

[0169] The memory 1202 and the communication interface 1203 are coupled to the processor 1201. For example, the memory 1202, the communication interface 1203 and the processor 1201 may be coupled together via a bus 1204.

[0170] The communication interface 1203 is used for data transmission with other devices. The memory 1202 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 1201, the electronic device executes the page display method in the embodiment of the present application.

[0171] Among them, the processor 1201 can be a processor or a controller, for example, it can be a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the contents of the embodiments of the present application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0172] The bus 1204 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 1204 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0173] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the method embodiment.

[0174] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the relevant method steps in the above method embodiment.

[0175] Among them, the electronic device, computer storage medium or computer program product provided in this application is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0176] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0177] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0178] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0179] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0180] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0181] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A page display method, It is characterized in that A server applied to a communication system, wherein the communication system further comprises at least one terminal device, and the server communicates with the at least one terminal device respectively; the method comprises: Acquire different page configuration information corresponding to the target application in different screen states of the terminal device; the screen state indicates whether the screen of the terminal device is in a folded state or in an unfolded state; the page configuration information is used to configure the application page of the target application; Merging the different page configuration information corresponding to different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application; the target page configuration information includes configuration information for displaying the application page in multiple screen states; After receiving a first page information request sent by the target terminal device after the target application is started, sending the target page configuration information and the first page content corresponding to the target application to the target terminal device; the first page content is used by the target terminal device to display an application page of the target application matching the current screen state according to the target page configuration information; After receiving a second page information request sent by the target terminal device after the target application is started, the second page content corresponding to the target application is sent to the target terminal device; the second page content is used by the target terminal device to display the application page of the target application that matches the current screen state based on the target page configuration information that has been acquired.

2. The method according to claim 1, It is characterized in that The page configuration information includes hypertext markup language HTML information and cascading style sheet CSS information for displaying the application page; the target page configuration information includes merged target HTML information and merged target CSS information.

3. The method according to claim 2, It is characterized in that The target application corresponds to first page configuration information when the screen of the terminal device is in a folded state, and corresponds to second page configuration information when the screen of the terminal device is in an unfolded state; the first page configuration information includes first HTML information and first CSS information, and the second page configuration information includes second HTML information and second CSS information; the merging of different page configuration information corresponding to different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application includes: Merging the first HTML information in the first page configuration information with the second HTML information in the second page configuration information to obtain the target HTML information; the target HTML information includes HTML information for configuring an application page of the target application in multiple screen states; The first CSS information in the first page configuration information is merged with the second CSS information in the second page configuration information to obtain the target CSS information; the target CSS information includes CSS information of an application page for configuring the target application in multiple screen states.

4. The method according to claim 3, It is characterized in that The step of fusing the first HTML information in the first page configuration information with the second HTML information in the second page configuration information to obtain the target HTML information includes: According to the first HTML information, a first syntax tree corresponding to the target application is obtained, and according to the second HTML information, a second syntax tree corresponding to the target application is obtained; the first syntax tree and the second syntax tree are used to represent the syntax structure corresponding to the application page of the target application when the screen of the terminal device is in a folded state and the syntax structure corresponding to the application page of the target application when the screen of the terminal device is in an expanded state, respectively; According to the same nodes in the first syntax tree and the second syntax tree, a first node set is obtained, and according to the different nodes in the first syntax tree and the second syntax tree, a second node set is obtained; the first syntax tree and the second syntax tree respectively include at least one node having a hierarchical relationship, and at least one node in the first syntax tree is respectively used to represent at least one syntax content in the first syntax tree, and at least one node in the second syntax tree is respectively used to represent at least one syntax content in the second syntax tree; Inserting nodes in the second node set into the first node set to generate a target syntax tree; the target syntax tree includes nodes corresponding to a plurality of screen states respectively; According to the target syntax tree, the target HTML information is obtained.

5. The method according to claim 3 or 4, It is characterized in that The step of fusing the first CSS information in the first page configuration information with the second CSS information in the second page configuration information to obtain the target CSS information includes: Obtaining, according to the first CSS information, a first rule for displaying the application page when the screen of the terminal device is in a folded state; Obtaining, according to the second CSS information, a second rule for the terminal device to display the application page when the screen is in an expanded state; Merging the first rule and the second rule into a target rule; the target rule includes a rule for displaying the application page that meets a preset display condition of the terminal device; According to the target rule, the target CSS information is obtained.

6. The method according to claim 5, It is characterized in that The preset display conditions include the page width being constant, the page width changing linearly, or the page width changing in segments.

7. The method according to claim 4, It is characterized in that The method further comprises: Mark the nodes that match the folded state of the terminal device screen in the target syntax tree, and mark the nodes that match the expanded state of the terminal device screen, and obtain the marking information of each node in the target syntax tree; the marking information is used by the target terminal device to determine the node that matches the current screen state from the target syntax tree.

8. The method according to any one of claims 1 to 7, It is characterized in that Sending the target page configuration information corresponding to the target application to the target terminal device includes: The target page configuration information corresponding to the target terminal device and the target application is sent to the target terminal device.

9. A page display method, It is characterized in that A terminal device applied to a communication system, wherein the communication system comprises a server and at least one terminal device, wherein the server communicates with the at least one terminal device respectively; and the method comprises: In response to a start-up operation of the target application, sending a first page information request to the server; receiving target page configuration information and first page content; the target page configuration information is formed by integrating different page configuration information corresponding to the application page of the target application in different screen states of the terminal device; Displaying, according to the target page configuration information and the first page content, an application page of the target application that matches the current first screen state; the first screen state indicates that the screen of the terminal device is in a folded state or in an unfolded state; If the terminal device switches from the current first screen state to the second screen state, sending second page request information to the server and receiving second page content; According to the target page configuration information and the second page content, an application page of the target application matching the current second screen state is displayed; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

10. The method according to claim 9, It is characterized in that The page configuration information includes hypertext markup language HTML information and cascading style sheet CSS information for displaying the application page; the target page configuration information includes merged target HTML information and merged target CSS information.

11. The method according to claim 10, It is characterized in that The step of displaying the application page of the target application matching the current first screen state according to the target page configuration information and the first page content includes: Respectively acquiring the target HTML information and the target CSS information from the target page configuration information; According to the target HTML information, a target syntax tree is obtained; the target syntax tree includes nodes corresponding to a plurality of screen states respectively; At least one target node matching the first screen state is obtained from the target syntax tree according to tag information of each node; the at least one target node has a hierarchical relationship, and at least one target node in the target syntax tree is used to represent at least one syntax content in the target syntax tree; According to the target CSS information, a target rule that meets a preset display condition of the terminal device is obtained; The application page of the target application is displayed according to the hierarchical relationship between the at least one target node, the grammatical content of the at least one target node, the target rule and the first page content.

12. A page display method, It is characterized in that Applied to a communication system, the communication system includes a server and at least one terminal device, the server communicates with the at least one terminal device respectively; the method includes: The server obtains different page configuration information corresponding to the target application in different screen states of the terminal device; the page configuration information is used to configure the application page of the target application; The server merges the different page configuration information corresponding to different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application; the target page configuration information includes configuration information for displaying the application page in multiple screen states; The target terminal device sends a first page information request to the server in response to the start-up operation of the target application; the at least one terminal device includes the target terminal device; The server receives the first page information request, and sends the target page configuration information and the first page content corresponding to the target application to the target terminal device; The target terminal device receives the target page configuration information and the first page content, and displays an application page of the target application matching a current first screen state according to the target page configuration information and the first page content; the first screen state indicates that the screen of the terminal device is in a folded state or in an unfolded state; If the target terminal device switches from the current first screen state to the second screen state, the target terminal device sends second page request information to the server; The server receives the second page information request, and sends the second page content corresponding to the target application to the target terminal device; The target terminal device receives the second page content, and displays the application page of the target application matching the current second screen state based on the target page configuration information and the second page content; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

13. A communication system, It is characterized in that comprising a server and at least one terminal device; the at least one terminal device comprising a target terminal device; The server is used to obtain different page configuration information corresponding to the target application in different screen states of the terminal device, and merge the different page configuration information corresponding to the different screen states of the terminal device to obtain the target page configuration information of the terminal device corresponding to the target application; The page configuration information is used to configure the application page of the target application; the target page configuration information includes configuration information for displaying the application page in multiple screen states; The target terminal device is used to send a first page information request to the server in response to a start-up operation of the target application; The server is further configured to receive the first page information request, and send the target page configuration information and the first page content corresponding to the target application to the target terminal device; The target terminal device is further used to receive the target page configuration information and the first page content, and display an application page of the target application matching a current first screen state according to the target page configuration information and the first page content; the first screen state indicates that the screen of the terminal device is in a folded state or in an unfolded state; If the target terminal device switches from the current first screen state to the second screen state, the target terminal device is further configured to send second page request information to the server; The server is further configured to receive the second page information request and send the second page content corresponding to the target application to the target terminal device; The target terminal device is also used to receive the second page content, and display the application page of the target application matching the current second screen state based on the target page configuration information and the second page content; the second screen state indicates that the screen of the terminal device is in an expanded state or in a folded state.

14. An electronic device, It is characterized in that It includes a memory and one or more processors; the memory is coupled to the processor; the memory stores computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the page display method as described in any one of claims 1 to 8, or executes the page display method as described in any one of claims 9 to 11.

15. A computer-readable storage medium, It is characterized in that It includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the page display method as described in any one of claims 1 to 8, or executes the page display method as described in any one of claims 9 to 11.

Citation Information

Patent Citations

  • Method and device for adapting to terminal screen, storage medium and electronic device

    CN110096322A

  • Data processing method and system, and storage medium

    CN111221609A

  • Data generation method, device, equipment and storage medium

    CN113721803A

  • Page layout adjustment method and device

    CN114564263A

  • Display method applied to electronic equipment with folding screen and electronic equipment

    CN114787773A