A method, device, electronic device and storage medium for acquiring content data of application object

By determining the object in the terminal and sending a content request, and acquiring the content data of the application object, the problem of long waiting time when acquiring online data in the prior art is solved, and the content data is quickly obtained and displayed.

CN112395520BActive Publication Date: 2025-02-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910756528.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-16
Publication Date
2025-02-14
Estimated Expiration
2039-12-20

AI Technical Summary

Technical Problem

In the prior art, online data in the application needs to be established with the server each time it is requested, resulting in a user having to wait a long time to acquire and display online data.

Method used

By determining the requested object in the terminal and sending a content request according to the object request preset rule, receiving a content reply from the requesting node, thereby obtaining the content data of the requested object.

Benefits of technology

Reduces the time to obtain the requested object, realizes the rapid opening of the content data of the requested object, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395520B_ABST
    Figure CN112395520B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for obtaining content data of an application object. The method includes determining an object requested by an object request indication in an application, and determining at least one content request of the requested object according to the requested object and a preset rule of the object request; wherein each content request carries parameter information of a requesting node. At least one content request is sent based on the parameter information of the requesting node, and a content reply returned by at least one requesting node is received, and content data of the requested object is determined from the content reply. Since the content data of the requested object can be obtained from at least one content reply returned by at least one requesting node according to at least one content request, the content data of the requested object can be quickly opened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for acquiring content data of an application object. Background Art

[0002] With the rapid development of Internet technology, more and more data on the Internet can be provided to users for browsing and viewing. In order to increase the convenience of data reading, users can obtain various forms of online data in applications through terminals for browsing and viewing.

[0003] In the prior art, the online data in the application is a pure page. Every time a user opens the online data, the terminal needs to establish a connection with the server that provides the online data and send a data request to the server. Correspondingly, after receiving the data request, the server sends a data reply corresponding to the data request to the terminal, and the data reply contains the requested online data. Subsequently, the terminal renders and displays the online data as a web page. However, if the user needs to request the online data from the server every time he requests the online data, the user needs to wait for a long time to obtain and display the online data.

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for obtaining content data of an application object, so that a terminal can reduce the time for obtaining a requested object and can quickly open the content data of the requested object. Summary of the invention

[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for obtaining content data of an application object, so that a terminal can reduce the time for obtaining a requested object and can quickly open the content data of the requested object.

[0006] On the one hand, an embodiment of the present application provides a method for obtaining content data of an application object, the method comprising:

[0007] determining the object requested by the object request indication in the application;

[0008] Determining at least one content request of the requested object according to the requested object and the preset rule of the object request; wherein each content request carries parameter information of the requesting node;

[0009] Sending at least one content request based on parameter information of the requesting node, and receiving a content reply returned by at least one requesting node;

[0010] Determine the content data of the requested object from the content response.

[0011] On the other hand, a device for obtaining content data of an application object is provided, the device comprising:

[0012] A first determining module, used for determining an object requested by an object request indication in an application program;

[0013] A second determination module, configured to determine at least one content request of the requested object according to the requested object and a preset rule for object request; wherein each content request carries parameter information of a requesting node;

[0014] A transceiver module, configured to send at least one content request based on parameter information of a requesting node, and receive a content reply returned by at least one requesting node;

[0015] The third determination module is used to determine the content data of the requested object from the content reply.

[0016] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the content data acquisition method of the application object as described above.

[0017] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the content data acquisition method of the application object as described above.

[0018] The content data acquisition method and device of the application object provided by the embodiments of the present application, the electronic device and the storage medium have the following technical effects:

[0019] Determine the object requested by the object request indication in the application, and determine at least one content request of the requested object according to the requested object and the preset rule of the object request; wherein each content request carries parameter information of the requesting node. Send at least one content request based on the parameter information of the requesting node, receive a content reply returned by at least one requesting node, and determine the content data of the requested object from the content reply. Since the terminal can obtain the content data of the requested object from at least one content reply returned by at least one requesting node according to at least one content request, so that the terminal does not only obtain the content data from the server, the time for obtaining the requested object can be reduced, and the content data of the requested object can be quickly opened. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0022] Figure 2 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application;

[0023] Figure 3 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application;

[0024] Figure 4 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application;

[0025] Figure 5 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application;

[0026] Figure 6 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application;

[0027] Figure 7 It is a structural diagram of a content data acquisition device for an application object provided in an embodiment of the present application;

[0028] Figure 8 It is a hardware structure block diagram of a server of a method for acquiring content data of an application object provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 making creative work are within the scope of protection of this application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] See also Figure 1 , Figure 1 It is a schematic diagram of an application environment provided in an embodiment of the present application, including a server 101 and a terminal 102 . The server 101 may be a server that provides services for an application on the terminal 102 .

[0032] In the embodiment of the present application, the terminal 102 determines the object requested by the object request indication in the application, and can determine at least one content request of the requested object according to the determined requested object and the preset rule of the object request, wherein each content request can carry parameter information of the requesting node. The terminal 102 sends at least one content request based on the parameter information of the requesting node, receives a content reply returned by at least one requesting node, and determines the content data of the requested object from the content reply.

