CN112632428B - Page local refreshing method, device, equipment and storage medium - Google Patents

Page local refreshing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112632428B
CN112632428B CN202011563004.2A CN202011563004A CN112632428B CN 112632428 B CN112632428 B CN 112632428B CN 202011563004 A CN202011563004 A CN 202011563004A CN 112632428 B CN112632428 B CN 112632428B
Authority
CN
China
Prior art keywords
control object
refreshing
content control
display page
grouping
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011563004.2A
Other languages
Chinese (zh)
Other versions
CN112632428A (en
Inventor
王金正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202011563004.2A priority Critical patent/CN112632428B/en
Publication of CN112632428A publication Critical patent/CN112632428A/en
Application granted granted Critical
Publication of CN112632428B publication Critical patent/CN112632428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results

Abstract

The embodiment of the invention provides a page local refreshing method, device, equipment and storage medium. The method comprises the following steps: monitoring a local refreshing event in a display page; the local refreshing event is used for triggering refreshing of a local area in the display page; responding to the local refreshing event, and inquiring a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area; and controlling the content control object positioned in the local area in the display page to execute refreshing operation for refreshing the data displayed by the content control object. The content control object is only used for refreshing the data in the local area of the page when the refreshing operation is executed, and the refreshing processing is not carried out on the data in other areas in the page, so that the refreshing efficiency is higher.

Description

Page local refreshing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for local page refreshing.
Background
In order to increase the aesthetic degree of a page and to highlight the functionality of the page, a functional area may be set in the page, and the same type of data is presented in the functional area, so that the user can sort the viewing data in the functional area. However, since only a small amount of data in the mass data can be displayed in the functional area, a data refresh button or a type change button may be provided for the functional area in order to satisfy the user's need to view more data.
For example: and setting a functional area for displaying the information of the television drama in the main page of the video website, correspondingly setting a change button (data refreshing button) for the display area of the television drama, and displaying the information of a new batch of television drama when the user clicks the change button. Another example is: in the main page of the book reading website, a functional area for displaying different types of books is set, and book type selection buttons (type change buttons) are set for the functional area correspondingly, such as: an "ancient" type button and an "in-the-case" type button, when the user clicks the "ancient" type button, the "ancient" type book information is presented in the function area, and when the user clicks the "in-the-case" type button, the "in-the-case" type book information is presented in the function area.
In a page provided with a functional area, either clicking a data refresh button or clicking a type change button involves a page refresh operation. At present, when a page provided with a functional area is refreshed, the whole content of the page needs to be refreshed, but only the data in the functional area, in which the content is actually changed, are not changed, so that the refreshing efficiency is lower in a mode of refreshing the whole content of the page to change the display content of the functional area of the page.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, equipment and a storage medium for locally refreshing a page, so as to solve the problem of low refreshing efficiency in a mode of changing the display content of a page function area by refreshing the whole content of the page. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a method for local refreshing of a page, including: monitoring a local refreshing event in a display page; the local refreshing event is used for triggering refreshing of a local area in the display page; responding to the local refreshing event, and inquiring a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area; and controlling the content control object positioned in the local area in the display page to execute refreshing operation for refreshing the data displayed by the content control object.
Wherein, in the display page, monitoring the local refreshing event comprises: monitoring a local refreshing event of a refreshing control object in a display page; the local refreshing event is used for triggering the local area corresponding to the refreshing control object to refresh; the responding to the local refreshing event queries the content control object positioned in the local area in the display page, and comprises the following steps: responding to a local refreshing event of the refreshing control object, and inquiring a content control object corresponding to the refreshing control object in the display page; and controlling the content control object in the local area in the display page to execute refreshing operation, including: and controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation.
Before the content control object corresponding to the refresh control object in the display page is queried, the method further comprises the following steps: acquiring a grouping name corresponding to a content control object in the display page in the process of loading the display page; the grouping names corresponding to the refreshing control object and the content control object in the display page are preset, and the grouping name corresponding to the refreshing control object is the same as the grouping name corresponding to the content control object corresponding to the refreshing control object; storing the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table correspondingly; and querying the content control object corresponding to the refreshing control object in the display page, wherein the querying comprises the following steps: acquiring a grouping name corresponding to the refreshing control object; the grouping names corresponding to the refreshing control objects are preset, and the grouping names corresponding to the refreshing control objects are the same as the grouping names corresponding to the content control objects in the local areas corresponding to the refreshing control objects; and querying the content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table.
Wherein, after obtaining the group name corresponding to the content control object in the presentation page in the process of loading the presentation page, the method further comprises: transmitting the group names corresponding to the content control objects in the display page to a preset message center; storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page in a mapping relation table, wherein the mapping relation comprises the following steps: storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table through the message center; and querying a content control object with the same grouping name as the grouping name corresponding to the refresh control object in the mapping relation table, wherein the content control object comprises: transmitting the grouping names corresponding to the refreshing control objects to the message center, and inquiring the content control objects with the grouping names identical to the grouping names corresponding to the refreshing control objects in the mapping relation table through the message center; and controlling the content control object corresponding to the refresh control object in the display page to execute refresh operation, including: and controlling the content control object corresponding to the refreshing control object to execute refreshing operation through the message center.
After the content control object in the presentation page and the grouping name corresponding to the content control object in the presentation page are correspondingly stored in the mapping relation table, the method further comprises the steps of: if a refreshing control object is newly added in the display page, setting a corresponding content control object for the newly added refreshing control object, setting the same grouping name for the newly added refreshing control object and the content control object corresponding to the newly added refreshing control object, and correspondingly storing the content control object corresponding to the newly added refreshing control object and the grouping name corresponding to the content control object corresponding to the newly added refreshing control object in the mapping relation table; and/or if a content control object is newly added in the display page, setting a corresponding refreshing control object for the newly added content control object, setting a grouping name for the newly added content control object according to a grouping name corresponding to the refreshing control object corresponding to the newly added content control object, and correspondingly storing the newly added content control object and the grouping name corresponding to the newly added content control object in the mapping relation table; and/or if the content control object in the presentation page is destroyed, removing the content control object in the mapping relation table; and/or if the refreshing control object in the display page is destroyed, removing the content control object corresponding to the refreshing control object in the mapping relation table; and/or deleting the mapping relation table if the display page is closed.
Wherein the mapping relation table is used for storing key value pairs; the key words in the key value pair are grouping names, and the key value corresponding to the grouping names is a hash table; the hash table is used for storing the content control object corresponding to the grouping name in a weak reference mode.
Storing the correspondence between the content control object in the presentation page and the grouping name corresponding to the content control object in the presentation page in a mapping relation table includes: inquiring whether a grouping name corresponding to the content control object in the display page exists in the keywords of the mapping relation table; if the grouping names corresponding to the content control objects in the display page exist, storing the content control objects in the display page into a hash table corresponding to the grouping names; and if the grouping names corresponding to the content control objects in the display page do not exist, storing the content control objects in the display page into a newly-built hash table, and storing the grouping names corresponding to the content control objects in the display page and the correspondence of the newly-built hash table into the mapping relation table.
And querying a content control object with the same grouping name as the grouping name corresponding to the refresh control object in the mapping relation table, wherein the content control object comprises: in the mapping relation table, inquiring a hash table with the same keyword and the grouping name corresponding to the refreshing control object; traversing the content control object in the hash table, and determining the state of the content control object in the hash table in a survival state; and controlling the content control object corresponding to the refresh control object in the display page to execute refresh operation, including: and controlling the content control object in the surviving state in the hash table to execute refreshing operation.
In a second aspect of the present invention, there is also provided a page partial refresh apparatus, including: the monitoring module is used for monitoring local refreshing events in the display page; the local refreshing event is used for triggering refreshing of a local area in the display page; the query module is used for responding to the local refreshing event and querying a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area; and the refreshing module is used for controlling the content control object positioned in the local area in the display page to execute refreshing operation and refreshing the data displayed by the content control object.
The third method of the embodiment of the invention also provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing the steps of any one of the page partial refreshing methods when executing the programs stored in the memory.
In a fourth aspect of the present invention, there is also provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the steps of any of the above described page partial refresh methods.
In a fifth aspect of the invention there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of any of the above described page partial refresh methods.
According to the page local refreshing method, device, equipment and storage medium provided by the embodiment of the invention, the content control object in the page is used as a refreshing basis, when the local refreshing event is monitored, the content control object is controlled to execute refreshing operation, only the data displayed by the content control object is refreshed, and the whole display page is not required to be refreshed, namely, the data in the local area of the page is refreshed only, and the refreshing processing is not performed on the data in other areas of the page, so that the data processing amount in the refreshing process is greatly reduced, the refreshing time is shortened, and the refreshing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a method for local refreshing of pages according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for partial refresh of a page according to an embodiment of the present invention;
FIG. 3 is a flowchart of the set step of packet name according to one embodiment of the present invention;
FIG. 4 is a flowchart of a method for local refreshing of a page according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a display page according to an embodiment of the invention;
FIG. 6 is a schematic diagram of a content control object after performing a refresh operation according to an embodiment of the present invention;
FIG. 7 is a block diagram of a page partial refresh device according to an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
The embodiment of the invention provides a page local refreshing method. Referring to FIG. 1, a flow chart of a method for local refreshing of pages according to an embodiment of the invention is shown.
Step S110, monitoring a local refreshing event in a display page; the local refreshing event is used for triggering refreshing of a local area in the display page.
The display page refers to the part of the page displayed in the display area of the user screen. The presentation page may be a full or partial page. If the length of the page is smaller than or equal to the length of the user screen display area, the display page is all the pages, and if the length of the page is larger than the length of the user screen display area, the display page is part of the pages, and the scroll display page is needed to be used for viewing all the pages. For example: the user screen presentation area is a screen area of the mobile terminal.
And the local refreshing event is used for triggering the refreshing of the local area in the display page. Further, the local refresh event is used to trigger refreshing of multiple local regions in the presentation page at the same time.
And step S120, responding to the local refreshing event, and inquiring the content control object positioned in the local area in the display page.
The content control object is used to present data in the local area.
At least one content control object is included in the local area.
And step S130, controlling the content control object positioned in the local area in the display page to execute refreshing operation for refreshing the data displayed by the content control object.
And controlling the content control object positioned in the local area in the display page to execute refreshing operation, comprising the following steps: indicating the content control object to acquire new data from a data server, or acquiring new data from local preloaded data, and the like; the currently presented data is replaced with new data.
Further, if the number of the content control objects is plural, the plural content control objects are controlled to perform refresh operations, respectively. Further, the refreshed data presented by the plurality of content control objects is different.
In this embodiment, the content control object in the page is used as a refreshing basis, and when the local refreshing event is monitored, the content control object is controlled to execute the refreshing operation, only the data displayed by the content control object is refreshed, and the whole display page is not required to be refreshed, that is, only the data in the local area of the page is refreshed, and the data in other areas of the page are not refreshed, so that the data processing amount in the refreshing process is greatly reduced, the refreshing time is shortened, and the refreshing efficiency is improved.
In this embodiment, listening for a local refresh event includes: monitoring whether a local area of the display page has a local refreshing event or not; and if the local area is monitored to generate a local refreshing event, querying a content control object in the local area, and controlling the content control object to execute refreshing operation. For example: and setting an information frame in the page, wherein the information frame corresponds to the content control object, the user can see the data displayed by the content control object in the information frame, the user clicks the information frame, the content control object refreshes the data, and the user can see the new data in the information frame.
In this embodiment, listening for a local refresh event includes: a refreshing control object is correspondingly set for at least one content control object in advance, and the at least one content control object is located in at least one local area in the display page; monitoring a local refreshing event of a preset refreshing control object; and if the refresh control object is monitored to generate the local refresh object, querying the content control object corresponding to the refresh control object, and controlling the content control object corresponding to the refresh control object to execute the refresh operation.
The following describes steps for implementing a refresh operation performed by a content control object through a refresh control object. FIG. 2 is a flow chart of a method for local refreshing of pages according to an embodiment of the invention.
Step S210, in the display page, monitoring a local refresh event of the refresh control object.
The refresh control object is used to trigger the occurrence of a local refresh event for the local region. The refreshing control object triggers the local refreshing event when a preset clicking event occurs in a preset key area or triggers the local refreshing event when voice information of preset content is acquired by the refreshing control object. For example: the refresh control object corresponds to a 'change-over' button area, and when the clicking event of the 'change-over' button area is monitored, the local refresh event is triggered. Another example is: the refreshing control object triggers the occurrence of a local refreshing event when voice information with the content of refreshing the ancient style novel area is acquired.
And the local refreshing event is used for triggering refreshing of a local area corresponding to the refreshing control object in the display page.
Step S220, responding to the local refreshing event of the refreshing control object, and inquiring the content control object corresponding to the refreshing control object in the display page; the content control object is located within the local area and is used to present data in the local area.
The content control object corresponding to the refresh control object is located in a local area corresponding to the refresh control object and is used for displaying data in the local area. Further, at least one content control object is included in the local area corresponding to the refresh control object, and each content control object is used for displaying one data in the local area. And synchronously executing refreshing operation corresponding to the content control object in the local area of the same refreshing control object. The data presented by the content control object may be data of a data object. The data of the data object is, for example, the cover and name of a book, and the cover and name of a television show.
And step S230, controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation for refreshing the data displayed by the content control object.
And controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation, comprising: acquiring new data from a data service end, or acquiring new data from local preloaded data and the like; the currently presented data is replaced with new data.
Further, if the number of the content control objects corresponding to the refresh control object is multiple, the multiple content control objects corresponding to the refresh control object are controlled to execute the refresh operation respectively. Further, the refreshed data presented by the plurality of content control objects is different.
In this embodiment, a refresh control object and a content control object in a page are used as a refresh basis, and when a local refresh event occurring in the refresh control object is monitored, the content control object corresponding to the refresh control object is controlled to execute a refresh operation. In the process, the refresh operation is executed by the content control object corresponding to the refresh control object only for refreshing the data in the local area of the page, and the refresh processing is not performed on the data in other areas in the page, so that the refresh efficiency is higher.
Furthermore, the content control object is only used for refreshing the data in the local area of the page, so that the content control object does not need to acquire the whole page data from a data server or from a local cache, only the data in the local area is acquired, the acquired data volume is smaller, the network data communication cost is reduced, and the acquired data volume is smaller, so that the data processing capacity during refreshing is reduced, and the refreshing speed is improved.
In order to make the embodiments of the present invention clearer, a more specific embodiment is given below to illustrate the page partial refresh method of the present invention.
In this embodiment, before querying the content control object corresponding to the refresh control object in the presentation page, the content control object corresponding to the refresh control object in the presentation page may be set and recorded.
Specifically, in the process of loading the presentation page, a grouping name corresponding to a content control object in the presentation page can be obtained; the grouping names corresponding to the content control objects in the display page are preset; storing the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table correspondingly; the mapping relation table is used for recording the corresponding relation between the content control object and the grouping name; acquiring a grouping name corresponding to the refreshing control object when inquiring the content control object corresponding to the refreshing control object in the display page; the grouping names corresponding to the refreshing control objects are preset, and the grouping names corresponding to the refreshing control objects are the same as the grouping names corresponding to the content control objects in the local areas corresponding to the refreshing control objects; and querying the content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table.
How to set grouping names for refresh control objects and content control object correspondence in a page is further described below.
As shown in fig. 3, a flowchart of the step of setting the packet name according to an embodiment of the present invention is shown.
Step S310, grouping the refreshing control object and the content control object in the page, and dividing the refreshing control object and the content control object in the local area corresponding to the refreshing control object into the same group.
When designing a page, analyzing all content control objects included in the page; determining a content control object needing to synchronously execute refreshing operation; and determining a refresh control object corresponding to the content control object needing to synchronously execute the refresh operation.
The area covered by the content control object that needs to synchronously perform refresh operations is a local area of the page. The partial area may be a complete partial area in the presentation page or may be a plurality of partial areas distributed in the presentation page.
The refresh control object corresponding to the content control object that needs to synchronously execute the refresh operation refers to a refresh control object for triggering the local refresh event of the local area.
Step S320, the same grouping names are set for the refresh control object and the content control object in the same grouping, and different grouping names are set for the refresh control object and the content control object in different groupings.
In this embodiment, in order to distinguish content control objects that need to perform refresh operations simultaneously, an msg_key (group name) is set for each group, so that both the refresh control object and the content control object in the same group correspond to the common msg_key. The msg_key corresponding to each packet is returned to the front end from the back end through the interface, so that the content control object needing to simultaneously execute the refreshing operation can be confirmed through the msg_key at the front end.
In this embodiment, the page design may be modified, and refresh control objects and content control objects in the page may be added or destroyed. If the refresh control object is newly added in the display page, setting a corresponding content control object for the newly added refresh control object, setting the same grouping name for the newly added refresh control object and the content control object corresponding to the newly added refresh control object, and correspondingly storing the content control object corresponding to the newly added refresh control object and the grouping name corresponding to the content control object corresponding to the newly added refresh control object in the mapping relation table; and/or if the content control object is newly added in the display page, setting a corresponding refreshing control object for the newly added content control object, setting a grouping name for the newly added content control object according to the grouping name of the refreshing control object corresponding to the newly added content control object (the grouping name of the refreshing control object corresponding to the newly added content control object is the same), and correspondingly storing the newly added content control object and the grouping name corresponding to the newly added content control object in a mapping relation table; and/or if the content control object in the presentation page is destroyed, removing the content control object in the mapping relation table; and/or if the refreshing control object in the display page is destroyed, removing the content control object corresponding to the refreshing control object in the mapping relation table; and/or deleting the mapping relation table if the display page is closed.
Further, the destruction of the content control object, also known as the release of the content control object, the destruction of the content control object, includes, but is not limited to: the content control object is deleted. The presentation page being closed includes: and closing the page to which the display page belongs, and sliding the display page out of the display area of the user screen.
In this embodiment, since one or more content control objects may be used to cover a local area corresponding to the refresh control object, the setting of the local area is flexible, the size of the local area may be determined according to the requirement, and the local area may be a part or all of page function areas, for example: and setting 6 book display positions in the functional area, wherein each book display position is used for displaying book data of a book, and content control objects can be respectively set for 3 book display positions in the book display positions, so that only book data of the 3 book display positions can be refreshed when the book display positions are refreshed.
The page partial refresh step of the embodiments of the present invention is further described below based on group names that have been set for the refresh control object and the content control object correspondence.
Referring to fig. 4, a specific flowchart of a page partial refresh method according to an embodiment of the present invention is shown.
Step S410, in the process of loading the display page, acquiring the grouping name corresponding to the content control object in the display page.
According to the setting, the grouping names respectively corresponding to the refreshing control object and the content control object in the display page are preset, and the grouping name corresponding to the refreshing control object is the same as the grouping name corresponding to the content control object corresponding to the refreshing control object.
If the length of the page is smaller than or equal to the length of the user screen display area, the grouping name corresponding to the content control object in the page (namely the display page) can be directly acquired.
If the length of the page is greater than that of the user screen display area, the display page in the user screen display area is a partial page, and the display page is dynamically loaded according to the position of the page scroll bar, and the grouping name corresponding to the content control object in the current display page is acquired in the process of loading the current display page.
Further, in the process of loading the current display page, acquiring attribute data of a content control object in the current display page, and acquiring a grouping name corresponding to the content control object from the attribute data of the content control object.
Further, since a plurality of content control objects may be included in the presentation page and the plurality of content control objects may correspond to the same or different refresh control objects, when obtaining the group names corresponding to the content control objects in the presentation page, it is required to obtain the group names corresponding to all the content control objects in the presentation page.
Step S420, transmitting the content control object in the presentation page and the group name corresponding to the content control object in the presentation page to a preset message center.
And the message center is used for managing the corresponding relation between the content control object and the group name in the display page and controlling the content control object to execute refreshing operation.
And calling a registration method registerMessageReceiving WithMsgKey of the message center, and sending the content control object and the msg_key of the content control object to the message center through the registration method.
Step S430, storing, by the message center, a correspondence between the content control object in the presentation page and the group name corresponding to the content control object in the presentation page in a mapping relationship table.
In this embodiment, the mapping relation table may be used to store key-value pairs (key-value), that is, the mapping relation table is a key-value structure; the key words (keys) in the key value pairs are grouping names, and the key values (values) corresponding to the grouping names are hash tables; the hash table is used for storing the content control object corresponding to the grouping name in a weak reference mode. Further, the pointers of the content control objects corresponding to the group names are stored in the hash table in a weak reference mode, so that the purpose of storing the objects by using the hash table is achieved. Because the lookup time complexity of the hash table is O (1), the data query speed is higher, the efficiency of object query can be improved by using the hash table to store the content control object, and the content control object can be ensured to be removed from the hash table after being released by adopting a weak reference mode to store the content control object.
In this embodiment, in the keywords in the mapping relationship table, whether there is a grouping name corresponding to the content control object in the presentation page already is queried; if the grouping names corresponding to the content control objects in the display page exist, storing the content control objects in the display page into a hash table corresponding to the grouping names; and if the grouping names corresponding to the content control objects in the display page do not exist, storing the content control objects in the display page into a newly-built hash table, and storing the grouping names corresponding to the content control objects in the display page and the correspondence of the newly-built hash table into the mapping relation table.
Specifically, in order to improve the efficiency of establishing the correspondence relationship between the content control object and the grouping name thereof in the mapping relationship table, the following two ways may be adopted according to the difference of page lengths:
in the first mode, when the length of the page is smaller than or equal to the length of the user screen display area, a hash table can be correspondingly generated for each group name; storing each content control object into a hash table of the corresponding group name according to the group name corresponding to each content control object; and generating a mapping relation table according to the corresponding relation between the packet names and the hash table.
In the second mode, under the condition that the length of the page is greater than that of the user screen display area, the display page in the user screen display area is a part of the page and needs to be dynamically loaded according to the position of the page scroll bar, so that the content control object in the display page of the user screen display area can be changed along with the scrolling of the page, and in the process of loading the current display page, whether the grouping name corresponding to the content control object in the display page exists or not needs to be inquired in the keywords of the mapping relation table; if the grouping names corresponding to the content control objects in the display page exist, storing the content control objects in the display page into a hash table corresponding to the grouping names; and if the grouping names corresponding to the content control objects in the display page do not exist, storing the content control objects in the display page into a newly-built hash table, and storing the grouping names corresponding to the content control objects in the display page and the correspondence of the newly-built hash table into the mapping relation table.
Further, in the case that the length of the page is greater than the length of the user screen presentation area, the message center may perform the steps of:
Step 1, a message center judges whether a hash table corresponding to a msg_key exists in a mapping relation table NSMapTable according to the msg_key corresponding to a content control object messageReceiver; if yes, executing step S2; if not, step S3 is performed.
Step S2, if the hash table corresponding to the msg_key does not exist in the mapping relation table NSMapTable, the message center creates a weakly referenced hash table NSHashTable, a content control object message receiver is added into the hash table NSHashTable, the mapping relation table NSMapTable is enabled to establish the corresponding relation between the msg_key and the hash table NSHashTable in a key-value mode.
Step S3, if the hash table NSHashTable corresponding to the msg_key already exists in the mapping relation table NSMapTable, the hash table NSHashTable corresponding to the msg_key is taken out from the mapping relation table NSMapTable according to the msg_key, and a content control object messageReceiver is added into the hash table NSHashTable.
Step S440, monitoring local refreshing event of refreshing control object in the display page of user screen display area.
The refreshing control object triggers the local refreshing event when a preset clicking event occurs in a preset key area or triggers the local refreshing event when voice information of preset content is acquired by the refreshing control object.
For example: the refresh control object corresponds to a 'change-over' key area, and when the clicking event of the 'change-over' key area is monitored, the local refresh event is triggered.
Step S450, responding to the local refreshing event of the refreshing control object, and acquiring the grouping name corresponding to the refreshing control object.
And when a local refreshing event of the refreshing control object is monitored, responding to the local refreshing event, and acquiring a grouping name corresponding to the refreshing control object.
Step S460, the grouping names corresponding to the refreshing control objects are sent to the message center.
And calling a message sending method of the message center, and sending the packet name corresponding to the refreshing control object to the message center through the message sending method.
For example: the interface of the message sending method is arranged on the refreshing control object, after the grouping name msg_key corresponding to the refreshing control object is obtained, the interface of the message sending method is called, the grouping name msg_key corresponding to the refreshing control object is transmitted into the message sending method [ QRMessageCenter sendMessageWithMsgKey:msg_key ], and then the grouping name msg_key corresponding to the refreshing control object is transmitted to the message center.
Step S470, inquiring the content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table through the message center.
In the mapping relation table, inquiring a hash table with the same keyword and the group name corresponding to the refreshing control object; traversing the content control object in the hash table, and determining the state of the content control object in the hash table in a survival state.
Further, the kinds of states of the control objects (control objects include refresh control object, content control object, and independent control object) include: a surviving state and a destroying state.
Survival state refers to the fact that the control object can display data in the display page.
The destroyed state refers to the control object having been released, such as: the control object has been deleted in the presentation page and the data cannot be presented in the presentation page.
Specifically, according to the msg_key corresponding to the refresh control object, the message center queries the hash table NSHashTable corresponding to the msg_key from the mapping relation table NSMapTable, traverses the hash table NSHashTable, and determines the state of each content control object in the hash table NSHashTable. If the content control object is nil, the content control object is in a destroying state and is released; if the content control object is not nil, the content control object is indicated to be in a survival state and is not released.
If the content control object is nil, the content control object is removed from the hash table NSHashTable. When the content control object is removed from the hash table NSHashTable, the message center may call a removing method of the message center, remosmessagereceivewithmsgkey: object, and remove the content control object from the hash table NSHashTable.
And step S480, controlling the content control object corresponding to the refreshing control object to execute refreshing operation through the message center.
And controlling the content control object corresponding to the refresh control object to execute refresh operation, comprising: and controlling the content control object in the surviving state in the hash table to execute refreshing operation. Further, the content control object is refreshed by calling a data acquisition interface of the data server or acquiring new data from the cached data.
In this embodiment, a mapping relation table is built by a message center at the front end, when a clicking event is monitored, a local refreshing event is triggered, msg_keys corresponding to refreshing control objects are transmitted to the message center, namely, msg_keys corresponding to content control objects need to be refreshed, the message center finds out the content control objects corresponding to the msg_keys according to the msg_keys, and then the corresponding content control objects are controlled to execute refreshing operation.
Further, the present embodiment may be implemented using the runtime system of iOS. And adding the content control object in the presentation page to a message center in the process of loading the presentation page. The message center establishes weak references to the content control objects by using a hash table, and establishes the corresponding relationship between the msg_key and the hash table by using a key-value form mapping relationship table, so that the message center can take out all the content control objects in the corresponding hash table according to the transmitted msg_key, and all the content control objects taken out can execute refreshing operation respectively.
Those skilled in the art should appreciate that, in the process of executing the embodiment of the present invention, the refresh control object may be released, after the refresh control object is released, the refresh control object will not exist in the presentation page, and the refresh operation is not required to be executed by the content control object in the local area corresponding to the refresh control object, so after the refresh control object is released, the hash table NSHashTable corresponding to the msg_key corresponding to the refresh control object needs to be removed. Of course, in order to ensure the page attractiveness, all content control objects of the refresh control object can be released at one time, so that after one content object control corresponding to the refresh control object is released, the hash table NSHashTable corresponding to the msg_key corresponding to the refresh control object can be removed.
In order to make the embodiment of the present invention easier to understand, a specific application scenario example is provided below to further describe the page local refreshing method of the embodiment of the present invention. Fig. 5 is a schematic diagram of a display page according to an embodiment of the invention.
The steps to be performed at the back end are as follows:
the back end sets 4 button areas in the presentation page shown in fig. 5, and each button area corresponds to one refresh control object. The ancient dress button area corresponds to the refreshing control object 1, the emotion button area corresponds to the refreshing control object 2, the martial arts button area corresponds to the refreshing control object 3, and the year button area corresponds to the refreshing control object 4.
The back end needs to click a button area in the presentation page shown in fig. 5, and can refresh the data of 6 content control objects at the same time. In this way, 6 common content control objects are correspondingly set for the refresh control objects 1 to 4, and the 6 content control objects are respectively a content control object a, a content control object B, a content control object C, a content control object D, a content control object E and a content control object F.
When the back end sets the grouping names, different grouping names can be correspondingly set for the refreshing control objects corresponding to the 4 button areas respectively according to the requirement of refreshing the data of the 6 content control objects at the same time, namely, 4 grouping names are set, and the 4 grouping names are set for each content control object in the 6 content control objects. Of course, for simplicity of implementation, the present embodiment sets the same group name msg_key for 4 refresh control objects and 6 content control objects, so that the interface of the back end may return only one msg_key to the front end.
The steps performed at the front end are as follows:
when loading the presentation page shown in fig. 5, the front end acquires grouping names msg_key which are set for the content control object a, the content control object B, the content control object C, the content control object D, the content control object E and the content control object F respectively and correspondingly in advance.
The front end calls a registration method registerMessageReceiving WithMsgKey of the message center, and sends a content control object A, a content control object B, a content control object C, a content control object D, a content control object E, a content control object F and a grouping name msg_key to the message center.
The message center calls an addMessagereceiver, a msg_key method creates a hash table corresponding to the msg_key, adds a content control object A, a content control object B, a content control object C, a content control object D, a content control object E and a content control object F into the hash table, and builds a corresponding relation between the grouping name msg_key and the hash table in a mapping relation table.
Further, in the page scrolling process, the display page is dynamically loaded, and the content control object a, the content control object B and the content control object C may first appear in the display page, so that the message center needs to first create a hash table corresponding to the msg_key, add the content control object a, the content control object B and the content control object C to the hash table, and establish a corresponding relationship between the msg_key and the hash table in the mapping relationship table. After the content control object D, the content control object E, and the content control object F appear in the presentation page, the message center may directly add the content control object D, the content control object E, and the content control object F to the hash table.
The front end monitors local refreshing events at the refreshing control objects 1 to 4 respectively, if the refreshing control object 2 monitors the local refreshing events, the msg_key of the refreshing control object 2 is obtained, and a messaging method of a message center is called to transmit the msg_key to the message center.
And the message center queries a corresponding hash table in the mapping relation table according to the msg_key, traverses the content control object A, the content control object B, the content control object C, the content control object D, the content control object E and the content control object F in the hash table, and determines that the content control object A, the content control object B, the content control object C, the content control object D, the content control object E and the content control object F are all in a survival state. Of course, if the state of a part of the content control objects in the content control object a, the content control object B, the content control object C, the content control object D, the content control object E, and the content control object F is the destroyed state, the part of the content control object is removed from the hash table.
And the message center is called as a content control object A, a content control object B, a content control object C, a content control object D, a content control object E and a content control object F, so that the content control object A, the content control object B, the content control object C, the content control object D, the content control object E and the content control object F respectively execute refreshing operation. FIG. 6 is a schematic diagram of a content control object after performing a refresh operation according to an embodiment of the present invention.
In the embodiment, the back end sends the msg_key of the control object to the front end, so that the control object is convenient to be managed uniformly; grouping the content control objects needing to be refreshed together, so that the refreshing of the content control objects in different groups is not affected; the refreshing of the packet is controlled through the message center, so that the front end is easy to manage the packet.
The embodiment of the invention also provides a device for refreshing the page locally. Fig. 7 is a block diagram of a page partial refresh device according to an embodiment of the present invention.
The page partial refreshing device comprises: a listening module 710, a querying module 720 and a refreshing module 730.
A monitor module 710, configured to monitor, in the presentation page, a local refresh event; the local refreshing event is used for triggering refreshing of a local area in the display page.
A query module 720, configured to query, in response to the local refresh event, a content control object located in the local area in the presentation page; the content control object is for exposing data in the local region.
And a refreshing module 730, configured to control the content control object located in the local area in the presentation page to perform a refreshing operation, so as to refresh the data presented by the content control object.
The functions of the apparatus according to the embodiments of the present invention have been described in the foregoing method embodiments, so that the descriptions of the embodiments are not exhaustive, and reference may be made to the related descriptions in the foregoing embodiments, which are not repeated herein.
The embodiment of the invention also provides an electronic device, as shown in fig. 8, which includes a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 complete communication with each other through the communication bus 840.
Memory 830 for storing a computer program.
The processor 810 is configured to execute the program stored in the memory 830, and implement the following steps: monitoring a local refreshing event in a display page; the local refreshing event is used for triggering refreshing of a local area in the display page; responding to the local refreshing event, and inquiring a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area; and controlling the content control object positioned in the local area in the display page to execute refreshing operation for refreshing the data displayed by the content control object.
Wherein, in the display page, monitoring the local refreshing event comprises: monitoring a local refreshing event of a refreshing control object in a display page; the local refreshing event is used for triggering the local area corresponding to the refreshing control object to refresh; the responding to the local refreshing event queries the content control object positioned in the local area in the display page, and comprises the following steps: responding to a local refreshing event of the refreshing control object, and inquiring a content control object corresponding to the refreshing control object in the display page; and controlling the content control object in the local area in the display page to execute refreshing operation, including: and controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation.
Before the content control object corresponding to the refresh control object in the display page is queried, the method further comprises the following steps: acquiring a grouping name corresponding to a content control object in the display page in the process of loading the display page; the grouping names corresponding to the refreshing control object and the content control object in the display page are preset, and the grouping name corresponding to the refreshing control object is the same as the grouping name corresponding to the content control object corresponding to the refreshing control object; storing the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table correspondingly; and querying the content control object corresponding to the refreshing control object in the display page, wherein the querying comprises the following steps: acquiring a grouping name corresponding to the refreshing control object; the grouping names corresponding to the refreshing control objects are preset, and the grouping names corresponding to the refreshing control objects are the same as the grouping names corresponding to the content control objects in the local areas corresponding to the refreshing control objects; and querying the content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table.
Wherein, after obtaining the group name corresponding to the content control object in the presentation page in the process of loading the presentation page, the method further comprises: transmitting the group names corresponding to the content control objects in the display page to a preset message center; storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page in a mapping relation table, wherein the mapping relation comprises the following steps: storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table through the message center, and correspondingly setting a message center agent for the content control object in the display page; and querying a content control object with the same grouping name as the grouping name corresponding to the refresh control object in the mapping relation table, wherein the content control object comprises: transmitting the grouping names corresponding to the refreshing control objects to the message center, and inquiring the content control objects with the grouping names identical to the grouping names corresponding to the refreshing control objects in the mapping relation table through the message center; and controlling the content control object corresponding to the refresh control object in the display page to execute refresh operation, including: and calling a message center proxy of the content control object corresponding to the refreshing control object through the message center, and controlling the content control object corresponding to the refreshing control object to execute refreshing operation.
After the content control object in the presentation page and the grouping name corresponding to the content control object in the presentation page are correspondingly stored in the mapping relation table, the method further comprises the steps of: if a refreshing control object is newly added in the display page, setting a corresponding content control object for the newly added refreshing control object, setting the same grouping name for the newly added refreshing control object and the content control object corresponding to the newly added refreshing control object, and correspondingly storing the content control object corresponding to the newly added refreshing control object and the grouping name corresponding to the content control object corresponding to the newly added refreshing control object in the mapping relation table; and/or if a content control object is newly added in the display page, setting a corresponding refreshing control object for the newly added content control object, setting a grouping name for the newly added content control object according to a grouping name corresponding to the refreshing control object corresponding to the newly added content control object, and correspondingly storing the newly added content control object and the grouping name corresponding to the newly added content control object in the mapping relation table; and/or if the content control object in the presentation page is destroyed, removing the content control object in the mapping relation table; and/or if the refreshing control object in the display page is destroyed, removing the content control object corresponding to the refreshing control object in the mapping relation table; and/or deleting the mapping relation table if the display page is closed.
Wherein the mapping relation table is used for storing key value pairs; the key words in the key value pair are grouping names, and the key value corresponding to the grouping names is a hash table; the hash table is used for storing the content control object corresponding to the grouping name in a weak reference mode.
Storing the correspondence between the content control object in the presentation page and the grouping name corresponding to the content control object in the presentation page in a mapping relation table includes: inquiring whether a grouping name corresponding to the content control object in the display page exists in the keywords of the mapping relation table; if the grouping names corresponding to the content control objects in the display page exist, storing the content control objects in the display page into a hash table corresponding to the grouping names; and if the grouping names corresponding to the content control objects in the display page do not exist, storing the content control objects in the display page into a newly-built hash table, and storing the grouping names corresponding to the content control objects in the display page and the correspondence of the newly-built hash table into the mapping relation table.
And querying a content control object with the same grouping name as the grouping name corresponding to the refresh control object in the mapping relation table, wherein the content control object comprises: in the mapping relation table, inquiring a hash table with the same keyword and the grouping name corresponding to the refreshing control object; traversing the content control object in the hash table, and determining the state of the content control object in the hash table in a survival state; and controlling the content control object corresponding to the refresh control object in the display page to execute refresh operation, including: and controlling the content control object in the surviving state in the hash table to execute refreshing operation.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the page partial refresh method according to any one of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform the page partial refresh method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (7)

1. A method for local refreshing of a page, comprising:
monitoring a local refreshing event in a display page; the local refreshing event is used for triggering refreshing of a local area in the display page;
responding to the local refreshing event, and inquiring a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area;
controlling a content control object positioned in the local area in the display page to execute refreshing operation for refreshing data displayed by the content control object;
in the display page, monitoring a local refreshing event comprises the following steps:
monitoring a local refreshing event of a refreshing control object in a display page; the local refreshing event is used for triggering the local area corresponding to the refreshing control object to refresh;
the responding to the local refreshing event queries the content control object positioned in the local area in the display page, and comprises the following steps:
Responding to a local refreshing event of the refreshing control object, and inquiring a content control object corresponding to the refreshing control object in the display page;
and controlling the content control object in the local area in the display page to execute refreshing operation, including:
controlling a content control object corresponding to the refreshing control object in the display page to execute refreshing operation;
before querying the content control object corresponding to the refresh control object in the display page, the method further comprises: acquiring a grouping name corresponding to a content control object in the display page in the process of loading the display page; the grouping names corresponding to the refreshing control object and the content control object in the display page are preset, and the grouping name corresponding to the refreshing control object is the same as the grouping name corresponding to the content control object corresponding to the refreshing control object; storing the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table correspondingly, wherein the mapping relation table is used for storing key value pairs; the key words in the key value pair are grouping names, and the key value corresponding to the grouping names is a hash table; the hash table is used for storing the content control object corresponding to the grouping name in a weak reference mode;
The querying the content control object corresponding to the refreshing control object in the display page comprises the following steps: acquiring a grouping name corresponding to the refreshing control object; querying a content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table in the following manner: in the mapping relation table, inquiring a hash table with the same keyword and the grouping name corresponding to the refreshing control object; traversing the content control object in the hash table, and determining the state of the content control object in the hash table in a survival state;
and controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation, wherein the refreshing operation comprises the following steps: and controlling the content control object in the surviving state in the hash table to execute refreshing operation.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
after the group names corresponding to the content control objects in the display page are acquired in the process of loading the display page, the method further comprises the following steps:
transmitting the group names corresponding to the content control objects in the display page to a preset message center;
Storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page in a mapping relation table, wherein the mapping relation comprises the following steps:
storing the corresponding relation between the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table through the message center;
and querying a content control object with the same grouping name as the grouping name corresponding to the refresh control object in the mapping relation table, wherein the content control object comprises:
transmitting the grouping names corresponding to the refreshing control objects to the message center, and inquiring the content control objects with the grouping names identical to the grouping names corresponding to the refreshing control objects in the mapping relation table through the message center;
and controlling the content control object corresponding to the refresh control object in the display page to execute refresh operation, including:
and controlling the content control object corresponding to the refreshing control object to execute refreshing operation through the message center.
3. The method of claim 1, further comprising, after storing the group name correspondence of the content control object in the presentation page and the content control object in the presentation page in the mapping table:
If a refreshing control object is newly added in the display page, setting a corresponding content control object for the newly added refreshing control object, setting the same grouping name for the newly added refreshing control object and the content control object corresponding to the newly added refreshing control object, and correspondingly storing the content control object corresponding to the newly added refreshing control object and the grouping name corresponding to the content control object corresponding to the newly added refreshing control object in the mapping relation table; and/or the number of the groups of groups,
if a content control object is newly added in the display page, setting a corresponding refreshing control object for the newly added content control object, setting a grouping name for the newly added content control object according to a grouping name corresponding to the refreshing control object corresponding to the newly added content control object, and correspondingly storing the newly added content control object and the grouping name corresponding to the newly added content control object in the mapping relation table; and/or the number of the groups of groups,
if the content control object in the presentation page is destroyed, removing the content control object in the mapping relation table; and/or the number of the groups of groups,
If the refreshing control object in the display page is destroyed, removing the content control object corresponding to the refreshing control object in the mapping relation table; and/or the number of the groups of groups,
and if the display page is closed, deleting the mapping relation table.
4. The method according to claim 1, wherein storing the correspondence of the group names corresponding to the content control object in the presentation page and the content control object in the presentation page in the mapping relation table includes:
inquiring whether a grouping name corresponding to the content control object in the display page exists in the keywords of the mapping relation table;
if the grouping names corresponding to the content control objects in the display page exist, storing the content control objects in the display page into a hash table corresponding to the grouping names;
and if the grouping names corresponding to the content control objects in the display page do not exist, storing the content control objects in the display page into a newly-built hash table, and storing the grouping names corresponding to the content control objects in the display page and the correspondence of the newly-built hash table into the mapping relation table.
5. A page partial refresh apparatus, comprising:
the monitoring module is used for monitoring local refreshing events in the display page; the local refreshing event is used for triggering refreshing of a local area in the display page;
the query module is used for responding to the local refreshing event and querying a content control object positioned in the local area in the display page; the content control object is used for displaying data in the local area;
the refreshing module is used for controlling the content control object positioned in the local area in the display page to execute refreshing operation and refreshing the data displayed by the content control object;
the monitoring module is also used for monitoring local refreshing events of the refreshing control object in the display page; the local refreshing event is used for triggering the local area corresponding to the refreshing control object to refresh;
the query module is further configured to query a content control object corresponding to the refresh control object in the presentation page in response to a local refresh event occurring in the refresh control object;
the refreshing module is further used for controlling the content control object corresponding to the refreshing control object in the display page to execute refreshing operation;
Wherein, the inquiry module is further used for: before querying a content control object corresponding to the refreshing control object in a display page, acquiring a grouping name corresponding to the content control object in the display page in the process of loading the display page; the grouping names corresponding to the refreshing control object and the content control object in the display page are preset, and the grouping name corresponding to the refreshing control object is the same as the grouping name corresponding to the content control object corresponding to the refreshing control object; storing the content control object in the display page and the grouping name corresponding to the content control object in the display page into a mapping relation table correspondingly, wherein the mapping relation table is used for storing key value pairs; the key words in the key value pair are grouping names, and the key value corresponding to the grouping names is a hash table; the hash table is used for storing the content control object corresponding to the grouping name in a weak reference mode;
wherein, the inquiry module is further used for: acquiring a grouping name corresponding to the refreshing control object; querying a content control object with the same grouping name as the grouping name corresponding to the refreshing control object in the mapping relation table in the following manner: in the mapping relation table, inquiring a hash table with the same keyword and the grouping name corresponding to the refreshing control object; traversing the content control object in the hash table, and determining the state of the content control object in the hash table in a survival state;
Wherein, the refreshing module is further configured to: and controlling the content control object in the surviving state in the hash table to execute refreshing operation.
6. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-4.
CN202011563004.2A 2020-12-25 2020-12-25 Page local refreshing method, device, equipment and storage medium Active CN112632428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011563004.2A CN112632428B (en) 2020-12-25 2020-12-25 Page local refreshing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011563004.2A CN112632428B (en) 2020-12-25 2020-12-25 Page local refreshing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112632428A CN112632428A (en) 2021-04-09
CN112632428B true CN112632428B (en) 2023-10-10

Family

ID=75325857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011563004.2A Active CN112632428B (en) 2020-12-25 2020-12-25 Page local refreshing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112632428B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974605A (en) * 2023-07-31 2023-10-31 南京国电南自轨道交通工程有限公司 Event mechanism-based 3D system interface local refreshing method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6057834A (en) * 1998-06-12 2000-05-02 International Business Machines Corporation Iconic subscription schedule controller for a graphic user interface
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation
CN104067276A (en) * 2012-01-19 2014-09-24 微软公司 Client-side minimal download and simulated page navigation features
CN108399222A (en) * 2018-02-11 2018-08-14 北京奇艺世纪科技有限公司 A kind of page furbishing method and device
CN108681550A (en) * 2018-03-30 2018-10-19 北京奇艺世纪科技有限公司 Page furbishing method, the control method of device and page furbishing, device
CN109101310A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of page furbishing method and device
CN110647704A (en) * 2019-09-20 2020-01-03 北京思维造物信息科技股份有限公司 Page updating method, device and equipment
CN111666516A (en) * 2020-04-24 2020-09-15 北京奇艺世纪科技有限公司 Page loading method and device, electronic equipment and storage medium
CN111796821A (en) * 2020-06-17 2020-10-20 北京三快在线科技有限公司 Page updating method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8131591B2 (en) * 2007-09-12 2012-03-06 Microsoft Corporation Updating contents of asynchronously refreshable webpages
US9841863B1 (en) * 2012-12-20 2017-12-12 Open Text Corporation Mechanism for partial page refresh using URL addressable hierarchical page structure

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6057834A (en) * 1998-06-12 2000-05-02 International Business Machines Corporation Iconic subscription schedule controller for a graphic user interface
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation
CN104067276A (en) * 2012-01-19 2014-09-24 微软公司 Client-side minimal download and simulated page navigation features
CN108399222A (en) * 2018-02-11 2018-08-14 北京奇艺世纪科技有限公司 A kind of page furbishing method and device
CN108681550A (en) * 2018-03-30 2018-10-19 北京奇艺世纪科技有限公司 Page furbishing method, the control method of device and page furbishing, device
CN109101310A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of page furbishing method and device
CN110647704A (en) * 2019-09-20 2020-01-03 北京思维造物信息科技股份有限公司 Page updating method, device and equipment
CN111666516A (en) * 2020-04-24 2020-09-15 北京奇艺世纪科技有限公司 Page loading method and device, electronic equipment and storage medium
CN111796821A (en) * 2020-06-17 2020-10-20 北京三快在线科技有限公司 Page updating method and device

Also Published As

Publication number Publication date
CN112632428A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US11768811B1 (en) Managing user data in a multitenant deployment
US10693758B2 (en) Collaborative incident management for networked computing systems
US11803548B1 (en) Automated generation of metrics from log data
WO2019120037A1 (en) Model construction method, network resource preloading method and apparatus, medium, and terminal
US11509706B1 (en) Customizable load balancing in a user behavior analytics deployment
TWI484402B (en) Method for processing data feeds within an entity management application of mobile device and ralated apparatus
US11768776B1 (en) Evicting data associated with a data intake and query system from a local storage
CN110162512B (en) Log retrieval method, device and storage medium
CN110932933B (en) Network condition monitoring method, computing device and computer storage medium
CN109388671B (en) Data processing method, device, equipment and storage medium
CN109167840B (en) Task pushing method, node autonomous server and edge cache server
JP7221380B2 (en) Mini-application switching method, apparatus, frame, device and readable medium
CN111367873A (en) Log data storage method and device, terminal and computer storage medium
CN112632428B (en) Page local refreshing method, device, equipment and storage medium
CN111382206B (en) Data storage method and device
US11461408B1 (en) Location-based object identification and data visualization
CN113535757A (en) Method, device and equipment for discovering cold and hot data and readable storage medium
CN113139123A (en) Resource recommendation method, device, server and storage medium
CN110928885B (en) Method and device for updating data of Mysql database to Es database
CN111367691B (en) Data feedback method and device, electronic equipment and storable medium
CN110674386B (en) Resource recommendation method, device and storage medium
CN106407238B (en) Method and system for media content interaction
CN111356006A (en) Video playing method, device, server and storage medium
US11934256B1 (en) Determining ingestion latency of data intake and query system instances
CN113900826B (en) Data processing method, apparatus, computer device, storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant