CIM engine data visualization method, device and electronic device

By using IndexedDB in the CIM engine for resource caching and queue management, the problem of low data visualization efficiency of CIM engine is solved, more efficient resource acquisition and display is achieved, and the performance and visualization efficiency of CIM engine are improved.

CN114547493BActive Publication Date: 2025-08-15GLODON CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210161765.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-22
Publication Date
2025-08-15
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

The data visualization efficiency of existing CIM engines is low, especially in the display of roaming services, which fail to reflect the due efficiency increase. Existing methods such as worker parallel requests and CDN content distribution networks have increased throughput but failed to truncate low-priority resource requests in time.

Method used

By using the browser database IndexedDB for resource caching, the resource request and display process is optimized, including cache queue management, dynamic priority and discarding identification processing, combined with network connections and resource acquisition of local storage space, dynamically adjust the number of resource extractions and clean up historical data.

Benefits of technology

It improves network throughput, reduces the time-consuming process of target resources from scheduling to imaging, improves the visual efficiency and performance of the CIM engine, and maintains a balance between resource requests and lags.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547493B_ABST
    Figure CN114547493B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of CIM engine data visualization, and more specifically to a method, apparatus, and electronic device for visualizing CIM engine data. The method comprises obtaining requested resource data, the requested resource data including a resource identifier of a target resource; querying a browser database based on the resource identifier; and, when the target resource exists, extracting the target resource from the browser database for visualization. Caching resources in a browser database, namely, an IndexedDB web database, indirectly improves network throughput and effectively reduces the time required from scheduling to imaging the target resource, thereby improving CIM engine performance and, in turn, enhancing the efficiency of CIM engine data visualization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CIM engine data visualization, and in particular to a CIM engine data visualization method, device and electronic equipment. Background Art

[0002] City Information Modeling (CIM) is an organic complex of three-dimensional urban spatial models and urban information based on urban information data. In a narrow sense, CIM is composed of large-scale Geographic Information System (GIS) data and Building Information Modeling (BIM) data, and is the foundational data for smart city construction. Based on the integration of BIM and GIS technologies, CIM reduces data granularity to individual modules within urban buildings, transforming static traditional digital cities into perceptible, real-time, dynamic, and interactive smart cities, providing critical data support for comprehensive urban management and refined governance.

[0003] Visualization of CIM engine data generally requires visualization efficiency. To improve visualization efficiency, existing network requests for data generally use XHR technology. One optimization method is to use multiple workers to request data in parallel, bypassing the browser's limit on the number of XHR requests to the same data server and speeding up data reception efficiency. Another method is to use the CDN content delivery network. This method requires enabling CORS (cross-origin resource sharing) and is also a way to bypass browser restrictions.

[0004] However, while adding workers and CDNs significantly improved throughput, the data in the request couldn't be truncated in time to free up bandwidth for requests for higher-priority resources. This meant that the expected efficiency gains for services like roaming in the CIM were not reflected. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, device, and electronic device for visualizing CIM engine data to solve the problem of low visualization efficiency.

[0006] According to a first aspect, an embodiment of the present invention provides a method for visualizing CIM engine data, comprising:

[0007] Obtaining requested resource data, wherein the requested resource data includes a resource identifier of a target resource;

[0008] Performing a query in a browser database based on the resource identifier;

[0009] When the target resource exists, the target resource is extracted from the browser database for visual display.

[0010] The CIM engine data visualization method provided by the embodiment of the present invention caches resources through a browser database, namely, an IndexedDB web database, thereby indirectly improving network throughput and effectively reducing the time taken from scheduling to imaging of target resources, thereby improving the performance of the CIM engine and further improving the visualization efficiency of the CIM engine data.

[0011] In combination with the first aspect, in a first implementation of the first aspect, the resource request data further includes a request entity, and when the target resource exists, extracting the target resource from the browser database for visual display includes:

[0012] When the target resource exists, adding the request entity to a cache queue;

[0013] Extracting a currently preset number of request entities from the cache queue;

