Data request method and device for rendering

By optimizing the data query and request process by using index identification mapping relationships in the local initialization storage space on the front end, the stuttering problem caused by traversal recursive updates is solved, resulting in smoother data rendering and updates and improved user experience.

CN119127976BActive Publication Date: 2026-06-23广域铭岛数字科技有限公司 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
广域铭岛数字科技有限公司
Filing Date
2024-09-10
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, traversal recursive update techniques can cause data rendering and dynamic updates to become sluggish, unsmooth, or even freeze, affecting the user experience.

Method used

By obtaining the data query range index from the data request to be rendered, and converting it into a data query range identifier using a preset index identifier mapping relationship, the data query is performed first by initializing the local storage space on the front end. Data request tasks are generated based on the difference in data range, and parallel processing capabilities and priority sorting are used to optimize the data request process.

Benefits of technology

It effectively improves the speed of data rendering and updating, reduces or avoids screen lag, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127976B_ABST
    Figure CN119127976B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and discloses a kind of to be rendered data request method and device, the method is by obtaining the to be rendered data request of front end, data query range index in it is converted into data query range identifier, then with the data query range identifier to the prestorage data in the local initialization storage space of front end is inquired, the data obtained by inquiry is as first to be rendered sub-data, if the matching data range of the data obtained by inquiry is identical with the data query range corresponding to data query range identifier, first to be rendered sub-data is determined as to be rendered data, the request of to be rendered data is completed, by pre-storing part data in the local initialization storage space of front end, when needing to display data, data query is carried out in the storage space preferentially, the rate of data rendering and data updating can be effectively improved, the problem that picture lag or even lock due to slow data request is reduced or even avoided, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for requesting data to be rendered. Background Technology

[0002] With the technological innovations in big data and high concurrency in recent years, many business scenarios involve a large number of data rendering and dynamic update nodes on the front end. The traversal and recursive update techniques used in related technologies to render and update large amounts of data dynamically can cause obvious lag, unsmoothness, or even freezing, resulting in a poor user experience. Summary of the Invention

[0003] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0004] In view of the shortcomings of the prior art described above, the present invention discloses a method and apparatus for requesting data to be rendered, in order to solve the technical problem in the related art that the use of traversal recursive update technology to render and dynamically update a large amount of data results in obvious lag, unsmoothness or even freezing, leading to a poor user experience.

[0005] This invention discloses a method for requesting data to be rendered, comprising: obtaining a data request to be rendered from a front end, wherein the data request to be rendered includes at least a data query range index; determining a data query range identifier corresponding to the data query range index according to a mapping relationship between the data query range index and a preset index identifier, wherein the preset index identifier mapping relationship represents the correspondence between the data query range index and the data query range identifier of data in a backend database; querying pre-stored data in the front end's local initialization storage space using the data query range identifier, wherein the pre-stored data includes preset data requested from the backend database and stored in the front end's local initialization storage space in advance, and a preset query identifier corresponding to the preset data; if a preset query identifier matches the data query range identifier, determining the preset data corresponding to the matching preset query identifier as the first sub-data to be rendered; if the matching data range formed by the matching preset query identifiers is the same as the data query range corresponding to the data query range identifier, determining the first sub-data to be rendered as the data to be rendered, thus completing the request for the data to be rendered.

[0006] In one embodiment of the present invention, the method further includes: if the matching data range formed by the matching preset query identifier is smaller than the data query range corresponding to the data query range identifier, determining the difference data range based on the matching data range and the data query range, and determining the difference data range identifier according to the difference data range and the data query range identifier; generating multiple data request tasks according to the difference data range identifier, sorting the multiple data request tasks according to the current priority order and request parallel processing capability, executing the multiple data request tasks according to the sorting result, so as to query the second sub-data to be rendered corresponding to the difference data range identifier from the backend database, and storing the second sub-data to be rendered in the frontend local initialization storage space; determining the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, and completing the request for the data to be rendered.

[0007] In one embodiment of the present invention, after storing the second sub-data to be rendered in the front-end local initialization storage space, the method further includes: storing the preset query identifier of the second sub-data to be rendered and the preset query identifier of the first sub-data to be rendered into the front-end local reference storage space, and increasing the reference count value of the preset query identifier of the second sub-data to be rendered, and increasing the reference count value of the preset query identifier of the first sub-data to be rendered.

[0008] In one embodiment of the present invention, the method further includes: counting the reference count values ​​of each preset query identifier in the front-end local reference storage space; if the data corresponding to the first target query identifier has not yet been stored in the front-end local initialization storage space, storing the data corresponding to the first target query identifier into the front-end local initialization storage space, wherein the first target query identifier is a preset query identifier with a reference count value greater than a preset first counting threshold; if the data corresponding to the second target query identifier is stored in the front-end local initialization storage space, deleting the data corresponding to the second target query identifier from the front-end local initialization storage space, wherein the second target query identifier is a preset query identifier with a reference count value less than a preset second counting threshold, wherein the preset second counting threshold is less than the preset first counting threshold.

[0009] In one embodiment of the present invention, multiple data request tasks are generated based on the differential data range identifier, and the multiple data request tasks are sorted according to the current priority order and the request parallel processing capability, including: determining an associated data range identifier based on the differential data range identifier, wherein the associated data range identifier represents the identifier of data that is associated with the data corresponding to the differential data range identifier; generating multiple data request tasks based on the differential data range identifier and the associated data range identifier; determining the current priority order based on a preset data priority and the differential data range identifier; performing a preliminary sorting of the multiple data request tasks according to the current priority order, and further sorting the preliminary sorted multiple data request tasks according to the request parallel processing capability, wherein the sorting of the data request tasks corresponding to the differential data range identifier takes precedence over the sorting of the data request tasks corresponding to the associated data range identifier.

[0010] In one embodiment of the present invention, the method further includes: during the execution of the plurality of data request tasks according to the sorting result, if a new data request to be rendered is received from the front end, the data request task that has not yet been completed is blocked.

[0011] In one embodiment of the present invention, before querying the pre-stored data in the front-end local initialization storage space using the data query range identifier, the method includes: querying the pre-stored data from the back-end database according to the preset query identifier, and storing the pre-stored data in the front-end local initialization storage space in association with the pre-stored data, wherein the preset query identifier is obtained based on a pre-configured set of pre-stored query identifiers.

