To-be-rendered data request method and device

By querying and processing data query range index in the front-end local initialization storage space, the data request task is decomposed in parallel, and the lag caused by traversing recursive updates is solved, and the data rendering rate and user experience are improved.

CN119127976AActive Publication Date: 2024-12-13广域铭岛数字科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411264455.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-13
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

In the prior art, traversing recursive update technology leads to stuttering, not smooth or even stuck when rendering and dynamic updates of a large number of data, affecting the user experience.

Method used

By obtaining the data to be rendered on the front end, the data query range index and preset index identification mapping relationship are used to determine the data query range identification, and the pre-stored data is preferred in the local initialized storage space of the front end. If it matches, it is determined as the data to be rendered; If the mismatch is used, the difference data range is generated, and the data request tasks are processed in parallel are broken down, and priority is given to improve the rendering rate.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127976A_ABST
    Figure CN119127976A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a to-be-rendered data request method and device.The method comprises the steps that a to-be-rendered data request of a front end is obtained, and a data query range index in the to-be-rendered data request is converted into a data query range identifier; then querying pre-stored data in a front-end local initialization storage space by using the data query range identifier, taking the queried data as first to-be-rendered sub-data, and if a matched data range of the queried data is the same as a data query range corresponding to the data query range identifier, rendering the first to-be-rendered sub-data; and determining the first to-be-rendered sub-data as the to-be-rendered data, completing the request of the to-be-rendered data, pre-storing part of the data in the front-end local initialization storage space, and preferentially performing data query in the storage space when the data needs to be displayed, so that the data rendering and data updating rates can be effectively improved, and the data display efficiency is improved. The problem of picture jamming and even jamming caused by slow data request is reduced or even avoided, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for requesting data to be rendered. Background Art

[0002] With the technological innovation of big data / high concurrency in recent years, in many business scenarios, there will be a large number of data rendering and dynamic update nodes on the front end. The traversal recursive update technology used in related technologies to achieve large-scale data rendering and dynamic update will cause obvious lag, unsmoothness or even freezing, resulting in poor user experience. Summary of the invention

[0003] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0004] In view of the shortcomings of the prior art mentioned above, the present invention discloses a method and device for requesting data to be rendered, so as to solve the technical problem that due to the traversal recursive update technology adopted in the related technology to realize large-scale data rendering and dynamic update, obvious lag, unsmoothness or even freezing will occur, resulting in poor user experience.

[0005] An embodiment of the present invention discloses a method for requesting data to be rendered, the method comprising: obtaining a request for data to be rendered of a front end, the request for data to be rendered at least comprising 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, the preset index identifier mapping relationship representing a corresponding relationship between the data query range index and the data query range identifier of data in a back-end database; querying pre-stored data in a local initialization storage space of a front end with the data query range identifier, the pre-stored data comprising preset data pre-requested from a back-end database and stored in the local initialization storage space of the front end and a preset query identifier corresponding to the preset data; if there is a preset query identifier that matches the data query range identifier, determining the preset data corresponding to the matched preset query identifier as first sub-data to be rendered; if the matching data range formed by the matched preset query identifier 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, and completing the request for the data to be rendered.

[0006] In one embodiment of the present invention, the method also includes: if the matching data range constituted 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, and sorting the multiple data request tasks according to the current priority order and the request parallel processing capability, executing the multiple data request tasks according to the sorting result, so as to query the back-end database to obtain the second sub-data to be rendered corresponding to the difference data range identifier, and storing the second sub-data to be rendered in the local initialization storage space of the front-end; 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 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.

[0008] In one embodiment of the present invention, the method also includes: counting 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 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, 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, deleting the data corresponding to the second target query identifier 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.

[0009] In one embodiment of the present invention, multiple data request tasks are generated according to the difference 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 difference data range identifier, the associated data range identifier representing an identifier of data that has an associated relationship with the data corresponding to the difference data range identifier; generating multiple data request tasks according to the difference data range identifier and the associated data range identifier; determining the current priority order according to the preset data priority and the difference data range identifier; preliminarily sorting the multiple data request tasks according to the current priority order, and re-sorting the preliminarily sorted multiple data request tasks according to the request parallel processing capability, wherein the data request tasks corresponding to the difference data range identifier are sorted before the data request tasks corresponding to the associated data range identifier.

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