[0014] Based on the extracted request entity, the corresponding target resource is extracted from the browser database for visual display.

[0015] In the CIM engine data visualization method provided by an embodiment of the present invention, the current preset number is a dynamically changing parameter, which can maintain a balance between resource requests and lag.

[0016] In combination with the first implementation of the first aspect, in the second implementation of the first aspect, extracting a current preset number of request entities from the cache queue includes:

[0017] Get the current data status;

[0018] determining the current preset number based on the current data state;

[0019] A current preset number of request entities are extracted from the cache queue.

[0020] In the CIM engine data visualization method provided by an embodiment of the present invention, the number of request entities extracted each time is determined based on the current data status, further ensuring the balance between resource requests and lags.

[0021] In combination with the second implementation of the first aspect, in the third implementation of the first aspect, obtaining the current data state includes:

[0022] Get the change status of the current camera viewport;

[0023] The current data state is determined based on a change state of the current camera viewport.

[0024] In combination with the first implementation of the first aspect, in a fourth implementation of the first aspect, extracting a current preset number of request entities from the cache queue includes:

[0025] Obtaining the real-time priority of each request entity in the cache queue and the real-time value of the discard flag;

[0026] A currently preset number of request entities are extracted from the cache queue based on the real-time priority and the real-time value of the discard flag.

[0027] In the CIM engine data visualization method provided by the embodiment of the present invention, priorities and discard flags are dynamically updated. Extracting request entities using the dynamically updated priorities and discard flags can ensure that the extracted request entities can meet current visualization requirements.

[0028] In combination with the fourth implementation of the first aspect, in the fifth implementation of the first aspect, obtaining the real-time value of the discard flag of each request entity in the cache queue includes:

[0029] Check whether the target resources corresponding to each request entity have been updated;

[0030] When there is an updated target resource, the real-time value of the discard flag of the requesting entity corresponding to the updated target resource is set to a preset value.

[0031] The CIM engine data visualization method provided by an embodiment of the present invention sets the real-time value of the discard flag of a browser database to a preset value when a resource in the browser database is updated. When the resource needs to be extracted, the real-time value of the discard flag can be used to determine whether the resource has been updated, so as to accurately obtain the corresponding resource.

[0032] In combination with the fourth implementation manner of the first aspect, in the sixth implementation manner of the first aspect, extracting the corresponding target resource from the browser database based on the extracted request entity for visual display includes:

[0033] When the real-time value of the discard flag of the requesting entity is a preset value, the corresponding target resource is extracted from the target storage space based on the network connection for visual display.

[0034] In combination with the first aspect, in a seventh implementation of the first aspect, the method further includes:

[0035] When the target resource does not exist, extracting the corresponding target resource from the target storage space based on the network connection for visual display;

[0036] The extracted target resource is timestamped and added to the browser database to update the browser database.

[0037] The CIM engine data visualization method provided by the embodiment of the present invention adds a timestamp to the target resource extracted from the target storage space and adds it to the browser database to update the browser database. That is, the browser database is used to cache the corresponding resources locally to improve the visualization efficiency.

[0038] In combination with the first aspect, in an eighth implementation of the first aspect, the method further includes:

[0039] When the amount of data in the browser database reaches a first data threshold, determining resources to be deleted based on timestamps of each resource in the browser database;

[0040] The resources to be deleted are recycled, and the browser database is updated.

[0041] The CIM engine data visualization method provided by the embodiment of the present invention automatically recycles data in the browser library data, thereby releasing resources in the browser database and reasonably cleaning up discarded historical data while caching data as much as possible.

[0042] In combination with the eighth implementation of the first aspect, in the ninth implementation of the first aspect, determining the resources to be deleted based on the timestamps of the resources in the browser database includes:

[0043] Based on the timestamps of the resources, sequentially extract the resources with the earliest timestamps;

[0044] Determining whether the amount of data of the remaining resources in the browser database after extracting the resource with the earliest timestamp is less than a second data threshold;

[0045] When the data amount of the remaining resources in the browser database is less than a second data threshold, the extracted resources are determined to be the resources to be deleted.