[0012] In one embodiment of the present invention, before querying pre-stored data in the front-end local initialization storage space using the data query range identifier, the method includes: configuring a corresponding data index based on the data identifier of the smallest storage unit of data in the back-end database; establishing a preset index identifier mapping relationship for the data identifiers, data indexes, and the correspondence between the data identifiers and data indexes of all data in the back-end database, so as to convert the data query range index into a data query range identifier through the preset index identifier mapping relationship; and after the data display service is started for the first time, making a silent request to the preset index identifier mapping relationship and encrypting and storing it in the front-end local reference storage space.

[0013] In one embodiment of the present invention, after determining the second sub-data to be rendered and the first sub-data to be rendered as data to be rendered, the method further includes: displaying at least a portion of the data to be rendered on a preset display interface according to the current display request, and preloading adjacent data of the at least a portion of the data to be rendered displayed on the preset display interface; and the method further includes: if a new data to be rendered request is received from the front end, comparing the data query range identifier of the new data to be rendered request with the data query range identifier of the previously received data to be rendered request to obtain a difference query range identifier and a same query range identifier; determining the data to be rendered corresponding to the same query range identifier as the third sub-data to be rendered; querying the pre-stored data in the front end's local initialization storage space using the difference query range identifier, and determining the preset data corresponding to the matching preset query identifier as the fourth sub-data to be rendered; if the The new matching data range formed by the preset query identifier is smaller than the new data query range corresponding to the data difference query range identifier. A new difference data range is determined based on the new matching data range and the new data query range, and a new difference data range identifier is determined according to the new difference data range and the difference query range identifier. Multiple new data request tasks are generated according to the new difference data range identifier, and the multiple new data request tasks are sorted according to the new current priority order and the new request parallel processing capability. The multiple new data request tasks are executed according to the sorting result to query the backend database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier. The third, fourth, and fifth sub-data to be rendered are determined as new data to be rendered, and at least part of the new data to be rendered is displayed on the preset display interface according to the new current display request.

[0014] This invention discloses a device for requesting data to be rendered, comprising: a data storage module, configured to request preset data from a backend database in advance, determine the requested preset data and the preset query identifier corresponding to the preset data as pre-stored data, store the pre-stored data in a frontend local initialization storage space, and store a preset index identifier mapping relationship, wherein the preset index identifier mapping relationship represents the correspondence between the data query range index and the data query range identifier of the data in the backend database; and a data acquisition module, configured to acquire the data request to be rendered from the frontend, wherein the data request to be rendered includes at least a data query range index, and according to the... The mapping relationship between the data query range index and the preset index identifier determines the data query range identifier corresponding to the data query range index; the data query module is used to query the pre-stored data in the front-end local initialization storage space using the data query range identifier; the data matching module is used to determine the preset data corresponding to the matching preset query identifier as the first sub-data to be rendered if there is a match between the preset query identifier and the data query range identifier; the determination module is used to determine the first sub-data to be rendered as the data to be rendered if the matching data range formed by the matching preset query identifier is the same as the data query range corresponding to the data query range identifier, thus completing the request for the data to be rendered.

[0015] This invention discloses an electronic device, including a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the above-described method.

[0016] The beneficial effects of this invention are:

[0017] By obtaining the data request to be rendered from the front end, the data query range index in the data request is converted into a data query range identifier that can be used to query data in the backend database and the front end's local initialization storage space based on a preset index identifier mapping relationship. Then, the pre-stored data in the front end's local initialization storage space is queried using this data query range identifier. The queried data is used as the first sub-data to be rendered. If the matching data range of the queried data is the same as the data query range corresponding to the data query range identifier, the first sub-data to be rendered is determined as the data to be rendered, and the request for the data to be rendered is completed. By pre-storing some data in the front end's local initialization storage space, and prioritizing data querying in this storage space when data needs to be displayed, the speed of data rendering and data update can be effectively improved, reducing or even avoiding screen lag or even freezing caused by slow data requests, thus improving the user experience. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a data request method to be rendered in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of an interface for customizing business fields provided in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram illustrating the principle of processing a task queue for data request tasks provided in an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram illustrating the processing principle of data updating and comparison provided in an embodiment of the present invention;

[0022] Figure 5 This is a specific schematic diagram of data comparison and return provided in an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of a display method for data to be rendered provided in an embodiment of the present invention;

[0024] Figure 7 This invention provides a schematic diagram comparing the time of two updates of the same interface during data rendering using a data request method;

[0025] Figure 8 This is a schematic diagram provided in an embodiment of the present invention, illustrating a method for requesting and rendering data using a data request method.

[0026] Figure 9 This is a schematic diagram of a page rendering process using a data request method provided in an embodiment of the present invention;

[0027] Figure 10 This is a schematic diagram of the structure of a data request device to be rendered in an embodiment of the present invention;

[0028] Figure 11 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0029] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and sub-samples in the embodiments can be combined with each other.

[0030] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0031] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0032] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0033] Unless otherwise stated, the term "multiple" means two or more.

[0034] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0035] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0036] Combination Figure 1 As shown, Figure 1 This is a flowchart illustrating a data request method to be rendered in an embodiment of the present invention, as shown below. Figure 1 As shown in the embodiments of this disclosure, a method for requesting data to be rendered is provided, including:

[0037] Step S110: Obtain the data request to be rendered from the front end.

[0038] The data request to be rendered must include at least a data query range index.

[0039] A data query range index can include multiple sub-index values, such as XX process, XX year, XX month, XX date, XX time period, XX category data, thus forming a data query range index through multiple sub-index values. As an example, the selection of sub-index values ​​can be provided through the provided data request page.

[0040] In one embodiment, before querying pre-stored data in the front-end local initialization storage space using a data query range identifier, the method includes: configuring a corresponding data index based on the data identifier of the smallest storage unit of data in the back-end database; establishing a preset index identifier mapping relationship for all data in the back-end database, including data identifiers, data indexes, and the correspondence between data identifiers and data indexes, so as to convert the data query range index into a data query range identifier through the preset index identifier mapping relationship; and after the data display service is started for the first time, making a silent request to the preset index identifier mapping relationship and encrypting and storing it in the front-end local reference storage space.

[0041] The smallest storage unit is the smallest granular identifier of the data stored in the backend database, enabling subsequent data queries and retrieval from more dimensions. A data identifier is a marker used during data storage to represent the identity of the data. Since this data identifier primarily serves to differentiate data storage, its readability is often poor. Therefore, a more readable data index can be configured corresponding to the data identifier, allowing users to understand the specific data type and facilitate the construction of indexes that support data query ranges. Please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of an interface for customizing business fields provided in an embodiment of the present invention, such as... Figure 2 As shown in the example, the decomposition type on the left can be input as the corresponding data index, such as the field name, while the configuration CODE on the right can be input as the corresponding data identifier. By pre-configuring the data index corresponding to the data identifier and establishing the relationship between the two, a preset index identifier mapping relationship can be obtained, which can facilitate the subsequent conversion of the data query range index provided by the front end into a data query range identifier that can be queried.

