Caching method and equipment of server management software front end, medium and program product

By adopting a caching method with fields as the smallest unit in the front end of the server management software, the problems of data packet failure and invalid rendering of view components were solved, thereby improving query efficiency and interface performance.

CN120804200AActive Publication Date: 2025-10-17LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511300442.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-10-17
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

The data caching on the front end of the server management software relies on the browser's native mechanism, which leads to problems such as data packet failure due to field changes, low efficiency in complex data operations, and invalid rendering of view components.

Method used

A caching method using fields as the smallest unit is adopted. By changing the listener to monitor field modifications of data objects, the target view component is updated according to priority, and the data object is queried in the reverse index mapping to avoid invalid rendering of irrelevant components and traversing the entire dataset.

Benefits of technology

Significantly reduce network traffic, prevent data packets from becoming invalid due to field changes, improve interface performance and query efficiency, and reduce invalid rendering of irrelevant components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804200A_ABST
    Figure CN120804200A_ABST
Patent Text Reader

Abstract

The invention discloses a caching method and equipment of a server management software front end, a medium and a program product, and relates to the technical field of server management software, and the method comprises the following steps: receiving a data updating event; the data updating event is generated when the change monitor monitors that the field of the data object is modified; updating a corresponding field in the target view component according to the data updating event and the priority of the modified field; the target view component is a view component subscribing to the modified field; a query request of a view layer where the target view component is located is received, and a value corresponding to a key carried by the query request is queried in the reverse index mapping according to the query request; and acquiring a data object corresponding to the value in the main data mapping according to the value, and returning the data object to the view layer. According to the method, the problem that the whole data packet is invalid due to field change, the problems of execution of complex data operations such as query and the like, low efficiency of data updating and the problem of invalid rendering of the view component can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server management software, and in particular to a cache method, equipment, medium and program product for a front end of server management software. Background Art

[0002] Related technologies rely on native browser mechanisms or general solutions for data caching within server management software front-ends. However, these technologies suffer from issues with field changes affecting entire data objects. Furthermore, these technologies are inefficient in executing complex data operations such as queries and updating data. Furthermore, these technologies also suffer from ineffective rendering of view components. Therefore, addressing these technical deficiencies has become a pressing technical challenge for those skilled in the art. Summary of the Invention

[0003] The present invention provides a caching method, device, medium and program product for the front end of server management software, so as to at least solve the problems in related technologies such as the invalidation of the entire data packet due to field changes, the low efficiency of executing complex data operations such as queries and updating data, and the invalid rendering of view components.

[0004] The present invention provides a caching method for a server management software front end, comprising: Receive data update events; the data update events are generated when a change listener monitors that a field of a data object has been modified; According to the data update event, the corresponding fields in the target view component are updated according to the priority of the modified fields; the target view component is the view component that subscribes to the modified fields; Receive a query request for the view layer where the target view component is located, and query the inverted index mapping for a value corresponding to the key carried in the query request according to the query request; According to the value, a data object corresponding to the value is obtained in the main data map, and the data object is returned to the view layer.

[0005] The present invention also provides a cache device for a server management software front end, comprising: The first receiving module is configured to receive a data update event; the data update event is generated when a change listener monitors that a field of a data object has been modified; An update module, configured to update corresponding fields in a target view component according to the data update event and the priority of the modified fields; the target view component is a view component that subscribes to the modified fields; A second receiving module is configured to receive a query request for the view layer where the target view component is located, and query the inverted index mapping for a value corresponding to the key carried in the query request according to the query request; The obtaining module is configured to obtain a data object corresponding to the value in a main data mapping according to the value, and return the data object to the view layer.

[0006] The application further provides an electronic device, comprising a memory for storing a computer program, and a processor for executing the computer program to implement the steps of the cache method of the server management software front end.

[0007] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the cache method of the server management software front end.

[0008] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of the cache method of the server management software front end.