[0046] According to a second aspect, an embodiment of the present invention further provides a CIM engine data visualization device, comprising:

[0047] An acquisition module, configured to acquire requested resource data, wherein the requested resource data includes a resource identifier of a target resource;

[0048] A query module, configured to query a browser database based on the resource identifier;

[0049] The visualization module is used to extract the target resource from the browser database for visualization display when the target resource exists.

[0050] According to a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the CIM engine data visualization method described in the first aspect or any one of the embodiments of the first aspect by executing the computer instructions.

[0051] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing the computer to execute the CIM engine data visualization method described in the first aspect or any one of the embodiments of the first aspect.

[0052] It should be noted that for the corresponding beneficial effects of the CIM engine data visualization device, electronic device, and computer-readable storage medium provided by the embodiments of the present invention, please refer to the corresponding description of the CIM engine data visualization method mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 is a flowchart of a method for visualizing CIM engine data according to an embodiment of the present invention;

[0055] Figure 2 is a flowchart of a method for visualizing CIM engine data according to an embodiment of the present invention;

[0056] Figure 3 is a flowchart of a method for visualizing CIM engine data according to an embodiment of the present invention;

[0057] Figure 4 is a flowchart of IndexedDB access according to an embodiment of the present invention;

[0058] Figure 5 is a flowchart of data saving and automatic cleaning according to an embodiment of the present invention;

[0059] Figure 6 This is a worker initialization process according to an embodiment of the present invention;

[0060] Figure 7 is a comparative schematic diagram of visualization efficiency according to an embodiment of the present invention;

[0061] Figure 8 is a structural block diagram of a device for visualizing CIM engine data according to an embodiment of the present invention;

[0062] Figure 9 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0064] To improve visualization efficiency, you can cache frequently used resource data locally for CIM engine data visualization. Caching data locally can involve caching data directly on disk. For example, you can use a third-party plug-in or library to bypass browser security restrictions on reading and writing local files and cache data directly on disk.

[0065] However, the aforementioned caching to disk solution involves the use of third-party plug-ins or libraries. These features are not specifically designed to overcome browser security and have numerous other functions, which are detrimental to the overall architecture. Furthermore, the concurrency security and performance of these solutions are difficult to compare with the browser database supported by native browsers, namely IndexedDB. Therefore, the CIM engine data visualization method provided in the embodiments of the present invention indirectly accelerates data acquisition efficiency by utilizing the browser database to cache and reuse resource data, thereby indirectly reducing the gap between the CIM engine's data demand and network throughput.

[0066] According to an embodiment of the present invention, an embodiment of a method for visualizing CIM engine data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0067] In this embodiment, a method for visualizing CIM engine data is provided, which can be used in electronic devices such as computers, tablet computers, servers, etc. Figure 1FIG. 1 is a flow chart of a method for visualizing CIM engine data according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0068] S11, obtaining requested resource data.

[0069] The requested resource data includes the resource identifier of the target resource.

[0070] Requesting resource data can also be considered a resource request, which includes a resource identifier of a target resource. The target resource is the resource being requested, and the data of the target resource is subsequently visualized on the interface.

[0071] S12, querying the browser database based on the resource identifier.

[0072] The browser database, namely the IndexedDB mentioned above, is used to store cached resource data. In the browser database, each resource data corresponds to a resource identifier, and each resource data corresponds to a unique resource identifier.

[0073] For example, the electronic device uses the main thread to take over the execution of the original resource request program and directs the logic flow to the takeover function. The takeover function uses the resource identifier to query the browser database to determine whether the corresponding cached resource data exists.

[0074] S13, when the target resource exists, extract the target resource from the browser database for visual display.

[0075] After the electronic device finds the target resource in the browser database, it can directly extract the target resource from the browser database for visual display. Alternatively, in the case of high concurrency, the electronic device can first add the requested resource data to a cache queue for subsequent processing. Subsequent threads will each extract a certain number of requests from the cache queue for processing and visual display.

[0076] This step will be described in detail below.