[0011] In one embodiment of the present invention, before querying the pre-stored data in the front-end local initialized storage space with the data query range identifier, the method includes: obtaining the pre-stored data by querying from the back-end database according to a preset query identifier, and storing the pre-stored data in the front-end local initialized storage space by associating the pre-stored data 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 the pre-stored data in the front-end local initialized storage space with the data query range identifier, the method includes: configuring the corresponding data index according to the data identifier of the smallest storage unit of the 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 the data in the back-end database, so as to realize the conversion of the data query range index into the data query range identifier through the preset index identifier mapping relationship; after starting the data display service for the first time, silently requesting 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 the second sub-data to be rendered and the first sub-data to be rendered are determined as data to be rendered, the method further includes: displaying at least part of the data to be rendered on a preset display interface according to a current display request, and preloading adjacent data of the at least part of the data to be rendered displayed on the preset display interface; and the method further includes: if a new request for data to be rendered is received from the front end, comparing the data query range identifier of the new request for data to be rendered with the data query range identifier of the request for data to be rendered received last time, to obtain a difference query range identifier and an identical query range identifier; determining the data to be rendered corresponding to the identical query range identifier as the third sub-data to be rendered; querying the pre-stored data in the local initialization storage space of the front end with 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 matching 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; a plurality of new data request tasks are generated according to the new difference data range identifier, and the plurality of new data request tasks are sorted according to the new current priority order and the new request parallel processing capability, and the plurality of new data request tasks are executed according to the sorting result to query from the back-end database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier; the third sub-data to be rendered, the fourth sub-data to be rendered and the 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] The embodiment of the present invention discloses a device for requesting data to be rendered, the device comprising: a data storage module, for requesting preset data from a back-end database in advance, and determining the requested preset data and a preset query identifier corresponding to the preset data as pre-stored data, and storing the pre-stored data in a local initialization storage space of a front-end, and storing a preset index identifier mapping relationship, wherein the preset index identifier mapping relationship represents a corresponding relationship between a data query range index and a data query range identifier of data in the back-end database; a data acquisition module, for acquiring a data request to be rendered from a front-end, wherein the data request to be rendered at least includes a data query range index, and according to the preset index identifier mapping relationship, the data query range index is determined to be the corresponding relationship between the preset index and the data query range identifier of data in the back-end database; 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; a data query module is used to query the pre-stored data in the local initialization storage space of the front-end with the data query range identifier; a 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; a determination module is used to determine the first sub-data to be rendered as the data to be rendered if the matching data range constituted by the matching preset query identifier is the same as the data query range corresponding to the data query range identifier, thereby completing the request for the data to be rendered.

[0015] An embodiment of the present 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 executes the above method.

[0016] Beneficial effects of the present invention:

[0017] By obtaining the data request to be rendered from the front end, the data query range index in the data request to be rendered is converted into a data query range identifier that can be used to query the back-end database and the front-end local initialized storage space data based on the preset index identifier mapping relationship, and then the pre-stored data in the front-end local initialized storage space is queried with the data query range identifier, and 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 part of the data in the front-end local initialized storage space, when the data needs to be displayed, data query is preferentially performed in this storage space, which can effectively improve the rate of data rendering and data update, reduce or even avoid the problem of screen freeze or even freeze caused by slow data request, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

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

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

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

[0024] Figure 7 A schematic diagram of a time comparison of two updates of the same interface when rendering data using a method for requesting data to be rendered provided in an embodiment of the present invention;

[0025] Figure 8 This is a schematic diagram of a method for requesting data to be rendered and performing data request and rendering provided in an embodiment of the present invention;

[0026] Fig. 9 It is a flow chart of a method for requesting data to be rendered to perform page rendering provided in an embodiment of the present invention;

[0027] Fig.10 is a structural schematic diagram of a device for requesting data to be rendered in an embodiment of the present invention;

[0028] Fig.11 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0030] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the form, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0031] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0032] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

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

[0034] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0035] The term "and / or" is a description of the association relationship 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 is a flow chart of a method for requesting data to be rendered in an embodiment of the present invention. Figure 1 As shown, the embodiment of the present disclosure provides a method for requesting data to be rendered, including:

[0037] Step S110, obtaining a request for data to be rendered from the front end.

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

[0039] The data query range index may include multiple sub-index values, such as XX process, XX year, XX month, XX date, XX period, and XX category data, so that the data query range index is formed by multiple sub-index values. As an example, the selection of sub-index values ​​may be provided through the provided data request page.

[0040] In one embodiment, before querying the pre-stored data in the local initialization storage space of the front-end with the data query range identifier, the method includes: configuring the corresponding data index according to the data identifier of the smallest storage unit of the 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 the data indexes of all the data in the back-end database, so as to realize the conversion of the data query range index into the data query range identifier through the preset index identifier mapping relationship; after starting the data display service for the first time, silently requesting the preset index identifier mapping relationship and encrypting and storing it in the local reference storage space of the front-end.

[0041] The smallest storage unit is the identifier of the smallest granularity of the data stored in the backend database, so that data can be queried and obtained from more dimensions later. The data identifier is an identifier used to represent the identity of the data during the data storage process. Since the data identifier is more for data storage differentiation services, the readability is often poor. Therefore, a corresponding data index with higher readability can be configured for the data identifier, so that users can know the specific data type through the data index and build a data query range index. Please refer to Figure 2 , Figure 2 FIG. 1 is a schematic diagram of an interface for customizing a business field provided in an embodiment of the present invention. Figure 2 As shown, as an example, the disassembly type on the left can input the corresponding data index, such as the field name, etc., and the configuration CODE on the right can input the corresponding data identifier. By pre-configuring the data index corresponding to the data identifier and establishing an association between the two, a preset index identifier mapping relationship is 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 method can be used to structure and split business data such as industrial manufacturing QMS (Quality Management System) and APS (Advanced Planning and Scheduling), providing the methodology and data structure of the smallest searchable unit, so as to minimize the cost of each update. Business fields can be customized to the maximum degree of divisibility according to the scenario. Table fields and search units can be customized according to the business.