[0009] The server management software front end cache method provided by the application updates in the field as the minimum unit, can significantly reduce network traffic, and can avoid the problem that the entire data packet is invalid due to field changes in the related scheme of caching in the entire API response or file unit. In addition, the server management software front end cache method provided by the application only updates the view component subscribed to the modified field, can avoid invalid rendering of irrelevant components, and improves the interface performance. When querying data, first, the corresponding value is found in the reverse index mapping, and then the complete data object corresponding to the value is taken out from the main data mapping, so that the entire data set is avoided to be traversed, and the query efficiency can be greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 A flowchart of a server management software front end cache method provided by the embodiments of the application is shown in the figure. Figure 2 An architecture diagram of a server management software cache system provided by the embodiments of the application is shown in the figure. Figure 3 A signal interaction schematic diagram provided by the embodiments of the application is shown in the figure. Figure 4 A component interaction schematic diagram provided by the embodiments of the application is shown in the figure. Figure 5 A cache control schematic diagram provided for an embodiment of the present application; Figure 6 A browser comparison schematic diagram provided for an embodiment of the present application; Figure 7 A cache device schematic diagram of a server management software front end provided for an embodiment of the present application. DETAILED DESCRIPTION

[0012] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0013] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0014] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0015] The embodiments of the present application provide a cache method of a server management software front end. In combination with the execution flow of the method, the method is described in detail as follows.

[0016] Reference Figure 1 As shown in the figure, the cache method of the server management software front end provided by the embodiments of the present application comprises: S101: receiving a data update event; the data update event is generated by a change listener when a field of a data object is modified.

[0017] S102: according to the data update event, updating a corresponding field in a target view component according to the priority of the modified field; the target view component is a view component subscribing to the modified field.

[0018] The execution subject of the embodiments of the present application is a cache control layer in a cache system of a server management software front end. Reference Figure 2As shown, the cache system includes a view layer, a cache control layer, and a data storage layer. The view layer provides an API interface for interacting with the cache system. The cache control layer is responsible for cache strategies, event handling, version management, and the like. The data storage layer stores actual cached data objects and their indexes, supporting IndexedDB (indexed database) and in-memory storage. IndexedDB is a client-side non-relational database provided by the browser, supporting the storage of structured cloned objects, files, and the like. The signal interactions between the cache control layer and the view layer, data storage layer, change listener, and synchronization engine can be referred to Figure 3 as shown.

[0019] The change listener continuously monitors changes in data objects in the data storage layer. When the change listener detects that any field of a data object is modified, the change listener generates a data change event. The data change event can include the ID of the modified data object, information of the modified field (i.e., which fields are modified), the value of the modified field after modification, and the data version number.

[0020] The cache control layer includes an event dispatcher. The change listener sends the data update event to the event dispatcher.

[0021] The event dispatcher updates the corresponding field in the target view component according to the priority of the modified field, so as to update the value of the corresponding field in the target view component to the modified value of the modified field. The target view component is a view component that subscribes to the modified field.

[0022] Updating in the field as the minimum unit can significantly reduce network traffic and can avoid the problem of invalidation of the entire data packet due to field changes in related solutions that cache the entire API response or file. After the field is modified, only the view component that subscribes to the modified field is updated, which can avoid invalid rendering of irrelevant components and improve interface performance.

[0023] The view layer provides a unified API interface that can be used for addition, deletion, query, and update operations.

[0024] interface CacheAPI { getServer(id: string): ServerObject; / / Get single server data by ID queryServers(criteria: QueryCriteria): ServerObject[]; / / Query server collection by criteria updateServer(patch: ServerPatch): void; / / Update server data (support field-level patch) batchUpdate(patches: ServerPatch[]): void; / / Batch update }.

[0025] When a view component retrieves data through getServer or queryServers, it must declare the data scope it depends on. For example, it depends on the cpuUsage and memoryUsage fields of the server with ID srv-001.

[0026] The cache control layer records the subscription relationship between view components and data.

[0027] When the event dispatcher dispatches an event, it accurately matches which components have subscribed to the modified fields and only updates the view components that have subscribed to the modified fields.

[0028] In some embodiments, updating corresponding fields in the target view component according to the priority of the modified fields includes: If the priority of the modified field is the first priority, the package of the modified fields is directly sent to the target view component for updating; If the priority of the modified field is the second priority, the modified field is packaged with other modified fields within the preset time and sent to the target view component for updating after a preset time delay.

[0029] If the priority of the modified field is the first priority, that is, high priority, for example, the modified field is a key alarm field, and its priority is the first priority, the modified field is directly packaged and sent to the target view component for updating.