[0042] This approach enables the structured decomposition of business data such as industrial manufacturing QMS (Quality Management System) and APS (Advanced Planning and Scheduling) systems, providing a methodology and data structure for the smallest searchable units. This minimizes the overhead of each update. Business fields can be customized to maximize their decomposability according to specific scenarios. Table fields and search units can be customized based on business requirements.

[0043] In the data acquisition phase, in complex business scenarios, the frontend might request a backend interface containing a large amount of data. This can lead to lengthy data transmission times at the application layer (including querying, waiting, downloading, and rendering). A better approach is to modify the data acquisition process by first retrieving the index of this large dataset (which could be a collection of IDs or identifiers). The frontend can then query the corresponding index based on its business needs, ensuring the smallest possible granularity from API call to rendering.

[0044] In one embodiment, before querying the pre-stored data in the front-end local initialization storage space using a data query range identifier in subsequent steps, the method includes: querying the pre-stored data from the back-end database according to a preset query identifier, and storing the pre-stored data in the front-end local initialization storage space in association with the pre-stored data, wherein the preset query identifier is obtained based on a pre-configured set of pre-stored query identifiers.

[0045] The pre-stored data can be determined using preset query identifiers pre-configured by those skilled in the art, either upon initial startup of the data display service or upon first activation of the entire service. This pre-stored data is then associated with and stored in the front-end's local initialization storage space. Initial startup of the data display service could occur upon first launch of the service or upon logging into the service with a specific account and password. First activation of the entire service, in a global context, refers to the first time the data display service is launched. Preset query identifiers can be data identifiers corresponding to frequently requested data, obtained by those skilled in the art through business experience or other data statistical methods. Clearly, there are multiple preset query identifiers. By persistently storing frequently used data locally, frequent requests from the front-end to interfaces with large amounts of data can be avoided.

[0046] To avoid storing excessive amounts of data, the set of indexes (data indexes) and identifiers (data identifiers) is mapped (with a pre-defined index-identifier mapping relationship) and silently requested for encrypted storage upon login (either after the initial data display service is launched or the entire service is first activated). This trades space for time, speeding up data requests and reducing data rendering time.

[0047] By using the above method, since a minimally divisible index is provided in advance based on the minimum granularity of data storage, it is easier for users to request data in a more refined manner, and it is also easier to extract the data accurately in the future.

[0048] Step S120: Determine the data query range identifier corresponding to the data query range index based on the mapping relationship between the data query range index and the preset index identifier.

[0049] The preset index identifier mapping relationship represents the correspondence between the data query range index and the data query range identifier of the data in the backend database.

[0050] As described in the above embodiments, the preset index identifier mapping relationship includes the mapping relationship between data indexes and data identifiers. The data query range index includes multiple data indexes, and a corresponding data identifier is determined for each data index. A data query range identifier is generated based on all the obtained data identifiers. For example, querying qualified data within a certain time period of a certain process. In this way, a highly readable data query range index can be converted into a data query range identifier that is convenient for subsequent data retrieval.

[0051] Step S130: Query the pre-stored data in the front-end local initialization storage space using the data query range identifier.

[0052] The pre-stored data includes preset data requested from the backend database and stored in the local initialization storage space of the frontend, as well as preset query identifiers corresponding to the preset data.

[0053] As mentioned in the above embodiments, some frequently used data is pre-stored in the front-end local initialization storage space. Furthermore, for convenient retrieval and querying, preset query identifiers corresponding to the data are also stored. These preset query identifiers and the data identifiers in the data query range identifier use the same construction rules, but different names are used to distinguish different stages. In this way, data queries can be achieved by matching the data query range identifier with all the preset query identifiers in the front-end local initialization storage space.

[0054] In related technologies, all requests for data to be rendered and subsequently displayed require querying the backend database. The accuracy of these queries is low, and the query path must be determined before the corresponding data can be found, resulting in slow overall retrieval speeds. This can lead to frontend lag due to the inability to provide data promptly. However, the method provided in this application prioritizes querying data from the local frontend initialization storage space. On one hand, the data is pre-stored locally, saving data request time. On the other hand, the pre-configured correspondence between data indexes and data identifiers allows for faster determination of the data retrieval path and quicker retrieval of the corresponding data. Even if the data stored in the frontend's local initialization storage space cannot fully meet the user's needs, providing a portion of the data for frontend display first can prevent lag due to a lack of data, effectively improving the user experience.

[0055] Step S140: If a preset query identifier matches a data query range identifier, the preset data corresponding to the matching preset query identifier is determined as the first sub-data to be rendered.

[0056] It is understandable that, assuming the data query range identifier is a certain data item of a certain business in the past month, if there are one or more identifiers corresponding to a certain data item of a certain business in the past half month among the multiple preset query identifiers in the local initialization storage space of the front end, then these identifiers are considered to be matched, and the preset data corresponding to these identifiers are used as the first sub-data to be rendered.

[0057] Of course, it is also possible that the data that the current user needs to display is relatively infrequent, and there is no corresponding data in the front-end local initialization storage space. In other words, all the preset query identifiers in the front-end local initialization storage space fail to match. In this case, the data can be retrieved using existing technologies, or the corresponding data can be retrieved from the back-end database through the data query range identifier.

[0058] Step S150: If the matching data range formed by the matching preset query identifier is the same as the data query range corresponding to the data query range identifier, the first sub-data to be rendered is determined as the data to be rendered, and the request for the data to be rendered is completed.

[0059] Assuming the pre-stored data is stored by date, and the matching data range formed by the pre-defined query identifier is a certain business data within the past month, and the data query range identifier also corresponds to a certain business data within the past month, then they are considered to be the same. The pre-stored data in the front-end local initialization storage space can meet the needs of the request without having to request data from the back-end database again, which can effectively save time.

[0060] In one embodiment, the method further includes: if the range of matching data formed by the matching preset query identifier is smaller than the range of data query corresponding to the range of data query identifier, determining the difference range of data based on the range of matching data and the range of data query, and determining the difference range identifier according to the difference range of data and the range of data query identifier; generating multiple data request tasks according to the difference range identifier, sorting the multiple data request tasks according to the current priority order and the parallel processing capability of the requests, executing the multiple data request tasks according to the sorting result, so as to query the second sub-data to be rendered corresponding to the difference range identifier from the backend database, and storing the second sub-data to be rendered in the frontend local initialization storage space;