[0033] Optionally, at least one requesting node may include a server 101, so that when the terminal 102 sends a content request corresponding to the requested object, the interception layer in the terminal 102 may send the content request to the server 101 based on the parameter information in the content request. Correspondingly, the server 101 may provide the terminal 102 with the content data of the requested object, and after receiving the content data of the requested object, the terminal 102 displays the content data on the display interface of the terminal 102.

[0034] Optionally, at least one requesting node may include terminal 102. In this way, when terminal 102 sends a content request corresponding to the requested object, the interception layer in terminal 102 can intercept the content request based on the parameter information of the requesting node in the content request, and obtain the content data of the requested object from the local cache of terminal 102 according to the content request, and display the content data on the display interface of terminal 102.

[0035] In the embodiment of the present application, the terminal 102 may be a wearable device such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a smart watch, etc. Optionally, the server 101 and the terminal 102 may be connected via a wireless link.

[0036] The following describes a specific embodiment of a method for obtaining content data of an application object of the present application. Figure 2 It is a flowchart of a method for obtaining content data of an application object provided in an embodiment of the present application. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:

[0037] S201: Determine the object requested by the object request indication in the application.

[0038] In the embodiment of the present application, the above application may be different types of applications, for example, social applications, music applications, information applications, etc. The requested object may be data opened and displayed based on the above application, and the requested object may include any one of document data, table data, video data, audio data, and picture data.

[0039] Optionally, before determining the requested object, the terminal may determine the object request indication, so that the terminal may parse the requested object according to the object request indication. The embodiment of the present application describes how to determine the object request indication through the following multiple optional implementations:

[0040] In an optional implementation, the terminal may determine the object request indication by detecting a triggering operation in which a display interface area corresponding to the indication information of the requested object is touched.

[0041] Specifically, assuming that the requested object is a piece of picture data on a certain application, optionally, the indication information of the picture data may be a virtual icon of the picture data displayed on the display interface of the terminal. When the terminal does not detect that the display interface area corresponding to the virtual icon of the picture data is touched, the terminal does not obtain the object request indication corresponding to the picture data. When the terminal detects that the display interface area corresponding to the virtual icon of the picture data is touched, the terminal can obtain the object request indication corresponding to the picture data, so that the terminal can parse the requested object as the picture data according to the object request indication. Optionally, the user may touch the display interface area of ​​the virtual icon of the picture data, or the user's touch device, such as a stylus.

[0042] In another optional implementation, the terminal may determine the object request indication by detecting a triggering operation in which indication information of the requested object is displayed on a display interface.

[0043] Based on the fact that the requested object is picture data, the specific application of this implementation method is further explained. For example, the application is a chat and social application, and the indication information of the requested object is detected and displayed on the display interface, which can be represented as a virtual icon of the picture data displayed on the display interface of the terminal. In this chat and social application, if the sender of the picture data sends the picture data to the terminal, the display screen of the terminal is in a black screen state, and the terminal will not obtain the object request indication corresponding to the picture data; if the sender of the picture data sends a lot of text data before sending the picture data, so that the virtual icon of the picture data is not displayed on the display interface, the terminal will not obtain the object request indication corresponding to the picture data. In this implementation method, only when the virtual icon of the picture data is displayed on the display interface, the terminal can obtain the object request indication corresponding to the picture data, and parse from the object request indication that the requested object is the picture data.

[0044] This optional implementation does not require the user to touch the display interface area of ​​the virtual icon of the image data, and can obtain the object request indication corresponding to the image data, and then determine that the requested object is the image data, so that the terminal can obtain the image data in advance. When the user needs to open the image data, the opening time of the image data is reduced, thereby improving the user experience.

[0045] In another optional implementation, the terminal may determine the object request indication through the historical operation behavior of the object in the application.

[0046] Based on the above-mentioned requested object being picture data, the application is a chat and social application to illustrate the specific application of this implementation method. Assuming that the sender of the picture data has sent a lot of picture data before sending the picture data, and some of the picture data among the lot of picture data have been opened and displayed by the user, the terminal can obtain the object request indication corresponding to the picture data through pre-judgment, and parse the requested object from the object request indication to determine that it is the picture data.

[0047] In this way, the terminal can determine the object request indication through the historical operation of the object in the application, and then determine that the requested object is the image data, so that the terminal can obtain the image data in advance. When the user needs to open the image data, the opening time of the image data is reduced, thereby improving the user experience.

[0048] S203: Determine at least one content request of the requested object according to the requested object and a preset rule for object request, wherein each content request carries parameter information of a requesting node.

[0049] In the embodiment of the present application, the object request preset rule is pre-set to specify the type and number of content requests that need to be sent to the requesting node when the terminal requests different requested objects. The object request preset rule will be described in detail in the specific embodiment below.