[0043] In the data acquisition stage, in more complex business scenarios, the front end may request a back end interface containing a large amount of data. On the one hand, the application layer data transmission time will be very long (including query / wait / download / rendering). By changing the data acquisition of such interfaces to: first obtain the index of such a large amount of data (which can be an ID set / identifier, etc.). The front end can query the data of the corresponding index according to business needs, ensuring that the granularity of the front end from calling the interface to rendering is minimized.

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

[0045] It can be that after the data display service is started for the first time, or after the entire service is enabled for the first time, the pre-stored data is determined by the preset query identifier pre-configured by the technicians in this field, and the pre-stored data is associated with the pre-stored data and stored in the local initialization storage space of the front end. Among them, the first startup of the data display service can be the state when the service is started once, or when the data display service is logged in through a specific account and password, and the first time the entire service is enabled is in the global concept, when the data display service is started for the first time. The preset query identifier can be a data identifier corresponding to the data that may be frequently requested, which is obtained by the technicians in this field through business experience or other data statistics methods. Obviously, the number of the preset query identifiers is multiple. By storing the data that is more frequently used in the service locally and persistently, it is possible to avoid the front end frequently requesting interfaces with large amounts of data.

[0046] In order to avoid storing too much data, the set of the mentioned index (data index) and identifier (data identifier) ​​is stored in a map (preset index identifier mapping relationship) and is silently requested for encrypted storage after login (after the data display service is started for the first time, or after the entire service is enabled for the first time). In this way, space can be exchanged for time, speeding up the data request and reducing the time consumption of data rendering.

[0047] In the above manner, since the smallest divisible index is provided in advance based on the minimum granularity of data storage, it is convenient for users to request data in a more refined manner and also convenient for subsequent accurate extraction of data.

[0048] Step S120: 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.

[0049] The preset index identifier mapping relationship represents the corresponding relationship 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 embodiment, the preset index identifier mapping relationship includes a mapping relationship between a data index and a data identifier, the data query range index includes multiple data indexes, a corresponding data identifier is determined for each data index, and a data query range identifier is generated based on all the obtained data identifiers. For example, qualified data within a certain period of a certain process is queried. In the above manner, a data query range index with high readability can be converted into a data query range identifier that is convenient for subsequent data retrieval.

[0051] Step S130, querying the pre-stored data in the local initialization storage space of the front end with the data query range identifier.

[0052] The pre-stored data includes preset data requested from the back-end database and stored in the local initialization storage space of the front-end in advance, and a preset query identifier corresponding to the preset data.

[0053] As mentioned in the above embodiment, some commonly used data will be stored in the local initialization storage space of the front end in advance, and the preset query identifier corresponding to the data is also stored in association for the convenience of retrieval and query. The preset query identifier and the data identifier in the data query range identifier use the same construction rules, but different names are used to distinguish different stages. In this way, the data query range identifier can be matched with all the preset query identifiers in the local initialization storage space of the front end to realize data query.

[0054] In the related art, all requests for data that need to be rendered and displayed later need to be queried from the back-end database, and the accuracy of the request is not high. It is necessary to determine the query path first before the corresponding data can be found. The overall retrieval speed is slow, which leads to freezes in the front-end display due to the failure to provide data in time. However, the method provided by the embodiment of the present application is used to query data from the local front-end local initialization storage space. On the one hand, the data has been pre-stored locally, saving the time for data requests. On the other hand, since the correspondence between the data index and the data identifier is pre-configured, the data retrieval path can be determined more quickly, and the corresponding data can be found more quickly. Even if the data stored in the local front-end initialization storage space cannot fully meet the user's needs, it is also possible to provide a part of the data for the front-end display first to avoid the screen from freezing due to no data to display, which can effectively improve the user experience.

[0055] Step S140: If there is a match between the preset query identifier and the data query range identifier, the preset data corresponding to the matched preset query identifier is determined as the first sub-data to be rendered.

[0056] It can be understood that, assuming that the data query range identifier is a certain data of a certain business in the past month, there are one or more identifiers corresponding to a certain data 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 rarely used, and there is no corresponding data in the local initialization storage space of the front-end, that is, all the preset query identifiers in the local initialization storage space of the front-end fail to match. In this case, the data can be retrieved using the existing technology, or the corresponding data can be queried from the back-end database through the data query range identifier.

[0058] Step S150: if the matching data range formed by the matched 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 that the pre-stored data is stored by date, the matching data range constituted by the matching preset query identifier is a certain business data in the past month, and the data query range corresponding to the data query range identifier is also a certain business data in the past month, then the two are considered to be the same, and the pre-stored data in the local initialized storage space on the front end can meet the needs of the request. There is no need to re-request data from the back-end database, which can effectively save time.

[0060] In one embodiment, the method further includes: if the matching data range formed by the matched 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, and sorting the multiple data request tasks according to the current priority order and the request parallel processing capability, executing the multiple data request tasks according to the sorting result, so as to query from the backend database to obtain the second sub-data to be rendered corresponding to the difference data range identifier, and storing the second sub-data to be rendered in the local initialization storage space of the front end;

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