[0077] The CIM engine data visualization method provided in this embodiment caches resources through a browser database, namely, an IndexedDB web database, thereby indirectly improving network throughput and effectively reducing the time taken from scheduling to imaging of target resources, thereby improving the performance of the CIM engine and further improving the visualization efficiency of the CIM engine data.

[0078] In some optional implementations of this embodiment, the above method may further include:

[0079] (1) When the target resource does not exist, the corresponding target resource is extracted from the target storage space based on the network connection for visualization.

[0080] (2) The extracted target resource is timestamped and added to the browser database to update the browser database.

[0081] If the target resource does not exist in the browser database, this indicates that the target resource is not cached locally and needs to be retrieved from the corresponding target storage space via a network connection for visualization. The target storage space is set based on actual needs and is not limited here. For example, the target storage space can be set before visualizing CIM engine data. If it is determined that the target resource does not exist in the browser database, it is directly retrieved from the target storage space via a network connection.

[0082] After extracting the target resource, the electronic device uses it for subsequent visual display and also adds the target resource to the browser database. Simultaneously, the timestamp of the target resource extraction is also added to the browser database. It should be noted that the timestamp corresponding to the target resource can be the timestamp corresponding to the resource request data, the timestamp of the target resource extraction, and so on. This is not limited to any specific timestamp and can be set according to actual needs.

[0083] The target resource extracted from the target storage space is timestamped and added to the browser database to update the browser database, that is, the browser database is used to cache the corresponding resource locally to improve the visualization efficiency.

[0084] In this embodiment, a method for visualizing CIM engine data is provided, which can be used in electronic devices such as computers, tablet computers, servers, etc. Figure 2 FIG. 1 is a flow chart of a method for visualizing CIM engine data according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0085] S21, obtaining requested resource data.

[0086] The requested resource data includes the resource identifier of the target resource.

[0087] For details, please see Figure 1 S11 of the illustrated embodiment will not be described in detail here.

[0088] S22, querying the browser database based on the resource identifier.

[0089] For details, please see Figure 1S12 of the illustrated embodiment will not be described in detail here.

[0090] S23, when the target resource exists, extract the target resource from the browser database for visual display.

[0091] Specifically, the above S23 includes:

[0092] S231: When the target resource exists, the request entity is added to the cache queue.

[0093] When it is determined that the target resource exists in the browser database, the electronic device adds the request entity in the request resource data to a cache queue, wherein the length of the cache queue is set according to actual needs.

[0094] Optionally, before adding the request entity to the cache queue, it is first determined whether the cache queue is full. If the cache queue is full, the request entity is placed in a waiting state to wait for the cache queue to be free. If the cache queue is not full, the request entity is added to the cache queue.

[0095] S232: Extract the currently preset number of request entities from the cache queue.

[0096] For processing the cache queue, the electronic device can start a processing thread to process it. The processing thread extracts a current preset number of request entities from the cache queue for processing each time, wherein the specific value of the current preset number is related to the current data state and is a dynamically changing value.

[0097] In some optional implementations of this embodiment, the above S232 may include:

[0098] (1) Get the current data status.

[0099] (2) Determine the current preset quantity based on the current data status.

[0100] (3) Extract the current preset number of request entities from the cache queue.

[0101] The current data status includes but is not limited to the current network status, the quantity and volume of target resources, and the camera status, etc. Among them, the camera status represents the status of the rendering viewport.

[0102] The electronic device analyzes the current data status and determines the current preset number based on this analysis. For example, the electronic device may only analyze the current network status. If the network status is good, the current preset number is larger; if the network status is poor, the current preset number is smaller, and so on. Alternatively, the electronic device may use two or more of the above factors to make a fusion judgment and determine the current data status to determine the current preset number.

[0103] As a specific application example of this embodiment, step (1) of S232 includes:

[0104] 1.1) Get the change status of the current camera viewport.

[0105] 1.2) Determine the current data state based on the change state of the current camera viewport.