[0050] S205: Send at least one content request based on the parameter information of the requesting node.

[0051] In the embodiment of the present application, the parameter information of the requesting node is the judgment standard of which requesting node to send the content request in which way after the terminal determines at least one content request, that is, the judgment standard of which requesting node to obtain the content reply from. The parameter information of the requesting node will be described in detail in the specific embodiment below.

[0052] In an embodiment of the present application, at least one content request may be a first type request, and the parameter information of the request node carried by the first type request is the first type parameter information. At least one content request may be one or more second type requests, and the parameter information of the request node carried by the second type request is the second type parameter information. Optionally, the first type request may be a POST request based on the HyperText Transfer Protocol (HTTP), and the second type request may be a GET request based on HTTP.

[0053] S207: Receive a content reply returned by at least one requesting node.

[0054] In the embodiment of the present application, at least one requesting node includes at least one of a server providing services for an application and a local cache of a terminal.

[0055] S209: Determine the content data of the requested object from the content response.

[0056] Several specific embodiments will be described below in conjunction with steps S201 to S209:

[0057] In an optional embodiment, the terminal may send a first type request to the server based on the first type parameter information carried in the first type request, and receive a first type reply sent by the server, wherein the first type reply includes content data of the requested object.

[0058] For example, assuming that the requested object is reporting information within a certain application, such as error reporting information, then at least one content request is a first type request. Figure 3 is a flow chart of a method for obtaining content data of an application object provided in an embodiment of the present application, such as Figure 3 As shown:

[0059] S301: The terminal determines the object request indication by detecting a triggering operation in which a display interface area corresponding to the indication information of the requested object is touched.

[0060] In an actual application scenario, if the user finds that an error occurs in the application, the user can click the display interface area of ​​the error reporting virtual button, so that the terminal can obtain the object request indication.

[0061] S303: The terminal parses the object request indication to find that the requested object is error reporting information in the application.

[0062] S305: The terminal determines from the preset rule of the object request that at least one content request for error reporting information is a first type request, and the first type request carries first type parameter information;

[0063] Optionally, the first type request may be a POST request based on HTTP, and the first type parameter information is a POST parameter in a header of a POST request packet.

[0064] S307: The interception layer (native layer) of the terminal intercepts the first type request and obtains the first type parameter information.

[0065] S309: The terminal sends the first type request to the server corresponding to the application based on the first type parameter information.

[0066] S311: Correspondingly, the server receives the first type request and sends a first type reply to the terminal.

[0067] S313: The terminal parses the first type of reply to obtain content data of the requested object.

[0068] Optionally, the content data of the requested object may be the report result reply information of the error report information, such as "Report successful". Optionally, the content data of the requested object may be the report feedback reply information of the error report information, such as "Cause of error: virus attack, fixed".

[0069] S315: The terminal displays the content data on the display interface.

[0070] Optionally, after the terminal obtains the content data, it may also display a prompt message, where the prompt message is used to prompt the user to view the content data.

[0071] In another optional embodiment, at least one second type request is a first content request, and the terminal can obtain the content data of the requested object from the local cache based on the second type parameter information of the first content request, and if the content data of the requested object exists in the local cache, the content data is obtained, otherwise the first content request is sent to the server. The terminal receives a first content reply sent by the server, the first content reply includes the content data of the requested object, and the content data is stored in the local cache.

[0072] For example, assuming that the requested object is a static, persistent resource within an application, such as keyboard data, image data, video data, or audio data, then at least one content request is a second type request. The following describes an optional implementation scheme based on the requested object being image data. Figure 4 is a flow chart of a method for obtaining content data of an application object provided in an embodiment of the present application, such as Figure 4 As shown:

[0073] S401: The terminal determines the object request indication by detecting a triggering operation in which a display interface area corresponding to the indication information of the requested object is touched.

[0074] In an actual application scenario, assuming that a user finds a virtual icon displaying image data in a social application, the user can click on the display interface area of ​​the virtual icon, so that the terminal can obtain the object request indication.

[0075] S403: The terminal parses the object request indication to find that the requested object is picture data in the application.

[0076] S405: The terminal determines from the preset rule of the object request that at least one content request for the picture data is a first content request in the second type request, and the second type request carries the second type parameter information.

[0077] Optionally, the first content request may be a GET request based on HTTP, and the second type parameter information is a first URL parameter in the GET request. Optionally, the first URL parameter includes a "nocache=false" parameter.

[0078] S407: The interception layer (native layer) of the terminal intercepts the first content request and obtains the second type parameter information.

[0079] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the first content request and obtains the "nocache=false" parameter in the first URL parameter from the first content request.

[0080] S409: The terminal determines whether content data of the requested object exists in the local cache of the terminal based on the second type parameter information of the first content request. If yes, go to S411; if not, go to S413.

[0081] In the embodiment of the present application, the local cache may be a cache memory.

[0082] S411: The terminal obtains the image data from the local cache. Go to step S419.