[0030] If the priority of the modified field is the second priority, i.e., medium-low priority, for example, the modified field is a non-core configuration and its priority is the second priority, then after a preset time delay, the modified field and other modified fields within the preset time are batch packaged and sent to the target view component for updating. Among them, the priority of other modified fields within the preset time is the second priority. For example, if the preset time is 50ms, then after 50ms, the modified field and other modified fields within 50ms are batch packaged and sent to the target view component for updating.

[0031] This embodiment updates fields based on their priority. For fields with the first priority, updates can be reflected on the interface within milliseconds, avoiding polling interval delays. For fields with the second priority, updates are delayed and performed in batches, avoiding frequent updates.

[0032] The priority of the field can be defined by the cache controller of the cache control layer. In addition, the cache controller can also dynamically calculate the storage weight according to the data type, access frequency, memory / storage pressure and other information, and make decisions: For the first priority data, i.e. high priority data (such as real-time alarm data), it is stored in memory preferentially, and a short automatic invalidation time or a strong dependent event update is set.

[0033] For the second priority data, i.e. medium priority data (such as server configuration data), it is stored in memory or IndexedDB on demand, and a moderate update strategy is set.

[0034] For the third priority data, i.e. low priority data (such as archived logs), it is stored in IndexedDB, and depends on manual flushing or timed update.

[0035] Therefore, in some embodiments, it further comprises: storing the data object according to the priority of the data object; wherein, if the data object is first priority data, it is stored in memory preferentially, and an automatic invalidation time or a strong dependent event update is set; if the data object is second priority data, it is stored in memory or IndexedDB; if the data object is third priority data, it is stored in IndexedDB, and depends on manual flushing or timed update.

[0036] In some embodiments, it further comprises: when the data update event is a target event, synchronizing the modified field to a target object; the target event is an event that needs to synchronize the modified field to the backend or the client; the target object is the backend or the client.

[0037] For fields that need to be synchronized to the backend or other clients, the modified field is transmitted to the backend or other clients for synchronization through the synchronization engine. The synchronization engine is responsible for communication with the backend and other clients. The synchronization engine only transmits the changed field instead of the entire data object. The synchronization engine performs network transmission, confirmation, and retries when transmission fails, etc.

[0038] Synchronizing data in the field as the minimum unit can reduce network traffic.

[0039] S103: receiving a query request of a view layer where the target view component is located, and querying the value corresponding to the key carried by the query request in the reverse index mapping according to the query request.

[0040] S104: obtaining the data object corresponding to the value in the main data mapping according to the value, and returning the data object to the view layer.

[0041] The data storage layer adopts a double Map structure, including a main data Map and a reverse index Map. The main data Map is used to store complete data objects (e.g., ServerObject). The key (Key) in the main data Map is a unique identifier (e.g., server ID). The value is the complete data object corresponding to the key. The reverse index Map is used to build various query indexes to achieve fast data object lookup. The key (Key) in the reverse index Map is a query condition (e.g., RACK_LOCATION:A-12, CPU_USAGE:>90, TAG:critical), and the value (Value) is a set of keys in the main data Map that satisfy the query condition (e.g., [‘srv-001’, ‘srv-005’]).

[0042] The cache control layer includes a cache controller. The cache controller receives a query request from the view layer and, according to the query request, first queries the value corresponding to the key carried by the query request in the reverse index Map, i.e., finds a set of keys in the main data Map that satisfy the query condition. Then, according to the query value, the data object corresponding to the value is obtained in the main data Map, and the data object is returned to the view layer.

[0043] In this embodiment, when querying data objects, the cache control layer first finds the corresponding keys in the reverse index Map, and then takes out the complete data objects corresponding to these keys from the main data Map, thus avoiding traversing the entire data set and greatly improving the query efficiency (close to O(1) complexity).

[0044] In some embodiments, obtaining the data object corresponding to the value in the main data Map according to the value includes: If the value is located in different shards, determining the shards where the value is located; sending query requests to the shards in parallel; receiving and aggregating the data objects corresponding to the value returned by the shards.

[0045] Sharding refers to dividing a large data set into smaller, more manageable parts. If the values corresponding to the key carried by the query request are scattered in multiple shards according to the query in the reverse index Map, the shards to which these values belong are determined, and query requests are initiated to these shards in parallel. Each shard independently performs the query, uses its internal double Map structure to find the data object, and returns the found data object. The cache control layer aggregates the data objects returned by the shards and returns the final result to the view layer.

[0046] For example, the view layer initiates a query request through CacheAPI.queryServers(), such as "get all servers in A-12 rack".