[0106] The current camera viewport's change state includes slow start and fast recovery. Each time the electronic device retrieves a request entity, it records the camera viewport's state. If the camera changes (movement or rotation) slowly, the current preset value is gradually increased. If the camera changes significantly, the current preset value is immediately restored to its initial state.

[0107] Since the number of request entities extracted each time is determined based on the current data status, the balance between resource requests and lag is further ensured.

[0108] In some other optional implementations of this embodiment, the above S232 may further include:

[0109] (1) Obtain the real-time priority of each request entity in the cache queue and the real-time value of the discard flag.

[0110] (2) Extracting a currently preset number of request entities from the cache queue based on the real-time priority and the real-time value of the discard flag.

[0111] For each request entity in the cache queue, its priority and discard flag are dynamically changing parameters. Specifically, the priority is determined by factors such as the camera viewport position during rendering and occlusion relationships. The discard flag is used when, during the visualization process, it is discovered that some resources are no longer sufficient for continued requests. For example, if a newer version of the resource already exists, the resource will be discarded.

[0112] When extracting request entities from the cache queue, the electronic device can sort them based on the real-time priority of each request entity, and then combine the real-time value of the discard identifier of each request entity on the basis of the sorting to extract the current preset number of request entities.

[0113] The priority and discard flag are both dynamically updated. By using the dynamically updated priority and discard flag to extract the request entity, it can be ensured that the extracted request entity can meet the current visualization requirements.

[0114] Specifically, obtaining the real-time value of the discard flag of each request entity in the cache queue includes:

[0115] 1.1) Check whether the target resource corresponding to each request entity has been updated.

[0116] 1.2) When there is an updated target resource, the real-time value of the discard flag of the requesting entity corresponding to the updated target resource is set to a preset value.

[0117] When the CIM engine of the electronic device is started, or the electronic device is started, the electronic device queries whether the target resources corresponding to each request entity in the cache queue are updated. If there is an update, the real-time value of the discard flag of the request entity corresponding to the updated target resource is set to a preset value.

[0118] For example, if the target resource is not updated, the real-time value of the discard flag is set to 0; otherwise, the real-time value of the discard flag is set to 1.

[0119] For the preset value, it can be distinguished by numbers, characters, etc. There is no limitation on its specific form, and it can be set according to actual needs, as long as it can ensure that the target resources that have not been updated can be distinguished from the updated target resources.

[0120] When a resource in the browser database is updated, the real-time value of the discard flag is set to a preset value. When the resource needs to be extracted, the real-time value of the discard flag can be used to determine that the resource has been updated, so as to accurately obtain the corresponding resource.

[0121] S233, based on the extracted request entity, extract the corresponding target resource from the browser database for visual display.

[0122] For details about this step, see Figure 1 S13 of the illustrated embodiment will not be described in detail here.

[0123] In some optional implementations of this embodiment, the above S233 may include:

[0124] When the real-time value of the discard flag of the requesting entity is a preset value, the corresponding target resource is extracted from the target storage space based on the network connection for visual display.

[0125] When the electronic device determines that the real-time value of the discard flag of the requesting entity is a preset value, indicating that the corresponding target resource has been updated, the electronic device extracts the corresponding target resource from the target storage space based on the network connection, thereby obtaining the latest target resource for visual display.

[0126] In the CIM engine data visualization method provided by an embodiment of the present invention, the current preset number is a dynamically changing parameter, which can maintain a balance between resource requests and lag.

[0127] In this embodiment, a method for visualizing CIM engine data is provided, which can be used in electronic devices such as computers, tablet computers, servers, etc. Figure 3 FIG. 1 is a flow chart of a method for visualizing CIM engine data according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0128] S31, obtaining requested resource data.

[0129] The requested resource data includes the resource identifier of the target resource.

[0130] For details, please see Figure 1 S11 of the illustrated embodiment will not be described in detail here.

[0131] S32, querying the browser database based on the resource identifier.

[0132] For details, please see Figure 1 S12 of the illustrated embodiment will not be described in detail here.

[0133] S33, when the target resource exists, extract the target resource from the browser database for visual display.

