Information updating method, device, electronic device and storage medium
By compiling the page component template before displaying the target page, and calling the preset information processing component to update and compile when the page data is updated, the problems of large compilation workload and low update efficiency in the existing technology are solved, and more efficient Page view update.
Patent Information
- Application Number
- CN202210345553.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the prior art, the compilation work before the target page display is large, resulting in low update efficiency of page views in the target page.
After compiling the page component template of the target page to generate the compiled components, monitor the page data update event, call the preset information processing component, update and compile the page view corresponding to the target data item based on the page update data, and generate the target page view.
It reduces the compilation workload before the target page display, improves the update efficiency of the page view, and avoids the need to repeatedly compile page component templates every time it is updated.
Smart Images

Figure CN114924759B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an information updating method, device, electronic device and storage medium. Background Art
[0002] During the dynamic display of the page, both the page data and the page view can be updated accordingly as the data is updated. For example, the update of the page data can drive the update of the page view, and the update of the page view can also reversely update the page data.
[0003] In the related art, each time the page view is updated by the updated page data, it is necessary to compile based on the page component template corresponding to the target page and the updated page view, which results in a large amount of compilation work before the target page is displayed, reducing the update efficiency of the page view in the target page. Summary of the invention
[0004] The present disclosure provides an information updating method, device, electronic device and storage medium to at least solve the problem in the related art that the compilation workload before the target page is displayed is large and the updating efficiency of the page view in the target page is low. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an information updating method, including:
[0006] After compiling the page component template of the target page to generate a compiled component, monitoring a page data update event of the target page; the target page is rendered and displayed based on the compiled component;
[0007] In the case where the page data update event is detected, determining the page update data corresponding to the target data item in the page data update event;
[0008] Calling a preset information processing component;
[0009] Based on the preset information processing component and the page update data, the page view corresponding to the target data item is updated and compiled to generate a target page view.
[0010] In an exemplary embodiment, the target page includes a plurality of preset page views, each preset page view corresponding to a page data item;
[0011] The method further comprises:
[0012] Creating a data observation object corresponding to the page data item;
[0013] A page data update event corresponding to the page data item is sent to the data observation object in a preset message sending mode; in the preset message sending mode, a message sender and a message receiver are decoupled.
[0014] In an exemplary embodiment, the method further comprises:
[0015] In the case where the page data update event is detected, a target data observation object corresponding to the target data item is determined based on a relationship storage queue; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item;
[0016] The page data update event is sent to the target data observation object.
[0017] In an exemplary embodiment, the method further comprises:
[0018] When the data observation object receives the page data update event, the view identifier of the page view to be updated is determined.
[0019] In an exemplary embodiment, the monitoring page data update event includes:
[0020] Perform data update monitoring on page data based on the monitoring module in the preset system processing function;
[0021] When the page data is updated, the page data update event is triggered.
[0022] In an exemplary embodiment, the preset system processing function also includes a component calling module;
[0023] The calling of the preset information processing component includes:
[0024] When the data observation object receives the page data update event, the preset information processing component is called based on the component calling module in response to the page view update request sent by the data observation object.
[0025] In an exemplary embodiment, the page view update request includes a view identifier of the page view to be updated;
[0026] The updating and compiling of the page view corresponding to the target data item based on the preset information processing component and the page update data to generate the target page view includes:
[0027] Obtaining original page data corresponding to the target data item;
[0028] In the case that the original page data is inconsistent with the page update data, the page view corresponding to the view identifier is updated and compiled based on the page update data to obtain the target page view.
[0029] In an exemplary embodiment, the method includes:
[0030] Monitoring page view update events of the target page;
[0031] In the case where the page view update event is detected, determining view update data corresponding to the target view in the page view update event;
[0032] Calling the preset information processing component;
[0033] Based on the preset information processing component and the view update data, the page data corresponding to the target view is updated to obtain the target page data.
[0034] According to a second aspect of an embodiment of the present disclosure, there is provided an information updating device, including:
[0035] A page data update event monitoring unit is configured to monitor a page data update event of a target page after compiling a page component template of the target page to generate a compiled component; the target page is rendered and displayed based on the compiled component;
[0036] a page update data determining unit, configured to determine, when the page data update event is detected, page update data corresponding to a target data item in the page data update event;
[0037] A first calling unit is configured to execute calling of a preset information processing component;
[0038] The target page view determination unit is configured to update and compile the page view corresponding to the target data item based on the preset information processing component and the page update data to generate a target page view.
[0039] In an exemplary embodiment, the target page includes a plurality of preset page views, each preset page view corresponding to a page data item;
[0040] The device also includes:
[0041] A data observation object creation unit, configured to execute creation of a data observation object corresponding to the page data item;
[0042] The first sending unit is configured to execute a preset message sending mode to send a page data update event corresponding to the page data item to the data observation object; in the preset message sending mode, a message sender and a message receiver are decoupled.
[0043] In an exemplary embodiment, the apparatus further comprises:
[0044] a target data observation object determination unit, configured to determine the target data observation object corresponding to the target data item based on a relationship storage queue when the page data update event is detected; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item;
[0045] The second sending unit is configured to send the page data update event to the target data observation object.
[0046] In an exemplary embodiment, the apparatus further comprises:
[0047] The view identifier determining unit is configured to determine the view identifier of the page view to be updated when the data observation object receives the page data update event.
[0048] In an exemplary embodiment, the page data update event monitoring unit includes:
[0049] A data update monitoring unit is configured to execute data update monitoring on page data based on a monitoring module in a preset system processing function;
[0050] The update event triggering unit is configured to trigger the page data update event when the page data is updated.
[0051] In an exemplary embodiment, the preset system processing function also includes a component calling module;
[0052] The first calling unit includes:
[0053] The second calling unit is configured to execute, when the data observation object receives the page data update event, in response to a page view update request sent by the data observation object, calling the preset information processing component based on the component calling module.
[0054] In an exemplary embodiment, the page view update request includes a view identifier of the page view to be updated;
[0055] The target page view determination unit comprises:
[0056] An original page data acquisition unit, configured to acquire the original page data corresponding to the target data item;
[0057] The update compiling unit is configured to perform update compiling on the page view corresponding to the view identifier based on the page update data to obtain the target page view when the original page data is inconsistent with the page update data.
[0058] In an exemplary embodiment, the apparatus further comprises:
[0059] A page view update event monitoring unit, configured to monitor the page view update event of the target page;
[0060] a view update data determining unit, configured to determine, when the page view update event is detected, the view update data corresponding to the target view in the page view update event;
[0061] A third calling unit is configured to execute calling of the preset information processing component;
[0062] The target page data determining unit is configured to update the page data corresponding to the target view based on the preset information processing component and the view update data to obtain the target page data.
[0063] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the information updating method as described above.
[0064] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the information updating method as described above.
[0065] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a computer program, wherein the computer program is stored in a readable storage medium, and at least one processor of a computer device reads and executes the computer program from the readable storage medium, so that the device executes the above-mentioned information updating method.
[0066] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0067] The present disclosure can first compile the page component template corresponding to the target page to generate a corresponding compiled component; when a page data update event of the target page is detected, the preset information processing component is called, and based on the preset information processing component and the page update data corresponding to the target data item in the page data update event, the page view corresponding to the target data item is updated and compiled to obtain the target page view. That is, the present disclosure realizes that the page component template corresponding to the target page is first compiled, and when the page view in the target page needs to be updated, the page view corresponding to the target data item can be updated and compiled based on the preset information processing component and the page update data to obtain the target page view, thereby eliminating the need to repeatedly compile the page component template each time the page view in the target page is updated, reducing the compilation workload before the target page is displayed, improving the compilation efficiency, and further improving the update efficiency of the page view in the target page.
[0068] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0070] Figure 1 It is a schematic diagram of an implementation environment according to an exemplary embodiment.
[0071] Figure 2 The present invention is a flow chart of an information updating method according to an exemplary embodiment.
[0072] Figure 3 The present invention is a flow chart of a method for processing a page data update event according to an exemplary embodiment.
[0073] Figure 4 The present invention is a flow chart showing a method for sending events based on a relational storage queue according to an exemplary embodiment.
[0074] Figure 5 The present invention is a flow chart of a method for determining a view identifier of a page view to be updated according to an exemplary embodiment.
[0075] Figure 6 The present invention is a flow chart of a method for monitoring a page data update event according to an exemplary embodiment.
[0076] Figure 7 The present invention is a flow chart of a method for generating a target page view according to an exemplary embodiment.
[0077] Figure 8 The figure is a flow chart of a method for updating target page data according to an exemplary embodiment.
[0078] Fig. 9 The figure is a framework diagram of an information update process according to an exemplary embodiment.
[0079] Fig.10 The present invention is a block diagram of an information updating device according to an exemplary embodiment.
[0080] Fig.11 The figure is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0081] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0082] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0083] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0084] See also Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present disclosure, the implementation environment may include: at least one client 110 and a server 120, and the client 110 and the server 120 can communicate data through a network.
[0085] Specifically, the client 110 may send a target page display request to the server 120, and the server 120 sends a page component template and page data to the client 110 based on the target page display request; the client 110 compiles and renders the page component template and page data, generates a target page, and displays it.
[0086] The client 110 can communicate with the server 120 based on the browser / server mode (B / S) or the client / server mode (C / S). The client 110 may include: physical devices such as smart phones, tablet computers, laptops, digital assistants, smart wearable devices, vehicle terminals, servers, etc., and may also include software running in physical devices, such as applications, etc. The operating system running on the client 110 in the embodiment of the present disclosure may include but is not limited to Android system, IOS system, Linux, Windows, etc.
[0087] The server 120 and the client 110 may establish a communication connection via wired or wireless communication. The server 120 may include an independently operated server, or a distributed server, or a server cluster consisting of multiple servers, wherein the server may be a cloud server.
[0088] In order to solve the problem in the related art that the compilation workload before the target page is displayed is large and the updating efficiency of the page view in the target page is low, the embodiment of the present disclosure provides an information updating method, the execution subject of which can be the above-mentioned client, and the method may include:
[0089] S210. After compiling the page component template of the target page to generate a compiled component, monitoring a page data update event of the target page; and rendering and displaying the target page based on the compiled component.
[0090] The target page here can be any page displayed on the client, the page data can be the background data supporting the page display, the page view can be the data display form specifically displayed in the target page, the page data corresponds to the page view, and the page view in the target page can be dynamically updated as the page data is updated. The target page can correspond to one or more page component templates, and the page frame of the target page can be generated by assembling one or more page component templates; the page component template can be the descriptive information for realizing a specific display effect of the page, that is, different page component templates have different display effects on the target page, so according to the effect display requirements of the target page, the page component template with the corresponding display effect can be selected for assembly.
[0091] In an optional embodiment, before displaying the target page, the page component template corresponding to the target page needs to be compiled to generate the corresponding compiled component, and then the target page is rendered based on the compiled component. If the page component template corresponding to the target page remains unchanged, the page component template can be compiled in advance to generate the compiled component; a corresponding relationship between the target page and the compiled component is established, and when the target page is requested to be displayed again later, there is no need to repeatedly compile the page component template corresponding to the target page, and the compiled component corresponding to the target page can be directly obtained, and the target page is rendered and displayed based on the compiled component.
[0092] In the present embodiment, after the page component template of the target page is compiled to generate a compiled component, the target page data can be updated, thereby achieving the independence of the compilation process of the page component template of the target page and the target page data update process, which is different from the scheme in the prior art of updating the page data while compiling the page component template. Therefore, on the one hand, the compilation workload in the component template compilation process can be reduced, and on the other hand, the page component template compilation process and the page data update process are independent of each other, thereby avoiding the need to update the page component template after each page data update, thereby saving compilation resources.
[0093] Furthermore, the displayed target page may include, in addition to page frame information, an original page view. Before the original page view in the target page is displayed for the first time, the page data corresponding to the original page view may be compiled; the compilation of the page data corresponding to the original page view and the compilation of the page component template may be performed simultaneously or independently, which is not specifically limited in the embodiments of the present disclosure.
[0094] In a specific embodiment, the update of page data can drive the update of the page view in the target page. Therefore, when the page data is updated, in order to update the page view in time, the page data update event can be monitored. The page data update event can be triggered when the page data is updated.
[0095] S220. When the page data update event is detected, determine the page update data corresponding to the target data item in the page data update event.
[0096] In one example, a page data update event may carry a target data item that has been updated; when specifically determining the page update data corresponding to the target data item, if the page data update event carries the page update data corresponding to the target data item, the page update data can be directly determined; if the page data update event does not carry the page update data corresponding to the target data item, the corresponding page update data can be obtained from the local client or the background server based on the data item identifier of the target data item.
[0097] S230. Call a preset information processing component.
[0098] The preset information processing component can update and compile the page view corresponding to the target data item based on the page update data to obtain the target page view corresponding to the page update data, that is, the preset information processing component can realize the update and compile functions.
[0099] The calling of the preset information processing component may be an automatic triggering calling process, or may be realized by inputting a component calling command, which is not specifically limited in this embodiment.
[0100] In a specific embodiment, the calling of the preset information processing component may be implemented when a page data update event is detected, that is, the determination of the page update data and the calling of the preset information processing component may be performed simultaneously; thereby improving data processing efficiency.
[0101] S240. Based on the preset information processing component and the page update data, update and compile the page view corresponding to the target data item to generate a target page view.
[0102] In one example, based on a preset information processing component, the page view corresponding to the target data item can be updated using page update data to obtain an updated page view; the updated page view needs to be compiled before being displayed on the target page, so the updated page view can be compiled based on the preset information processing component to generate corresponding target page view compilation information, and the target page view can be displayed by rendering based on the target page view compilation information.
[0103] Compilation is required before the page view is displayed. The preset information processing component has the compilation function. Therefore, when there is page update data, it can be updated and compiled through the preset information processing component, and then the target page view can be displayed on the target page. That is, once there is page update data, the target page view can be displayed accordingly, without the need to integrate the page view compilation process with the page component template compilation process. Instead, the compilation of the page component template is independent of the compilation of the page view, thereby improving the update efficiency of the page view.
[0104] The present disclosure can first compile the page component template corresponding to the target page to generate a corresponding compiled component; when a page data update event of the target page is detected, the preset information processing component is called, and based on the preset information processing component and the page update data corresponding to the target data item in the page data update event, the page view corresponding to the target data item is updated and compiled to obtain the target page view. That is, the present disclosure realizes that the page component template corresponding to the target page is first compiled, and when the page view in the target page needs to be updated, the page view corresponding to the target data item can be updated and compiled based on the preset information processing component and the page update data to obtain the target page view, thereby eliminating the need to repeatedly compile the page component template each time the page view in the target page is updated, reducing the compilation workload before the target page is displayed, improving the compilation efficiency, and further improving the update efficiency of the page view in the target page.
[0105] In an optional embodiment, the target page includes multiple preset page views, each preset page view corresponds to a page data item; accordingly, refer to Figure 3 , which shows a method for processing a page data update event, which may include:
[0106] S310. Create a data observation object corresponding to the page data item.
[0107] S320. Send a page data update event corresponding to the page data item to the data observation object in a preset message sending mode; in the preset message sending mode, a message sender and a message receiver are decoupled.
[0108] Since each page data item may be updated, a corresponding data observation object may be created for each page data item, that is, the data observation object may be used to receive a page data update event of the corresponding page data item, thereby determining the update information of the page data item.
[0109] In a specific embodiment, a page data item may correspond to one or more data observation objects, because a page data item may correspond to one or more page views in the target page, that is, the page data corresponding to a page data item may be used in one or more places in the target page, that is, the number of data observation objects corresponding to the target page may be consistent with the number of page views included in the target page, and the data observation object may correspond to the page view. Figure 1 One-to-one correspondence, so that when the data observation object receives a page data update event, it can determine that the corresponding page view is to be updated.
[0110] The page data update event can be sent to the data observation object in a preset message sending mode, wherein the message sender and the message receiver are decoupled. The message sender can be an event monitoring object that monitors the page data update event, and the message receiver can be a data observation object. The decoupling of the message sender and the message receiver can mean that the message sender and the message receiver do not communicate directly, and the message can be forwarded through a third party. The message sender is responsible for the generation of the message and does not need to know to whom the message is forwarded. The message receiver is responsible for receiving the message and does not need to know who the message comes from, thereby improving the efficiency of the data observation object in obtaining page data update events.
[0111] For further information, see Figure 4 , which shows a method for sending events based on a relational storage queue, which may include:
[0112] S410. When the page data update event is detected, determine the target data observation object corresponding to the target data item based on a relationship storage queue; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item.
[0113] S420. Send the page data update event to the target data observation object.
[0114] According to the above content of this embodiment, it can be known that the message sender and the message receiver do not communicate directly, so the message can be forwarded through the relationship storage queue of a third party; specifically, the relationship storage queue can store the correspondence between the data observation object and the page data item, so that when the relationship storage queue receives the page data update event, it can determine the target observation object to which the current page data update event should be forwarded based on the correspondence between the data observation object and the page data item; and then send the current page data update event to the target data observation object.
[0115] Therefore, the unified distribution of page data update events is achieved based on the relational storage queue, without the need for the data sender to communicate with multiple data receivers separately to achieve the sending of page data update events. On the one hand, it can improve the sending efficiency of page data update events, so that the page data update events can reach the corresponding target observation objects as soon as possible; on the other hand, it can avoid the sending errors of page data update events caused by the communication between the data sender and multiple data receivers, and achieve accurate sending of page data update events.
[0116] In one specific embodiment, see Figure 5 , which shows a method for determining a view identifier of a page view to be updated, the method may include:
[0117] 510. When the page data update event is detected, a target data observation object corresponding to the target data item is determined based on a relationship storage queue; the relationship between the data observation object and the page data item is stored in the relationship storage queue.
[0118] S520. Send the page data update event to the target data observation object.
[0119] S530. When the data observation object receives the page data update event, determine the view identifier of the page view to be updated.
[0120] The view identifier of a page view may be used to represent the display position information of the page view in a target page, or represent the number information of the page view.
[0121] In an optional embodiment, according to the above content of this embodiment, it can be known that the data observation object can be connected with the page view. Figure 1 One by one, the view identifier of the corresponding page view can be set for each data observation object, so that when the observation object receives a page data update event, the view identifier corresponding to the observation object can be directly determined as the view identifier of the page view to be updated, thereby improving the efficiency and convenience of determining the view identifier of the page view to be updated.
[0122] In another optional embodiment, since the corresponding relationship between the data observation object and the page data item is stored in the relationship storage queue, the data observation object can be associated with the page data item. Figure 1 One-to-one correspondence, so when the relationship storage queue sends a page data update event to the data observation object, it can carry the view identifier of the corresponding page view, so that the view identifier of the page view to be updated can be directly determined based on the view identifier sent by the relationship storage queue.
[0123] For further information, see Figure 6 , which shows a method for monitoring page data update events, which may include:
[0124] S610. Perform data update monitoring on the page data based on the monitoring module in the preset system processing function.
[0125] S620. When the page data is updated, trigger the page data update event.
[0126] The preset system processing function can be a system function that comes with the page dynamic display framework. The preset system processing function may include multiple modules, each of which can implement corresponding specific functions. For example, the preset system processing function may include a monitoring module, which can be used to monitor the dynamics of page data, that is, to monitor the update operation of the page data. Once the update operation of the page data is detected, the corresponding page data update event will be triggered.
[0127] Since the monitoring module in the preset system processing function is a module that comes with the page dynamic display framework, data update monitoring is performed based on the monitoring module. On the one hand, compatibility issues can be avoided, and on the other hand, the convenience of data update monitoring can be improved.
[0128] In this embodiment, the call to the preset information processing component can be implemented through the component calling module, and the component calling template can be specifically implemented based on the preset system processing function; specifically, the preset system processing function can also include a component calling module, and the component calling module is not possessed by the preset system processing function that comes with the page dynamic display framework. In this embodiment, the component calling module can be written into the preset system processing function by program replication; when the data observation object receives the page data update event, the preset information processing component is called based on the component calling module in response to the page view update request sent by the data observation object.
[0129] The component calling template can realize that after detecting a page data update event, the preset information processing component is called to update and compile the page view corresponding to the target data item to obtain the target page view.
[0130] Since the preset system processing function is a system function that comes with the page dynamic display framework, by copying the preset system processing function, the component calling function is added to the preset system processing function, which can not only realize the calling of the preset information processing component, but also avoid the system compatibility problems caused by introducing other non-system functions, thereby improving the calling efficiency of the preset information processing component.
[0131] In an optional embodiment, the page view update request sent by the data observation object includes the view identifier of the page view to be updated; accordingly, refer to Figure 7 , which shows a method for generating a target page view, which may include:
[0132] S710. Obtain original page data corresponding to the target data item.
[0133] S720. When the original page data is inconsistent with the page update data, update and compile the page view corresponding to the view identifier based on the page update data to obtain the target page view.
[0134] It should be noted that, in this embodiment, when an update operation on page data is monitored, the page data corresponding to the corresponding target data item may not necessarily change. It is possible that a page data update operation has been performed, but the page data before and after the update are the same; therefore, before updating the page view, the original page data and the page update data can be compared first. If the comparison between the two is inconsistent, the page view corresponding to the view identifier is updated and compiled based on the page update data to obtain the target page view, thereby avoiding the problem of waste of update resources caused by updating the page view corresponding to the target data item without actually updating the page data corresponding to the target data item, thereby saving system resources.
[0135] Furthermore, based on the preset information processing component, the page view corresponding to the target data item is updated using page update data to obtain an updated page view; the updated page view needs to be compiled before being displayed on the target page, so the updated page view can be compiled based on the preset information processing component to generate corresponding target page view compilation information, so that after the page view corresponding to the target data item is updated, the rendering and display process of the target page may include: obtaining a compiled component, which may be generated by compiling a page component template corresponding to the target page; performing page rendering based on the compiled component and the target page view compilation information to display the target page, which includes the target page view.
[0136] Furthermore, the update of page data can drive the update of page view, and the update of page view can also reversely update page data; accordingly, please refer to Figure 8 , which shows a method for updating target page data, which may include:
[0137] S810. Monitor a page view update event of the target page.
[0138] S820. When the page view update event is detected, determine the view update data corresponding to the target view in the page view update event.
[0139] S830. Call the preset information processing component.
[0140] S840. Based on the preset information processing component and the view update data, update the page data corresponding to the target view to obtain target page data.
[0141] For the relevant descriptions of the target page, page component template, and the calling method of the preset information processing component, please refer to the above content of this embodiment, which will not be repeated here.
[0142] The page view update event may specifically be an information input event, that is, an event for inputting based on the page view in the target page; for example, an event for inputting information in a text box in the target page. The preset information processing component may update the page data corresponding to the target view based on the view update data to obtain the target page data corresponding to the view update data.
[0143] That is, when the page data corresponding to the target page needs to be updated, the target view can be updated based on the preset information processing component and the view update data to obtain the target page view, thereby improving the efficiency of page data update.
[0144] In this embodiment, once there is an information input operation, the corresponding page view update event can be triggered. The currently input information may be the same as the original information in the page view. At this time, it is necessary to compare the original page view with the view update data. In the case of inconsistency in the comparison, the page data corresponding to the target view is updated based on the preset information processing component and the view update data to obtain the target page data, thereby avoiding the problem of waste of update resources caused by updating the target view without actually updating the view data corresponding to the target view, thereby saving system resources.
[0145] In an example, see Fig. 9 , which shows an information update process framework diagram, in which the monitoring module in the preset system processing function monitors the data update of the page data, and triggers the page data update event corresponding to the page data item when the page data is updated; the data observation object corresponding to the page data item is determined based on the relationship storage queue, and the page data update event is sent to the data observation object; the data observation object calls the preset information processing component based on the component calling module in the preset system processing function to update the page view based on the page update data, or update the page data based on the view update data.
[0146] Fig.10 is a block diagram of an information updating device according to an exemplary embodiment. Fig.10 , the device comprises:
[0147] The page data update event monitoring unit 1010 is configured to monitor the page data update event of the target page after compiling the page component template of the target page to generate a compiled component; the target page is rendered and displayed based on the compiled component;
[0148] The page update data determining unit 1020 is configured to determine the page update data corresponding to the target data item in the page data update event when the page data update event is detected;
[0149] The first calling unit 1030 is configured to execute calling of a preset information processing component;
[0150] The target page view determination unit 1040 is configured to execute update compilation of the page view corresponding to the target data item based on the preset information processing component and the page update data to generate a target page view.
[0151] In an exemplary embodiment, the target page includes a plurality of preset page views, each preset page view corresponding to a page data item;
[0152] The device also includes:
[0153] A data observation object creation unit, configured to execute creation of a data observation object corresponding to the page data item;
[0154] The first sending unit is configured to execute a preset message sending mode to send a page data update event corresponding to the page data item to the data observation object; in the preset message sending mode, a message sender and a message receiver are decoupled.
[0155] In an exemplary embodiment, the apparatus further comprises:
[0156] a target data observation object determination unit, configured to determine the target data observation object corresponding to the target data item based on a relationship storage queue when the page data update event is detected; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item;
[0157] The second sending unit is configured to send the page data update event to the target data observation object.
[0158] In an exemplary embodiment, the apparatus further comprises:
[0159] The view identifier determining unit is configured to determine the view identifier of the page view to be updated when the data observation object receives the page data update event.
[0160] In an exemplary embodiment, the page data update event monitoring unit 1010 includes:
[0161] A data update monitoring unit is configured to execute data update monitoring on page data based on a monitoring module in a preset system processing function;
[0162] The update event triggering unit is configured to trigger the page data update event when the page data is updated.
[0163] In an exemplary embodiment, the preset system processing function also includes a component calling module;
[0164] The first calling unit 1030 includes:
[0165] The second calling unit is configured to execute, when the data observation object receives the page data update event, in response to a page view update request sent by the data observation object, calling the preset information processing component based on the component calling module.
[0166] In an exemplary embodiment, the page view update request includes a view identifier of the page view to be updated;
[0167] The target page view determination unit 1040 includes:
[0168] An original page data acquisition unit, configured to acquire the original page data corresponding to the target data item;
[0169] The update compiling unit is configured to perform update compiling on the page view corresponding to the view identifier based on the page update data to obtain the target page view when the original page data is inconsistent with the page update data.
[0170] In an exemplary embodiment, the apparatus further comprises:
[0171] A page view update event monitoring unit, configured to monitor the page view update event of the target page;
[0172] a view update data determining unit, configured to determine, when the page view update event is detected, the view update data corresponding to the target view in the page view update event;
[0173] A third calling unit is configured to execute calling of the preset information processing component;
[0174] The target page data determining unit is configured to update the page data corresponding to the target view based on the preset information processing component and the view update data to obtain the target page data.
[0175] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0176] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided. Optionally, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, an optical data storage device, etc.; when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the methods described above.
[0177] In an exemplary embodiment, a computer program product is also provided, which includes a computer program stored in a readable storage medium, and at least one processor of a computer device reads and executes the computer program from the readable storage medium, so that the device performs any of the above methods.
[0178] Fig.11 is a block diagram of an electronic device for information update according to an exemplary embodiment. The electronic device may be a client, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an information updating method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0179] Those skilled in the art will understand that Fig.11 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0180] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0181] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An information updating method, characterized in that: include: After compiling the page component template of the target page to generate a compiled component, monitoring a page data update event of the target page; The target page is rendered and displayed based on the compiled component; In the case where the page data update event is detected, determining the page update data corresponding to the target data item in the page data update event; Calling a preset information processing component; Based on the preset information processing component and the page update data, the page view corresponding to the target data item is updated and compiled to generate a target page view; The updating and compiling of the page view corresponding to the target data item based on the preset information processing component and the page update data to generate the target page view includes: updating the page view corresponding to the target data item using the page update data based on the preset information processing component to obtain an updated page view; compiling the updated page view based on the preset information processing component to generate target page view compilation information; rendering and displaying based on the target page view compilation information to display the target page view; When requesting to display the target page, the compiled component corresponding to the target page is obtained, and the target page is rendered and displayed based on the compiled component and the target page view.
2. The method according to claim 1, characterized in that The target page includes a plurality of preset page views, each preset page view corresponding to a page data item; The method further comprises: Creating a data observation object corresponding to the page data item; A page data update event corresponding to the page data item is sent to the data observation object in a preset message sending mode; in the preset message sending mode, a message sender and a message receiver are decoupled.
3. The method according to claim 2, characterized in that The method further comprises: In the case where the page data update event is detected, a target data observation object corresponding to the target data item is determined based on a relationship storage queue; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item; The page data update event is sent to the target data observation object.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: When the data observation object receives the page data update event, the view identifier of the page view to be updated is determined.
5. The method according to claim 2 or 3, characterized in that: The monitoring page data update event includes: Perform data update monitoring on page data based on the monitoring module in the preset system processing function; When the page data is updated, the page data update event is triggered.
6. The method according to claim 5, characterized in that The preset system processing function also includes a component calling module; The calling of the preset information processing component includes: When the data observation object receives the page data update event, the preset information processing component is called based on the component calling module in response to the page view update request sent by the data observation object.
7. The method according to claim 6, characterized in that The page view update request includes a view identifier of the page view to be updated; The updating and compiling of the page view corresponding to the target data item based on the preset information processing component and the page update data to generate the target page view includes: Obtaining original page data corresponding to the target data item; In the case that the original page data is inconsistent with the page update data, the page view corresponding to the view identifier is updated and compiled based on the page update data to obtain the target page view.
8. The method according to claim 1, characterized in that The method comprises: Monitoring page view update events of the target page; In the case where the page view update event is detected, determining view update data corresponding to the target view in the page view update event; Calling the preset information processing component; Based on the preset information processing component and the view update data, the page data corresponding to the target view is updated to obtain the target page data.
9. An information updating device, characterized in that: include: A page data update event monitoring unit is configured to monitor a page data update event of a target page after compiling a page component template of the target page to generate a compiled component; the target page is rendered and displayed based on the compiled component; a page update data determining unit, configured to determine, when the page data update event is detected, page update data corresponding to a target data item in the page data update event; A first calling unit is configured to execute calling of a preset information processing component; A target page view determination unit is configured to update and compile the page view corresponding to the target data item based on the preset information processing component and the page update data to generate a target page view; The target page view determination unit is further configured to execute: based on the preset information processing component, using the page update data to update the page view corresponding to the target data item to obtain an updated page view; Compiling the updated page view based on the preset information processing component to generate target page view compilation information; Perform rendering and display based on the target page view compilation information to display the target page view; When requesting to display the target page, the compiled component corresponding to the target page is obtained, and the target page is rendered and displayed based on the compiled component and the target page view.
10. The device according to claim 9, characterized in that The target page includes a plurality of preset page views, each preset page view corresponding to a page data item; The device also includes: A data observation object creation unit, configured to execute creation of a data observation object corresponding to the page data item; The first sending unit is configured to execute a preset message sending mode to send a page data update event corresponding to the page data item to the data observation object; in the preset message sending mode, a message sender and a message receiver are decoupled.
11. The device according to claim 10, characterized in that The device also includes: a target data observation object determination unit, configured to determine the target data observation object corresponding to the target data item based on a relationship storage queue when the page data update event is detected; the relationship storage queue stores the corresponding relationship between the data observation object and the page data item; The second sending unit is configured to send the page data update event to the target data observation object.
12. The device according to claim 10 or 11, characterized in that The device also includes: The view identifier determining unit is configured to determine the view identifier of the page view to be updated when the data observation object receives the page data update event.
13. The device according to claim 10 or 11, characterized in that The page data update event monitoring unit includes: A data update monitoring unit is configured to execute data update monitoring on page data based on a monitoring module in a preset system processing function; The update event triggering unit is configured to trigger the page data update event when the page data is updated.
14. The device according to claim 13, characterized in that The preset system processing function also includes a component calling module; The first calling unit includes: The second calling unit is configured to execute, when the data observation object receives the page data update event, in response to a page view update request sent by the data observation object, calling the preset information processing component based on the component calling module.
15. The device according to claim 14, characterized in that The page view update request includes a view identifier of the page view to be updated; The target page view determination unit includes: An original page data acquisition unit, configured to acquire the original page data corresponding to the target data item; The update compiling unit is configured to perform update compiling on the page view corresponding to the view identifier based on the page update data to obtain the target page view when the original page data is inconsistent with the page update data.
16. The device according to claim 15, characterized in that The device also includes: A page view update event monitoring unit, configured to monitor the page view update event of the target page; a view update data determining unit, configured to determine, when the page view update event is detected, the view update data corresponding to the target view in the page view update event; A third calling unit is configured to execute calling of the preset information processing component; The target page data determining unit is configured to update the page data corresponding to the target view based on the preset information processing component and the view update data to obtain the target page data.
17. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the information updating method according to any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information updating method according to any one of claims 1 to 8.
19. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the information updating method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Page view display method and device, storage medium and electronic terminal
CN108897538A
Page refreshing method and device, terminal and storage medium
CN110413913A