[0061] The second and first sub-data to be rendered are identified as the data to be rendered, and the request for the data to be rendered is completed.

[0062] Sometimes users might need data from the last six months, while the front-end's local initial storage only contains data from the last month. In this case, the data in the front-end's local initial storage is insufficient, meaning the matching data range is smaller than the data query range (a subset of the query range). Therefore, it's necessary to request the difference from the back-end database to the front-end. Requesting all data from the back-end database would be cumbersome and wasteful of resources. A better approach is to calculate the difference between the matching data range and the query range, obtaining the difference data range (e.g., data from February to May). Combining this with other information from the query range identifier, we can determine the identifier of the required data—the difference data range identifier. Based on this identifier, we can then query the remaining data from the back-end database. When data needs to be requested from the back-end database, it can be divided into one or more data request tasks. The data request task corresponding to the data currently needed for the front-end to be displayed should be given a higher priority and processed first. Parallel processing capability represents the number of data request tasks that can be processed simultaneously. The current priority order can be determined by combining a preset priority order and / or the front-end display data order. The preset priority order can be a pre-set sorting of data by those skilled in the art, such as sorting data from recent to distant in chronological order. The front-end display data order can be the chronological order that the front-end needs to display. For example, if the user requests to display the data on page 13 first, which corresponds to data from March 12 to March 18, then the front-end display data order will prioritize the data request tasks corresponding to the data from March 12 to March 18, then the data request tasks corresponding to the data from March 5 to March 11, and the data request tasks corresponding to the data from March 19 to March 25, and so on. Currently, if the user's page-turning direction is also known, the data request tasks corresponding to the data from March 5th to March 11th and the data request tasks corresponding to the data from March 19th to March 25th can be further prioritized. For example, if the user turns to the next page, the data request tasks for the data from March 5th to March 11th would have a lower priority than those for the data from March 19th to March 25th. Since the number of data request tasks may exceed the number of tasks that can be processed simultaneously (exceeding the parallel processing capacity), prioritizing the data request tasks helps to prioritize the data that the user urgently needs to display on the screen.

[0063] When managing data request tasks, various management methods are supported, including race, queue jumping, blocking, and reordering. During the execution of a data request task, it can either require the full request data to be returned, or it can adopt a race mode, returning the first piece of data requested, and then returning more data as it is retrieved. This ensures that the front-end can at least display a portion of the data, avoiding excessively long waiting times that would otherwise negatively impact user experience.

[0064] When a new data request to be rendered is received from the front end, the previous data request may not have finished executing. In this case, the previous data request task can be blocked, and the new data request can be executed. In other words, the new data request has a higher execution priority than the old data request.

[0065] Following the above implementation, multiple data request tasks are generated based on the differential data range identifier, and these tasks are sorted according to their current priority and parallel processing capability. This includes: determining associated data range identifiers based on the differential data range identifier, where the associated data range identifier represents the identifier of data that is related to the data corresponding to the differential data range identifier; generating multiple data request tasks based on the differential data range identifier and the associated data range identifier; determining the current priority order based on preset data priority and the differential data range identifier; performing a preliminary sorting of the multiple data request tasks according to the current priority order, and then re-sorting the preliminary sorted data request tasks according to the parallel processing capability, wherein the data request tasks corresponding to the differential data range identifier are prioritized over the data request tasks corresponding to the associated data range identifier.

[0066] Because the data granularity may be relatively small during the data indexing process, users may request specific data segments. A single data point may not provide accurate analysis results and usually requires the assistance of other data for comprehensive judgment. Therefore, users are likely to request related data. Thus, it's possible to pre-define association markers for certain data identifiers. This allows for requests for related data at a later stage when querying the difference data range identifier, and these related data can be pre-stored in designated storage space as needed. The current priority order is determined based on preset data priorities and difference data range identifiers. Specifically, data request tasks corresponding to related data range identifiers can be sorted according to preset data priorities, while data request tasks corresponding to difference data range identifiers can be determined by a combination of the aforementioned preset priorities and / or the order of data displayed on the front end. However, data request tasks corresponding to difference data range identifiers are generally prioritized before those corresponding to related data range identifiers.

[0067] The data request tasks are initially sorted according to their current priority, and then re-sorted according to their parallel processing capabilities. In other words, the former is the overall sorting of the data request tasks, while the latter is the re-sorting of multiple data request tasks based on the aforementioned sorting. Assuming the parallel processing capability is 6, then the first 6 are the first batch and are processed simultaneously. Then, the data request tasks are selected and executed according to the initial sorting results based on the released parallel processing capability.

[0068] Following the above embodiments, the method further includes: during the execution of multiple data request tasks according to the sorting result, if a new data request to be rendered is received from the front end, the data request task that has not yet been completed is blocked. It is understood that if the user changes their request requirements, they now prefer the new data to be displayed on the front end as soon as possible. Continuing to execute the old task is obviously unnecessary; therefore, it is not necessary to wait for the previous batch of data request tasks to complete, but rather to block that batch of data request tasks.

[0069] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the principle of processing a task queue for data request tasks, as provided in an embodiment of the present invention. Figure 3 As shown, after receiving the data requests (data request tasks) to be executed, a task queue is obtained by sorting them by priority. A data request queue (queue executor) with a configurable blocking length (default is 6, i.e., the maximum concurrency of the browser) is provided. A request controller supports racing / queueing / blocking / reordering. Priority requests can control the optimization and degradation of intensive / discrete data according to priority, and data request tasks can be executed in queue. Parameter parsing of regular data is performed sequentially according to the queue. This solution relies on pre-defined interfaces and data from pre-requests / conditions / business scenarios. If any link in the preceding chain fails (condition failure), it can terminate in time (blocking the request) without affecting subsequent links. It supports full return / racing (whoever returns first renders first, single data return) and supports commands such as adjusting priority for reordering and changing the request mode for forced termination, to flexibly control the data flow.

[0070] There might be pages that require a large amount of data, possibly from multiple APIs. For such scenarios, optimization at the business layer is crucial. Infinite scrolling and virtual loading are integrated into form and chart components, allowing for batch / multiple loading. Specifically, data on the page is grouped into sets of six (assuming a browser concurrency limit of six), and rendered in batches using the previously mentioned method for obtaining differences. If updates occur during this process (such as user actions, changes in query conditions, or database updates), the data queue is stopped. This achieves distributed rendering that supports blocking operations. Furthermore, because the front-end has this rendering capability, this distributed and segmented approach can be incorporated into the product design and back-end table design, guiding and optimizing the business logic for better page performance.