[0083] S413: The terminal sends the first content request to the server corresponding to the application.

[0084] S415: Correspondingly, the server receives the first content request and sends a first content reply to the terminal.

[0085] S417: The terminal parses the first content reply to find that the content data of the requested object is the picture data, and saves the picture data to a local cache. Go to step S419.

[0086] S419: The terminal displays the image data on the display interface.

[0087] This optional implementation is also suitable for the application scenarios of offline packages. It first attempts to obtain the requested object from the local cache. If the requested object is stored in the local cache, that is, the object requested by the user when opening the application, it is directly obtained from the local cache of the terminal. Otherwise, it requests the server to obtain the requested object and saves it so that when the image data is opened again later, it can be directly obtained from the local cache.

[0088] In another optional embodiment, at least one second type request includes a first content request and a second content request. In this solution, the terminal can send two requests at the same time. First, the terminal can obtain the content data of the requested object from the local cache based on the second type parameter information of the first content request. If the content data of the requested object exists in the local cache, the content data is obtained, otherwise the first content request is sent to the server. The terminal can receive a first content reply sent by the server, the first content reply contains the content data of the requested object, and stores the content data in the local cache. Second, the terminal can send a second content request to the server based on the second type parameter information of the second content request, and receive a second content reply sent by the server, wherein the second content reply contains the content data of the requested object. If the content data in the second content reply does not match the content data in the local cache, the terminal can update the content data in the local cache with the content data in the second content reply.

[0089] For example, assuming that the requested object is document data in a certain application, the at least one content request is a first content request and a second content request. Figure 5 is a flow chart of a method for obtaining content data of an application object provided in an embodiment of the present application, such as Figure 5 As shown:

[0090] S501: The terminal detects a triggering operation in which the indication information of the requested object is displayed on the display interface to determine the object request indication.

[0091] S503: The terminal parses the object request indication to find that the requested object is document data in the application program.

[0092] S505: The terminal determines from the preset rule of the object request that at least one content request for the document data is a first content request and a second content request in the second type of request, and both the first content request and the second content request carry the second type of parameter information.

[0093] Optionally, the first content request may be a GET request based on HTTP, the second type parameter information is a first URL parameter in the GET request, and the first URL parameter optionally includes a "nocache=false" parameter. The second content request may also be a GET request based on HTTP, the second type parameter information is a second URL parameter in the GET request, and the second URL parameter optionally includes a "nocache=true" parameter.

[0094] S507: The interception layer (native layer) of the terminal intercepts the first content request and obtains the second type parameter information of the first content request.

[0095] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the first content request and obtains the "nocache=false" parameter in the first URL parameter from the first content request.

[0096] S509: The terminal determines whether content data of the requested object exists in the local cache of the terminal based on the second type parameter information of the first content request. If yes, go to S511; if not, go to S513.

[0097] S511: The terminal obtains the document data from the local cache and ends the process.

[0098] S513: The terminal sends the first content request to the server corresponding to the application.

[0099] S515: The server receives the first content request and sends a first content reply to the terminal.

[0100] S517: The terminal parses the first content reply to find that the content data of the requested object is document data, and saves the document data to the local cache, and ends the process.

[0101] S519: The interception layer (native layer) of the terminal intercepts the second content request and obtains the second type parameter information of the second content request.

[0102] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the second content request and obtains the "nocache=true" parameter in the second URL parameter from the second content request.

[0103] S521: The terminal sends the second content request to the server corresponding to the application based on the second type parameter information of the second content request.

[0104] S523: The server receives the second content request and sends a second content reply to the terminal.

[0105] S525: The terminal parses the second content reply to find that the content data of the requested object is document data, and saves the document data to a local cache.

[0106] In this embodiment, steps S507-S517 correspond to the first content request, and steps S519-S525 correspond to the second content request, and there is no sequential relationship between the implementation of the two, that is, the two can be performed simultaneously.

[0107] Optionally, if the document data corresponding to the first content request is obtained from the local cache, and the second content reply corresponding to the second content request parses the document data, the terminal will determine whether the document data parsed from the second content reply is consistent with the document data in the local cache, and if not, update the document data in the local cache with the document data parsed from the second content reply. In addition, the terminal generates first update information, which is used to record that the document data parsed from the second content reply updates the data in the local cache.

[0108] The following will introduce the rendering and display method of the document data in the implementation method of the previous paragraph. Since the time used to obtain document data from the local cache is less than the time used to obtain document data from the server, when displaying the document data, the document data in the local cache can be rendered first and displayed on the display interface of the terminal. Specifically, after the document data page is loaded, based on the Schame protocol, the custom getDocMailData is called to obtain the document data. The terminal executes the js interface opened by H5 to transmit the document data back to H5, and H5 displays the document data. Subsequently, the terminal can determine the first part of the document data that is consistent with the content data in the local cache from the content data in the second content reply, render the first part of the document data, and display it over the complete file data in the local cache. The user will not notice the process, but the process will actually use hardware and software resources. The terminal determines the second part of the document data that is inconsistent with the content data in the local cache from the content data in the second content reply, renders it, and displays the second part of the document data on the display interface.