[0047] The cache control layer receives the query request, and looks up the value (a set of server IDs, such as ['srv-001','srv-003',...]) corresponding to the key RACK_LOCATION:A-12 through the reverse index Map.

[0048] If the values are scattered in multiple shards, the shard to which the values belong is determined.

[0049] Parallelly, query requests are initiated to the shards (each shard can run in an independent Web Worker thread to improve performance): "return the server objects in the shard whose IDs are in the set ['srv-001','srv-003',...]".

[0050] Each shard independently executes the query (quickly locates by using its internal double Map structure) and returns the result.

[0051] The cache control layer aggregates all the results returned by the shards. The final result is returned to the view layer.

[0052] The reverse index Map and the parallel query of the shards can greatly optimize the efficiency of complex data retrieval, and the performance of complex data retrieval is expected to be improved by more than 10 times.

[0053] In some embodiments, further comprising: When the local version number of the data object is higher than the received update version number, the corresponding data object is not modified; When the local modified field and the received modified field do not overlap, the local modified object and the received modified field are merged; When the local and remote modified fields are the same, the local modified field, the remote modified field, and the original version of the field are compared, and when it is determined according to the comparison result that the local modified field and the remote modified field exist conflict, an alarm is given for manual processing; When batch operations are received, the operations are sorted according to the logical time of the operations and the operations are executed in sequence; When the data object is damaged and cannot be recovered according to the data version number, the data object is rolled back to the nearest checkpoint backup.

[0054] The cache control layer includes a data version manager. The data version manager is configured to control data versions, resolve read-write conflicts in a distributed high-concurrency environment, implement data rollback, and provide an operation safety net mechanism. When data versions do not conflict, data is operated according to a normal process. When data versions conflict, different processing methods are used according to the conflict type.

[0055] The conflict types include version lag, non-overlapping field modification, field conflict, batch operation, and data corruption.

[0056] If the conflict type is version lag, that is, the local version number is higher than the received update version number, the corresponding data object is not modified. The local version number refers to the version number that has been updated locally. The update version number refers to the version number that has not been updated locally.

[0057] If the conflict type is non-overlapping field modification, that is, the locally modified field and the received modified field do not overlap, the locally modified object and the received modified field are merged.

[0058] If the conflict type is field conflict, that is, the locally and remotely modified fields are the same, and it is determined that the locally modified field and the remotely modified field conflict by comparing the locally modified field, the remotely modified field, and the original version of the field, an alarm is given for manual processing.

[0059] If the conflict type is batch operation, each operation is sorted according to the logical time of the operation and executed in order. The logical time of the operation is the time when the operation is generated.

[0060] If the conflict type is data corruption, that is, the data object is corrupted and cannot be recovered according to the data version number, a rollback is performed to the nearest checkpoint. The checkpoint backup of the data object is created periodically, so that when the data object is corrupted and cannot be recovered according to the data version number, a rollback is performed to the nearest checkpoint.

[0061] In some embodiments, the method further includes: receiving an update request; updating a target object according to the update request; the target object is a part of a data object or the entire data object.

[0062] Reference Figure 4 As shown, the cache control layer receives an update request sent by the view layer, and writes an update to the data storage layer according to the update request. After writing the update, a data change is triggered, a change listener publishes a notification to the cache controller, the cache controller sends a synchronization instruction to the synchronization engine, and then the synchronization engine synchronizes the changed data to the backend or other clients and writes back an acknowledgement. The cache controller sends an update confirmation to the view layer.

[0063] In some embodiments, the method further comprises: updating the data version number of the data object when the local update data is completed or the modified field is synchronized to the target object is completed.

[0064] updating the data version number corresponding to the related data after the local update is confirmed or the confirmation of the synchronization success of the synchronization engine is received.

[0065] In some embodiments, the method further comprises: receiving a data deletion event; the data deletion event is generated when the event listener detects that a field of a data object or the data object is deleted; notifying the corresponding view component to remove the corresponding part according to the data deletion event.

[0066] Reference Figure 5 As shown in the figure, when the event listener detects that a field of a data object or the data object is deleted, a data deletion event is generated. The data deletion event can include the ID of the data object and the information of the deleted part. The event dispatcher notifies the corresponding view component to remove the deleted part according to the data deletion event. In addition, the event dispatcher can record the deletion log and trigger the synchronization deletion.