[0071] Following the above embodiments, after storing the second sub-data to be rendered in the front-end local initialization storage space, the method further includes: storing the preset query identifier of the second sub-data to be rendered and the preset query identifier of the first sub-data to be rendered in the front-end local reference storage space, and increasing the reference count value of the preset query identifier of the second sub-data to be rendered, and increasing the reference count value of the preset query identifier of the first sub-data to be rendered.

[0072] Following the above embodiments, the method further includes: counting the reference count values ​​of each preset query identifier in the front-end local reference storage space; if the data corresponding to the first target query identifier has not yet been stored in the front-end local initialization storage space, storing the data corresponding to the first target query identifier in the front-end local initialization storage space, wherein the first target query identifier is a preset query identifier whose reference count value is greater than a preset first counting threshold; if the data corresponding to the second target query identifier is stored in the front-end local initialization storage space, deleting the data corresponding to the second target query identifier from the front-end local initialization storage space, wherein the second target query identifier is a preset query identifier whose reference count value is less than a preset second counting threshold, wherein the preset second counting threshold is less than a preset first counting threshold.

[0073] This approach changes the traditional data exchange from backend storage to frontend retrieval to a model where the data is retrieved from the frontend via a combination of frontend and backend storage. It persists identifiable data locally, provides both old and new storage locations, and offers a fast diff and a comparison of retrieval parameters, applying the concept of a memory control group to frontend memory management. The underlying principle is as follows:

[0074] 1. When an object is created, its reference count is 1;

[0075] 2. When it is referenced by other objects, its reference count is incremented by 1;

[0076] 3. When it is released by another object, its reference count is decremented by 1;

[0077] 4. When its reference count is 0, it can be garbage collected.

[0078] This allows data changes to be obtained with minimal performance overhead by capturing the changes between update differences, and is compatible with low-performance machines.

[0079] Since the locally persisted data isn't directly usable for business presentation and rendering, data transformation is necessary. This involves identifying the essential data that the current page needs to render. A combination of breadth-first and depth-first traversal approaches can be used. First, the root node identifier needs to be found based on the business parameters. For example, if the current page needs to query and display workstation pass rates for all batch numbers within the past three months, it first needs to find all current batch numbers (a snapshot with a count on the backend) in the local persisted data (pre-stored data), and then return the corresponding batch set based on the batches with data within the past three months returned by the backend. Then, it requests the three months' worth of batch data for the current data. In the depth-first traversal, the changes to the data are recorded in a counter under the corresponding index. Subsequent data updates or retrievals can then be changed from a full query to an exact match, saving significant query time.

[0080] The data layer update mentioned earlier replaces the traditional N*T (N is the complexity, T is the time taken for a full query) hard traversal update method with a comparison update between the old and new storage spaces (from & to). Specifically, the data index is initialized in the old storage space. Whenever data changes, the index of the updated data is calculated and stored in the new storage space. When a replacement update operation is needed, the updated data is found first using reference counting. If data in the old storage space has been updated, it is moved to the new storage space. This most intuitively reduces the complexity from N*T to (logN – N / 2)*T.

[0081] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the data update and comparison processing principle provided in an embodiment of the present invention, as shown below. Figure 4 As shown, data index and data identifier ( Figure 4The metadata in the memory has a 1:1 correspondence and a mapping relationship. Data indexes are pre-persisted in a preset storage space, such as the front-end local initialization storage space. Source data is referenced and stored in the front-end local reference storage space based on the comparison and matching references of the data to be rendered. The data indexes in the initial storage are placed in the old storage space (front-end local initialization storage space). Whenever data changes, the updated data index is calculated and stored in the new storage space (front-end local reference storage space). When a replacement update operation is needed, the updated data is found first through reference counting. If data in the old storage space is updated, it is transferred (updated) to the new storage space. The corresponding business data is queried by transforming and combining the data indexes and metadata. The changed data sequence is found by comparing the two memory spaces (new and old storage spaces), and the matching data is compared (matched data is returned directly; otherwise, an update is obtained), and the count of the matched parts is updated for future comparisons.

[0082] In one embodiment, after determining the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, the method further includes: displaying at least a portion of the data to be rendered on a preset display interface according to the current display request, and preloading the adjacent data of the at least a portion of the data to be rendered displayed on the preset display interface.

[0083] The rendering layer controls rendering using the queue and data management methods mentioned in the previous two steps, including waiting for rendering, real-time rendering, and silent requests. Please see [link / reference]. Figure 5 , Figure 5 This is a specific schematic diagram of data comparison and return provided in an embodiment of the present invention, such as... Figure 5 As shown, for the request queue, Figure 5 Taking five queues as an example, the count values ​​in the initialization storage and reference storage are updated, prioritizing the identification of updated data through reference counting. If data in the old storage space is updated, it is moved to the new storage space. Then, it is matched with metadata, and the page data (data to be rendered) is obtained by combining the metadata. The matching above and the update below correspond to the cache hit and cache miss updates and update counts mentioned above, respectively.

[0084] Please see Figure 6 , Figure 6 This is a schematic diagram of a display method for data to be rendered provided in an embodiment of the present invention, such as... Figure 6As shown, the actual loaded portion is the entire item, but the user only sees the dark-colored portion representing the item in the middle. The other light-colored blocks, i.e., the adjacent data, have also been pre-loaded, and can be quickly displayed on the front end if the user needs to adjust the displayed data range. D) Using this method, front-end chart / table components with integrated virtual loading and infinite scrolling can be provided, and can be further expanded based on business needs, applying dynamic loading and silent loading controllers to front-end business. Figure 6 This can be understood as the controlled display of returned data (updated data or data that hits the cache) on the page. The part that the user cannot see is to compensate for the lack of smoothness. In other words, there is more data actually displayed than what is shown. This gives the user advance notice and a buffer when scrolling or turning pages, preventing blank spaces.