[0109] Optionally, if the document data corresponding to the first content request is obtained from the local cache, and the second content reply corresponding to the second content request parses the document data, the terminal will determine whether the document data parsed from the second content reply is consistent with the document data in the local cache, and if they are consistent, generate second update information, which is used to record that the document data parsed from the second content reply does not update the data in the local cache. Specifically, the HTTP error code can be modified to -100.

[0110] The rendering and display method of document data in the previous implementation manner can refer to the rendering and display method of document data in the above text. The document data in the local cache is first rendered and displayed, and then the document data parsed from the second content reply is rendered and displayed. Since the document data of the two are consistent, the user will not be aware of the process of rendering and displaying the document data from the second content reply, but this process actually uses hardware and software resources.

[0111] Optionally, if the document data corresponding to the first content request is not obtained from the local cache, but is parsed from the first content reply corresponding to the first content request, and the document data is parsed from the second content reply corresponding to the second content request. The storage order of the document data in the local cache is determined according to the time before and after the parsing. If the terminal first parses the document data in the first content reply, the document data stored in the local cache is the document data in the first content reply, and when the document data in the second content reply is subsequently stored, if the document data of the two are consistent, the second update information is generated, otherwise, the document data in the local cache is updated with the document data in the second content reply, and the first update information is generated. If the terminal first parses the document data in the second content reply, the document data stored in the local cache by the terminal is the document data in the second content reply, and when the document data in the first content reply is subsequently stored, if the document data of the two are consistent, the second update information is generated, otherwise, the document data in the local cache is updated with the document data in the first content reply, and the first update information is generated.

[0112] The rendering and displaying method of the document data in the previous embodiment can refer to the rendering and displaying method of the document data in the above text, and will not be repeated here.

[0113] In the embodiment of the present application, the implementation method based on document data can not only realize the rapid display of document data through local cache, but also update the document data in the local cache through the second content request, and display the part that cannot be displayed in the local cache. In summary, this implementation method saves time while ensuring the integrity of document data, which can improve user experience.

[0114] In another optional embodiment, at least one second type request includes a first content request, a second content request and a third content request. In this solution, the terminal can send three requests at the same time. First, the terminal can obtain the content data of the requested object from the local cache based on the second type parameter information of the first content request. If the content data of the requested object exists in the local cache, the content data is obtained, otherwise the first content request is sent to the server. The terminal can receive the first content reply sent by the server, the first content reply contains the content data of the requested object, and the content data is stored in the local cache. Second, the terminal can send a second content request to the server based on the second type parameter information of the second content request, and receive the second content reply sent by the server, wherein the second content reply contains the content data of the requested object. If the content data in the second content reply does not match the content data in the local cache, the terminal can update the content data in the local cache with the content data in the second content reply. Third, the terminal can send a third content request to the server based on the second type parameter information of the third content request, and then the terminal receives the third content reply sent by the server, wherein the third content reply contains the content data of the requested object.

[0115] For example, assuming that the requested object is table data in a certain application, the at least one content request is a first content request, a second content request, and a third content request. Figure 6 is a flow chart of a method for obtaining content data of an application object provided in an embodiment of the present application, such as Figure 6 As shown:

[0116] S601: The terminal detects a triggering operation in which the indication information of the requested object is displayed on the display interface to determine the object request indication.

[0117] S603: The terminal parses the object request indication to find that the requested object is table data in the application program.

[0118] S605: The terminal determines from the preset rule of the object request that at least one content request of the table data is a first content request, a second content request and a third content request in the second type request, and the first content request, the second content request and the third content request all carry the second type parameter information.

[0119] Optionally, the first content request may be a GET request based on HTTP, the second type parameter information is a first URL parameter in the GET request, and the first URL parameter may optionally include a "nocache=false" parameter. The second content request may also be a GET request based on HTTP, the second type parameter information is a second URL parameter in the GET request, and the second URL parameter may optionally include a "nocache=true" parameter. The third content request may also be a GET request based on HTTP, the second type parameter information is a third URL parameter in the GET request, and the third URL parameter may optionally include an "ignorlocaldiff=true" parameter.

[0120] S607: The interception layer (native layer) of the terminal intercepts the first content request and obtains the second type parameter information of the first content request.

[0121] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the first content request and obtains the "nocache=false" parameter in the first URL parameter from the first content request.

[0122] S609: The terminal determines whether content data of the requested object exists in the local cache of the terminal based on the second type parameter information of the first content request. If yes, go to S611; if not, go to S613.

[0123] S611: The terminal obtains the table data from the local cache.

[0124] S613: The terminal sends the first content request to the server corresponding to the application.

[0125] S615: The server receives the first content request and sends a first content reply to the terminal.

[0126] S617: The terminal parses the first content reply to find that the content data of the requested object is table data, and saves the table data to a local cache.