[0062] Sometimes users may need data from the past six months, but the local initialization storage space on the front end only stores data from the past month. At this time, the data in the local initialization storage space on the front end cannot meet the needs. Obviously, the matching data range is smaller than the data query range, that is, the matching data range is a subset of the data query range. Then, it is necessary to request the difference data from the back-end database to the front end. If all data is requested from the back-end database, it is obviously troublesome and wastes early resources. At this time, the difference data range can be obtained by calculating the difference between the matching data range and the data query range, such as data from February to May. Then, combined with other information in the data query range identifier, the identifier of the required data can be determined, that is, the difference data range identifier, and the remaining data can be queried from the back-end database based on the difference data range identifier. When data needs to be requested from the back-end database, it can be split into one or more data request tasks. A higher priority is set for the data request task corresponding to the data currently required to be displayed on the front end, and it is processed first. The request parallel processing capability represents the number of data request tasks that can be processed simultaneously. The current priority order can be determined comprehensively based on the preset priority order and / or the front-end display data order. The preset priority order can be a pre-set sorting of data by technical personnel in this field, such as chronological order from near to far. The front-end display data order can be the chronological order that the current front-end needs to display. For example, the user requires to display the data on page 13 first, and the data should correspond to the data from March 12 to March 18. At this time, the front-end display data order is to prioritize the data request tasks corresponding to the data from March 12 to March 18, and 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. At present, if the user's page turning direction can be obtained, 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 can be further sorted. For example, if the page is turned backward, the priority of the data request tasks corresponding to the data from March 5 to March 11 is lower than the priority of the data request tasks corresponding to the data from March 19 to March 25. Since the number of data request tasks may exceed the number of tasks that can be processed simultaneously at one time (exceeding the request parallel processing capability), sorting the data request tasks according to priority is conducive to giving priority to the data that the user is anxious to display on the screen.

[0063] When managing data request tasks, management methods such as racing / queue cutting / blocking / rearrangement can be supported. In the process of executing data request tasks, it can be required to return all the requested data, or it can be in racing mode, where the first requested single data is returned first, and then as more data is queried, it is returned in sequence. In this way, the front end can at least display part of the data, avoiding the long time of waiting for all data to be queried, which affects the user experience.

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

[0065] Following the above implementation, multiple data request tasks are generated according to the difference 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 the associated data range identifier based on the difference data range identifier, the associated data range identifier represents the identifier of data that has an associated relationship with the data corresponding to the difference data range identifier; generating multiple data request tasks according to the difference data range identifier and the associated data range identifier; determining the current priority order according to the preset data priority and the difference data range identifier; preliminarily sorting the multiple data request tasks according to the current priority order, and re-sorting the preliminarily sorted multiple data request tasks according to the request parallel processing capability, wherein the data request tasks corresponding to the difference data range identifier are sorted before the data request tasks corresponding to the associated data range identifier.

[0066] Since the data granularity may be relatively small during the process of data index formulation, it is possible that the user requests a certain segmented data, and a single data may not be able to obtain accurate analysis results, and usually other data are needed to assist in comprehensive judgment. Therefore, it is highly likely that the user will continue to request the associated data of the data. Therefore, the associated identifiers of certain data identifiers can be pre-set, and then when performing a difference data range identifier query, the associated data request can also be made at a later stage, and pre-stored in the designated storage space as needed. The current priority order is determined according to the preset data priority and the difference data range identifier, that is, the data request tasks corresponding to the associated data range identifier can be sorted according to the preset data priority order, and the data request tasks corresponding to the difference data range identifier can be comprehensively determined according to the aforementioned preset priority and / or the front-end display data order, but the data request tasks corresponding to the difference data range identifier are overall sorted before the data request tasks corresponding to the associated data range identifier.

[0067] Multiple data request tasks are preliminarily sorted according to the current priority order, and the preliminarily sorted multiple data request tasks are re-sorted according to the request parallel processing capability. That is, the former is the sorting of the overall data request tasks, and the latter is to re-sort the multiple data request tasks based on the aforementioned sorting. Assuming that the request parallel processing capability is 6, the first 6 are the first batch and are processed at the same time, and then the data request tasks are selected and executed according to the preliminary sorting results based on the released request parallel processing capability.

[0068] Following the above embodiment, the method further includes: in the process of executing 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 tasks that have not yet been completed are blocked. It can be understood that if the user changes his request requirements, then the user currently hopes that the new data can be displayed on the front end as soon as possible. At this time, it is obviously unnecessary to continue to execute the old tasks. Therefore, it is not necessary to wait for the previous batch of data request tasks to be completed, but to block the data request tasks of this batch.

[0069] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram showing a principle of processing a task queue for a data request task provided in an embodiment of the present invention. Figure 3 As shown, after obtaining the data request (data request task) to be executed, the task queue is obtained by sorting by priority, and a data request queue (queue executor) with a configurable blocking length (the default is 6, that is, the maximum concurrency of the browser) is provided. The request controller supports racing / queue interruption / blocking / rearrangement. Priority requests can control intensive / discrete data to optimize and degrade according to priority, and can execute data request tasks by queue interruption; parameter parsing conventional data is executed in sequence according to the queue; the solution relies on the pre-required interface and the data of the pre-request / condition / business scenario. When any of the previous links fails (conditional failure), it can be terminated in time (blocking the request) without affecting the subsequent links; it can support full return / racing (whoever returns first renders first, single data return) and support instructions such as adjusting the priority to reorder, changing the request mode to force end, etc., to flexibly control the data flow.