[0134] For details, please see Figure 2 S23 of the illustrated embodiment will not be described in detail here.

[0135] S34: When the amount of data in the browser database reaches a first data threshold, resources to be deleted are determined based on timestamps of each resource in the browser database.

[0136] The electronic device may determine the amount of data in the browser database at regular intervals, or after each resource is written, etc. When it is determined that the amount of data in the browser database has reached a first data threshold, it indicates that data in the browser database needs to be recycled. The electronic device recycles the data based on the timestamps of each resource in the browser database, determining the resource with the earliest timestamp as the resource to be deleted.

[0137] For example, the earliest N resources may be recycled each time, or one resource may be recycled each time, and then it is determined whether the amount of remaining resources in the browser data is less than a certain threshold. If it is less than the certain threshold, the resource to be deleted is determined.

[0138] In some optional implementations of this embodiment, the above S34 includes:

[0139] (1) Based on the timestamps of the resources, the resources with the earliest timestamps are sequentially extracted.

[0140] (2) Determine whether the amount of data of the remaining resources in the browser database after extracting the resource with the earliest timestamp is less than a second data threshold.

[0141] (3) When the data amount of the remaining resources in the browser database is less than the second data threshold, the extracted resources are determined to be resources to be deleted.

[0142] Specifically, the electronic device determines the amount of data in the browser database and determines whether the value exceeds a first upper threshold value, e.g. Figure 4 Threshold B in . If exceeded, start resource recovery worker and then return, if not exceeded, return directly.

[0143] The resource recycling worker started is a ready thread that has been initialized when the engine starts. The thread will be sorted according to the timestamp in the browser database. The electronic device starts from the oldest data and traverses each stored resource, recording its resource identifier and the accumulated resource size, and at the same time determines whether the remaining resource size is lower than the second data threshold. For example, Figure 4 When the value falls below the lower limit, the traversal is terminated, and all recorded resource identifiers are returned and sent to the main thread for further processing.

[0144] S35, recycling the resources to be deleted and updating the browser database.

[0145] After main thread obtains the resource to be deleted, it notifies resource recovery thread to perform cleanup task and updates browser database. In the present embodiment, the recycling method of the resource to be deleted is not limited in any way and is specifically set according to actual demand.

[0146] The CIM engine data visualization method provided by the embodiment of the present invention automatically recycles data in the browser library data, thereby releasing resources in the browser database and reasonably cleaning up discarded historical data while caching data as much as possible.

[0147] It should be noted that the order of S34-S35 is not limited to Figure 3 As shown, it can be processed in parallel with S31-S33, or it can be processed before S31-S33, etc., and there is no limitation on it here.

[0148] As a specific application example of this embodiment, Figure 4 As shown, the method includes:

[0149] 1) Requesting resource data: The main thread takes over the execution of the original resource request program and directs the logic flow to the takeover function. This function uses the resource identifier URL to determine whether there is cached data in the browser database. If so, the request entity data structure is pushed into cache queue B. After obtaining the data locally, it is synchronized to the downstream. If not, the request entity is processed according to the original logic. If the resource exists but cache queue B is full and cannot be pushed further, the request is terminated directly and the next loop logic is waited for to continue the request.

[0150] 1.1) Add a new function call to the engine loop. This function will perform over-discard cleanup and priority sorting on all request entities already in cache queue B. The over-discard cleanup will be performed based on the dynamically updated discard mark in the request entity, and the priority sorting will be based on the dynamically updated priority. You need to implement your own sorting algorithm. This method uses heap sort.

[0151] 1.2) Pop out the top X request entities with the highest priority (see 1.3), asynchronously read their local data, obtain the specific resource data, and notify the downstream program to start execution; other request entities in cache queue B wait for the next loop to be executed, or are abandoned or request data due to higher priority;

[0152] 1.3) To balance resource requests and lag, the first X request entities will be a dynamically changing parameter. Since the camera viewport state includes slow start and fast recovery, the camera state is recorded in each loop. If the camera changes (movement or rotation) slowly, the number of resources requested per frame will be gradually increased. If the camera changes significantly, the value will be immediately restored to the initial state.