[0067] In some embodiments, notifying the corresponding view component to remove the corresponding part according to the data deletion event comprises: notifying the corresponding view component to remove the corresponding part according to the priority of the deleted part.

[0068] If the deleted part is a field, notifying the corresponding view component to remove the deleted field according to the priority of the field; If the deleted part is a data object, notifying the corresponding view component to remove the deleted data object according to the priority of the data object.

[0069] The present embodiment sets the priority of the field and the data object, and notifies the corresponding view component to remove the deleted part according to the priority of the field and the priority of the data object, so that the view component can more accurately perform data deletion.

[0070] In some embodiments, notifying the corresponding view component to remove the corresponding part according to the priority of the deleted part comprises: If the deleted part is a field and the priority of the field is a first priority, directly notifying the corresponding view component to remove the corresponding field; If the deleted part is a field and the priority of the field is a second priority, notifying the corresponding view component to remove the deleted field and other deleted fields within a second preset time after delaying for the second preset time.

[0071] The embodiment deletes the fields according to the priority of the fields, and the deletion of the fields of the first priority can make the millisecond-level reaction to the interface, avoiding the interval delay of the polling. The fields of the second priority are deleted by batch informing the corresponding view components, so that the frequent informing of the view components can be avoided.

[0072] In some embodiments, further comprising: determining a target data object according to the historical access of the view component to the data object; preloading the target data object to the view component.

[0073] The target data object can be a data object frequently accessed by the view component or a data object focused on. For the data object frequently accessed by the view component, the target data object is preloaded to the view component instead of being loaded after receiving the query request, so that the target data object can be reflected on the interface more timely. For example, the target data object is the server status of a high-fault cabinet, and the server status of the high-fault cabinet is preloaded, so that the server status of the high-fault cabinet can be reflected on the interface in time, and relevant personnel can check in time.

[0074] In some embodiments, preloading the target data object to the view component comprises: preloading the target data object to the view component by a dedicated loading resource.

[0075] The dedicated loading resource is responsible for loading the target data object to the view component. When the target data object does not need to be loaded, the dedicated loading resource is idle and is not used to process other tasks. When the target data object needs to be loaded, the dedicated loading resource works to load the target data object to the view component.

[0076] On the basis of the cache method provided in the above embodiments of the application, different schemes can be used for compatibility according to different browser versions. For example, as shown in Figure 6 , if it is a modern browser, IndexedDB can be used. If it is an old browser, LocalStorge, i.e., local storage, can be used.

[0077] In summary, the server management software front-end cache method provided by the application updates in the field as the minimum unit, can significantly reduce network traffic, and can avoid the problem of invalidation of the entire data packet caused by field changes in the related scheme of caching the entire API response or file. In addition, the server management software front-end cache method provided by the application only updates the view component that subscribes to the modified field, which can avoid invalid rendering of irrelevant components and improve interface performance. When querying data, first find the corresponding value in the reverse index mapping, and then take out the complete data object corresponding to the value from the main data mapping, which avoids traversing the entire data set and greatly improves the query efficiency.

[0078] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment.

[0079] The embodiments of the application also provide a server management software front-end cache device, as shown in Figure 7 The device comprises: A first receiving module 10 is configured to receive a data update event; the data update event is generated by a change listener when a field of a data object is modified; An updating module 20 is configured to update a corresponding field in a target view component according to the data update event and the priority of the modified field; the target view component is a view component that subscribes to the modified field; A second receiving module 30 is configured to receive a query request of a view layer where the target view component is located, and query a value corresponding to a key carried by the query request in a reverse index mapping according to the query request; An obtaining module 40 is configured to obtain a data object corresponding to the value in a main data mapping according to the value, and return the data object to the view layer.

[0080] On the basis of the above embodiments, as a specific embodiment, the updating module 20 comprises: A first updating unit is configured to directly send the modified field to the target view component for updating if the priority of the modified field is a first priority; A second updating unit is configured to delay a preset time and then send the modified field and other modified fields within the preset time to the target view component for updating if the priority of the modified field is a second priority.

[0081] On the basis of the above-mentioned embodiments, as a specific implementation, the data object corresponding to the value is obtained from the main data mapping according to the value, including: The shard determination unit is configured to determine the shard in which the value is located if the value is located in different shards. The query request sending unit is configured to send query requests to the shards in parallel. The aggregation unit is configured to receive and aggregate the data objects corresponding to the value returned by the shards.