[0085] In one embodiment, the method further includes: if a new data request to be rendered is received from the front end, comparing the data query range identifier of the new data request to be rendered with the data query range identifier of the previously received data request to be rendered to obtain a difference query range identifier and a same query range identifier; determining the data to be rendered corresponding to the same query range identifier as the third sub-data to be rendered; querying the pre-stored data in the front end's local initialization storage space using the difference query range identifier, and determining the preset data corresponding to the matching preset query identifier as the fourth sub-data to be rendered; if the new matching data range formed by the matching preset query identifiers is smaller than the new data query range corresponding to the data difference query range identifier, based on the new matching data... A new difference data range is determined based on the range and the new data query range, and a new difference data range identifier is determined based on the new difference data range and the difference query range identifier. Multiple new data request tasks are generated based on the new difference data range identifier, and the multiple new data request tasks are sorted according to the new current priority order and the new request parallel processing capability. The multiple new data request tasks are executed according to the sorting result to query the backend database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier. The third, fourth, and fifth sub-data to be rendered are determined as new data to be rendered, and at least part of the new data to be rendered is displayed on the preset display interface according to the new current display request.

[0086] If the data request to be rendered on the front end changes, blindly re-executing the request might waste previous computing resources. The user might simply have increased or decreased the range of data requested. Therefore, it's advisable to first compare the data query range identifier of the new data request with that of the previously received data request. If there's overlap, the query results for the overlapping range can still be used without re-requesting. If there's no overlap, execute the new request as described above. In other words, if the overlapping portion (same query range identifier) ​​corresponds to previously queried data to be rendered, it's directly used as the current result. If the data hasn't been retrieved yet, the previously generated data request task can be used. For newly added data requests, i.e., data ranges corresponding to different query range identifiers, the same method for handling data requests to be rendered can be used. First, check if the required data exists in the front end's local initialization storage space. If not, or if it doesn't fully meet the requirements, obtain the difference data range identifier, generate a new data request task, and execute it.

[0087] Sometimes the requested data volume is very large. In this case, the new current display request only requires that a portion of the data be displayed. In this case, the decision of which data to display can be made based on the new current display request.

[0088] Please see Figure 7 , Figure 7 This invention provides a schematic diagram comparing the time of two updates of the same interface during data rendering using a data request method. Figure 7 As shown in the red box above, the data rendering times using related technologies are 697ms and 4.51s respectively. However, when using the data request method provided in this embodiment, the update time for the same interface on the homepage screen is significantly shortened, decreasing to 270ms and 2.94s. It can be understood that for repeated data requests, the data request method provided in this embodiment can shorten the matching time from data index to data identifier (updating the reference count value and prioritizing matching based on the reference count value, allowing more frequently used data identifiers to be matched earlier, thus shortening the matching time between data index and data identifier), and update locally persistent data as needed, saving more frequently used data. This significantly reduces the time for subsequent identical data requests.

[0089] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating a data request and rendering method using a data request approach provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the query returned data in seconds for a year's worth of data, taking 346ms and 295ms respectively.

[0090] In one embodiment, data triggers only a change query each time, avoiding a full update at the minimum operator level.

[0091] Please see Figure 9 , Figure 9 This is a schematic diagram of a page rendering process using a data request method provided in an embodiment of the present invention, such as... Figure 9 As shown, the initial phase involves basic configuration, such as basic business data, basic business processes, business permissions, work orders, state machines, and reports. This is followed by initialization and entry into the business process phase. During this phase, memory allocation, storage updates, and business process configuration are performed. This phase also includes configuring data indexes, establishing the mapping between data indexes and data identifiers, and storage. Next, the controller process begins, acquiring data and prioritizing data request tasks. A default queue exists, and requests can be blocked during this process. Updates then occur, and during page rendering, the reference count is compared and updated. Data in locally persistent storage is also updated in memory. Real-time rendering with silent loading can be used during rendering.

[0092] The data request method provided in the above embodiments obtains the data request from the front end, converts the data query range index into a data query range identifier, and then uses the data query range identifier to query the pre-stored data in the front end's local initialization storage space. The queried data is used as the first sub-data to be rendered. If the matching data range of the queried data is the same as the data query range corresponding to the data query range identifier, the first sub-data to be rendered is determined as the data to be rendered, thus completing the data request. By pre-storing some data in the front end's local initialization storage space, and prioritizing data querying in this storage space when data needs to be displayed, the data rendering and data update speed can be effectively improved, reducing or even avoiding screen lag or even freezing caused by slow data requests, thereby improving the user experience.

[0093] This method addresses the following issues encountered in web loading and lag when collecting large amounts of data from devices and interacting with users in the Industrial Internet: How to ensure that the volume of each data update is as small as possible? How to quickly retrieve data based on conditions while ensuring business operations? Can a data queue that can block rendering and change in real time be provided to reduce performance overhead? How to ensure stability and smoothness under large data volumes on low-performance devices? The method provided in this embodiment offers a relatively complete end-to-end solution from data acquisition to parsing to rendering; each module supports hot-swapping and can be customized in any direction based on data storage, data queues, and rendering components. It combines the advantages of data sandboxing, memory management, and silent loading. Tests have shown that: the rendering time of the industrial APP (size) homepage large screen has been reduced from more than 8 seconds to about 1-2 seconds; full queries of more than three months of data, regardless of whether the data is hot or cold; interface return time is controlled within 1 second; CRUD operations on all single-page table pages with more than 30 records are stable and smooth; and data update response is in seconds. The issue of lag when rendering big data pages for some on-site customers has been resolved (due to inadequate computer configuration).

[0094] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a data request device to be rendered in an embodiment of the present invention, as shown below. Figure 10 As shown, this embodiment of the invention also provides a data request device 1200 to be rendered. The data request device 1200 includes: a data storage module 1201, used to request preset data from a backend database in advance, and determine the requested preset data and the preset query identifier corresponding to the preset data as pre-stored data, and store the pre-stored data in a frontend local initialization storage space, and store a preset index identifier mapping relationship, the preset index identifier mapping relationship representing the correspondence between the data query range index and the data query range identifier of the data in the backend database; and a data acquisition module 1202, used to acquire the data request to be rendered from the frontend, the data request to be rendered including at least the data query range index. The system retrieves and determines the data query range identifier corresponding to the data query range index based on the mapping relationship between the data query range index and the preset index identifier; the data query module 1203 is used to query the pre-stored data in the front-end local initialization storage space using the data query range identifier; the data matching module 1204 is used to determine the preset data corresponding to the matching preset query identifier as the first sub-data to be rendered if there is a match between the preset query identifier and the data query range identifier; the determination module 1205 is used to determine the first sub-data to be rendered as the data to be rendered if the matching data range formed by the matching preset query identifier is the same as the data query range corresponding to the data query range identifier, thus completing the request for the data to be rendered.