[0153] 2) Saving Resources: After receiving data from a resource request from the original program, in addition to continuing to execute its designated downstream program, the resource table must be refreshed and then saved to IndexedDB. This saving process is performed by the worker. The main thread must pass the data and resource identifier to the worker, allowing the worker to save the resource and subsequently recycle it. This includes saving the worker and reclaiming the resource.

[0154] The working principle of resource recycling worker is as follows Figure 5 As shown, the resource representation is used to record the resource status in the browser database, for example, the timestamp and size of each resource. Figure 6 As shown. Among them, Figure 4-Figure 5 The dotted line part represents the asynchronous process, which is implemented through asynchronous processing.

[0155] The visualization method of CIM engine data provided in this embodiment increases the effective utilization of computers through the collaborative work of multiple workers. For CIM business, its audience is generally organizations rather than individuals, and the host machine does not have too many other processes to execute. The rational use of workers in this method not only improves the efficiency of model rendering, but also increases the effective utilization of the host machine and reduces the physical cost of the host machine. At the same time, due to the huge volume of CIM business data and the frequent changes in data, the engine's use and holding of data cannot be permanently cached. This method reasonably cleans up abandoned historical data while caching data as much as possible, theoretically increasing the limited IndexedDB storage capacity to infinity, bringing continuous and efficient visualization efficiency to the CIM engine.

[0156] Compared with the front-end engine requesting network resources, this method caches resources through the IndexedDB web database, indirectly improving network throughput and effectively reducing the time taken from scheduling to imaging of target data, thereby improving the performance of the CIM engine. At the same time, it automatically clears resources in the browser database, making it possible to support large amounts of data. Figure 7 The figure shows a comparison of test data for a certain scenario before and after it is connected to IndexedDB. The figure shows that the imaging efficiency has increased by 51.3%. Objectively speaking, this result is local and has a single data type. In theory, for multi-source heterogeneous data, the improvement will not be too low.

[0157] In some optional implementations of this embodiment, the following methods may be used to improve the visualization efficiency of CIM engine data:

[0158] There are several feasible ways to improve the visualization efficiency of CIM engine models:

[0159] 1) Using the new HTTP2.0 protocol can greatly improve network throughput;

[0160] 2) Cache the parsed network data to avoid the performance loss of repeated parsing when reused. This solution increases the complexity of IndexedDB access.

[0161] 3) Using websockets eliminates the end-to-end communication costs of the HTTP protocol;

[0162] 4) Camera viewport (similar to camera field of view) offset. Whether it is network data or local data, drawing requires a request first. The premise of the request is that it is within the camera field of view, which is immediate. You can consider recording the camera's historical status to "predictively" request data in advance, which theoretically will speed up the visualization efficiency of the model.

[0163] This embodiment also provides a CIM engine data visualization device for implementing the aforementioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0164] This embodiment provides a CIM engine data visualization device, such as Figure 8 Shown, including:

[0165] An acquisition module 41 is configured to acquire requested resource data, wherein the requested resource data includes a resource identifier of a target resource;

[0166] A query module 42, configured to query a browser database based on the resource identifier;

[0167] The visualization module 43 is configured to extract the target resource from the browser database for visualization when the target resource exists.

[0168] The visualization device of CIM engine data in this embodiment is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0169] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0170] An embodiment of the present invention further provides an electronic device having the above Figure 8 The CIM engine data visualization device is shown.

[0171] See also Figure 9 , Figure 9 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 9As shown, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, a memory 54, and at least one communication bus 52. The communication bus 52 is used to realize the connection and communication between these components. The communication interface 53 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 53 may also include a standard wired interface and a wireless interface. The memory 54 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 54 may optionally be at least one storage device located away from the aforementioned processor 51. The processor 51 may be combined with Figure 8 In the described apparatus, the memory 54 stores an application program, and the processor 51 calls the program code stored in the memory 54 to execute any of the above method steps.