[0070] There may be a page that requests a large amount of data, and the data may come from several interfaces. For this scenario, more intelligence is optimized at the business layer. Infinite scrolling and virtual loading are integrated into form and chart components. That is, loading in batches / multiple times. Specifically, the data on the page is grouped into 6 (assuming that the browser concurrency limit is 6), and the request rendering is done in batches through the method of obtaining difference data mentioned above. If there is an update during the process (such as user operation, query condition change, database update, etc.), the data queue is stopped. Distributed rendering that supports blocking operations is achieved. In addition, because the front end has such rendering capabilities, when doing business design for the product and table design for the back end, this idea of ​​distribution and cutting can be taken into account, and the business can be guided and optimized to achieve better page performance.

[0071] Continuing from the above embodiment, after storing the second sub-data to be rendered in the local initialization storage space of the front-end, the method also 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 local reference storage space of the front-end, 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] Continuing from the above embodiment, the method also includes: counting 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 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, the first target query identifier being 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, deleting the data corresponding to the second target query identifier from the front-end local initialization storage space, the second target query identifier being a preset query identifier whose reference count value is less than a preset second count threshold, the preset second count threshold being less than the preset first count threshold.

[0073] In this way, the traditional backend storage frontend acquisition can be changed to the data interaction direction of frontend + backend storage and then acquired by the frontend, local persistence can be achieved through retrieval identification data, new and old storage intervals can be provided, and a control group of fast diff and retrieval parameters can be provided, and the idea of ​​memory control group can be applied to frontend memory management. The 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 increased by 1;

[0076] 3. When it is released by other objects, its reference count is reduced by 1;

[0077] 4. When its reference count reaches 0, it can be recycled.

[0078] In this way, the changes between the update differences can be obtained with minimal performance overhead, which is compatible with low-performance machines.

[0079] Since the local persistent storage is not directly usable as data for business presentation and rendering, data conversion is required here, that is, to find out which data is necessary for the current page to be converted for rendering. You can combine the priority method of breadth traversal and depth traversal, that is, first find the root node identifier that needs to be requested based on the input parameters in the business. For example, the current page needs to query the workstation qualification rate data under all batch numbers within three months for presentation. You need to first find all current batch numbers (there is a snapshot of the statistical count in the backend) from the breadth of the local persistent data (pre-stored data), and then return the batches with data within three months from the backend. Return the corresponding batch set, and then request the three-month batch data under the current data. In the deep traversal, store the data change situation in the counter under the corresponding index as an identifier. When the data is updated or retrieved again, the original full query can be changed to an exact match, saving a lot of query time.

[0080] The update of the data layer mentioned above is done by changing the traditional N*T (N is the complexity, T is the duration of the full query) hard traversal update method to a comparison update of the new and old storage spaces (from & to). The specific principle is that the initialized stored data index is placed in the old storage space, and each time the data changes, the updated data index is calculated and stored in the new storage space. When a replacement update operation is required, the updated data is found first through the reference count. If the data in the old storage space is updated, it is transferred to the new storage space. The most intuitive way is to reduce the complexity from N*T to (logN–N / 2)*T.

[0081] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a processing principle of data updating and comparison provided in an embodiment of the present invention. Figure 4 As shown, data index and data identification ( Figure 4The metadata in the old storage space) has a 1:1 correspondence and a mapping relationship exists. The data index is pre-persistently stored in a preset storage space such as the local initialization storage space of the front-end. The source data is stored in the local reference storage space of the front-end according to the comparison and matching reference of the data to be rendered. The initialized stored data index is placed in the old storage space (the local initialization storage space of the front-end). Every time there is a data change, the updated data index is calculated and stored in the new storage space (the local reference storage space of the front-end). When a replacement update operation is required, the updated data is found first through the reference count. If the data in the old storage space is updated, it is transferred (updated) to the new storage space. The corresponding business data is queried by converting and combining the data index 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 (the matched data is directly returned, and the matched data is updated), and the count of the compared part is updated to facilitate the next comparison.

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

[0083] The rendering layer will control the rendering through the queue and data management methods mentioned in the previous two steps, including waiting for rendering, real-time rendering, silent request, etc. Figure 5 , Figure 5 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 5 queues as an example, the count values ​​in the initialization storage and reference storage are updated, and the updated data is found first through the reference count. If the data in the old storage space is updated, it is transferred to the new storage space. Then it is matched with the metadata, and the page data (data to be rendered) is obtained by combining the metadata. The above matching and the following update correspond to the hit cache and miss cache updates and update counts mentioned above.

[0084] See also Figure 6 , Figure 6 is a schematic diagram of a display method of data to be rendered provided in an embodiment of the present invention, such as Figure 6As shown, the actual loaded part is all the ITEMs, but the actual user sees only the ITEMs represented by the dark part in the middle. The other light-colored blocks, i.e., the adjacent data, have also been preloaded. Once the user needs to adjust the displayed data range, it can be quickly displayed on the front end. D) This method can support the provision of front-end chart / table components with integrated virtual loading and infinite scrolling, and can continue to expand based on the business, and apply dynamic loading and silent loading controllers to the front-end business. Figure 6 It can be understood as the control display interpretation of the returned data (updated data or data that hits the cache) on the page. The part that users cannot see is to make up for the smoothness. That is, the actual data is more than what is seen. In this way, there is advance and buffer when users scroll or turn pages, and there will be no blank space.

