Updating method and device, electronic equipment and computer readable medium
By using image update characterization data during component update process to determine whether to update the image data in the target component, the problem of long-term component update in the prior art is solved, and a more efficient update process and a better user experience is achieved.
Patent Information
- Application Number
- CN202311094261.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art has a long time-consuming problem during component updates, which affects the user experience.
By displaying the target page and responding to component update requests, the image update characterization data in the component update description data is used to determine whether to update the image data in the target component, and thus optimize the update content and efficiency.
It effectively improves component update efficiency, reduces update time and improves user experience.
Smart Images

Figure CN119536780A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to an updating method, device, electronic device, and computer-readable medium. Background Art
[0002] In some application scenarios, for a page (eg, a session page or other pages), some components in the page may need to be updated.
[0003] However, due to defects in some component update implementation solutions (for example, the update takes a long time, etc.), the component update effect is not very good, thereby affecting the user experience. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides an updating method, device, electronic device, and computer-readable medium, which are conducive to improving user experience.
[0005] In order to achieve the above objectives, the technical solutions provided by this application are as follows:
[0006] The present application provides an updating method, the method comprising:
[0007] Displaying a target page, wherein the target page includes at least one component;
[0008] In response to a component update request triggered for a target component in at least one of the components, the target component in the target page is updated based on component update description data corresponding to the target component, the component update description data including image update representation data, the image update representation data being used to indicate whether the image data in the target component is updated, the image update representation data being determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
[0009] In a possible implementation manner, if there is a difference between the original image address and the target image address, and the at least one stored image address includes the original image address, the image update representation data is used to indicate that the image data in the target component is not updated.
[0010] In a possible implementation manner, the process of determining the image update representation data includes:
[0011] Obtaining an original image address corresponding to the target component and a target image address corresponding to the target component;
[0012] Comparing the original image address with the target image address to obtain an address comparison result;
[0013] If the address comparison result indicates that there is a difference between the original image address and the target image address, determining whether the original image address is stored in the preset storage space according to at least one stored image address stored in the preset storage space;
[0014] If the original image address is stored in the preset storage space, the preset retention representation data is determined as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated.
[0015] In one possible implementation, the image update representation data is determined based on a comparison result between the original image address and the target image address, at least one stored image address stored in the preset storage space, and a comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address.
[0016] In a possible implementation manner, the image description data includes image modification time and / or image identification.
[0017] In a possible implementation manner, if there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and a comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address satisfies a preset condition, then the image update representation data is used to indicate that the image data in the target component is not updated;
[0018] and / or,
[0019] If there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address does not meet the preset condition, then the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0020] In a possible implementation manner, the process of determining the image update representation data includes:
[0021] If there is a difference between the original image address and the target image address, and the original image address is stored in the preset storage space, then acquiring image description data corresponding to the original image address and image description data corresponding to the target image address;
[0022] Comparing the image description data corresponding to the original image address with the image description data corresponding to the target image address to obtain a data comparison result;
[0023] If the data comparison result satisfies a preset condition, determining the preset retention representation data as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated;
[0024] If the data comparison result does not meet the preset condition, the image update representation data is determined according to the target image address, so that the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0025] In a possible implementation manner, the image description data includes an image identifier;
[0026] The preset condition includes that the image identifier corresponding to the original image address is the same as the image identifier corresponding to the target image address.
[0027] In a possible implementation manner, the image description data further includes image modification time;
[0028] The preset condition also includes that the image modification time corresponding to the original image address is the same as the image modification time corresponding to the target image address.
[0029] In a possible implementation manner, the component update description data is determined according to original description information corresponding to the target component and target description information corresponding to the target component;
[0030] The original description information at least includes the original image address;
[0031] The target description information at least includes the target image address.
[0032] In a possible implementation manner, the component update description data determination process includes:
[0033] If the original description information belongs to the preset single information type, and the target description information belongs to the preset single information type, determining whether the original description information satisfies the image address condition, and determining whether the target description information satisfies the image address condition;
[0034] If the original description information satisfies the image address condition and the target description information satisfies the image address condition, the component update description data is determined according to the comparison result between the original description information and the target description information and at least one storage image address stored in the preset storage space.
[0035] In a possible implementation manner, the component update description data determination process includes:
[0036] If the original description information belongs to the preset information aggregation type, and the target description information belongs to the preset information aggregation type, initializing the target position;
[0037] Determine the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information;
[0038] Determine the information update description data corresponding to the target position according to the information at the target position in the original description information, the information at the target position in the target description information, and the type characterization data;
[0039] Update the target position, and continue to execute the steps of determining the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information, until a preset stop condition is reached, and the description data is updated based on the information to determine that the component updates the description data.
[0040] In a possible implementation manner, the preset storage space is an image address cache pool.
[0041] The present application provides an updating device, comprising:
[0042] A display unit, used to display a target page, wherein the target page includes at least one component;
[0043] An update unit is used to respond to a component update request triggered for a target component in the at least one component, and to update the target component in the target page according to component update description data corresponding to the target component, wherein the component update description data includes image update representation data, and the image update representation data is used to indicate whether the image data in the target component is updated, and the image update representation data is determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
[0044] The present application provides an electronic device, the device comprising: a processor and a memory;
[0045] The memory is used to store instructions or computer programs;
[0046] The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the updating method provided in the present application.
[0047] The present application provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes the updating method provided by the present application.
[0048] The present application provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the updating method provided by the present application.
[0049] Compared with the related art, this application has at least the following advantages:
[0050] In the technical solution provided by the present application, for an electronic device (for example, a terminal device), when a target page (for example, a session page) is being displayed on the electronic device, and the target page includes at least one component (for example, an image card or other components), if a component update request (for example, a reload request or a view visibility request, etc.) triggered for a target component among these components is detected, the component update description data corresponding to the target component is first obtained, so that the component update description data can indicate which content needs to be updated and which content needs to be kept unchanged during the update process of the target component; and then the target component in the target page is updated based on the component update description data. In this way, the amount of updated content can be reduced as much as possible while meeting the component update requirements, thereby effectively improving the component update efficiency, and further effectively avoiding the defects caused by the long component update time. This is conducive to improving the component update effect and thus the user experience.
[0051] In addition, for the image update representation data in the above component update description data, the determination process of the image update representation data not only refers to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, but also refers to at least one stored image address stored in the preset storage space, so that the determination process of the image update representation data can better identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated. This can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), which is conducive to better improving the component update effect, and then to better improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A flowchart of an updating method provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a component update process provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of the structure of an updating device provided in an embodiment of the present application;
[0056] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] After research, it was found that for some relevant component update implementation schemes, the update process of a component can be specifically as follows: after obtaining new information (such as image address and other information) provided by the server for the component, the component can be directly redrawn on the page according to the new information. However, these component update implementation schemes have the following defects: because the probability of some information of the component (such as the location of the component, etc.) changing is very small, the rendering effect presented by the component on the information is almost unchanged, so that the update process performed based on the information is almost worthless, which leads to a waste of resources (such as a waste of time, etc.).
[0058] Further research has found that in order to solve the defects shown in the previous paragraph, the update process for a component can be completed by using the difference between the old information of a component (for example, the information based on which the component was last drawn, etc.) and the new information of the component.
[0059] Further research has revealed that in some application scenarios, for image data in a component, the image address of the image data is relatively easy to change, but the image data itself hardly changes. As a result, the following phenomenon may occur in the component update process shown in the previous paragraph: when the image address of a component changes (for example, there is a difference between the image address in the old information of the component and the image address in the information of the component, etc.), but the image data of the component has not changed, the image update process is still executed, so that the visual effect of the image data presented on the component has not changed, making this image update process almost worthless, thus resulting in a waste of resources (for example, a waste of time, etc.).
[0060] Based on the above three studies, the present application provides an update method, which includes: when a target page (for example, a session page) is being displayed, and the target page includes at least one component (for example, image cards and other components), if a component update request triggered for a target component among these components is detected (for example, a reload request or a view visibility request, etc.), first obtain the component update description data corresponding to the target component, so that the component update description data can indicate which content needs to be updated and which content needs to be kept unchanged during the update process of the target component; then update the target component in the target page based on the component update description data, so that the amount of updated content can be reduced as much as possible while meeting the component update requirements, thereby effectively improving the component update efficiency, and then effectively avoiding the defects caused by the long component update time, which is conducive to improving the component update effect and thus the user experience.
[0061] In addition, for the image update representation data in the above component update description data, the determination process of the image update representation data not only refers to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, but also refers to at least one stored image address stored in the preset storage space, so that the determination process of the image update representation data can better identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated. This can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), which is conducive to better improving the component update effect, and then to better improving the user experience.
[0062] In addition, the embodiments of the present application do not limit the execution subject of the update method provided in the embodiments of the present application. For example, the update method provided in the embodiments of the present application can be applied to a terminal device or a server. For another example, the update method provided in the embodiments of the present application can also be implemented with the help of the data interaction process between the terminal device and the server. Among them, the terminal device can be a smart phone, a computer, a personal digital assistant (PDA), a tablet computer, etc. The server can be a stand-alone server, a cluster server, or a cloud server.
[0063] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0064] In order to better understand the technical solution provided by the present application, the updating method provided by the present application is described below with reference to some drawings. Figure 1 As shown, the updating method provided in the embodiment of the present application includes the following S1-S2. Figure 1 A flowchart of an updating method provided in an embodiment of the present application.
[0065] S1: Display a target page, which includes at least one component.
[0066] The target page refers to the page that needs to be updated; and the present application does not limit the target page. For example, in some application scenarios, the target page may refer to a session page. In other application scenarios, the target page may also be a resource display page (for example, a video display page, an image display page, a text display page, a document display page, etc.).
[0067] In addition, for the target page mentioned above, the target page may include at least one component. The component refers to an object that exists in the target page and is used to provide certain information (e.g., images, etc.) or functions; and the present application does not limit the implementation method of the component, for example, the component may be implemented by a button, a text box, or an image card.
[0068] In addition, the present application does not limit the implementation method of "at least one component" in the above paragraph. For example, in some application scenarios, the "at least one component" may include all or part of the components in the above target page. For another example, in some application scenarios, the "at least one component" may include all or part of the components that exist in the above target page and can be updated.
[0069] Based on the relevant content of S1 above, it can be known that for an electronic device (for example, a terminal device), the electronic device can be used to display a target page so that some components are displayed on the target page, so that the update processing process for one or more of these components can be completed on the target page later.
[0070] S2: In response to a component update request triggered for a target component in at least one component, update the target component in the target page according to component update description data corresponding to the target component, the component update description data including image update representation data, the image update representation data being used to indicate whether the image data in the target component is updated, the image update representation data being determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
[0071] Among them, the target component refers to the component existing in the above target page and needs to be updated; and the present application does not limit the determination process of the target component. For example, the target component can be determined based on some trigger operations for the target page.
[0072] The component update request is used to request the target component to be updated; and the present application does not limit the triggering method of the component update request. For example, in some application scenarios, the user can trigger the component update request by triggering a reload (onload) operation on the target component. For another example, in some application scenarios, the user can trigger the component update request by triggering a view visible (viewVisible) operation on the target component.
[0073] The component update description data corresponding to the target component refers to the information required to be based on the update process of the target component, so that the component update description data can describe which contents need to be updated and which contents need to remain unchanged (that is, which contents do not need to be updated) during the update process of the target component.
[0074] In addition, the present application does not limit the implementation method of the component update description data corresponding to the above target component. For example, in some application scenarios, if the target component includes N items of content to be updated, the component update description data corresponding to the target component may include update representation data of the N items of content to be updated. Among them, the content to be updated refers to the content that needs to be considered whether to be updated during the update process of the target component; and the present application does not limit the content to be updated. The update representation data of the nth content to be updated is used to indicate whether it is necessary to update the nth content to be updated during the update process of the target component; and the present application does not limit the update representation data of the nth content to be updated. For example, if the nth content to be updated is image data, the update representation data of the nth content to be updated may refer to the image update representation data of the image data. n is a positive integer, n≤N, and N is a positive integer. It should be noted that the relevant content of the image update representation data is shown below.
[0075] Based on the above content, it can be known that for the component update description data corresponding to the target component above, if there is image data in the target component, the component update description data may include image update representation data, and the image update representation data is used to indicate whether the image data in the target component is updated. It can be seen that in a possible implementation, when there is image data in the target component, the component update description data corresponding to the target component may include the image update representation data of the image data, so that the component update description data can at least indicate whether the image data in the target component is updated during the update process for the target component.
[0076] In fact, in some application scenarios (such as Figure 2 In the scenario shown in the figure, for the image data in a component, the image address of the image data may change frequently, but the image data itself will not change, so that the visual effect presented by the image data on the component will not change. Based on this, in order to better improve the update efficiency, the present application also provides a possible implementation method of the above-mentioned determination process of the image update representation data. Under this implementation method, when there is image data in the above-mentioned target component, the determination process of the image update representation data corresponding to the target component can specifically include the following step 11.
[0077] Step 11: Determine the image update representation data corresponding to the target component based on the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, and at least one stored image address stored in the preset storage space.
[0078] The original image address corresponding to the target component refers to the address information referenced by the image data in the target component in the drawing process that has occurred. The drawing process that has occurred may refer to the latest drawing process that occurred for the target component before the current time (for example, the occurrence time of S2 above) (for example, the component update process for the target component that is closest to the current time, etc.).
[0079] In addition, the present application does not limit the implementation method of the original image address corresponding to the target component above. For example, it can be implemented using the current Uniform Resource Locator (URL). Figure 2 When the image shown is displayed, the original image address corresponding to the target component can refer to Figure 2 The image URL that existed in the old information shown.
[0080] The target image address corresponding to the target component refers to the address information that should be referenced during the current update process of the target component; and the present application does not limit the target image address corresponding to the target component. For example, in a possible implementation, when the image data in the target component refers to Figure 2 When the image shown in the figure is shown, the target image address corresponding to the target component can refer to Figure 2 The image URL present in the new information shown.
[0081] In addition, the present application does not limit the method for obtaining the target image address corresponding to the target component above. For example, it can be implemented by requesting the server. Based on this, it can be seen that in one possible implementation, when the target page including the target component is being displayed on the terminal device, after the terminal device detects the component update request triggered for the target component, the terminal device can request the server for relevant information of the target component (for example, image address and other information), so that the server can feedback relevant information of the target component to the terminal device (for example, Figure 2 It can be seen that in some application scenarios, the target image address corresponding to the target component can be obtained by the terminal device through requesting the server.
[0082] The preset storage space refers to a storage space that is preset and used to store image addresses of some loaded image data; and the present application does not limit the implementation method of the preset storage space. For example, in some application scenarios, the preset storage space can adopt a cache method (for example, Figure 2It can be seen that in a possible implementation, the preset storage space can be an image address cache pool, so that the preset storage space can be used to cache some URLs of successfully loaded image data, so that it can be used to determine whether an image data has been successfully loaded later with the help of the URL stored in the preset storage space.
[0083] The storage image address refers to the image address that has been stored in the above preset storage space.
[0084] In addition, the present application does not limit the implementation method of the "image update representation data corresponding to the target component" in step 11 above. For example, in one possible implementation method, the "image update representation data corresponding to the target component" can specifically be: if there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, and at least one of the stored image addresses stored in the preset storage space above includes the original image address, then the image update representation data is used to indicate that the image data in the target component is not updated.
[0085] For example, in another possible implementation, the above "image update representation data corresponding to the target component" can specifically be: if there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, and at least one storage image address stored in the above preset storage space includes the original image address, then the image update representation data is used to indicate that the image data in the target component is not updated; if there is no difference between the original image address corresponding to the target component and the target image address corresponding to the target component (that is, the original image address corresponding to the target component is the same as the target image address corresponding to the target component), then the image update representation data is used to indicate that the image data in the target component is not updated; if there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, and at least one storage image address stored in the preset storage space does not include the original image address, then the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0086] Based on the above two paragraphs, it can be known that in a possible implementation manner, the above step 11 may specifically include all or part of the steps in the following steps 111 to 114.
[0087] Step 111: Obtain the original image address corresponding to the above target component and the target image address corresponding to the target component.
[0088] In the present application, for a terminal device (such as a smart phone, etc.), when a target page is being displayed on the terminal device, if the terminal device detects a component update request triggered for a target component in the target page, not only the image address (such as the image address used by the image data in the target component in the most recent loading / updating process) can be updated. Figure 2 The current URL shown in FIG. 1 is regarded as the original image address corresponding to the target component. The terminal device can also request the server for relevant information of the target component (for example, Figure 2 The new information shown) can be used to subsequently regard the image address in the relevant information as the target image address corresponding to the target component, so that it can be determined based on the two addresses whether the image data in the target component needs to be updated.
[0089] Step 112: Compare the original image address corresponding to the above target component with the target image address corresponding to the target component to obtain an address comparison result.
[0090] The address comparison result refers to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, so that the address comparison result can indicate whether there is a difference between the original image address and the target image address.
[0091] In addition, the present application does not limit the method for determining the above address comparison result. For example, when the above original image address and the target image address are both represented by strings, the address comparison result can be implemented by any method that can compare whether two strings are the same.
[0092] Step 113: If the above address comparison result indicates that the original image address corresponding to the above target component is the same as the target image address corresponding to the target component, the preset retention representation data is determined as the image update representation data corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is not updated.
[0093] Among them, the preset retention representation data refers to pre-set data information used to represent the semantics of not updating (for example, the string "not updating", etc.); and this application does not limit the preset retention representation data, for example, it can be set according to the actual application scenario.
[0094] Based on the relevant content of step 113 above, it can be known that for the image data in the target component, if the above address comparison result indicates that the original image address corresponding to the target component is the same as the target image address corresponding to the target component, then it can be determined that the image address obtained from the server for the image data is the same as the image address used when the image data was loaded last time, so that it can be determined that the image data in the target component has not changed. Therefore, in order to better improve the update efficiency, the preset retention representation data can be determined as the image update representation data corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is not updated, so that the image data does not need to be updated during the update process for the target component.
[0095] Step 114: If the address comparison result indicates that there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, determine whether the preset storage space stores the original image address based on at least one stored image address stored in the preset storage space.
[0096] In the present application, for the image data in the target component, if the address comparison result above indicates that there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, it can be determined that the image address obtained from the server for the image data is different from the image address used when the image data was last loaded, so that it can be determined that the image address of the image data has changed. Therefore, it is possible to further determine whether the original image address is stored in the preset storage space based on at least one stored image address stored in the preset storage space above, so that it can be determined whether the image data in the target component needs to be updated based on the judgment result later.
[0097] It should be noted that the present application does not limit the implementation method of the step in the above paragraph "determining whether the original image address is stored in the preset storage space based on at least one storage image address stored in the above preset storage space". For example, it can be: matching the original image address with each storage image address stored in the preset storage space, so that it can be determined whether the original image address is stored in the preset storage space based on the matching result.
[0098] Step 115: If the original image address corresponding to the target component is stored in the preset storage space, the preset retention representation data is determined as the image update representation data corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is not updated.
[0099] In the present application, for the image data in the target component, if it is determined that the original image address corresponding to the target component is stored in the above preset storage space, it can be determined that the image data with the original image address has been loaded, so that it can be inferred that the difference between the original image address and the above target image address is very likely not to cause changes in the visual effect of the image data. Therefore, in some scenarios (for example, scenarios where the image data in the component hardly changes), in order to better reduce the update time, the above preset retention representation data can be determined as the image update representation data corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is not updated, so that the image data does not need to be updated during the update process of the target component. In this way, the purpose of directly ignoring the difference between the original image address and the above target image address under certain conditions (for example, the original image address corresponding to the target component is stored in the preset storage space, etc.) can be achieved. In this way, defects caused by image updating when the image address changes but the image data does not change (for example, defects such as long update time) can be effectively avoided, which is conducive to better improving the component update effect.
[0100] Step 116: If the original image address corresponding to the target component is not stored in the preset storage space, the image update representation data corresponding to the target component is determined according to the target image address corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0101] In the present application, for the image data in the target component, if it is determined that the original image address corresponding to the target component is not stored in the above preset storage space, it can be determined that the image data with the original image address has not yet been loaded. Therefore, in order to better improve the component update effect, the image update representation data corresponding to the target component can be determined directly based on the target image address corresponding to the target component (for example, the target image address is determined as the image update representation data corresponding to the target component), so that the image update representation data is used to indicate that the image data in the target component is updated according to the target image address, so that in the subsequent update process of the target component, the image data in the target component can be directly updated according to the target image address.
[0102] Based on the relevant contents of steps 111 to 116 above, it can be known that in some application scenarios, for the image data in the target component, the process of determining the image update representation data of the image data can not only refer to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, but also refer to the conclusion of whether the original image address is stored in the preset storage space above, so that the process of determining the image update representation data can better identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated, which can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), thereby helping to better improve the component update effect, and then to better improve the user experience.
[0103] In fact, in some application scenarios, for the image data in a component, the image data itself may also change. Based on this, the present application also provides a possible implementation method of the determination process of the above "image update representation data corresponding to the target component". Under this implementation method, when there is image data in the above target component, the determination process of the image update representation data corresponding to the target component may specifically include the following step 12.
[0104] Step 12: Determine the image update representation data corresponding to the target component based on the comparison result between the original image address corresponding to the target component above and the target image address corresponding to the target component, at least one storage image address stored in the preset storage space above, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address.
[0105] The above "image description data corresponding to the original image address" is used to describe the image data having the original image address; and the present application does not limit the "image description data corresponding to the original image address", for example, it may include metadata information of the image data having the original image address (for example, attribute information such as image modification time and image identifier); and the present application does not limit the metadata information, for example, the metadata information may include at least one attribute information of the image data having the original image address. It should be noted that the present application does not limit the implementation method of the "at least one attribute information", for example, it may include image modification time and / or image identifier. Among them, the image modification time is used to indicate the modification time of an image data; and the present application does not limit the implementation method of the image modification time, for example, it may at least include the latest modification time (that is, the time of the most recent modification to the current moment). The image identifier is used to uniquely identify the image data, and the present application does not limit the image identifier, for example, in some application scenarios, the image identifier will change with the modification of the image data, so that the image identifier (for example, Etag) can represent the image data modified at the latest modification time.
[0106] In addition, the present application does not limit the method for obtaining the above-mentioned "image description data corresponding to the original image address". For example, in one possible implementation, when the "image description data corresponding to the original image address" includes metadata information of the image data having the original image address, an acquisition function (such as fetch) can be used to request the server pointed to by the original image address so that the server can feedback the metadata information of the image data having the original image address (such as the latest modification time, Etag, etc.).
[0107] The above “image description data corresponding to the target image address” is used to describe the image data having the target image address; and the present application does not limit the “image description data corresponding to the target image address”, for example, it may include metadata information of the image data having the target image address (for example, attribute information such as image modification time and image identification). It should be noted that the implementation method of the “metadata information” is similar to the implementation method of the “metadata information” in the previous paragraph, and for the sake of brevity, it will not be repeated here.
[0108] In addition, the present application does not limit the method for obtaining the above-mentioned "image description data corresponding to the target image address". For example, in one possible implementation, when the "image description data corresponding to the target image address" includes metadata information of the image data having the target image address, an acquisition function (such as fetch) can be used to request the server pointed to by the target image address so that the server can feedback the metadata information of the image data having the target image address (such as the latest modification time, Etag, etc.).
[0109] In addition, the present application does not limit the implementation method of the "image update representation data corresponding to the target component" in step 12 above. For example, in one possible implementation method, the "image update representation data corresponding to the target component" can be specifically: if there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, at least one storage image address stored in the above preset storage space includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address meets the preset conditions, then the image update representation data is used to indicate that the image data in the target component is not updated; if there is a difference between the original image address and the target image address, at least one storage image address stored in the preset storage space includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address does not meet the preset conditions, then the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0110] For example, in another possible implementation, the above "image update representation data corresponding to the target component" can be specifically: if there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, at least one storage image address stored in the above preset storage space includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address meets the preset conditions, then the image update representation data is used to indicate that the image data in the target component is not updated; if there is a difference between the original image address and the target image address, at least one storage image address stored in the preset storage space includes the original image address, and the original image address If the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address does not meet the preset conditions, the image update representation data is used to indicate that the image data in the target component is updated according to the target image address; if there is a difference between the original image address and the target image address, and at least one stored image address stored in the preset storage space does not include the original image address, the image update representation data is used to indicate that the image data in the target component is updated according to the target image address; if there is no difference between the original image address and the target image address (that is, the original image address is the same as the target image address), the image update representation data is used to indicate that the image data in the target component is not updated.
[0111] Based on the above two paragraphs, it can be known that in a possible implementation manner, the above step 12 may specifically include at least the following steps 121 to 124.
[0112] Step 121: If there is a difference between the original image address corresponding to the target component above and the target image address corresponding to the target component, and the original image address is stored in the above preset storage space, then obtain the image description data corresponding to the original image address and the image description data corresponding to the target image address.
[0113] In the present application, for the image data in the target component above, when it is determined that there is a difference between the original image address corresponding to the target component and the target image address corresponding to the target component, it can be determined that the image address obtained from the server for the image data is different from the image address used when the image data was loaded last time, so that it can be determined that the image address of the image data has changed, so that when it is determined that the original image address is stored in the preset storage space above, it can be inferred that the image data in the target component may not have changed. Therefore, in order to further confirm whether the image data has changed, the image description data corresponding to the original image address (for example, the latest modification time, Etag, etc.) and the image description data corresponding to the target image address (for example, the latest modification time, Etag, etc.) can be obtained, so that it can be determined whether the image data has changed based on the comparison result between the two image description data.
[0114] It should be noted that the determination process of the conclusion "there is a difference between the original image address corresponding to the target component above and the target image address corresponding to the target component, and the original image address is stored in the preset storage space above" in step 121 above is similar to the determination process shown in steps 111 to 116 above, and for the sake of brevity, it will not be repeated here. Based on this, it can be seen that in a possible implementation, step 12 above can specifically include all or part of the steps in steps 111 to 114, step 116, and steps 121 to 124 above.
[0115] Step 122: Compare the image description data corresponding to the original image address and the image description data corresponding to the target image address to obtain a data comparison result.
[0116] Among them, the data comparison result refers to the above "comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address", so that the data comparison result can indicate whether there is a difference between the image description data corresponding to the original image address and the image description data corresponding to the target image address.
[0117] Step 123: If the data comparison result satisfies the preset condition, the preset retention representation data is determined as the image update representation data corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is not updated.
[0118] Among them, the preset condition refers to the condition set in advance according to the application scenario and achieved between the image description data (for example, metadata information) corresponding to the new and old addresses when the image data has not changed; and the present application does not limit the preset condition. For example, when the above image description data includes an image identifier (for example, Etag), the preset condition may include that the image identifier corresponding to the above original image address is the same as the image identifier corresponding to the above target image address.
[0119] It can be seen that, in a possible implementation manner, for the above data comparison result, if the data comparison result indicates that the image identifier corresponding to the above original image address is the same as the image identifier corresponding to the above target image address, then it can be determined that the image data with the original image address and the image data with the target image address refer to the same image data, and thus it can be determined that the image data in the above target component has not changed, so the preset retention representation data can be directly determined as the image update representation data corresponding to the above target component, so that the image update representation data is used to indicate that the image data in the target component is not updated, so that the image data does not need to be updated during the update process for the target component.
[0120] In fact, in some application scenarios, in order to better improve the recognition effect of image changes, the present application also provides another possible implementation of the above preset conditions. In this implementation, when the above image description data includes an image identifier (for example, Etag) and an image modification time (for example, the latest modification time), the preset condition can be: the image identifier corresponding to the above original image address is the same as the image identifier corresponding to the above target image address, and the image modification time corresponding to the original image address is the same as the image modification time corresponding to the target image address.
[0121] It can be seen that, in a possible implementation manner, for the above data comparison result, if the data comparison result indicates that the image identifier corresponding to the above original image address is the same as the image identifier corresponding to the above target image address, and the image modification time corresponding to the original image address is the same as the image modification time corresponding to the target image address, then it can be determined that the image data with the original image address and the image data with the target image address refer to the same image data, and thus it can be determined that the image data in the above target component has not changed, so the preset retention representation data can be directly determined as the image update representation data corresponding to the above target component, so that the image update representation data is used to indicate that the image data in the target component is not updated, so that the image data does not need to be updated during the update process for the target component.
[0122] Based on the relevant content of step 123 above, it can be known that for the image data in the above target component, if the above data comparison result meets the preset conditions, it can be determined that the image data has not changed, so the preset retention representation data can be directly determined as the image update representation data corresponding to the above target component, so that the image update representation data is used to indicate that the image data in the target component is not updated, so that the image data does not need to be updated during the update process of the target component.
[0123] Step 124: If the data comparison result does not meet the preset condition, the image update representation data corresponding to the target component is determined according to the target image address corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0124] In the present application, for the image data in the above target component, if the above data comparison result does not meet the preset conditions, it can be determined that the image data is likely to have changed. Therefore, in order to ensure the component update effect, the image update representation data corresponding to the target component can be determined based on the target image address corresponding to the target component, so that the image update representation data is used to indicate that the image data in the target component is updated based on the target image address, so that the image data can be updated based on the target image address during the update process of the target component.
[0125] Based on the relevant contents of steps 121 to 124 above, it can be known that in some application scenarios, for the image data in the target component, the process of determining the image update representation data of the image data can not only refer to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, and the conclusion of whether the original image address is stored in the preset storage space above, but also refer to the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address, so that the process of determining the image update representation data can more accurately identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated, which can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), thereby helping to better improve the component update effect, and then to better improve the user experience.
[0126] Based on the above content related to the image data in the target component, it can be known that if the target component contains image data, the component update description data corresponding to the target component may include image update representation data of the image data, so that the image update representation data of the image data can indicate whether the image data is updated during the update process for the target component. Among them, since the determination process of the image update representation data can better identify whether the image data in the target component has changed, the image update representation data can more accurately indicate whether the image data in the target component needs to be updated, which can effectively avoid defects caused by image updates when the image address has changed but the image data has not changed (for example, defects such as long update time), which is conducive to better improving the component update effect, and then to better improving the user experience.
[0127] In fact, in some application scenarios, for the target component mentioned above, the update process of the target component may involve the update processing of one or more contents (for example, the N contents to be updated mentioned above). Based on this, the present application also provides a possible implementation method of the determination process of the component update description data corresponding to the target component mentioned above. In this implementation method, the determination process of the component update description data corresponding to the target component may specifically include the following step 21.
[0128] Step 21: Determine component update description data corresponding to the target component based on the original description information corresponding to the target component and the target description information corresponding to the target component.
[0129] The original description information corresponding to the target component refers to the information referenced by the target component in the drawing process that has occurred. It should be noted that the drawing process that has occurred is similar to the "drawing process that has occurred" in step 11 above, and for the sake of brevity, it will not be repeated here.
[0130] In addition, for the original description information corresponding to the target component above, if there is image data in the target component, the original description information corresponding to the target component can at least include the original image address of the image data, so that the original description information can describe the relevant information of at least one content (for example, image data, etc.) referenced by the target component in the drawing process that has occurred.
[0131] In addition, the present application does not limit the implementation method of the original description information corresponding to the target component above. For example, in some application scenarios, the original description information corresponding to the target component may belong to a preset single information type, so that the original description information is only used to record relevant information of a certain content (for example, image data or component location, etc.). Among them, the preset single information type refers to the type of component description information that is only used to record relevant information of one content, so that the component description information with the preset single information type is only used to record relevant information of a certain content (for example, image data). In addition, the present application does not limit the implementation method of the preset single information type. For example, it may refer to other types (for example, basic types such as strings) except array type and object type.
[0132] For another example, in some application scenarios, the original description information corresponding to the target component above may belong to a preset information aggregation type, so that the original description information is used to record relevant information of at least two contents. Among them, the preset information aggregation type refers to the type of component description information used to record relevant information of at least two contents, so that the component description information with the preset information aggregation type is used to record relevant information of at least two contents. In addition, the present application does not limit the implementation method of the preset information aggregation type, for example, it can be an array type or an object type.
[0133] The target description information corresponding to the target component refers to the information that the target component should refer to during the current update process.
[0134] In addition, for the target description information corresponding to the target component above, if there is image data in the target component, the target description information corresponding to the target component can at least include the target image address of the image data, so that the target description information can describe the relevant information of at least one content (for example, image data, etc.) that the target component should refer to during the current update process.
[0135] In addition, the present application does not limit the implementation method of the target description information corresponding to the above target component. For example, the implementation method of the target description information is similar to the implementation method of the above "original description information corresponding to the target component". For the sake of brevity, it will not be repeated here.
[0136] In addition, the present application does not limit the implementation method of the above step 21. For ease of understanding, two situations are combined for explanation below.
[0137] Case 1: In some application scenarios, the component description information involved in a component may only be used to record relevant information of a certain content.
[0138] Based on the above situation 1, it can be known that in a possible implementation mode, the above step 21 may specifically include at least all or part of the following steps 211 to 213.
[0139] Step 211: If the original description information corresponding to the above target component belongs to the preset single information type, and the target description information corresponding to the target component belongs to the preset single information type, then determine whether the original description information meets the image address condition, and determine whether the target description information meets the image address condition.
[0140] In the present application, when the original description information corresponding to the target component above belongs to the preset single information type, and the target description information corresponding to the target component belongs to the preset single information type, it can be determined that any component description information corresponding to the target component (for example, the original description information or the target description information) is only used to record the relevant information of a certain content, so that it can be determined that in the update process of the target component, only attention needs to be paid to whether this content needs to be updated. At this time, in order to better improve the update effect, it can be further determined whether the original description information meets the image address condition, and whether the target description information meets the image address condition, so that it can be determined based on these two determination results whether this content is image data. If this content is image data, the component update description data corresponding to the target component can be determined according to the update determination process for image data (for example, the determination process shown in step 212 below); however, if this content is not image data, the component update description data corresponding to the target component can be determined according to the preset update determination process (for example, the determination process shown in step 213 below).
[0141] Step 212: If the original description information corresponding to the above target component satisfies the image address condition, and the target description information corresponding to the target component satisfies the image address condition, then the component update description data corresponding to the target component is determined based on the comparison result between the original description information and the target description information, and at least one storage image address stored in the preset storage space.
[0142] In the present application, for the above-mentioned target component, if it is further determined that the original description information corresponding to the target component satisfies the image address condition, and the target description information corresponding to the target component satisfies the image address condition, then it can be determined that any component description information corresponding to the target component (for example, the original description information or the target description information) is only used to record the relevant information of the image data in the target component, so the component update description data corresponding to the target component can be determined directly according to the update determination process for the image data (for example, the determination process shown in step 11 or step 12 above).
[0143] Step 213: If the original description information corresponding to the above target component does not meet the image address condition, and the target description information corresponding to the target component does not meet the image address condition, then determine the component update description data corresponding to the target component based on the comparison result between the original description information and the target description information.
[0144] In the present application, for the above-mentioned target component, if it is further determined that the original description information corresponding to the target component does not meet the image address condition, and the target description information corresponding to the target component does not meet the image address condition, it can be determined that any component description information corresponding to the target component (for example, the original description information or the target description information) is only used to record relevant information of a certain non-image data (for example, the text content displayed on the component, the border status of the component, or the location of the component, etc.), so the comparison result between the original description information and the target description information can be directly used to determine the component update description data corresponding to the target component, so that the component update description data can describe whether this content is updated during the update process of the target component.
[0145] Based on the relevant contents of steps 211 to 213 above, it can be known that in some application scenarios, for a target component, if any component description information corresponding to the target component (e.g., original description information or target description information) is only used to record relevant information of a certain content, then the component update description data corresponding to the target component (e.g., Figure 2 The update determination process used for the content under the basic type as shown) is used so that the component update description data can describe whether this content is updated during the update process for the target component.
[0146] Case 2: In some application scenarios, the component description information involved in a component may be used to record relevant information of at least two contents.
[0147] Based on the above situation 2, it can be known that in a possible implementation mode, when the original description information corresponding to the above target component and the target description information corresponding to the target component are implemented using the same information arrangement method, the above step 21 can specifically include at least the following steps 214-219.
[0148] Step 214: If the original description information corresponding to the above target component belongs to the preset information aggregation type, and the target description information corresponding to the target component belongs to the preset information aggregation type, then initialize the target position.
[0149] The target position is used to indicate the position of a content that needs to be updated and determined in the current round during the loop traversal of at least two contents involved in the above target component.
[0150] In addition, the present application does not limit the implementation method of "initializing the target position" in step 214 above. For example, it can be set according to the actual application scenario (for example, the initial value of the target position can be set to the first position, or the initial value of the target position can be set to a random position, etc.).
[0151] Based on the relevant content of step 214 above, it can be known that for the above target component, when the original description information corresponding to the target component belongs to the preset information aggregation type, and the target description information corresponding to the target component belongs to the preset information aggregation type, it can be determined that any component description information corresponding to the target component (for example, the original description information or the target description information) is used to record the relevant information of at least two contents, so that it can be determined whether at least two contents need to be updated during the update process of the target component. Therefore, in order to avoid omissions, a loop traversal method (for example, Figure 2 The update determination process used for the content under the array type or object type shown in the figure) completes the update determination processing for each content involved in the target component in turn.
[0152] Step 215: Determine the type representation data of the information at the target position in the original description information corresponding to the target component and the type representation data of the information at the target position in the target description information corresponding to the target component.
[0153] Among them, the information at the target position in the original description information corresponding to the target component refers to an information that exists in the original description information and is at the target position, so that the "information at the target position in the original description information corresponding to the target component" is only used to describe a certain content.
[0154] The above “type characterization data of information at the target position in the original description information corresponding to the target component” is used to describe the type of information at the target position existing in the original description information (for example, image URL type, non-image URL type, etc.); and the present application does not limit the “type characterization data of information at the target position in the original description information corresponding to the target component”. For example, if the information at the target position in the original description information corresponding to the target component is of the image URL type, then the “type characterization data of information at the target position in the original description information corresponding to the target component” can be used to indicate that the information at the target position in the original description information corresponding to the target component is an image URL; if the information at the target position in the original description information corresponding to the target component is not of the image URL type, then the “type characterization data of information at the target position in the original description information corresponding to the target component” can be used to indicate that the information at the target position in the original description information corresponding to the target component is not an image URL.
[0155] It should be noted that this application does not limit the determination method of the image URL type. For example, in some application scenarios, a regular expression can be used to determine whether the above "information at the target location in the original description information corresponding to the target component" belongs to the image URL type. In addition, this application does not limit the implementation method of the regular expression. For example, it can be implemented using the expression / (https?:\ / \ / [^\s]+\.(?:jpg|jpeg|png|gif|webp)) / g.
[0156] The information at the target position in the target description information corresponding to the target component refers to an information existing in the target description information and located at the target position, so that the "information at the target position in the target description information corresponding to the target component" is only used to describe a certain content.
[0157] The above "type characterization data of the information at the target position in the target description information corresponding to the target component" is used to describe the type of information at the target position existing in the target description information (for example, image URL type, non-image URL type, etc.); and the present application does not limit the "type characterization data of the information at the target position in the target description information corresponding to the target component". For example, if the information at the target position in the target description information corresponding to the target component is of the image URL type, then the "type characterization data of the information at the target position in the target description information corresponding to the target component" can be used to indicate that the information at the target position in the target description information corresponding to the target component is an image URL; if the information at the target position in the target description information corresponding to the target component does not belong to the image URL type, then the "type characterization data of the information at the target position in the target description information corresponding to the target component" can be used to indicate that the information at the target position in the target description information corresponding to the target component is not an image URL.
[0158] Based on the relevant content of step 215 above, it can be known that after obtaining the target position (for example, the target position obtained by initialization, or the updated target position), the type characterization data of the information at the target position in the original description information corresponding to the target component above and the type characterization data of the information at the target position in the target description information corresponding to the target component can be determined, so that the update determination process of an item of content corresponding to the target position in the target component can be determined based on the type characterization data.
[0159] Step 216: Determine the information update description data corresponding to the target position based on the information at the target position in the original description information corresponding to the target component, the information at the target position in the target description information corresponding to the target component, and the type characterization data.
[0160] The information update description data corresponding to the target position is used to indicate whether it is necessary to update a content corresponding to the target position in the target component during the update process of the target component.
[0161] In addition, the present application does not limit the implementation method of the information update description data corresponding to the target position above. For example, when the information at the target position in the original description information corresponding to the target component above and the information at the target position in the target description information corresponding to the target component are both image URLs, the information update description data corresponding to the target position can be implemented using the image update representation data of the image data in the target component, so that the information update description data corresponding to the target position is used to indicate whether it is necessary to update the image data during the update process of the target component; when the information at the target position in the original description information corresponding to the target component and the information at the target position in the target description information corresponding to the target component are not image URLs, the information update description data corresponding to the target position can be directly implemented using the comparison result between the new and old information at the target position, so that the information update description data corresponding to the target position is used to indicate whether it is necessary to update an item of content corresponding to the target position in the target component during the update process of the target component.
[0162] Based on the content of the above paragraph, it can be known that for the above target component, if the information at the target position in the original description information corresponding to the target component is an image URL, and the information at the target position in the target description information corresponding to the target component is an image URL, then it can be determined that an item of content corresponding to the image position in the target component is image data, so the information update description data corresponding to the target position can be determined using the image data update determination process (for example, the determination process shown in step 11 or step 12 above); however, if the information at the target position in the original description information corresponding to the target component is not an image URL, and the information at the target position in the target description information corresponding to the target component is not an image URL, then it can be determined that an item of content corresponding to the image position in the target component is not image data, so the information update description data corresponding to the target position can be directly determined based on the comparison result between the information at the target position in the original description information corresponding to the target component and the information at the target position in the target description information corresponding to the target component.
[0163] Based on the relevant content of step 216 above, it can be known that for the current round, after obtaining the type representation data of the information at the target position in the original description information corresponding to the target component above and the type representation data of the information at the target position in the target description information corresponding to the target component, the information update description data corresponding to the target position can be determined based on the type representation data, the information at the target position in the original description information corresponding to the target component, and the information at the target position in the target description information corresponding to the target component, so that in the process of determining the information update description data, it can be more accurately identified whether the visual effect of an item of content corresponding to the target position in the target component has changed, so that the information update description data can better indicate whether it is necessary to update an item of content corresponding to the target position in the target component during the update process of the target component.
[0164] Step 217: Determine whether the preset stop condition is met, if so, execute the following step 219; if not, execute the following step 218.
[0165] Among them, the preset stop condition refers to the condition that needs to be achieved when the loop iteration process for the target component ends; and the present application does not limit the preset stop condition. For example, the preset stop condition can be specifically: the information at each position in the original description information corresponding to the above target component has been traversed once, and the information at each position in the target description information corresponding to the target component has been traversed once.
[0166] Step 218: If the preset stop condition is not reached, the target position is updated, and the process returns to continue executing the above step 215 and its subsequent steps.
[0167] It should be noted that the present application does not limit the implementation method of "updating the target position" in step 218 above. For example, in some application scenarios (for example, scenarios in which the positions are traversed in order), the target position update process is: add the current target position to the preset position step value (for example, 1) to obtain the updated target position.
[0168] For example, in some application scenarios (for example, scenarios in which traversal is performed by randomly selecting positions), the target position update process is as follows: for all positions that have not yet been traversed in the original description information corresponding to the target component (or, the target description information), a position can be randomly selected from these positions that have not yet been traversed as the updated target position.
[0169] Based on the relevant content of step 218 above, it can be known that for the current round, if the preset stop condition is not met, it can be determined that there is information in the original description information corresponding to the target component that has not been traversed, and there is information in the target description information corresponding to the target component that has not been traversed, so the target position can be updated so that it can be returned based on the updated position to continue to execute step 215 and its subsequent steps, so that the update judgment process corresponding to a certain information among these information that has not been traversed can be started.
[0170] Step 219: If the preset stop condition is reached, the description data is updated according to the above information, and the component update description data corresponding to the above target component is determined.
[0171] In the present application, for the current round, if the preset stop condition is reached, it can be determined that the information at all positions in the original description information corresponding to the target component has been traversed once, and the information at all positions in the target description information corresponding to the target component has been traversed once, so the description data can be directly updated based on the information corresponding to all positions to determine the component update description data corresponding to the target component, so that the component update description data includes the information update description data corresponding to all positions, so that the component update description data can represent the update judgment results of at least two contents involved in the target component, and then the component update description data can represent which contents need to be updated and which contents do not need to be updated during the update process of the target component, so that the update judgment process for at least two contents in the target component can be completed by means of a loop iteration, which is beneficial to improving the component update effect.
[0172] Based on the relevant contents of steps 214 to 219 above, it can be known that in some application scenarios, for a target component, if any component description information corresponding to the target component (for example, original description information or target description information) is used to record relevant information of multiple contents, then the update determination process for the multiple contents can be performed in a loop iteration manner (for example, Figure 2 The update determination process used for the content under the array type or object type as shown) is used to obtain the component update description data corresponding to the target component, so that the component update description data can describe whether the multiple contents are updated during the update process of the target component.
[0173] Based on the relevant contents of S1 to S2 above, it can be known that for the update method provided in the embodiment of the present application, when the target page (for example, the session page) is being displayed, and the target page includes at least one component (for example, image cards and other components), if a component update request triggered for a target component among these components is detected (for example, a reload request or a view visibility request, etc.), the component update description data corresponding to the target component is first obtained, so that the component update description data can indicate which content needs to be updated and which content needs to be kept unchanged during the update process of the target component; then, based on the component update description data, the target component in the target page is updated, so that the amount of update content can be reduced as much as possible while meeting the component update requirements, thereby effectively improving the component update efficiency, and then effectively avoiding the defects caused by the long component update time, which is conducive to improving the component update effect and thus the user experience.
[0174] In addition, for the image update representation data in the above component update description data, the determination process of the image update representation data not only refers to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, but also refers to at least one stored image address stored in the preset storage space, so that the determination process of the image update representation data can better identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated. This can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), which is conducive to better improving the component update effect, and then to better improving the user experience.
[0175] Based on the updating method provided in the embodiment of the present application, the embodiment of the present application also provides an updating device. Figure 3 Explain and illustrate. Figure 3 This is a schematic diagram of the structure of an updating device provided in an embodiment of the present application. It should be noted that for the technical details of the updating device provided in an embodiment of the present application, please refer to the relevant contents of the updating method above.
[0176] like Figure 3 As shown, the updating device 300 provided in the embodiment of the present application includes:
[0177] A display unit 301 is used to display a target page, wherein the target page includes at least one component;
[0178] An update unit 302 is used to respond to a component update request triggered for a target component in the at least one component, and to update the target component in the target page according to component update description data corresponding to the target component, wherein the component update description data includes image update representation data, and the image update representation data is used to indicate whether the image data in the target component is updated, and the image update representation data is determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
[0179] In a possible implementation manner, if there is a difference between the original image address and the target image address, and the at least one stored image address includes the original image address, the image update representation data is used to indicate that the image data in the target component is not updated.
[0180] In one possible implementation, the process of determining the image update representation data includes: obtaining an original image address corresponding to the target component and a target image address corresponding to the target component; comparing the original image address and the target image address to obtain an address comparison result; if the address comparison result indicates that there is a difference between the original image address and the target image address, judging whether the original image address is stored in the preset storage space based on at least one storage image address stored in the preset storage space; if the original image address is stored in the preset storage space, determining the preset retention representation data as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated.
[0181] In one possible implementation, the image update representation data is determined based on a comparison result between the original image address and the target image address, at least one stored image address stored in the preset storage space, and a comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address.
[0182] In a possible implementation manner, the image description data includes image modification time and / or image identification.
[0183] In a possible implementation manner, if there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and a comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address satisfies a preset condition, then the image update representation data is used to indicate that the image data in the target component is not updated;
[0184] and / or,
[0185] If there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address does not meet the preset condition, then the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
[0186] In one possible implementation, the process of determining the image update representation data includes: if there is a difference between the original image address and the target image address, and the original image address is stored in the preset storage space, then obtaining the image description data corresponding to the original image address and the image description data corresponding to the target image address; comparing the image description data corresponding to the original image address and the image description data corresponding to the target image address to obtain a data comparison result; if the data comparison result meets a preset condition, then determining the preset retention representation data as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated; if the data comparison result does not meet the preset condition, then determining the image update representation data based on the target image address, so that the image update representation data is used to indicate that the image data in the target component is updated based on the target image address.
[0187] In a possible implementation manner, the image description data includes an image identifier; and the preset condition includes that the image identifier corresponding to the original image address is the same as the image identifier corresponding to the target image address.
[0188] In a possible implementation manner, the image description data further includes image modification time; and the preset condition further includes that the image modification time corresponding to the original image address is the same as the image modification time corresponding to the target image address.
[0189] In one possible implementation, the component update description data is determined based on original description information corresponding to the target component and target description information corresponding to the target component; the original description information at least includes the original image address; and the target description information at least includes the target image address.
[0190] In one possible implementation, the process of determining the component update description data includes: if the original description information belongs to a preset single information type, and the target description information belongs to a preset single information type, then determining whether the original description information satisfies an image address condition, and determining whether the target description information satisfies an image address condition; if the original description information satisfies the image address condition, and the target description information satisfies the image address condition, then determining the component update description data based on a comparison result between the original description information and the target description information, and at least one storage image address stored in the preset storage space.
[0191] In one possible implementation, the process of determining the component update description data includes: if the original description information belongs to a preset information aggregation type and the target description information belongs to a preset information aggregation type, initializing the target position; determining the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information; determining the information update description data corresponding to the target position based on the information at the target position in the original description information, the information at the target position in the target description information, and the type characterization data; updating the target position, and continuing to execute the steps of determining the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information, until a preset stop condition is reached, determining the component update description data based on the information update description data.
[0192] In a possible implementation manner, the preset storage space is an image address cache pool.
[0193] Based on the relevant content of the above-mentioned update device 300, it can be known that for the update device 300 provided in the embodiment of the present application, when the update device 300 is displaying a target page (for example, a session page), and the target page includes at least one component (for example, an image card or other components), if a component update request triggered for a target component among these components is detected (for example, a reload request or a view visibility request, etc.), the component update description data corresponding to the target component is first obtained, so that the component update description data can indicate which content needs to be updated and which content needs to be kept unchanged during the update process of the target component; and then the target component in the target page is updated based on the component update description data. In this way, the amount of updated content can be reduced as much as possible while meeting the component update requirements, thereby effectively improving the component update efficiency, and then effectively avoiding the defects caused by the long component update time. This is conducive to improving the component update effect, thereby improving the user experience.
[0194] In addition, for the image update representation data in the above component update description data, the determination process of the image update representation data not only refers to the comparison result between the original image address corresponding to the target component and the target image address corresponding to the target component, but also refers to at least one stored image address stored in the preset storage space, so that the determination process of the image update representation data can better identify whether the image data in the target component has changed, so that the image update representation data can more accurately indicate whether the image data in the target component needs to be updated. This can effectively avoid defects caused by image updating when the image address has changed but the image data has not changed (for example, defects such as long updating time), which is conducive to better improving the component update effect, and then to better improving the user experience.
[0195] In addition, an embodiment of the present application also provides an electronic device, which includes a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation of the update method provided in the embodiment of the present application.
[0196] See also Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0197] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0198] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0199] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0200] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept, and the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0201] The embodiment of the present application also provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes any implementation of the update method provided in the embodiment of the present application.
[0202] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0203] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0204] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0205] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can execute the method.
[0206] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0207] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0208] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit / module does not, in some cases, constitute a limitation on the unit itself.
[0209] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0210] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0211] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0212] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0213] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0214] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0215] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An updating method, characterized in that: The method comprises: Displaying a target page, wherein the target page includes at least one component; In response to a component update request triggered for a target component in at least one of the components, the target component in the target page is updated based on component update description data corresponding to the target component, the component update description data including image update representation data, the image update representation data being used to indicate whether the image data in the target component is updated, the image update representation data being determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
2. The method according to claim 1, characterized in that If there is a difference between the original image address and the target image address, and the at least one stored image address includes the original image address, the image update representation data is used to indicate that the image data in the target component is not updated.
3. The method according to claim 1, characterized in that The process of determining the image update representation data includes: Obtaining an original image address corresponding to the target component and a target image address corresponding to the target component; Comparing the original image address with the target image address to obtain an address comparison result; If the address comparison result indicates that there is a difference between the original image address and the target image address, determining whether the original image address is stored in the preset storage space according to at least one stored image address stored in the preset storage space; If the original image address is stored in the preset storage space, the preset retention representation data is determined as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated.
4. The method according to claim 1, characterized in that: The image update representation data is determined based on a comparison result between the original image address and the target image address, at least one stored image address stored in the preset storage space, and a comparison result between image description data corresponding to the original image address and image description data corresponding to the target image address.
5. The method according to claim 4, characterized in that The image description data includes image modification time and / or image identification.
6. The method according to claim 4, characterized in that If there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and a comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address satisfies a preset condition, the image update representation data is used to indicate that the image data in the target component is not updated; and / or, If there is a difference between the original image address and the target image address, the at least one stored image address includes the original image address, and the comparison result between the image description data corresponding to the original image address and the image description data corresponding to the target image address does not meet the preset condition, then the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
7. The method according to claim 4, characterized in that The process of determining the image update representation data includes: If there is a difference between the original image address and the target image address, and the original image address is stored in the preset storage space, then acquiring image description data corresponding to the original image address and image description data corresponding to the target image address; Comparing the image description data corresponding to the original image address with the image description data corresponding to the target image address to obtain a data comparison result; If the data comparison result satisfies a preset condition, determining the preset retention representation data as the image update representation data, so that the image update representation data is used to indicate that the image data in the target component is not updated; If the data comparison result does not meet the preset condition, the image update representation data is determined according to the target image address, so that the image update representation data is used to indicate that the image data in the target component is updated according to the target image address.
8. The method according to claim 6 or 7, characterized in that: The image description data includes an image identifier; The preset condition includes that the image identifier corresponding to the original image address is the same as the image identifier corresponding to the target image address.
9. The method according to claim 8, characterized in that The image description data also includes image modification time; The preset condition also includes that the image modification time corresponding to the original image address is the same as the image modification time corresponding to the target image address.
10. The method according to claim 1, characterized in that The component update description data is determined based on the original description information corresponding to the target component and the target description information corresponding to the target component; The original description information at least includes the original image address; The target description information at least includes the target image address.
11. The method according to claim 10, characterized in that The component updates the determination process of the description data, including: If the original description information belongs to the preset single information type, and the target description information belongs to the preset single information type, determining whether the original description information satisfies the image address condition, and determining whether the target description information satisfies the image address condition; If the original description information satisfies the image address condition and the target description information satisfies the image address condition, the component update description data is determined according to the comparison result between the original description information and the target description information and at least one storage image address stored in the preset storage space.
12. The method according to claim 10, characterized in that The component updates the determination process of the description data, including: If the original description information belongs to the preset information aggregation type, and the target description information belongs to the preset information aggregation type, initializing the target position; Determine the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information; Determine the information update description data corresponding to the target position according to the information at the target position in the original description information, the information at the target position in the target description information, and the type characterization data; Update the target position, and continue to execute the steps of determining the type characterization data of the information at the target position in the original description information and the type characterization data of the information at the target position in the target description information, until a preset stop condition is reached, and the description data is updated based on the information to determine that the component updates the description data.
13. The method according to claim 1, characterized in that The preset storage space is an image address buffer pool.
14. An updating device, characterized in that: include: A display unit, used to display a target page, wherein the target page includes at least one component; An update unit is used to respond to a component update request triggered for a target component in the at least one component, and to update the target component in the target page according to component update description data corresponding to the target component, wherein the component update description data includes image update representation data, and the image update representation data is used to indicate whether the image data in the target component is updated, and the image update representation data is determined based on a comparison result between an original image address corresponding to the target component and a target image address corresponding to the target component, and at least one stored image address stored in a preset storage space.
15. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory so that the electronic device executes the method according to any one of claims 1 to 13.
16. A computer readable medium, characterized in that The computer-readable medium stores instructions or computer programs, and when the instructions or computer programs are executed on a device, the device executes the method according to any one of claims 1 to 13.