[0127] S619: The interception layer (native layer) of the terminal intercepts the second content request and obtains the second type parameter information of the second content request.

[0128] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the second content request and obtains the "nocache=true" parameter in the second URL parameter from the second content request.

[0129] S621: The terminal sends the second content request to the server corresponding to the application based on the second type parameter information of the second content request.

[0130] S623: The server receives the second content request and sends a second content reply to the terminal.

[0131] S625: The terminal parses the second content reply to find that the content data of the requested object is table data, and saves the table data to a local cache.

[0132] S627: The interception layer (native layer) of the terminal intercepts the third content request and obtains the second type parameter information of the third content request.

[0133] In the embodiment of the present application, the interception layer (native layer) of the terminal intercepts the third content request and obtains the "ignorlocaldiff=true" parameter in the third URL parameter from the third content request.

[0134] S629: The terminal sends the third content request to the server corresponding to the application based on the second type parameter information of the third content request.

[0135] S631: The server receives the third content request and sends a third content reply to the terminal.

[0136] S633: The terminal parses the third content reply to find that the content data of the requested object is table data.

[0137] In this embodiment, steps S607-S617 correspond to the first content request, steps S619-S625 correspond to the second content request, and steps S627-S633 correspond to the third content request, and there is no sequential order in which the three are implemented, that is, the three can be performed simultaneously.

[0138] In the embodiment of the present application, the content data parsed from the second content reply corresponding to the second content request in the above S601-S633 is used to update the content data in the local cache. If the content data parsed from the second content reply is consistent with the content data in the local cache, a second update message is generated, and the second update message is used to record that the table data parsed from the second content reply did not update the data in the local cache. Specifically, the HTTP error code can be modified to -100. If it is inconsistent, a first update message is generated, and the first update message is used to record that the table data parsed from the second content reply updates the table data in the local cache.

[0139] In the embodiment of the present application, it is assumed that the table data corresponding to the first content request is obtained from the local cache, and the table data parsed from the third content reply corresponding to the third content request is consistent with the table data in the local cache. Since the time used to obtain the table data from the local cache is less than the time used to obtain the table data from the server, the terminal renders and displays the table data in the way of rendering the table data in the local cache and displaying it on the display interface of the terminal, and does not render and display the table data parsed from the third content reply.

[0140] Assume that the table data corresponding to the first content request is obtained from the local cache, and the table data parsed from the third content reply corresponding to the third content request is inconsistent with the table data in the local cache. Since the time used to obtain the table data from the local cache is less than the time used to obtain the table data from the server, the terminal renders and displays the table data in the following way: first, the table data in the local cache is rendered and displayed on the display interface of the terminal, and then the part of the table data that is inconsistent with the table data in the local cache is determined from the table data in the third content reply, and the part of the table data is rendered and displayed on the display interface, and the consistent part of the table data is not rendered and displayed.

[0141] In summary, if the table data is updated after being displayed on the terminal, the first content request is mainly used to obtain the table data in the local cache, the second content request is used to obtain the updated table data in the local cache, and the third content request obtains the updated table data and determines whether there are any inconsistent parts with the table data in the local cache, and only renders and displays the inconsistent parts, and the consistent parts are not rendered and overwritten like the document data above. In this way, not only can the time from the request to the display of the table data be shortened, but the table data in the local cache is updated to ensure the integrity of the table data, pave the way for the next display, and save hardware and software resources used for rendering and display.

[0142] Based on the above embodiments, the object request preset rule in the embodiment of the present application can be expressed as:

[0143] Reporting information - Type 1 request;

[0144] Image data - second type request (first content request);

[0145] Video data - second type request (first content request);

[0146] Audio data - second type request (first content request);

[0147] Document data - second type request (first content request and second content request);

[0148] Form data - second type request (first content request, second content request and third content request).

[0149] The above-mentioned object request preset rules are determined according to the above-mentioned embodiments, and the object request preset rules obtained by adjusting the content based on the above embodiments are still included in the embodiments of the present application.

[0150] In an embodiment of the present application, since the terminal can obtain the content data of the requested object based on at least one content response returned from at least one requesting node according to at least one content request, the terminal not only obtains the content data from the server, thereby reducing the time for obtaining the requested object and quickly opening the content data of the requested object.

[0151] The present application also provides a device for acquiring content data of an application object. Figure 7 is a schematic diagram of the structure of a content data acquisition device for an application object provided in an embodiment of the present application, such as Figure 7 As shown, the device comprises:

[0152] The first determining module 701 is used to determine the object requested by the object request indication in the application program;

[0153] The second determination module 702 is used to determine at least one content request of the requested object according to the requested object and the preset rule of the object request; wherein each content request carries parameter information of the requesting node;

[0154] The transceiver module 703 is used to send at least one content request based on the parameter information of the requesting node, and receive a content reply returned by at least one requesting node;

[0155] The third determination module 704 is used to determine the content data of the requested object from the content reply.

[0156] In an optional embodiment, the device further comprises:

[0157] The first determination module is used to detect a trigger operation that the indication information of the requested object is displayed on the display interface; or; the first determination module is used to detect a trigger operation that the display interface area corresponding to the indication information of the requested object is touched.

[0158] In an optional embodiment, the device further comprises:

[0159] At least one content request is a first type request, and the parameter information of the requesting node carried by the first type request is first type parameter information. The transceiver module is used to send the first type request to the server based on the first type parameter information, and receive the first type reply sent by the server, and the first type reply contains the content data of the requested object.

[0160] In an optional embodiment, the device further comprises:

[0161] The at least one content request includes at least one second type request, and the parameter information of the requesting node carried by the second type request is second type parameter information.

[0162] In an optional embodiment, the device further comprises:

[0163] at least one second type request comprises a first content request;

[0164] The acquisition module is used to obtain the content data of the requested object from the local cache based on the second type parameter information of the first content request. If the content data of the requested object exists in the local cache, the acquisition module obtains the content data. Otherwise, the transceiver module sends a first content request to the server, receives a first content reply sent by the server, the first content reply includes the content data of the requested object, and stores the content data in the local cache.

[0165] In an optional embodiment, the device further comprises:

[0166] The at least one second type request comprises a second content request;

[0167] The transceiver module is used to send a second content request to the server based on the second type parameter information of the second content request, and receive a second content reply sent by the server, where the second content reply includes content data of the requested object;

[0168] The updating module is configured to update the content data in the local cache according to the content data in the second content reply if the content data in the second content reply does not match the content data in the local cache.

[0169] In an optional embodiment, the device further comprises:

[0170] The display module is used to obtain the content data of the requested object if it exists in the local cache, render the content data, and display it on the display interface;

[0171] The rendering module is used to render the content data in the second content reply if the content data in the second content reply does not match the content data in the local cache;

[0172] The display module is used to determine a first portion of content data that is consistent with the content data in the local cache from the content data in the second content reply, and display the first portion of content data over the content data in the local cache; determine a second portion of content data that is inconsistent with the content data in the local cache from the content data in the second content reply, and display the second portion of content data on the display interface.

[0173] In an optional embodiment, the device further comprises:

[0174] the at least one content request comprising a third content request;

[0175] The transceiver module is used to send a third content request to the server based on the second type parameter information of the third content request; and receive a third content reply sent by the server, where the third content reply includes content data of the requested object.

[0176] In an optional embodiment, the device further comprises:

[0177] The display module is used to obtain the content data, render the content data, and display it on the display interface if the content data of the requested object exists in the local cache; if the content data in the third content reply does not match the content data in the local cache, determine the partial content data that is inconsistent with the content data in the local cache from the content data in the third content reply, and display the partial content data on the display interface.

[0178] In an optional embodiment, the device further comprises:

[0179] The requested object includes any one of document data, table data, video data, audio data, and picture data.

[0180] The device and method embodiments in the embodiments of the present application are based on the same application concept.

[0181] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 8 1 is a hardware structure block diagram of a server of a method for acquiring content data of an application object provided in an embodiment of the present application. Figure 8As shown, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 810 (the processor 810 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 830 for storing data, and one or more storage media 820 (such as one or more mass storage devices) for storing application programs 823 or data 822. Among them, the memory 830 and the storage medium 820 can be short-term storage or permanent storage. The program stored in the storage medium 820 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 810 can be configured to communicate with the storage medium 820 and execute a series of instruction operations in the storage medium 820 on the server 800. The server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input and output interfaces 840, and / or one or more operating systems 821, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0182] The input / output interface 840 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 800. In one example, the input / output interface 840 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 840 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0183] It can be understood by those skilled in the art that Figure 8 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 8 More or fewer components as shown, or with Figure 8 Different configurations are shown.

[0184] An embodiment of the present application also provides a storage medium, which can be set in a server to store at least one instruction, at least one program, code set or instruction set related to a content data acquisition method for an application object in a method embodiment. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the content data acquisition method for the above-mentioned application object.

[0185] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0186] It can be seen from the embodiments of the method for obtaining content data of an application object, an electronic device or a storage medium provided by the present application that the object requested by the object request indication in the application is determined in the present application, and at least one content request of the requested object is determined according to the requested object and the preset rule of the object request; wherein each of the content requests carries parameter information of the requesting node, the at least one content request is sent based on the parameter information of the requesting node, and a content reply returned by at least one requesting node is received to determine the content data of the requested object from the content reply. Since the terminal can obtain the content data of the requested object from at least one content reply returned by at least one requesting node according to at least one content request, so that the terminal does not only obtain the content data from the server, the time for obtaining the requested object can be reduced, and the content data of the requested object can be quickly opened.