[0082] On the basis of the above-mentioned embodiments, as a specific implementation, the method further includes: The synchronization module is configured to synchronize the modified field to a target object when the data update event is a target event; the target event is an event that requires the modified field to be synchronized to a backend or a client; and the target object is the backend or the client.

[0083] On the basis of the above-mentioned embodiments, as a specific implementation, the method further includes: The version management module is configured to not modify the corresponding data object when the local version number of the data object is higher than the received update version number; to merge the locally modified object and the received modified field when the locally modified field and the received modified field do not overlap; to compare the locally modified field, the remotely modified field, and the original version of the field when the locally and remotely modified fields are the same, and to perform an alarm for manual processing when it is determined according to the comparison result that the locally modified field and the remotely modified field conflict; to sort and sequentially execute each operation according to the logical time of the operation when a batch operation is received; and to roll back the data object to the nearest checkpoint backup when the data object is damaged and cannot be recovered according to the data version number.

[0084] On the basis of the above-mentioned embodiments, as a specific implementation, the method further includes: The third receiving module is configured to receive an update request. The target object updating module is configured to update a target object according to the update request; the target object is part of a field of a data object or the entire data object.

[0085] On the basis of the above-mentioned embodiments, as a specific implementation, the method further includes: The data version number updating module is configured to update the data version number of the data object when the local update data is completed or the modified field is synchronized to the target object.

[0086] On the basis of the above-mentioned embodiments, as a specific implementation, the method further includes: A fourth receiving module is configured to receive a data deletion event; the data deletion event is generated by an event listener when a field of a data object or the data object is deleted; A notification module is configured to notify a corresponding view component to remove a corresponding part according to the data deletion event.

[0087] In the above embodiments, as a specific implementation, the notification module is configured to: notify the corresponding view component to remove the corresponding part according to a priority of the deleted part.

[0088] In the above embodiments, as a specific implementation, the notification module comprises: A first notification unit is configured to, if the deleted part is a field and a priority of the field is a first priority, directly notify the corresponding view component to remove the corresponding field; A second notification unit is configured to, if the deleted part is a field and a priority of the field is a second priority, notify the corresponding view component to remove the deleted field and other deleted fields within a second preset time after a delay of the second preset time.

[0089] In the above embodiments, as a specific implementation, the method further comprises: A target data object determination module is configured to determine a target data object according to a historical access situation of the data object by the view component; A preloading module is configured to preload the target data object to the view component.

[0090] In the above embodiments, as a specific implementation, the preloading module is configured to: preload the target data object to the view component by a dedicated processing resource.

[0091] The server management software front-end cache device provided by the application can update in the minimum unit of a field, can significantly reduce network traffic, and can avoid the problem of invalidation of the entire data packet caused by field changes in the related scheme of caching in the unit of an entire API response or a file. In addition, the server management software front-end cache device provided by the application can only update the view component that subscribes to the modified field, can avoid invalid rendering of irrelevant components, and improves the interface performance. When querying data, the corresponding values are first searched in the reverse index mapping, and then the complete data object corresponding to the values is taken out from the main data mapping, so that the entire data set is avoided to be traversed, and the query efficiency can be greatly improved.

[0092] The features of the embodiment of the cache device of the server management software front end can be referred to the related description of the embodiment of the cache method of the server management software front end, which will not be repeated here.

[0093] The embodiment of the application further provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-mentioned embodiments of the cache method of the server management software front end.

[0094] The electronic device provided by the application can update in the field as the minimum unit, which can significantly reduce network traffic, and can avoid the problem of invalidating the entire data packet due to field changes in the related scheme of caching in the entire API response or file unit. In addition, the electronic device provided by the application only updates the view component that subscribes to the modified field, which can avoid invalid rendering of irrelevant components and improve interface performance. When querying data, first find the corresponding value in the reverse index mapping, and then take out the complete data object corresponding to the value from the main data mapping, which avoids traversing the entire data set and greatly improves the query efficiency.

[0095] The embodiment of the application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any of the above-mentioned embodiments of the cache method of the server management software front end when running.

[0096] In an exemplary embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0097] The embodiment of the application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the cache method of the server management software front end.

[0098] The embodiment of the application further provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the cache method of the server management software front end.