[0095] In one embodiment, the determining module is further configured to: if the range of matched data formed by the matched preset query identifier is smaller than the range of data query corresponding to the data query range identifier, determine the difference data range based on the range of matched data and the range of data query, and determine the difference data range identifier based on the difference data range and the range of data query; generate multiple data request tasks based on the difference data range identifier, sort the multiple data request tasks according to the current priority order and the parallel processing capability of the requests, execute the multiple data request tasks according to the sorting result, so as to query the second sub-data to be rendered corresponding to the difference data range identifier from the backend database, and store the second sub-data to be rendered in the frontend local initialization storage space; determine the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, and complete the request for the data to be rendered.

[0096] In one embodiment, the device further includes an update module, which, after storing the second sub-data to be rendered in the front-end local initialization storage space, stores the preset query identifier of the second sub-data to be rendered and the preset query identifier of the first sub-data to be rendered in the front-end local reference storage space, and increments the reference count value of the preset query identifier of the second sub-data to be rendered and the reference count value of the preset query identifier of the first sub-data to be rendered.

[0097] In one embodiment, the update module is further configured to: count the reference count values ​​of each preset query identifier in the front-end local reference storage space; if the data corresponding to the first target query identifier has not yet been stored in the front-end local initialization storage space, store the data corresponding to the first target query identifier in the front-end local initialization storage space, wherein the first target query identifier is a preset query identifier whose reference count value is greater than a preset first counting threshold; if the data corresponding to the second target query identifier is stored in the front-end local initialization storage space, delete the data corresponding to the second target query identifier from the front-end local initialization storage space, wherein the second target query identifier is a preset query identifier whose reference count value is less than a preset second counting threshold, wherein the preset second counting threshold is less than a preset first counting threshold.

[0098] In one embodiment, the determining module is further configured to: determine an associated data range identifier based on the difference data range identifier, wherein the associated data range identifier represents the identifier of data that is associated with the data corresponding to the difference data range identifier; generate multiple data request tasks based on the difference data range identifier and the associated data range identifier; determine the current priority order based on the preset data priority and the difference data range identifier; perform preliminary sorting of the multiple data request tasks according to the current priority order, and further sort the multiple data request tasks after preliminary sorting according to the parallel processing capability of the requests, wherein the sorting of the data request task corresponding to the difference data range identifier takes precedence over the data request task corresponding to the associated data range identifier.

[0099] In one embodiment, the device further includes a blocking module, which is used to block data request tasks that have not yet been completed if a new data request to be rendered is received from the front end during the execution of multiple data request tasks according to the sorting result.

[0100] In one embodiment, the device further includes a display module, configured to, after determining the second sub-data to be rendered and the first sub-data to be rendered as data to be rendered, display at least a portion of the data to be rendered on a preset display interface according to the current display request, and preload adjacent data of the at least portion of the data to be rendered displayed on the preset display interface; and, if a new data to be rendered request is received from the front end, compare the data query range identifier of the new data to be rendered request with the data query range identifier of the previously received data to be rendered request to obtain a difference query range identifier and a same query range identifier; determine the data to be rendered corresponding to the same query range identifier as the third sub-data to be rendered; query the pre-stored data in the front end's local initialization storage space using the difference query range identifier, and determine the preset data corresponding to the matching preset query identifier as the fourth sub-data to be rendered; if a match is found... The new matching data range formed by the preset query identifier is smaller than the new data query range corresponding to the data difference query range identifier. A new difference data range is determined based on the new matching data range and the new data query range. A new difference data range identifier is determined based on the new difference data range and the difference query range identifier. Multiple new data request tasks are generated based on the new difference data range identifier. The multiple new data request tasks are sorted according to the new current priority order and the new request parallel processing capability. The multiple new data request tasks are executed according to the sorting result to query the backend database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier. The third, fourth, and fifth sub-data to be rendered are determined as new data to be rendered. At least part of the new data to be rendered is displayed on the preset display interface according to the new current display request.

[0101] Specific limitations regarding the data request device can be found in the limitations of the data request method described above, and will not be repeated here. Each module in the aforementioned data request device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.

[0102] In this embodiment, the data request device is actually configured with multiple modules to execute the data request method in any of the above embodiments. The specific functions and technical effects can be referred to in the above embodiments, and will not be repeated here.

[0103] This disclosure also provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the electronic device to perform the method provided in any of the above embodiments.

[0104] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0105] Figure 11 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 11 The computer system 1300 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of the embodiments of this application.

[0106] like Figure 11 As shown, the computer system 1300 includes a Central Processing Unit (CPU) 1301, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1302 or programs loaded from Storage Unit 1308 into Random Access Memory (RAM) 1303. The RAM 1303 also stores various programs and data required for system operation. The CPU 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An I / O (Input / Output) interface 1305 is also connected to the bus 1304.

[0107] The following components are connected to I / O interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to I / O interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1310 as needed so that computer programs read from them can be installed into storage section 1308 as needed.

[0108] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1309, and / or installed from removable medium 1311. When the computer program is executed by central processing unit (CPU) 1301, it performs various functions defined in the system of this application.

[0109] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0110] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication between them. The memory is used to store computer programs, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer programs, so that the electronic device performs the various steps of the above method.

[0111] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0112] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application refers to any and all possible combinations of one or more of the associated listed elements. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated subsamples, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other subsamples, wholes, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes the element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0114] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some sub-samples may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for requesting data to be rendered, characterized in that, The method for requesting data to be rendered includes: Obtain the data request to be rendered from the front end, wherein the data request to be rendered includes at least a data query range index; The data query range identifier corresponding to the data query range index is determined according to the mapping relationship between the data query range index and the preset index identifier. The preset index identifier mapping relationship represents the correspondence between the data query range index and the data query range identifier of the data in the backend database. The data query range identifier is used to query the pre-stored data in the front-end local initialization storage space. The pre-stored data includes preset data that is requested from the back-end database and stored in the front-end local initialization storage space in advance, as well as the preset query identifier corresponding to the preset data. If a preset query identifier matches the data query range identifier, the preset data corresponding to the matching preset query identifier will be determined as the first sub-data to be rendered. If the matching data range formed by the preset query identifier is the same as the data query range corresponding to the data query range identifier, the first sub-data to be rendered is determined as the data to be rendered, and the request for the data to be rendered is completed. If the range of matched data formed by the preset query identifier is smaller than the range of data query corresponding to the range of data query identifier, the difference range of data is determined based on the range of matched data and the range of data query, and the difference range identifier is determined based on the difference range of data and the range of data query identifier. Multiple data request tasks are generated based on the difference data range identifier, and the multiple data request tasks are sorted according to the current priority order and request parallel processing capability. The multiple data request tasks are executed according to the sorting result to query the backend database to obtain the second sub-data to be rendered corresponding to the difference data range identifier, and store the second sub-data to be rendered in the frontend local initialization storage space. The second sub-data to be rendered and the first sub-data to be rendered are determined as the data to be rendered, and the request for the data to be rendered is completed.