[0187] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0188] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0189] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0190] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for acquiring content data of an application object, characterized in that: Applied to a terminal, the method comprises: Determine the object requested by the object request indication in the application; the requested object includes any one of document data, table data, video data, audio data, and picture data; Determine at least one content request of the requested object according to the requested object and the preset rule of object request; wherein each of the content requests carries parameter information of a requesting node; the requesting node includes at least one of a server providing services for the application and a local cache of the terminal; Sending the at least one content request based on the parameter information of the requesting node, and receiving a content reply returned by at least one requesting node; determining content data of the requested object from the content response; The at least one content request includes at least one second type request, and the parameter information of the requesting node carried by the second type request is second type parameter information; The at least one second type request includes a second content request; the sending of the at least one content request based on the parameter information of the requesting node, and receiving a content reply returned by at least one requesting node, includes: Sending a second content request to the server based on the second type parameter information of the second content request; receiving a second content reply sent by the server, wherein the second content reply includes content data of the requested object; If the content data of the requested object exists in the local cache, acquiring the content data, rendering the content data, and displaying it on the display interface; If the content data in the second content reply does not match the content data in the local cache, render the content data in the second content reply; determine a first portion of content data that is consistent with the content data in the local cache from the content data in the second content reply, and display the first portion of content data over the content data in the local cache; determine a second portion of content data that is inconsistent with the content data in the local cache from the content data in the second content reply, and display the second portion of content data on the display interface.

2. The method according to claim 1, characterized in that: The object request indication is determined in the following manner: A trigger operation is detected in which the indication information of the requested object is displayed on the display interface; or; A triggering operation is detected in which a display interface area corresponding to the indication information of the requested object is touched.

3. The method according to claim 1, characterized in that The at least one content request is a first type request, and the parameter information of the requesting node carried by the first type request is first type parameter information; The sending of the at least one content request based on the parameter information of the requesting node and receiving a content reply returned by the at least one requesting node comprises: Sending a first type of request to a server based on the first type of parameter information; A first type of response is received from the server, wherein the first type of response includes content data of the requested object.

4. The method according to claim 1, characterized in that The at least one second type request comprises a first content request; The sending of the at least one content request based on the parameter information of the requesting node and receiving a content reply returned by the at least one requesting node comprises: Acquire content data of the requested object from a local cache based on the second type parameter information of the first content request; If the content data of the requested object exists in the local cache, acquiring the content data; Otherwise, a first content request is sent to the server, a first content response is received from the server, the first content response includes content data of the requested object; and the content data is stored in the local cache.

5. The method according to claim 4, characterized in that The sending of the at least one content request based on the parameter information of the requesting node and receiving a content reply returned by the at least one requesting node comprises: Sending a second content request to the server based on the second type parameter information of the second content request; receiving a second content reply sent by the server, wherein the second content reply includes content data of the requested object; If the content data in the second content reply does not match the content data in the local cache, the content data in the local cache is updated according to the content data in the second content reply.

6. The method according to claim 5, characterized in that The at least one content request comprises a third content request; The sending of the at least one content request based on the parameter information of the requesting node and receiving a content reply returned by the at least one requesting node comprises: Sending a third content request to the server based on the second type parameter information of the third content request; A third content reply sent by the server is received, where the third content reply includes content data of the requested object.

7. The method according to claim 6, characterized in that The method further comprises: If the content data of the requested object exists in the local cache, acquiring the content data, rendering the content data, and displaying it on the display interface; If the content data in the third content reply does not match the content data in the local cache, partial content data inconsistent with the content data in the local cache is determined from the content data in the third content reply, and the partial content data is displayed on the display interface.

8. A device for acquiring content data of an application object, characterized in that: Applied to a terminal, the device comprises: A first determination module is used to determine the object requested by the object request indication in the application program; the requested object includes any one of document data, table data, video data, audio data, and picture data; A second determination module is used to determine at least one content request of the requested object according to the requested object and the preset rule of the object request; wherein each of the content requests carries parameter information of a requesting node; the requesting node includes at least one of a server providing services for the application and a local cache of the terminal; a transceiver module, configured to send the at least one content request based on the parameter information of the requesting node, and receive a content reply returned by the at least one requesting node; A third determination module, configured to determine content data of the requested object from the content reply; The at least one content request includes at least one second type request, and the parameter information of the requesting node carried by the second type request is second type parameter information; the at least one second type request includes a second content request; The transceiver module is used to send a second content request to the server based on the second type parameter information of the second content request; receive a second content reply sent by the server, wherein the second content reply includes content data of the requested object; A display module, configured to obtain the content data of the requested object if the content data exists in the local cache, render the content data, and display it on a display interface; If the content data in the second content reply does not match the content data in the local cache, render the content data in the second content reply; determine a first portion of content data that is consistent with the content data in the local cache from the content data in the second content reply, and display the first portion of content data over the content data in the local cache; determine a second portion of content data that is inconsistent with the content data in the local cache from the content data in the second content reply, and display the second portion of content data on the display interface.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the content data acquisition method of the application object as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the content data acquisition method of the application object as described in any one of claims 1-7.

Citation Information

Patent Citations

  • A service processing method and device

    CN109446088A