[0085] In one embodiment, the method further includes: if a new request for data to be rendered is received from the front end, comparing the data query range identifier of the new request for data to be rendered with the data query range identifier of the request for data to be rendered received last time, to obtain a difference query range identifier and an identical query range identifier; determining the data to be rendered corresponding to the identical query range identifier as the third sub-data to be rendered; querying the pre-stored data in the local initialization storage space of the front end with the difference query range identifier, and determining the preset data corresponding to the matched preset query identifier as the fourth sub-data to be rendered; if the new matching data range formed by the matched preset query identifier is smaller than the new data query range corresponding to the data difference query range identifier, based on the new matching data, The method comprises the following steps: determining a new difference data range according to the current data range and the new data query range, and determining a new difference data range identifier according to the new difference data range and the difference query range identifier; generating multiple new data request tasks according to the new difference data range identifier, and sorting the multiple new data request tasks according to the new current priority order and the new request parallel processing capability, executing the multiple new data request tasks according to the sorting result, so as to query from the back-end database and obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier; determining the third sub-data to be rendered, the fourth sub-data to be rendered and the fifth sub-data to be rendered as the new data to be rendered, and displaying at least part of the new data to be rendered on the preset display interface according to the new current display request.

[0086] If the data request to be rendered of the front end has changed, then if the request is re-executed blindly, it may lead to a waste of the previous computing resources. It is possible that the user has only increased the scope of the requested data or reduced the scope of the data request. Therefore, the data query range identifier of the new data request to be rendered can be compared with the data query range identifier of the data request to be rendered received last time. If an overlap is found, the data query result of the overlapping range can still be used without re-requesting. If there is no overlap, then it can be executed in the manner of the new request. That is, if the part of the data to be rendered that was previously queried corresponding to the overlapping part (the same query range identifier) ​​is directly used as the result of this time, if the data has not been requested, the previously generated data request task can also be used. For the data request of the newly added range, that is, the data range corresponding to the difference query range identifier, it can be executed in the manner of processing the data request to be rendered as described above. First, query whether the required data exists in the local initialization storage space of the front end. If there is no data or it cannot fully meet the needs, then obtain the corresponding difference data range identifier, obtain a new data request task, and execute it.

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

[0088] See also Figure 7 , Figure 7 A schematic diagram of the time comparison of two updates of the same interface when rendering data using a method for requesting data to be rendered is provided in an embodiment of the present invention, such as Figure 7 As shown, the red box above indicates that the time consumed for data rendering using the relevant technology is 697ms and 4.51s respectively, while when the method for requesting data to be rendered provided in this embodiment is used for data rendering, the time for updating the same interface on the homepage screen twice is significantly shortened, and the time consumed is reduced to 270ms and 2.94s. It can be understood that for repeated requests for data to be rendered, by adopting the method for requesting data to be rendered provided in this embodiment, the matching time from data index to data identifier can be shortened (update of reference count values, and priority sorting for matching according to the size of reference count values, so that more commonly used data identifiers are matched earlier, thereby shortening the matching time between data index and data identifier), and updating the data in local persistent storage as needed, saving more commonly used data, which can significantly reduce the time consumed for subsequent identical data requests.

[0089] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of a method for requesting data to be rendered and performing data request and rendering provided in an embodiment of the present invention. Figure 8 As shown in the figure, the query returns within seconds when querying one year's data volume, and the time consumption is 346ms and 295ms respectively.

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

[0091] See also Fig. 9 , Fig. 9 is a flow chart of a page rendering process using a method for requesting data to be rendered provided in an embodiment of the present invention, such as Fig. 9 As shown, in the initial stage, basic configuration will be performed, such as business basic data, business basic processes, business permissions, work orders, state machines, reports, etc., and then initialization will be performed to enter the business process stage, at which time memory division, storage update, and business process configuration will be performed. In this stage, data index configuration, data index and data identifier mapping relationship establishment and storage will be performed. Then enter the controller, data acquisition will be performed, data request tasks will be sorted according to priority, and there will also be a default queue. Requests can be blocked in this process, and then updates will be performed. When the page is rendered, the reference count value will be compared and updated, and then the data in the local persistent storage will be updated in memory. When rendering, real-time rendering and silent loading can be used.

[0092] The method for requesting data to be rendered provided in the above-mentioned embodiment obtains the request for data to be rendered from the front end, converts the data query range index therein into a data query range identifier, and then uses the data query range identifier to query the pre-stored data in the local initialized storage space of the front end, and uses the data query range identifier to query the pre-stored data, and uses the data obtained by the query as the first sub-data to be rendered. If the matching data range of the data obtained by the query 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 part of the data in the local initialized storage space of the front end, when the data needs to be displayed, data query is preferentially performed in this storage space, which can effectively improve the rate of data rendering and data update, reduce or even avoid the problem of screen freeze or even freeze caused by slow data request, and improve user experience.