[0172] The communication bus 52 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 52 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0173] Among them, the memory 54 may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM); the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory), hard disk drive (English: hard disk drive, abbreviated: HDD) or solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 54 may also include a combination of the above types of memory.

[0174] The processor 51 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0175] The processor 51 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0176] Optionally, the memory 54 is further configured to store program instructions. The processor 51 may call the program instructions to implement the CIM engine data visualization method as shown in any embodiment of the present application.

[0177] An embodiment of the present invention further provides a non-transitory computer storage medium storing computer-executable instructions capable of executing the CIM engine data visualization method of any of the above-mentioned method embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the storage medium may also include a combination of the above-mentioned types of memory.

[0178] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for visualizing CIM engine data, characterized in that: include: Acquire request resource data, where the request resource data includes a resource identifier of a target resource and a requesting entity; Performing a query in a browser database supported by the native browser based on the resource identifier; When the target resource exists, adding the request entity to a cache queue; Determining a current preset number based on a current data state includes: obtaining a change state of a current camera viewport, determining the current data state based on the change state of the current camera viewport, wherein the change state of the current camera viewport includes a slow start and a fast recovery, and when the camera moves or rotates slowly, gradually increasing the current preset number, and restoring the current preset number to an initial state when the camera has a significant change; Extracting a currently preset number of request entities from the cache queue; Based on the extracted request entity, the corresponding target resource is extracted from the browser database for visual display.

2. The method according to claim 1, characterized in that The extracting a currently preset number of request entities from the cache queue includes: Obtaining the real-time priority of each request entity in the cache queue and the real-time value of the discard flag; A currently preset number of request entities are extracted from the cache queue based on the priority and the discard identifier.

3. The method according to claim 2, characterized in that Obtaining a real-time value of a discard flag of each request entity in the cache queue includes: Check whether the target resources corresponding to each request entity have been updated; When there is an updated target resource, the real-time value of the discard flag of the requesting entity corresponding to the updated target resource is set to a preset value.

4. The method according to claim 3, characterized in that The step of extracting a corresponding target resource from the browser database based on the extracted request entity for visual display includes: When the real-time value of the discard flag of the requesting entity is a preset value, the corresponding target resource is extracted from the target storage space based on the network connection for visual display.

5. The method according to claim 1, wherein The method further comprises: When the target resource does not exist, extracting the corresponding target resource from the target storage space based on the network connection for visual display; The extracted target resource is timestamped and added to the browser database to update the browser database.

6. The method according to claim 1, characterized in that The method further comprises: When the amount of data in the browser database reaches a first data threshold, determining resources to be deleted based on timestamps of each resource in the browser database; The resources to be deleted are recycled, and the browser database is updated.

7. The method according to claim 6, characterized in that Determining the resources to be deleted based on the timestamps of the resources in the browser database includes: Based on the timestamps of the resources, sequentially extract the resources with the earliest timestamps; Determining whether the amount of data of the remaining resources in the browser database after extracting the resource with the earliest timestamp is less than a second data threshold; When the data amount of the remaining resources in the browser database is less than a second data threshold, the extracted resources are determined to be the resources to be deleted.

8. A CIM engine data visualization device, characterized in that: include: An acquisition module, configured to acquire requested resource data, wherein the requested resource data includes a resource identifier of a target resource and a requesting entity; A query module, configured to query a browser database supported by the native browser based on the resource identifier; A visualization module, configured to add the requesting entity to a cache queue when the target resource exists; Determining a current preset number based on a current data state includes: obtaining a change state of a current camera viewport, determining the current data state based on the change state of the current camera viewport, wherein the change state of the current camera viewport includes a slow start and a fast recovery, and when the camera moves or rotates slowly, gradually increasing the current preset number, and restoring the current preset number to an initial state when the camera has a significant change; A currently preset number of request entities are extracted from the cache queue; and based on the extracted request entities, corresponding target resources are extracted from the browser database for visual display.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the CIM engine data visualization method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the CIM engine data visualization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Network information processing method and device and electronic equipment

    CN110287432A