Page display method, device, equipment and computer readable medium
By receiving rich text data from the server and obtaining executable code locally, and setting the attributes of page elements, it solves the problems of heavy development workload and complex protocols in page display technology, and achieves a balance between development efficiency and lightweight protocols.
Patent Information
- Application Number
- CN202110519389.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-05-12
AI Technical Summary
In page display technology, when setting multiple display control attributes, the development workload is heavy and repetitive, resulting in a large client installation package that takes up a lot of storage space, and there are many elements issued by the server, which leads to complex protocols and parsing. time consuming.
By receiving rich text data sent by the server, including overall style data and local style data, the public attributes and local attributes of text elements are set according to the scope information, and the executable code of non-text elements is obtained locally for display, avoiding Set the properties of each control one by one.
It simplifies the development work, reduces the size of the installation package, makes the protocol lightweight, saves parsing time, and achieves a balance between development efficiency and protocol lightweighting.
Smart Images

Figure CN113296771B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a page display method, apparatus, device, and computer-readable medium. Background Art
[0002] The page contains many types of elements, such as pictures, text, buttons, etc. Among them, text has many formats, and different texts may have different properties such as color, size, and line spacing. Related page display technologies can set the format by setting the properties of various display controls. Other technologies organize all elements in the server page according to a predetermined protocol, and the client parses and displays the data after receiving it.
[0003] However, when the above method is used for formatting, the following technical problems often occur:
[0004] When setting the properties of multiple display controls, the page usually contains a large number of controls, each with multiple properties. During development, each property of each control is set one by one, which is labor-intensive and repetitive, wasting a lot of manpower and material resources. In addition, the large amount of code will result in a large client installation package, which will take up more storage space. When all elements are sent from the server, the large number of elements (pictures, buttons, text, etc.) leads to complex protocols and time-consuming parsing. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, and these concepts will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection. Some embodiments of the present disclosure propose page display methods, devices, equipment and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.
[0006] In a first aspect, some embodiments of the present disclosure provide a page display method, the method comprising: for text elements in a page to be displayed, receiving rich text data sent by a server, the rich text data comprising overall style data and local style data, the local style data corresponding to scope information; setting the common attributes of the text elements and the local attributes of the text elements according to the overall style data and the local style data and the corresponding scope information respectively; assigning values to the created text controls according to the common attributes and the local attributes to display the text elements; for non-text elements in the page to be displayed, obtaining the executable code corresponding to the non-text elements from the local to display the non-text elements.
[0007] In a second aspect, some embodiments of the present disclosure provide a page display device, comprising: a receiving unit, configured to receive rich text data sent by a server for text elements in a page to be displayed, the rich text data comprising overall style data and local style data, the local style data corresponding to scope information; a setting unit, configured to set public attributes of text elements and local attributes of text elements according to the overall style data and the local style data and the corresponding scope information, respectively; a display unit, configured to assign values to a created text control according to the public attributes and the local attributes to display the text elements; the display unit is further configured to obtain executable codes corresponding to non-text elements in the page to be displayed from a local computer to display the non-text elements.
[0008] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0009] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0010] The above-mentioned embodiments of the present disclosure have the following beneficial effects: different elements in the page are displayed in different ways to avoid the defects of a single method. This can avoid the problem of large development workload and large installation package size caused by paying attention to setting each attribute of the control. In addition, since it is only for text elements and it is necessary to receive the data sent by the server, it is possible to agree on the organization and parsing protocol only for text elements, which can make the protocol lightweight and save parsing time. This can achieve a balance between development workload and lightweight protocol. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0012] Figure 1 is a schematic diagram of an application scenario of the page display method of some embodiments of the present disclosure;
[0013] Figure 2 is a flow chart of some embodiments of the page display method according to the present disclosure;
[0014] Figure 3 is an exemplary schematic diagram of rich text data of a page display method according to some embodiments of the present disclosure;
[0015] Figure 4 is a flow chart of other embodiments of the page display method according to the present disclosure;
[0016] Figure 5 is a schematic structural diagram of some embodiments of the page display device according to the present disclosure;
[0017] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0024] Figure 1 It is a schematic diagram of an application scenario of the page display method of some embodiments of the present disclosure.
[0025] exist Figure 1In the application scenario of , the execution subject of the page display method can be a smart phone 101. The page to be displayed can be any page, such as a product details page, which includes a picture 102, a button 103, a text 104, and a text 105. Among them, the text 104 and the text 105 have different font sizes, fonts, and other formats. Among them, the text 104 and the text 105 are both text elements, and the picture 102 and the button 103 are both non-text elements.
[0026] On this basis, the smart phone 101 can receive rich text data sent by the server. Among them, the rich text data includes overall style data and local style data. The local style data corresponds to the scope information. Among them, the overall style data can be used to represent the unified format of all texts in the page, and the local style data can be used to represent the format of part of the text. For example, the overall style data can be "Kai Ti", and the local style data can be "No. 14 font, No. 8 font". The scope information corresponding to the local style data can be "(1,5), (6,17)". Among them, (1,5) means that the scope is the first to the fifth character, and (6,17) has a similar meaning. Then, according to the overall style data and the local style data and the corresponding scope information, the common attributes of the text element and the local attributes of the text element are set. Afterwards, the created text control is assigned values according to the common attributes and the local attributes to display the text element, and the display effect is as follows. Figure 1 For non-text elements (picture 102, button 103) in the page to be displayed, the smart phone 101 obtains the executable code corresponding to the non-text elements from the local computer to display the non-text elements. The display effect is as follows: Figure 1 shown.
[0027] It should be noted that the above-mentioned execution subject 101 can be hardware or software. When the execution subject is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the execution subject is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] Continue to refer Figure 2 , shows a process 200 of some embodiments of the page display method according to the present disclosure. The page display method comprises the following steps:
[0029] Step 201: for a text element in a page to be displayed, rich text data sent by a server is received. The rich text data includes overall style data and local style data. The local style data has corresponding scope information.
[0030] In some embodiments, the execution body of the page display method (eg Figure 1 The smartphone shown in the figure can receive rich text data from the server. Among them, rich text data is data used to display text with formatting. Among them, rich text data includes overall style data and local style data. The overall style data can be used to represent the unified format of all texts in the page. In practice, each page often includes texts in multiple formats. Although the formats of these texts are different, there are still some common properties. For example, properties such as line spacing and the maximum number of lines of a string are generally unified throughout the page. Local style data can be used to represent the format of part of the text. For example, different local attributes such as text color, font size, font, etc. are different. Since the local style data does not act on all texts, the local style data needs to correspond to the scope information to represent which texts the local style data acts on. Figure 3 An example of rich text data is shown. Among them, mark 301 in the figure is the overall style data, which is used to specify the global line spacing as "10" and the maximum number of lines as "2". Marks 302-305 in the figure are local style data. Optionally, mark 302 is string specification information, which is used to specify the style of the symbol "¥". Mark 303 is character position specification information. Mark 304 is character type specification information, which is used to specify the style of text of type "1". Mark 305 is a regular expression.
[0031] In some optional implementations of some embodiments, the scope information includes at least one of the following: string specifying information, character type specifying information, character position specifying information, and a regular expression for specifying the scope. Among them, the string specifying information can be used to specify a specific string in a string (for example, specifying the symbol "¥"). The character type specifying information can be used to specify a specific type of character (for example, specifying a numeric character). The character position specifying information is used to specify characters at a specific position (for example, specifying characters in a certain row). Optionally, each item of scope information can be mutually exclusive or compatible. Each item of scope information can correspond to a priority. This can solve the problem of conflict when different scope information corresponds to overlapping content.
[0032] Step 202, setting the common attributes of the text element and the local attributes of the text element according to the overall style data and the local style data and the corresponding scope information.
[0033] In some embodiments, the execution subject can set the common attributes of the text element and the local attributes of the text element according to the overall style data, the local style data and the corresponding scope information. Specifically, the common attributes of the text element can be set according to the overall style data. The local attributes of the text element can be set according to the local style data and the corresponding scope information. For example, the overall style data can be "Kai Ti", and the local style data can be "No. 14 font, No. 8 font". The scope information corresponding to the local style data can be "(1,5), (6,17)". At this time, all the texts can be set to "Kai Ti" as a whole. The first to fifth characters are set to "No. 14 font", and the sixth to seventeenth characters are set to "No. 8 font". In practice, the attribute value of the preset agreed field can be set, for example, the font size can be set to: "fontSize": "20". Among them, fontSize is a field used to characterize the font size. Or it can also be: fontSize = 20.
[0034] Step 203: assign values to the created text control according to the common attributes and the local attributes to display the text element.
[0035] In some embodiments, the execution subject may assign values to the created text control according to the common attributes and the local attributes. For example, the background color may be set in the following manner: label.backgroundcolor = [UIColor whiteColor].
[0036] Optionally, different systems may require different parameter types. Therefore, for the fields in step 202, the fields may be converted into parameter types required for calling the system method, so that the system method may be called to implement the setting.
[0037] Step 204: For the non-text elements in the page to be displayed, the executable code corresponding to the non-text elements is obtained locally to display the non-text elements.
[0038] In some embodiments, for non-text elements (e.g., images, buttons, etc.) in the page to be displayed, corresponding executable codes can be obtained locally. The non-text elements are displayed by executing these executable codes. The executable codes corresponding to these non-text elements can be codes included in the installation package of the application.
[0039] In some embodiments of the present disclosure, different elements in a page are displayed in different ways to avoid the defects of a single way. Generally speaking, a page has more text elements and relatively fewer non-text elements. Therefore, for text elements, the data sent by the server is received, so as to avoid the problems of large development workload and large installation package size caused by paying attention to setting each attribute of the control. In addition, since it is only for text elements that it is necessary to receive the data sent by the server, it is possible to agree on the organization and parsing protocol only for text elements, which can make the protocol lightweight and save parsing time. Thereby, a balance between development workload and lightweight protocol can be achieved.
[0040] Further references Figure 4 , which shows a process 400 of another embodiment of a page display method. The process 400 of the page display method includes the following steps:
[0041] Step 401: for a text element in a page to be displayed, rich text data sent by a server is received. The rich text data includes overall style data and local style data. The local style data has corresponding scope information.
[0042] Step 402, setting the common attributes of the text element and the local attributes of the text element according to the overall style data and the local style data and the corresponding scope information.
[0043] In some embodiments, the specific implementation of steps 401-402 and the corresponding technical effects can be referred to. Figure 2 The corresponding embodiments will not be described in detail here.
[0044] Step 403: Receive text display configuration information sent by the server.
[0045] In some embodiments, the execution subject may also receive text display configuration information sent by the server, wherein the text display configuration information may include text display position information, maximum text display width and height, and the like.
[0046] Step 404: assign values to the created text control according to the common properties, local properties and text display configuration information to display the text element.
[0047] In some cases, the execution subject may first assign values to the created text control according to the common attributes and local attributes. On this basis, determine whether the attribute value of the text control needs to be modified according to the text display configuration information. For example, the initial size of the text element may be first determined according to the common attributes and local attributes. If it is determined that the initial size is greater than the text size threshold in the text display configuration information, the text size threshold is determined as the actual size of the text element. On this basis, the actual size is passed to the text control to display the text element. If the initial size is less than or equal to the text size threshold in the text display configuration information, it may be displayed directly according to the initial size.
[0048] Step 405: For the non-text elements in the page to be displayed, the executable code corresponding to the non-text elements is obtained locally to display the non-text elements.
[0049] In some embodiments, the specific implementation of step 405 and the technical effects thereof can be referred to in Figure 2 The corresponding step 204 in the embodiments will not be described in detail here.
[0050] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the page display method in some corresponding embodiments constrains the width and height of the text through the text display configuration information, so that the display size of the text can be effectively controlled.
[0051] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a page display device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0052] like Figure 5As shown, the page display device 500 of some embodiments includes: a data receiving unit 501, a setting unit 502, and a display unit 503. Among them, the data receiving unit 501 is configured to receive rich text data sent by the server for the text elements in the page to be displayed, and the rich text data includes overall style data and local style data, and the local style data corresponds to the scope of action information. The setting unit 502 is configured to set the public attributes of the text elements and the local attributes of the text elements according to the overall style data and the local style data and the corresponding scope of action information. The display unit 503 is configured to assign values to the created text controls according to the public attributes and the local attributes to display the text elements. The display unit 503 is further configured to obtain the executable code corresponding to the non-text elements in the page to be displayed from the local to display the non-text elements.
[0053] In some optional implementations of some embodiments, the scope information includes at least one of the following: string specifying information, character type specifying information, character position specifying information, and a regular expression for specifying the scope.
[0054] In some optional implementations of some embodiments, the device also includes: a configuration information receiving unit, which receives text display configuration information sent by the server; and the display unit 503 is further configured to: assign values to the created text controls to display the text elements according to the common properties, local properties and text display configuration information.
[0055] In some optional implementations of some embodiments, the device 500 also includes: an initial size determination unit, configured to determine the initial size of the text element based on common attributes and local attributes; an actual size determination unit, configured to determine the text size threshold as the actual size of the text element in response to determining that the initial size is greater than the text size threshold in the text display configuration information; and a transmission unit, configured to transmit the actual size to the text control to display the text element.
[0056] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0057] Reference below Figure 6 , which shows an electronic device (eg, Figure 1The electronic devices in some embodiments of the present disclosure may include but are not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0058] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0059] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0060] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0061] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0062] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0063] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: for the text elements in the page to be displayed, receives the rich text data sent by the server, the rich text data includes the overall style data and the local style data, and the local style data corresponds to the scope information; sets the common attributes of the text elements and the local attributes of the text elements according to the overall style data and the local style data and the corresponding scope information; assigns values to the created text controls according to the common attributes and the local attributes to display the text elements; for the non-text elements in the page to be displayed, obtains the executable code corresponding to the non-text elements from the local to display the non-text elements.
[0064] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0065] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0066] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a data receiving unit, a setting unit, and a display unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the receiving unit may also be described as a "unit for receiving rich text data sent by the server".
[0067] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0068] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A page display method, include: For a text element in a page to be displayed, receiving rich text data sent by a server, wherein the rich text data includes overall style data and local style data, and the local style data corresponds to scope information; Setting the common attributes of the text element and the local attributes of the text element according to the overall style data, the local style data and the corresponding scope information respectively; Assigning values to the created text control according to the common attributes and the local attributes to display the text element; For the non-text elements in the to-be-displayed page, the executable code corresponding to the non-text elements is obtained locally to display the non-text elements.
2. The method according to claim 1, in, The scope information includes at least one of the following: String specification information, character type specification information, character position specification information, and a regular expression used to specify a scope.
3. The method according to claim 1, in, The method further comprises: Receiving text display configuration information sent by the server; and The step of assigning a value to the created text control according to the common attribute and the local attribute to display the text element includes: According to the common properties, the local properties and the text display configuration information, the created text control is assigned a value to display the text element.
4. The method according to claim 3, in, The step of assigning a value to the created text control according to the common attribute, the local attribute and the text display configuration information to display the text element comprises: Determining the initial size of the text element according to the common attributes and the local attributes; In response to determining that the initial size is greater than a text size threshold in the text display configuration information, determining the text size threshold as an actual size of the text element; The actual size is transmitted to the text control to display the text element.
5. A page display device, include: The data receiving unit is configured to receive rich text data sent by the server for the text element in the page to be displayed, wherein the rich text data includes overall style data and local style data, and the local style data corresponds to the scope of application information; A setting unit, configured to set the common attributes of the text element and the local attributes of the text element according to the overall style data and the local style data and corresponding scope information respectively; A display unit, configured to assign values to the created text control according to the common attributes and the local attributes to display the text element; The display unit is further configured to obtain executable codes corresponding to the non-text elements in the to-be-displayed page from a local computer so as to display the non-text elements.
6. The device according to claim 5, in, The scope information includes at least one of the following: String specification information, character type specification information, character position specification information, and a regular expression used to specify a scope.
7. The device according to claim 5, in, The device also includes: a configuration information receiving unit, receiving text display configuration information sent by the server; and The display unit is further configured to: According to the common properties, the local properties and the text display configuration information, the created text control is assigned a value to display the text element.
8. The device according to claim 7, in, The device also includes: an initial size determining unit, configured to determine the initial size of the text element according to the common attribute and the local attribute; an actual size determination unit, configured to, in response to determining that the initial size is larger than a text size threshold in the text display configuration information, determine the text size threshold as an actual size of the text element; The transmitting unit is configured to transmit the actual size to the text control so as to display the text element.
9. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
10. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