[0093] This method aims to solve the following problems encountered when loading and freezing the web when a large number of devices collect data and interact with user data in the industrial Internet. How to ensure that the volume of each data update is as small as possible? How to quickly retrieve data according to conditions while ensuring business? Can a data queue that can block rendering and change in real time be provided to reduce performance overhead? On low-performance devices, how to ensure stability and fluency under large amounts of data? The method provided in this embodiment provides a relatively complete full-process solution from data acquisition to parsing to rendering; each part of the module supports hot plugging, and can be based on data storage, data queues and rendering components in any direction for business. Combined with data sandbox / memory management / silent loading. The advantages of the three design patterns are integrated together. After testing, it is specifically reflected in: the rendering time of the large screen of the homepage of the industrial APP (size) is reduced from more than 8 seconds to about 1 to 2 seconds. Full query for more than three months without distinguishing between cold and hot data. The interface return time is controlled within 1 second. The CRUD of all table pages with more than 30 data on a single page is stable and smooth. Update data response in seconds. Resolved the issue of lag in the use of big data rendering pages for some on-site customers (poor computer configuration).

[0094] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a device for requesting data to be rendered in an embodiment of the present invention. Fig.10 As shown, the embodiment of the present invention further provides a device 1200 for requesting data to be rendered, and the device 1200 for requesting data to be rendered includes: a data storage module 1201, which is used to request preset data from a back-end 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 the local initialization storage space of the front end, and store the preset index identifier mapping relationship, the preset index identifier mapping relationship represents the corresponding relationship between the data query range index and the data query range identifier of the data in the back-end database; a data acquisition module 1202, which is used to obtain the data request to be rendered from the front end, and the data request to be rendered includes at least the data query range index. The method comprises the following steps: a) a first step of determining a data query range identifier corresponding to the data query range index according to the mapping relationship between the data query range index and the preset index identifier; b) a data query module 1203 for querying the pre-stored data in the local initialization storage space of the front end with the data query range identifier; c) a data matching module 1204 for determining the preset data corresponding to the matched 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; and c) a determination module 1205 for determining the first sub-data to be rendered as the data to be rendered if the matching data range formed by the matched preset query identifier is the same as the data query range corresponding to the data query range identifier, thereby completing the request for the data to be rendered.

[0095] In one embodiment, the determination module is also used to, if the matching data range constituted by the matched preset query identifier is smaller than the data query range corresponding to the data query range identifier, determine the difference data range based on the matching data range and the data query range, and determine the 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, and sort the multiple data request tasks according to the current priority order and the request parallel processing capability, execute the multiple data request tasks according to the sorting results, so as to query the back-end database for 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 front-end local initialized 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 also includes an update module, which is used to store 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 local reference storage space of the front-end after storing the second sub-data to be rendered in the local initialization storage space of the front-end, and increase the reference count value of the preset query identifier of the second sub-data to be rendered, and increase 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 also used 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 been stored in the front-end local initialization storage space, the data corresponding to the first target query identifier is stored in the front-end local initialization storage space, and 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, and 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.

[0098] In one embodiment, the determination module is also used to determine an associated data range identifier based on a difference data range identifier, wherein the associated data range identifier represents an identifier of data that has an associated relationship 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 a current priority order based on a preset data priority and the difference data range identifier; preliminarily sort the multiple data request tasks based on the current priority order, and re-sort the multiple data request tasks after the preliminarily sorting based on the request parallel processing capability, wherein the data request tasks corresponding to the difference data range identifier are sorted before the data request tasks corresponding to the associated data range identifier.

[0099] In one embodiment, the device further includes a blocking module for blocking 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 process of executing multiple data request tasks according to the sorting results.

[0100] In one embodiment, the device also includes a display module, which is used to display at least part of the data to be rendered on a preset display interface according to a current display request after determining the second sub-data to be rendered and the first sub-data to be rendered as the data to be rendered, and preload adjacent data of at least part of the data to be rendered displayed on the preset display interface; and, if a new request for data to be rendered is received from the front end, compare the data query range identifier of the new request for data to be rendered with the data query range identifier of the request for data to be rendered received last time to obtain a difference query range identifier and an identical query range identifier; determine the data to be rendered corresponding to the identical query range identifier as the third sub-data to be rendered; query the pre-stored data in the local initialization storage space of the front end with 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 the matching 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, and the multiple new data request tasks are executed according to the sorting result to query from the back-end database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier; the third sub-data to be rendered, the fourth sub-data to be rendered and the 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.

[0101] For the specific definition of the device for requesting data to be rendered, please refer to the definition of the method for requesting data to be rendered above, which will not be repeated here. Each module in the above-mentioned device for requesting data to be rendered can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0102] In this embodiment, the device for requesting data to be rendered is substantially provided with multiple modules for executing the method for requesting data to be rendered in any of the above embodiments. The specific functions and technical effects may refer to the above embodiments and will not be described in detail here.

[0103] An embodiment of the present disclosure further 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, so that the electronic device executes a method provided in any of the above embodiments.

[0104] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0105] Fig.11 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.11 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and application scope of the embodiments of the present application.

[0106] like Fig.11 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1302 or the program loaded from the storage part 1308 to the random access memory (RAM) 1303, such as executing the method in the above embodiment. In RAM 1303, various programs and data required for system operation are also stored. CPU 1301, ROM 1302 and RAM 1303 are connected to each other through bus 1304. I / O (Input / Output) interface 1305 is also connected to bus 1304.

[0107] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, 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, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.

[0108] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1309, and / or installed from a removable medium 1311. When the computer program is executed by a central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.

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