[0099] Those skilled in the art will further realize that the mere concepts, teachings, and embodiments described herein are merely meant to provide an enabling description of the claimed application and are not intended to limit the scope of the application. Therefore, embodiments or examples described herein are not meant to be limiting, but merely to provide an enabling description of the claimed application.

[0100] The above describes in detail the cache method, device, medium and program product of the server management software front end provided by the application. The principles and implementation modes of the application are described by applying specific examples in this paper. The above description of the embodiments is only applicable to help understand the method of the application and its core idea. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the application, the application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the application.

Claims

1. A cache method for a server management software front end, characterized in that: include: Receive data update events; The data update event is generated when the change listener detects that a field of a data object has been modified; According to the data update event, the corresponding fields in the target view component are updated according to the priority of the modified fields; the target view component is the view component that subscribes to the modified fields; Receive a query request for the view layer where the target view component is located, and query the inverted index mapping for a value corresponding to the key carried in the query request according to the query request; According to the value, a data object corresponding to the value is obtained in the main data map, and the data object is returned to the view layer.

2. The caching method according to claim 1, wherein: According to the priority of the modified fields, the corresponding fields in the target view component are updated, including: If the priority of the modified field is the first priority, the package of the modified fields is directly sent to the target view component for updating; If the priority of the modified field is the second priority, the modified field is packaged with other modified fields within the preset time and sent to the target view component for updating after a preset time delay.

3. The caching method according to claim 1, wherein: Obtaining a data object corresponding to the value in the master data mapping according to the value includes: If the value is located in a different shard, determining the shard in which the value is located; Sending query requests to the shards in parallel; Receive and aggregate data objects corresponding to the values ​​returned by the shards.

4. The caching method according to claim 1, wherein: Also includes: When the data update event is a target event, the modified field is synchronized to the target object; The target event is an event that requires synchronizing the modified fields to the backend or client; the target object is the backend or client.

5. The caching method according to claim 1, wherein: Also includes: When the local version number of a data object is higher than the received update version number, the corresponding data object is not modified; When the locally modified fields do not overlap with the received modified fields, the locally modified object and the received modified fields are merged; When the locally modified and remotely modified fields are the same, the locally modified fields, the remotely modified fields, and the original versions of the fields are compared. If the comparison results indicate a conflict between the locally modified fields and the remotely modified fields, an alarm is issued for manual processing. When receiving batch operations, sort the operations according to their logical time and execute them in order; When a data object is damaged and cannot be restored based on the data version number, the data object is rolled back to the most recent checkpoint backup.

6. The caching method according to claim 1, wherein: Also includes: Receive update requests; updating the target object according to the update request; The target object is a partial field of a data object or the entire data object.

7. The caching method according to claim 1, wherein: Also includes: When the local data update is completed or the modified fields are synchronized to the target object, the data version number of the data object is updated.

8. The caching method according to claim 1, wherein: Also includes: Receive data deletion events; The data deletion event is generated when the event listener detects that a field of a data object or a data object is deleted; According to the data deletion event, the corresponding view component is notified to remove the corresponding part.

9. The caching method according to claim 8, wherein: According to the data deletion event, notifying the corresponding view component to remove the corresponding part includes: According to the priority of the deleted part, notify the corresponding view component to remove the corresponding part.

10. The caching method according to claim 9, characterized in that: According to the priority of the deleted part, the corresponding view component is notified to remove the corresponding part, including: If the deleted part is a field and the priority of the field is the first priority, the corresponding view component is directly notified to remove the corresponding field; If the deleted part is a field and the priority of the field is the second priority, then after a delay of the second preset time, the corresponding view component is notified to remove the deleted field and other deleted fields within the second preset time.

11. The caching method according to claim 1, wherein: Also includes: Determining a target data object based on historical access of the view component to the data object; Preload the target data object into the view component.

12. The caching method according to claim 11, characterized in that: Preloading the target data object into the view component includes: The target data object is preloaded into the view component by dedicated processing resources.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the server management software front-end caching method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the caching method for the server management software front end according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the caching method for the server management software front end according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Local caching method and device based on Velocity block instruction

    CN107346305A

  • Data query method and system and computer readable storage medium

    CN112506964A

  • Bus operation maintenance system

    CN113762543A

  • Unified loading and hot updating system for application dynamic configuration

    CN118963863A

  • Incremental maintenance of path-expression views

    US20060294156A1