2. The method for requesting data to be rendered as described in claim 1, characterized in that, After storing the second sub-data to be rendered in the front-end local initialization storage space, the method further includes: The preset query identifier of the second sub-data to be rendered and the preset query identifier of the first sub-data to be rendered are stored in the front-end local reference storage space, and the reference count value of the preset query identifier of the second sub-data to be rendered and the reference count value of the preset query identifier of the first sub-data to be rendered are increased.

3. The method for requesting data to be rendered as described in claim 2, characterized in that, The method further includes: Calculate the reference count value of each preset query identifier in the front-end local reference storage space; If the data corresponding to the first target query identifier has not yet been stored in the front-end local initialization storage space, the data corresponding to the first target query identifier will be stored in the front-end local initialization storage space. The first target query identifier is a preset query identifier whose reference count value is greater than a preset first count threshold. If the data corresponding to the second target query identifier is stored in the front-end local initialization storage space, the data corresponding to the second target query identifier is deleted from the front-end local initialization storage space. The second target query identifier is a preset query identifier whose reference count value is less than a preset second count threshold, and the preset second count threshold is less than the preset first count threshold.

4. The method for requesting data to be rendered as described in claim 1, characterized in that, Multiple data request tasks are generated based on the difference data range identifier, and these tasks are sorted according to their current priority and parallel processing capability, including: A related data range identifier is determined based on the difference data range identifier, wherein the related data range identifier represents the identifier of data that is related to the data corresponding to the difference data range identifier; Multiple data request tasks are generated based on the difference data range identifier and the associated data range identifier; The current priority order is determined based on the preset data priority and the difference data range identifier; The multiple data request tasks are initially sorted according to the current priority order, and then sorted again according to the parallel processing capability of the requests, wherein the data request tasks corresponding to the difference data range identifier are sorted with priority over the data request tasks corresponding to the associated data range identifier.

5. The method for requesting data to be rendered as described in claim 1, characterized in that, The method further includes: During the execution of the multiple data request tasks according to the sorting results, if a new data request to be rendered is received from the front end, the data request task that has not yet been completed is blocked.

6. The method for requesting data to be rendered as described in any one of claims 1-5, characterized in that, Before querying pre-stored data in the front-end local initialization storage space using the data query range identifier, the method includes: Pre-stored data is retrieved from the backend database according to a preset query identifier, and the pre-stored data is associated with and stored in the frontend local initialization storage space. The preset query identifier is obtained based on a pre-configured set of pre-stored query identifiers.

7. The method for requesting data to be rendered as described in any one of claims 1-5, characterized in that, Before querying pre-stored data in the front-end local initialization storage space using the data query range identifier, the method includes: Configure the corresponding data index based on the data identifier of the smallest storage unit of data in the backend database; Establish a preset index identifier mapping relationship for all data identifiers, data indexes, and the correspondence between the data identifiers and data indexes in the backend database, so as to convert the data query range index into the data query range identifier through the preset index identifier mapping relationship; After the data display service is started for the first time, the preset index identifier mapping relationship is silently requested and encrypted and stored in the front-end local reference storage space.

8. The method for requesting data to be rendered as described in any one of claims 1-5, characterized in that, After determining the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, the method further includes: According to the current display request, at least a portion of the data to be rendered is displayed on the preset display interface, and the adjacent data of the at least a portion of the data to be rendered displayed on the preset display interface are preloaded; Furthermore, the method further includes: If a new data request to be rendered is received from the front end, the data query range identifier of the new data request to be rendered is compared with the data query range identifier of the previously received data request to be rendered to obtain the difference query range identifier and the same query range identifier. The data to be rendered corresponding to the same query range identifier is determined as the third sub-data to be rendered; The pre-stored data in the front-end local initialization storage space is queried using the difference query range identifier, and the preset data corresponding to the matching preset query identifier is determined as the fourth sub-data to be rendered; If the new matching data range formed by the preset query identifier is smaller than the new data query range corresponding to the data difference query range identifier, a new difference data range is determined based on the new matching data range and the new data query range, and a new difference data range identifier is determined based on the new difference data range and the difference query range identifier. Multiple new data request tasks are generated based on the new difference data range identifier, and the multiple new data request tasks are sorted according to the new current priority order and the new parallel processing capability of the requests. The multiple new data request tasks are executed according to the sorting result in order to query the fifth sub-data to be rendered corresponding to the new difference data range identifier from the backend database. The third, fourth, and fifth sub-data to be rendered are identified as new data to be rendered, and at least a portion of the new data to be rendered is displayed on the preset display interface according to the new current display request.

9. A device for requesting data to be rendered, characterized in that, The data request device to be rendered includes: The data storage module is used to request preset data from the backend database in advance, and determine the requested preset data and the preset query identifier corresponding to the preset data as pre-stored data, store the pre-stored data in the frontend local initialization storage space, and store the preset index identifier mapping relationship, wherein the preset index identifier mapping relationship represents the correspondence between the data query range index and the data query range identifier of the data in the backend database; The data acquisition module is used to acquire the data request to be rendered from the front end. The data request to be rendered includes at least a data query range index, and the data query range identifier corresponding to the data query range index is determined according to the mapping relationship between the data query range index and the preset index identifier. The data query module is used to query the pre-stored data in the front-end local initialization storage space using the data query range identifier; The data matching module is used to determine the preset data corresponding to the matching preset query identifier as the first sub-data to be rendered if there is a preset query identifier that matches the data query range identifier. The determination module is configured to: determine the first sub-data to be rendered as the data to be rendered if the matching data range formed by the matching preset query identifier is the same as the data query range corresponding to the data query range identifier, thus completing the request for the data to be rendered; and determine a difference data range based on the matching data range and the data query range if the matching data range formed by the matching preset query identifier is smaller than the data query range corresponding to the data query range identifier, and determine a difference data range identifier based on the difference data range and the data query range identifier; generate multiple data request tasks based on the difference data range identifier, sort the multiple data request tasks according to the current priority order and request parallel processing capability, execute the multiple data request tasks according to the sorting result, query the backend database to obtain the second sub-data to be rendered corresponding to the difference data range identifier, and store the second sub-data to be rendered in the frontend local initialization storage space; and determine the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, thus completing the request for the data to be rendered.