[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 with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.

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

[0112] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, 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 words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0113] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

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

[0115] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by 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: 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; Determine the data query range identifier corresponding to the data query range index according to the data query range index and the preset index identifier mapping relationship, wherein the preset index identifier mapping relationship represents the corresponding relationship between the data query range index and the data query range identifier of the data in the backend database; Querying the pre-stored data in the local initialization storage space of the front end with the data query range identifier, the pre-stored data including preset data pre-requested from the back-end database and stored in the local initialization storage space of the front end and the preset query identifier corresponding to the preset data; If there is a preset query identifier that matches the data query range identifier, the preset data corresponding to the matched preset query identifier is determined as the first sub-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, 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.

2. The method for requesting data to be rendered according to claim 1, wherein: The method further comprises: 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 a difference data range based on the matching data range and the data query range, and determining a difference data range identifier based on the difference data range and the data query range identifier; Generate multiple data request tasks according to the difference data range identifier, sort the multiple data request tasks according to the current priority order and the request parallel processing capability, execute the multiple data request tasks according to the sorting result, query from 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 local initialization storage space of the front end; The second to-be-rendered sub-data and the first to-be-rendered sub-data are determined as data to be rendered, and a request for the data to be rendered is completed.

3. The method for requesting data to be rendered according to claim 2, wherein: After storing the second to-be-rendered sub-data in the local initialization storage space of the front end, 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 is increased, and the reference count value of the preset query identifier of the first sub-data to be rendered is increased.

4. The method for requesting data to be rendered according to claim 3, wherein: The method further comprises: Counting 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 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 having a reference count value 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, and 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.

5. The method for requesting data to be rendered according to claim 2, wherein: Generating a plurality of data request tasks according to the difference data range identifier, and sorting the plurality of data request tasks according to the current priority order and the request parallel processing capability, including: Determine an associated data range identifier based on the difference data range identifier, wherein the associated data range identifier represents an identifier of data having an associated relationship with the data corresponding to the difference data range identifier; Generate multiple data request tasks according to the difference data range identifier and the associated data range identifier; Determine the current priority order according to the preset data priority and the difference data range identifier; The multiple data request tasks are preliminarily sorted according to the current priority order, and the multiple data request tasks after the preliminarily sorting are re-sorted according to the request parallel processing capability, wherein the data request tasks corresponding to the difference data range identifier are sorted before the data request tasks corresponding to the associated data range identifier.

6. The method for requesting data to be rendered according to claim 2, wherein: The method further comprises: In the process of executing 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 tasks that have not yet been completed are blocked.

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

8. The method for requesting data to be rendered according to any one of claims 1 to 6, characterized in that: Before querying the pre-stored data in the local initialization storage space of the front end with the data query range identifier, the method includes: Configure a corresponding data index according to the data identifier of the minimum storage unit of data in the backend database; Establishing a preset index identifier mapping relationship among the data identifiers, data indexes and the corresponding relationship between the data identifiers and the data indexes of all the data in the back-end database, so as to realize the conversion of 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, a silent request is made for the preset index identifier mapping relationship and encrypted and stored in the front-end local reference storage space.

9. The method for requesting data to be rendered according to any one of claims 2 to 6, characterized in that: After determining the second to-be-rendered sub-data and the first to-be-rendered sub-data as data to be rendered, the method further includes: Displaying at least part 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 part of the data to be rendered displayed on the preset display interface; And, the method further comprises: If a new request for data to be rendered is received from the front end, the data query range identifier of the new request for data to be rendered is compared with the data query range identifier of the request for data to be rendered received last time to obtain a difference query range identifier and an identical query range identifier; Determine the to-be-rendered data corresponding to the same query range identifier as the third to-be-rendered sub-data; The pre-stored data in the local initialization storage space of the front end is queried with 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 matching 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; Generate multiple new data request tasks according to the new difference data range identifier, sort the multiple new data request tasks according to the new current priority order and the new request parallel processing capability, and execute the multiple new data request tasks according to the sorting result to query from the backend database to obtain the fifth sub-data to be rendered corresponding to the new difference data range identifier; The third sub-data to be rendered, the fourth sub-data to be rendered, and the 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 a preset display interface according to a new current display request.

10. A device for requesting data to be rendered, characterized in that: The device for requesting data to be rendered comprises: A data storage module, used to request preset data from a backend database in advance, determine the requested preset data and a preset query identifier corresponding to the preset data as pre-stored data, store the pre-stored data in a front-end local initialization storage space, and store a preset index identifier mapping relationship, wherein the preset index identifier mapping relationship represents a corresponding relationship between a data query range index and a data query range identifier of data in the backend database; A data acquisition module is used to acquire 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, and determine a data query range identifier corresponding to the data query range index according to a mapping relationship between the data query range index and the preset index identifier; A data query module, used to query the pre-stored data in the local initialization storage space of the front end with the data query range identifier; A data matching module, configured to determine the preset data corresponding to the matched 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 configured to determine the first to-be-rendered sub-data as the to-be-rendered data 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, and complete the request for the to-be-rendered data.

Citation Information

Patent Citations

  • Data rendering method and device, computer equipment and storage medium

    CN113467869A

  • Page offline rendering method and system, terminal equipment and storage medium

    CN115544407A