Data processing method and device, electronic equipment, medium and product
By retrieving the content unit data corresponding to the flag field from the local pre-stored database when a page open request is received, the problem of blank or no data on the client side under poor network conditions is solved, and the effect of allowing users to browse valid data even without a network is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2026-03-31
AI Technical Summary
Existing applications display a blank or data-free startup screen when network quality is poor or there is no network, resulting in a poor user experience.
When a request to open the target page is received, the flag field corresponding to the initial set of content units is obtained, and the content unit data corresponding to the target flag field is retrieved from the local pre-stored database. The target page is then rendered based on this data, avoiding the need to directly request all content unit data from the server.
Even when there is no network or the network quality is degraded, users can still browse valid data, avoiding blank or no data display and improving user experience.
Smart Images

Figure CN116089685B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, apparatus, electronic device, medium, and product. Background Technology
[0002] In existing applications, when a user enters a browsing page, the user's logged-in client needs to request data from the server in order to display the data returned by the server on the startup screen.
[0003] If the client encounters poor network quality or no network during the data request process, the client's startup screen will remain blank or without data, resulting in a poor user experience. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a data processing method, apparatus, electronic device, medium and product.
[0005] Firstly, this disclosure provides a data processing method, including:
[0006] In response to a request to open a target page, at least one first flag field corresponding to an initial content unit set is obtained, wherein the initial content unit set is a set of content units to be displayed in the list data of the target page;
[0007] Determine whether a second flag field exists in the local pre-stored database that is identical to the at least one first flag field. If so, use the second flag field as the target flag field, wherein the local pre-stored data stores the content unit data corresponding to the second flag field.
[0008] Retrieve the target content unit data corresponding to the target flag field from the local pre-stored database;
[0009] The target page is rendered based on the target content unit data.
[0010] In one possible design, before obtaining at least one first flag field corresponding to the initial set of content units, the method further includes:
[0011] Send a field retrieval request to the server, causing the server to issue the at least one first flag field.
[0012] In one possible design, after rendering the target page based on the target content unit data, the process further includes:
[0013] Determine whether a third flag field that is different from the at least one first flag field exists in the local pre-stored database; if so, then the third flag field is regarded as an unstored flag field.
[0014] Send a first data retrieval request to the server, wherein the first data retrieval request includes the identifier of the content unit data corresponding to the unstored flag field;
[0015] The server sends a first response message, which includes content unit data corresponding to the unstored flag field.
[0016] In one possible design, after receiving the first response message sent by the server, the process further includes:
[0017] Update the target content unit data based on the content unit data corresponding to the unstored flag field;
[0018] The target page is refreshed based on the updated target content unit data.
[0019] In one possible design, after receiving the first response message sent by the server, the process further includes:
[0020] Update the local pre-stored database based on the content unit data corresponding to the unstored flag field.
[0021] In one possible design, prior to sending the field retrieval request to the server, the following steps are also included:
[0022] Determine whether the request to open the target page meets the preset field retrieval rules. If so, execute the operation of sending a field retrieval request to the server.
[0023] The preset field acquisition rules include at least one of the following: number of historical page requests, number of historical page data acquisitions, and historical browsing duration.
[0024] In one possible design, when the preset field acquisition rule includes the number of historical page requests, determining whether the target page opening request meets the preset field acquisition rule includes:
[0025] Determine whether the number of historical page requests for the target page is greater than a preset threshold.
[0026] In one possible design, after determining whether the target page opening request meets the preset field retrieval rules, the method further includes:
[0027] If the request to open the target page does not meet the preset field retrieval rules, a second data retrieval request is sent to the server. The second data retrieval request includes the data identifier of the list data of the target page.
[0028] Receive a second response message sent by the server, the second response message including content unit data to be displayed in the list data;
[0029] Update the local pre-stored database based on the content unit data to be displayed.
[0030] Secondly, this disclosure provides a data processing apparatus, including:
[0031] The acquisition module is used to acquire at least one first flag field corresponding to the initial content unit set in response to the request to open the target page, wherein the initial content unit set is the set of content units to be displayed in the list data of the target page;
[0032] The determining module is used to determine whether there is a second flag field in the local pre-stored database that is the same as the at least one first flag field. If so, the second flag field is used as the target flag field, wherein the local pre-stored data stores the content unit data corresponding to the second flag field.
[0033] The acquisition module is also used to acquire target content unit data corresponding to the target flag field from the local pre-stored database;
[0034] The rendering module is used to render the target page based on the target content unit data.
[0035] In one possible design, it also includes: a sending module;
[0036] The sending module is used to send a field retrieval request to the server, so that the server sends the at least one first flag field.
[0037] In one possible design, it also includes: a receiving module;
[0038] The determining module is further configured to determine whether there is a third flag field in the local pre-stored database that is different from the at least one first flag field; if so, the third flag field is regarded as an unstored flag field.
[0039] The sending module is also used to send a first data acquisition request to the server, wherein the first data acquisition request includes the identifier of the content unit data corresponding to the unstored flag field;
[0040] The receiving module is used to receive a first response message sent by the server, wherein the first response message includes content unit data corresponding to the unstored flag field.
[0041] One possible design also includes: an update module and a refresh module;
[0042] The update module is used to update the target content unit data based on the content unit data corresponding to the unstored flag field;
[0043] The refresh module is used to refresh the target page based on the updated target content unit data.
[0044] In one possible design, the update module is also used to update the local pre-stored database based on the content unit data corresponding to the unstored flag field.
[0045] In one possible design, the determining module is also used to determine whether the opening request of the target page meets the preset field retrieval rules. If so, the operation of sending a field retrieval request to the server is executed.
[0046] The preset field acquisition rules include at least one of the following: number of historical page requests, number of historical page data acquisitions, and historical browsing duration.
[0047] In one possible design, the module is defined specifically for:
[0048] Determine whether the number of historical page requests for the target page is greater than a preset threshold.
[0049] In one possible design, the sending module is further configured to send a second data acquisition request to the server if the opening request of the target page does not meet the preset field acquisition rules, wherein the second data acquisition request includes a data identifier of the list data of the target page;
[0050] The receiving module is also configured to receive a second response message sent by the server, wherein the second response message includes content unit data to be displayed in the list data;
[0051] The update module is also used to update the local pre-stored database based on the content unit data to be displayed.
[0052] Thirdly, this disclosure provides an electronic device, including: a memory and a processor; the memory is used to store program instructions; the processor is used to invoke the program instructions in the memory to cause the electronic device to perform the data processing method of the first aspect and any possible design of the first aspect.
[0053] Fourthly, this disclosure provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the data processing method of the first aspect and any possible design of the first aspect.
[0054] Fifthly, this disclosure provides a computer program product that, when run on a computer, causes the computer to perform the data processing method of the first aspect and any possible design of the first aspect.
[0055] The data processing method, apparatus, electronic device, medium, and product provided in this disclosure can, after receiving a user-triggered request to open a target page, obtain at least one first flag field corresponding to an initial content unit set. The initial content unit set is a set of content units to be displayed in the list data of the target page. After determining that a second flag field identical to at least one first flag field exists in a locally stored database as a target flag field, the target content unit data corresponding to the target flag field is obtained from the locally stored database. The target page may include one or more initial content unit sets, each of which may correspond to a list data set. The target content unit data corresponding to the target flag field is the data corresponding to one or more content units in the list data. The target page is rendered based on the target content unit data to display the target content unit data to the user. This allows the user to browse valid data even without a network or with degraded network quality, thus avoiding blank or data-free display states during browsing. Users can directly browse valid data without waiting, effectively improving the user experience. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0057] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A schematic flowchart illustrating a data processing method provided in an embodiment of this disclosure;
[0059] Figure 2 This is a schematic diagram of an existing page refresh process;
[0060] Figure 3 A flowchart illustrating another data processing method provided in an embodiment of this disclosure;
[0061] Figure 4A A schematic diagram of a target page provided in an embodiment of this disclosure;
[0062] Figure 4B A schematic diagram of another target page provided in an embodiment of this disclosure;
[0063] Figure 5 A flowchart illustrating yet another data processing method provided in this disclosure embodiment;
[0064] Figure 6 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of the present disclosure. Detailed Implementation
[0065] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0066] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0067] For example, this disclosure provides a data processing method, apparatus, electronic device, medium, and product that, upon receiving a user-triggered request to open a target page, obtains at least one first flag field corresponding to an initial set of content units, wherein the initial set of content units is a set of content units to be displayed in the list data of the target page. After determining that a second flag field identical to at least one first flag field exists in a locally stored database as a target flag field, the target content unit data corresponding to the target flag field is obtained from the locally stored database. The target content unit data corresponding to the target flag field is data corresponding to one or more content units in the initial set of content units. The target page is then rendered based on the target content unit data to display the target content unit data to the user. This allows the user to browse valid data even when there is no network or the network quality is degraded, thereby avoiding blank or data-free display states during browsing. Users can directly browse valid data without waiting, effectively improving the user experience.
[0068] The data processing method disclosed herein is executed by a client installed in an electronic device. The electronic device can be a tablet computer, mobile phone, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), smart TV, smart screen, high-definition TV, 4K TV, smart speaker, smart projector, etc. This disclosure does not impose any restrictions on the specific type of electronic device.
[0069] This disclosure does not limit the type of operating system used in electronic devices. Examples include Android, Linux, Windows, and iOS.
[0070] Please see Figure 1 , Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this disclosure. Figure 1 As shown, the data processing method provided in this disclosure may include:
[0071] S110. In response to the request to open the target page, obtain at least one first flag field corresponding to the initial content unit set.
[0072] The initial content unit set is the set of content units to be displayed in the list data of the target page.
[0073] The electronic device can have multiple clients installed. Each client can display different list data corresponding to content units or content streams on the device's display interface. Users can switch between browsing list data corresponding to content units or content streams by swiping (e.g., swiping up or down) on the current page displayed in the client. Each content unit or content stream includes at least one piece of content.
[0074] The target page is the page to be displayed on the client. The target page may include one or more initial content unit sets. Each initial content unit set corresponds to a list of data. The list of data on the target page is one or more list data corresponding to the content unit data or content stream that the client displays in response to the request to open the target page.
[0075] For example, a target page may contain both a recommended user list and an online user list. The content unit data for the recommended user list and the online user list are obtained using different logics, and therefore are stored in different list data. In other words, the recommended user list may correspond to the first list data, and the online user list may correspond to the second list data. The target page may include both the first list data and the second list data.
[0076] The initial set of content units on the target page includes at least one content unit. The content unit data is the display data corresponding to the content unit. The first flag field is the flag field of the content unit data corresponding to the content unit. Each content unit data has a corresponding flag field, which is used to label the content unit data.
[0077] List data is a type of data in the form of a sequence with a similar structure, such as data composed of multiple user information stored in a data structure. Essentially, it can be regarded as a sequence, with each item in the sequence storing information about a user. A list data can include multiple content unit data.
[0078] For example, user information includes: user identifier (id), user nickname (nickName), user avatar, and user signature. Each piece of user information can be represented by the following data structure.
[0079]
[0080] Then, multiple content unit data can be displayed in the form of a list data. Multiple content unit data can represent multiple user information and can be formed into the following list format.
[0081]
[0082]
[0083] Based on the above examples, the sequence of flag fields corresponding to the above multiple content unit data can be represented as:
[0084]
[0085] It should be noted that a request to open a target page can be viewed as a request to retrieve or refresh the content unit data displayed on the target page. For the specific implementation process of existing page refresh operations, please refer to... Figure 2 , Figure 2 This is a schematic diagram of an existing page refresh process.
[0086] When the client detects a user's request to open a page (such as when the user actively enters the client's list page), the client requests a data interface from the server. The data interface is used to obtain the content unit data or content stream to be displayed in the list page. At the same time, while the client is requesting the data interface and the data interface has not yet returned, the client's list page does not display any data content from any content unit. During this time, the user cannot see any browsing content.
[0087] When the client receives the data returned by the server, it needs to serialize the returned content unit data. At the same time, during the serialization process, the client's list page will not display any data, and the user will still not see any browsing content.
[0088] After the client parses the list data into strings of data for display, the parsed datasets can be displayed on the list page for easy browsing by users.
[0089] During the above process, if the electronic device has a poor network connection or no network connection, the user may have to wait a long time to obtain the desired data information when entering the list page, or may not be able to obtain any data information at all.
[0090] This greatly reduces the user experience and also significantly impacts the stability of the client.
[0091] This disclosure addresses the problems existing in the prior art by allowing the client to obtain the first flag field corresponding to the content unit data included in the list data from the server instead of sending a data retrieval request to the server when it detects a request to open the target page. This reduces the time for information interaction between the server and the client and saves network traffic.
[0092] Based on the description of the above embodiments, optionally, before obtaining at least one first flag field corresponding to the initial content unit set, the method of this embodiment may further include:
[0093] Send a field retrieval request to the server, causing the server to send at least one first flag field.
[0094] In this process, after the client detects a request to open the target page, it sends a field retrieval request to the server to obtain the flag fields corresponding to all content unit data to be displayed in the list data of the target page.
[0095] Each content unit data may correspond to a first identifier field. The field identifier of the first identifier field may be a field name, field number, etc., which may be marked by the client according to actual needs. This disclosure does not limit this.
[0096] Therefore, after detecting a request to open the target page, the client does not need to request all the content unit data to be displayed from the server, but instead requests the first flag field corresponding to the content unit data to be displayed, thereby optimizing the server's response time.
[0097] In addition, before sending a field retrieval request to the server, the client can pre-set a judgment rule. This judgment rule is used to evaluate the field retrieval request / data retrieval request sent by the client to the server, so as to clarify the client's retrieval needs and reduce information redundancy when the server and the client interact.
[0098] In this embodiment, optionally, before sending a field retrieval request to the server, the method may further include:
[0099] Determine whether the request to open the target page meets the preset field retrieval rules. If so, execute the operation of sending a field retrieval request to the server.
[0100] The preset field retrieval rules include at least one of the following: number of historical page requests, number of historical page data retrievals, and historical browsing duration.
[0101] The client can set field retrieval rules based on user behavior, thereby effectively classifying the types of requests sent by the client to the server and improving the efficiency of data interaction with the server.
[0102] The historical page request count is the number of times a user requests the client to open the page displayed in the client. For example, the historical page request count will be incremented by 1 every time a user opens the client.
[0103] The types of requests that the client sends to the server may include: data type and field type; the data type is used to describe the content unit data that the client wants to obtain to be displayed, and the field type is used to describe the first field identifier corresponding to the content unit data that the client wants to obtain to be displayed.
[0104] Based on the above embodiments, when the preset field acquisition rules include the number of historical page requests, determining whether the target page opening request meets the preset field acquisition rules includes:
[0105] Determine whether the number of historical page requests for the target page exceeds a preset threshold.
[0106] Among them, a threshold can be preset to determine the number of historical page requests, which is used to measure whether the target page opening request meets the preset field acquisition rules.
[0107] For example, if it is determined that the number of historical page requests for the target page is greater than a preset threshold, then the opening request of the target page is determined to meet the preset field retrieval rules. The client does not need to request all the content unit data to be displayed from the server, but only requests the flag field corresponding to the content unit data to be displayed from the server, and retrieves the content unit data to be displayed from the local pre-stored database based on the received flag field, so as to directly respond to the user.
[0108] Therefore, by comparing the number of historical page requests to the target page with a preset threshold, the type of request to be sent to the server can be determined, thereby improving the transmission efficiency between the client and the server.
[0109] Examples of field retrieval rules are given for historical retrieval count and historical browsing duration.
[0110] For example, if the number of times the first user has retrieved data in the past exceeds a preset threshold, then the preset field retrieval rules are met, and the client sends a field retrieval request to the server.
[0111] The number of historical data retrievals can include the number of times a user refreshes the target page on the client.
[0112] Example 2: If the historical browsing duration of the first user is detected to exceed the preset duration threshold, it is determined that the preset field retrieval rules are met, and the client can send a field retrieval request to the server.
[0113] Historical browsing time may include the user's browsing time on the client and the user's browsing time on the target page within a preset time period.
[0114] In addition, the preset field acquisition rules are not limited to including the number of historical acquisitions or the historical browsing duration. They can also be based on the user's browsing habits in the client. For example, the field acquisition rules can be set based on the user's historical browsing habits (fixed browsing time, browsing duration associated with fixed browsing time). This disclosure does not limit the specific setting method of the field acquisition rules.
[0115] S120. Determine whether there is a second flag field in the local pre-stored database that is the same as at least one first flag field. If so, use the second flag field as the target flag field.
[0116] The local pre-stored data contains the content unit data corresponding to the second flag field.
[0117] The local pre-stored database is a database in the client that stores content unit data and the corresponding flag fields of the content unit data. It can be a sub-database of an existing database in the client or a newly created database in the client.
[0118] The client compares all the flag fields included in the local pre-stored database with all the flag fields included in at least one first flag field, and determines the flag fields containing some or all of the flag fields included in at least one first flag field in the local pre-stored database as target flag fields.
[0119] Based on the above example, assuming that all the flag fields included in at least one first flag field are {1, 2, 3}, and all the flag fields included in the local pre-stored database are {1, 2, 4, 5, 6}, then, based on the second flag fields in the local pre-stored database that are the same as at least one first flag field, which are field {1} and field {2}, the determined target flag fields are {1, 2}.
[0120] S130. Obtain the target content unit data corresponding to the target flag fields from the local pre-stored database.
[0121] Among them, the local pre-stored database stores multiple content units corresponding to list data. Each content unit corresponds to content unit data, and each content unit data can correspond to a second flag field. The client can directly, based on the target flag fields, quickly find the target content unit data corresponding to the target flag fields from the local pre-stored database according to the mapping relationship between the content unit data and the flag fields.
[0122] Combined with the above example, if the target flag fields are {1, 2}, the content unit data corresponding to the target flag field {1} is shown as follows:
[0123]
[0124]
[0125] Among them, nickName indicates that the user nickname is "Little A", avatar indicates that the storage name of the user avatar is " / avatar1.png", and signiture indicates that the user signature is "平常心".
[0126] The content unit data corresponding to the target flag field {2} is shown as follows:
[0127]
[0128] Among them, nickName indicates that the user nickname is "Little B", avatar indicates that the storage name of the user avatar is " / avatar2.png", and signiture indicates that the user signature is "努力".
[0129] It should be noted that the storage format of user avatars is not limited to "png", but can also include "jpeg", "jpg", "heic" and "bmp", etc.
[0130] S140. Render the target page based on the target content unit data.
[0131] The initial state of the target page is empty. After the client obtains the target content unit data that can be displayed, it renders all or part of the target content unit data onto the target page.
[0132] Based on the above examples, the identified target content unit data includes content unit data of field {1} and content unit data of field {2}. The client can display content unit data of field {1} and content unit data of field {2} simultaneously or sequentially, depending on the display requirements of the target page. For details, please refer to the following examples.
[0133] For example, if the target page of the client can display multiple content unit data at the same time, then after determining the content unit data to be displayed on the target page, the content unit data of field {1} and the content unit data of field {2} can be displayed on the target page at the same time.
[0134] Example 2: If the target page of the client can only display one content unit data, after determining the content unit data to be displayed on the target page, the content unit data of field {1} can be displayed on the target page first. After receiving the page refresh request triggered by the user, the content unit data of field {2} can be displayed on the target page.
[0135] Alternatively, the client can first display the content unit data of field {2} on the target page, and then display the content unit data of field {1} on the target page after receiving a page refresh request triggered by the user.
[0136] The data processing method provided in this disclosure can, after receiving a user-triggered request to open a target page, obtain at least one first flag field corresponding to an initial content unit set, wherein the initial content unit set is a set of content units to be displayed in the list data of the target page. After determining that a second flag field identical to at least one first flag field exists in the local pre-stored database as a target flag field, the target content unit data corresponding to the target flag field is obtained from the local pre-stored database. The target content unit data corresponding to the target flag field is data corresponding to one or more content units in the initial content unit set. The target page is then rendered based on the target content unit data to display the target content unit data to the user. This allows the user to still browse valid data even when there is no network or the network quality is degraded, thereby avoiding blank or data-free display states during browsing. Users can directly browse valid data without waiting, effectively improving the user experience.
[0137] Figure 3 This is a flowchart illustrating another data processing method provided in this embodiment. Based on the above embodiment, this embodiment further includes, after S140, the method of this embodiment:
[0138] S150. Determine whether a third flag field exists in the local pre-stored database that is different from at least one first flag field. If so, treat the third flag field as an unstored flag field.
[0139] Specifically, the client compares all the flag fields included in at least one first flag field with all the flag fields included in the local pre-stored database, and determines the third flag field whose at least one first flag field is different from the flag fields in the local pre-stored database as an unstored flag field.
[0140] Based on the example that all the flag fields included in at least one first flag field are {1,2,3} and all the flag fields included in the local pre-stored database are {1,2,4,5,6}, and based on the fact that the third flag field determined by at least one first flag field and the local pre-stored database is field {3}, the determined unstored flag field is field {3}.
[0141] S160, Send the first data retrieval request to the server.
[0142] The first data acquisition request includes the identifier of the content unit data corresponding to the unstored flag field.
[0143] When the client determines that at least one of the first flag fields contains an unstorable flag field, it can obtain the content unit data corresponding to the unstorable flag field from the server through data interaction with the server.
[0144] The identifier for the content unit data corresponding to the unstored flag field can be either the data name or the data number of the content unit data corresponding to the unstored flag field.
[0145] In addition, the server stores a flag field and the corresponding content unit data. The first data retrieval request sent by the client to the server can carry an identifier for the content unit data corresponding to the flag field that is not stored, so that the server can quickly find the corresponding content unit data directly based on the identifier; or, the first data retrieval request sent by the client to the server can carry a field identifier for the flag field that is not stored, so that the server can search for the corresponding content unit data based on the field identifier mapping.
[0146] S170. Receive the first response message sent by the server, the first response message including the content unit data corresponding to the unstored flag field.
[0147] Specifically, after receiving the content unit data corresponding to the unstored flag field sent by the server, the client can establish the association between the content unit data and its corresponding flag field, and store the content unit data, the flag field corresponding to the content unit data, and the association between the content unit data and its corresponding flag field.
[0148] Therefore, when the client cannot find the content unit data corresponding to a certain flag field in the local pre-stored database, it can supplement the missing content unit data in the content unit data to be displayed on the target page through interaction with the server, so as to achieve the integrity of the data in the target page.
[0149] In this embodiment, after receiving the content unit data corresponding to the unstored flag field sent by the server, the client can also update the local pre-stored database based on the content unit data.
[0150] Optionally, after the client receives the first response message sent by the server, the method in this embodiment may further include:
[0151] Update the local pre-stored database based on the content unit data corresponding to the unstored flag field.
[0152] Specifically, the content unit data corresponding to the unstored flag field, the unstored flag field, and the association between the unstored flag field and the content unit data corresponding to the unstored flag field can be added to the client's local pre-stored database.
[0153] Therefore, by adding the content unit data corresponding to the unstored flag field to the local pre-stored database, the data integrity of the client's local pre-stored database is improved, making it easier to respond to different users' requests to open multiple pages.
[0154] Furthermore, the client can update the content unit data already displayed on the target page based on the content unit data corresponding to the unstored flag field sent by the server, so that the new content unit data can be inserted into the content unit data displayed on the target page without the user's awareness.
[0155] S180. Update the target content unit data based on the content unit data corresponding to the unstored flag field, and refresh the target page based on the updated target content unit data.
[0156] Once the client identifies the content unit data corresponding to the unstored flag field, it can forcefully insert that content unit data into the display data of the target page, allowing users to browse the new content unit data without being aware of it.
[0157] The example of adding the content unit data corresponding to the unstored flag field to the target page is provided for illustration; among them, Figure 4A The target page is rendered based on the content unit data corresponding to the target flag field. Figure 4B To update the target content unit data based on the content unit data corresponding to the unstored flag field, and then refresh the target page based on the updated target content unit data, the refreshed target page is obtained.
[0158] Based on the above example, assuming that the target page can display two content unit data at the same time, the target content unit data corresponding to the target flag field are the content unit data of field {1} and the content unit data of field {2}, and the content unit data corresponding to the unstored flag field is the content unit data of field {3}.
[0159] For example, the client can display multiple content unit data on the target page according to rules related to the list data, such as the original generation time of the content unit data, the data update time, or the online status of the data owner.
[0160] For example, if the sorting rules of the refreshed page are based on the online status of the data owners, the content units corresponding to online data owners can be arranged at the top.
[0161] For example, if the original generation time of the content unit data in field {1} is later than the original generation time of the content unit data in field {2}, it can be done as follows: Figure 4A As shown in the example, the content unit data of field {1} can be displayed in the first display position of the target page, and the content unit data of field {2} can be displayed in the second display position of the target page. The first display position can be the display area above the second display position.
[0162] When the client determines that the content unit data corresponding to the unstored flag field is the content unit data of field {3}, it can replace the content unit data of field {1} with the content unit data of field {3} according to the original generation time / data update time of the content unit data, or replace the content unit data of field {2} with the content unit data of field {3}.
[0163] If the original generation time of the content unit data in field {1} is earlier than the original generation time of the content unit data in field {2}, then... Figure 4B As shown in the example, the content unit data of field {1} is replaced with the content unit data of field {3} for display.
[0164] Figure 5 This is a flowchart illustrating another data processing method provided in this embodiment. Based on the above embodiments, this embodiment further includes, after determining that the target page opening request does not meet the preset field acquisition rules, the method of this embodiment may also include:
[0165] S111. Send a second data retrieval request to the server. The second data retrieval request includes the data identifier of the list data of the target page.
[0166] The client can obtain data from the server in advance and store it in a local pre-stored database to populate the local pre-stored database, so that the data can be displayed directly when a user requests it.
[0167] In addition, the server stores multiple content unit data corresponding to multiple list data, as well as a corresponding flag field for each content unit data. The second data retrieval request sent by the client to the server can carry the data identifier of the list data of the target page, so that the server can directly and quickly find the corresponding list data based on the data identifier; or, the second data retrieval request sent by the client to the server can carry the field identifier of the flag field corresponding to the list data of the target page, so that the server can search for the corresponding list data based on the field identifier mapping.
[0168] S112. Receive a second response message sent by the server, the second response message including the content unit data to be displayed in the list data.
[0169] After receiving the content unit data to be displayed in the list data sent by the server, the client can establish the association between the content unit data and its corresponding flag field, and store the content unit data, the flag field corresponding to the content unit data, and the association between the content unit data and its corresponding flag field.
[0170] S113. Update the local pre-stored database based on the content unit data to be displayed.
[0171] Specifically, the content unit data to be displayed, the corresponding flag field of the content unit data, and the association between the content unit data to be displayed and the corresponding flag field can be added to the client's local pre-stored database.
[0172] Therefore, by adding the content unit data to be displayed from the list data of the target page to the local pre-stored database, the data in the client's local pre-stored database is expanded, increasing the data storage capacity of the local pre-stored database.
[0173] The determination that the target page opening request does not meet the preset field retrieval rules can be achieved in the following way.
[0174] The following examples illustrate the rules for retrieving historical data and the duration of historical browsing.
[0175] For example, if the number of historical data retrievals by a second user does not exceed a preset threshold N, it is determined that the preset field retrieval rules are not met, and the client can send a data retrieval request to the server. Therefore, when the number of historical data retrievals by a user does not exceed the preset threshold, all data can be retrieved from the server to update and maintain data in the locally pre-stored database. For instance, N=3. By repeatedly retrieving all data, data accuracy is ensured, and data stability is effectively improved.
[0176] The number of historical data retrievals can include the number of times a user refreshes the target page on the client.
[0177] For example, if the historical browsing duration of the second user is not detected to exceed the preset duration threshold, it is determined that the preset field acquisition rules are not met, and the client can send a data acquisition request to the server.
[0178] Therefore, before sending a second data retrieval request to the server, it is determined whether the preset field retrieval rules are met, so as to determine the type of request that the client needs to send to the server. This allows the server to respond directly based on the type of request sent by the client, avoiding the repeated transmission of the same data.
[0179] In addition, the preset field acquisition rules are not limited to including the number of historical acquisitions or the historical browsing duration. They can also be based on the user's browsing habits in the client. For example, the field acquisition rules can be set based on the user's historical browsing habits (fixed browsing time, browsing duration associated with fixed browsing time). This disclosure does not limit the specific setting method of the field acquisition rules.
[0180] Figure 6 This is a schematic diagram of the structure of a data processing device provided in this disclosure, such as... Figure 6 As shown, the data processing device 600 of this embodiment includes: an acquisition module 610, a determination module 620, and a rendering module 630, wherein:
[0181] The acquisition module 610 is used to acquire at least one first flag field corresponding to the initial content unit set in response to the request to open the target page, wherein the initial content unit set is the set of content units to be displayed in the list data of the target page;
[0182] The determining module 620 is used to determine whether there is a second flag field in the local pre-stored database that is the same as the at least one first flag field. If so, the second flag field is used as the target flag field. The local pre-stored data stores the content unit data corresponding to the second flag field.
[0183] The acquisition module 610 is also used to acquire target content unit data corresponding to the target flag field from the local pre-stored database;
[0184] The rendering module 630 is used to render the target page based on the target content unit data.
[0185] In this embodiment, optionally, the device further includes a transmitting module;
[0186] The sending module is used to send a field retrieval request to the server, so that the server sends the at least one first flag field.
[0187] In this embodiment, optionally, the device further includes a receiving module;
[0188] The determining module 620 is further configured to determine whether there is a third flag field in the local pre-stored database that is different from the at least one first flag field; if so, the third flag field is regarded as an unstored flag field.
[0189] The sending module is also used to send a first data acquisition request to the server, wherein the first data acquisition request includes the identifier of the content unit data corresponding to the unstored flag field;
[0190] The receiving module is used to receive a first response message sent by the server, wherein the first response message includes content unit data corresponding to the unstored flag field.
[0191] In this embodiment, optionally, it also includes: an update module and a refresh module;
[0192] The update module is used to update the target content unit data based on the content unit data corresponding to the unstored flag field;
[0193] The refresh module is used to refresh the target page based on the updated target content unit data.
[0194] In this embodiment, optionally, the update module is further configured to update the local pre-stored database based on the content unit data corresponding to the unstored flag field.
[0195] In this embodiment, optionally, the determining module 620 is further configured to determine whether the opening request of the target page meets the preset field acquisition rules. If so, the operation of sending a field acquisition request to the server is performed. The preset field acquisition rules include at least one of the following: the number of historical page requests, the number of historical page data acquisitions, and the historical browsing duration.
[0196] In this embodiment, optionally, the determining module 620 is specifically used for:
[0197] Determine whether the number of historical page requests for the target page is greater than a preset threshold.
[0198] In this embodiment, optionally, the sending module is further configured to send a second data acquisition request to the server if the opening request of the target page does not meet the preset field acquisition rules, wherein the second data acquisition request includes the data identifier of the list data of the target page;
[0199] The receiving module is also configured to receive a second response message sent by the server, wherein the second response message includes content unit data to be displayed in the list data;
[0200] The update module is also used to update the local pre-stored database based on the content unit data to be displayed.
[0201] The data processing apparatus provided in this disclosure can execute the above-described method embodiments. For its specific implementation principles and technical effects, please refer to the above-described method embodiments. This disclosure will not repeat them here.
[0202] For example, this disclosure provides an electronic device including: one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; and when the one or more processors execute the one or more computer programs, the electronic device causes the electronic device to implement the data processing method of the foregoing embodiments.
[0203] For example, this disclosure provides a chip system applied to an electronic device including a memory and a sensor; the chip system includes: a processor; when the processor executes the data processing method of the preceding embodiments.
[0204] For example, this disclosure provides a computer-readable storage medium having a computer program stored thereon, the computer program being processed by a processor to cause an electronic device to implement the data processing method of the preceding embodiments.
[0205] For example, this disclosure provides a computer program product that, when run on a computer, causes the computer to execute the data processing method described in the preceding embodiments.
[0206] In the above embodiments, all or part of the functionality can be implemented by software, hardware, or a combination of software and hardware. When implemented using software, it can be implemented wholly or partially in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0207] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0208] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily 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 this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized by, The method comprises: In response to an opening request of a target page, it is determined whether the opening request of the target page meets a preset field acquisition rule, the field acquisition rule being used to indicate that a local pre-stored database includes a flag field in at least one first flag field; in response to a determination that the opening request of the target page meets the preset field acquisition rule, a field acquisition request is sent to a server, so that the server issues the at least one first flag field corresponding to an initial content unit set, the initial content unit set being a set of content units to be displayed in list data of the target page; The at least one first flag field is acquired from the server; It is determined whether a second flag field in the at least one first flag field exists in the local pre-stored database, and if so, the second flag field is taken as a target flag field, wherein the local pre-stored data stores content unit data corresponding to the second flag field; Target content unit data corresponding to the target flag field is acquired from the local pre-stored database; The target page is rendered based on the target content unit data.
2. The method of claim 1, wherein, After the target page is rendered based on the target content unit data, the method further comprises: It is determined whether a third flag field in the at least one first flag field does not exist in the local pre-stored database, and if so, the third flag field is taken as an un-stored flag field; A first data acquisition request including an identifier of content unit data corresponding to the un-stored flag field is sent to the server; A first response message sent by the server is received, the first response message including the content unit data corresponding to the un-stored flag field.
3. The method of claim 2, wherein, After the first response message sent by the server is received, the method further comprises: The target content unit data is updated based on the content unit data corresponding to the un-stored flag field; The target page is refreshed based on the updated target content unit data.
4. The method of claim 2, wherein, After the first response message sent by the server is received, the method further comprises: The local pre-stored database is updated based on the content unit data corresponding to the un-stored flag field.
5. The method of claim 1, wherein, The preset field acquisition rule includes at least one of a historical page request number greater than a preset threshold, a historical page data acquisition number greater than a preset number threshold, and a historical browsing time length greater than a preset time length threshold.
6. The method of claim 5, wherein, When the preset field acquisition rule includes a historical page request number, the determination of whether the opening request of the target page meets the preset field acquisition rule comprises: It is determined whether the historical page request number of the target page meets a condition of being greater than a preset threshold.
7. The method of claim 5, wherein, After the determination of whether the opening request of the target page meets the preset field acquisition rule, the method further comprises: If the opening request of the target page does not meet the preset field acquisition rule, a second data acquisition request including a data identifier of list data of the target page is sent to the server; A second response message sent by the server is received, the second response message including content unit data to be displayed in the list data; Update a local pre-stored database based on the to-be-presented content unit data.
8. A data processing apparatus, characterized by, The method comprises the steps of: The acquisition module is configured to, in response to an opening request for a target page, determine whether the opening request for the target page satisfies a preset field acquisition rule, the field acquisition rule being used to indicate a flag field in at least one first flag field in a local pre-stored database; and in response to a determination that the opening request for the target page satisfies the preset field acquisition rule, send a field acquisition request to a server, so that the server issues the at least one first flag field corresponding to an initial content unit set, the initial content unit set being a set of to-be-presented content units in list data of the target page. The at least one first flag field is acquired from the server. The determination module is configured to determine whether a second flag field in the at least one first flag field exists in the local pre-stored database, and if so, take the second flag field as a target flag field, wherein the local pre-stored data stores content unit data corresponding to the second flag field. The acquisition module is further configured to acquire target content unit data corresponding to the target flag field from the local pre-stored database. The rendering module is configured to render the target page based on the target content unit data.
9. An electronic device, comprising: One or more processors; Memory; And one or more computer programs; wherein the one or more computer programs are stored in the memory; characterized in that the one or more processors, when executing the one or more computer programs, cause the electronic device to implement the data processing method of any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer program product comprises computer instructions, when the computer instructions run on the electronic device, cause the electronic device to execute the data processing method of any one of claims 1-7.
11. A computer program product, characterised in that, When the computer program product runs on the computer, the computer executes the data processing method of any one of claims 1-7.
Citation Information
Patent Citations
Method and device for loading page picture and electronic equipment
CN110096660A
Method and device for loading first screen of page by browser application
CN111339455A