An interface refreshing method and device, computer device and storage medium

By deploying a log module on the cloud management platform server, the log information of the cloud database can be obtained and parsed in real time, which solves the problem that the cloud management platform interface cannot be refreshed in real time and improves the user experience.

CN118474202BActive Publication Date: 2025-11-18JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410684374.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2025-11-18
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

The cloud management platform cannot refresh the interface data in real time, resulting in a poor user experience.

Method used

Deploy a log module on the server side of the cloud management platform to obtain log information from the cloud database in real time, parse it into update messages in a preset format, and send them to the front end to refresh the front end interface.

Benefits of technology

It enables real-time refreshing of the cloud management platform interface, displaying updated data without requiring manual refresh by the user, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474202B_ABST
    Figure CN118474202B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of cloud platforms, and discloses an interface refreshing method and device, computer equipment and a storage medium, which are applied to a service end of a cloud management platform, the method comprises the following steps: obtaining expected update information expected to be updated by a front-end interface of the cloud management platform, the front-end interface comprising a plurality of resource interfaces; obtaining log information sent by a cloud database of the cloud management platform after starting a log pushing service, the service end being taken as a slave end device of the cloud database; analyzing the log information to obtain update information, the update information being used for indicating update content and an update object; when the update information comprises the expected update information, encapsulating the update information into an update message in a preset format, and sending the update message in the preset format to the front end to refresh a target interface in the front-end interface, the data corresponding to the updated object in the refreshed target interface being the update content. The application can solve the problem that interface data of the cloud management platform cannot be refreshed in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud platform technology, and specifically to an interface refresh method, apparatus, computer device, and storage medium. Background Technology

[0002] With the rapid development of computer network and cloud computing technologies, an increasing number of applications are bringing convenience to people's daily lives. The backend products corresponding to these applications are typically deployed in the cloud or on virtualization platforms. Cloud management platforms usually manage multiple virtualization platforms and control their virtualization resources, such as computing, storage, and network resources.

[0003] Since the cloud management platform and the virtualization platform are two separate platforms, each with its own data storage system, and the cloud management platform's data depends on the virtualization platform, the cloud management platform typically employs scheduled tasks to prevent inconsistencies between the two systems. These tasks read data from the cloud platform and synchronize it to the cloud management platform at set intervals, ensuring data consistency between the two platforms. However, while this method can periodically synchronize data to the cloud management platform, it cannot refresh the cloud management platform's interface in real time. Users need to refresh the cloud management platform's interface to see the updated data, resulting in a poor user experience. Summary of the Invention

[0004] In view of this, the present invention provides an interface refresh method, apparatus, computer device and storage medium to solve the problem of the inability to refresh the interface data of the cloud management platform in real time.

[0005] In a first aspect, the present invention provides an interface refresh method applied to the server side of a cloud management platform. The method includes: obtaining expected update information of the front-end interface of the cloud management platform, the front-end interface including multiple resource interfaces; obtaining log information sent by the cloud database of the cloud management platform after starting the log push service, the server being regarded as a slave device of the cloud database; parsing the log information to obtain update information, the update information being used to indicate the update content and the update object; when the update information includes expected update information, encapsulating the update information into an update message of a preset format, and sending the update message of the preset format to the front-end to refresh the target interface in the front-end interface, the data corresponding to the updated object in the refreshed target interface being the update content.

[0006] Based on the method in the first aspect mentioned above, the expected update information of the front-end interface of the cloud management platform can be obtained, and the log information sent by the cloud database after starting the log push service can be obtained. When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format and sent to the front-end to refresh the target interface in the front-end interface.

[0007] Since the logging module can be treated as a slave device of the cloud database, it can be deployed on the server side to start the log push service and obtain log information sent by the cloud database in real time; uninstalling it on the server side will stop the cloud database from sending log information. The logging module adopts an independent plug-in design, which can be flexibly plugged in and out without affecting other business, solving the problem of code intrusion and avoiding the complex scenario of developing multiple modules.

[0008] In addition, since the log module can obtain log information sent by the cloud database in real time, and when the update information obtained by parsing the log information includes the expected update information, it can interact with the front end in real time and send update information to the front end to refresh the target interface in the front end interface. This achieves real-time refresh of the interface data of the cloud management platform, and the refreshed data will be displayed without the user having to refresh the interface, thus improving the user experience.

[0009] In one optional implementation, obtaining the expected update information of the front-end interface of the cloud management platform includes: loading the expected update information from a preset configuration table in the cloud database. The expected update information includes the expected update database, the expected update data table, and the expected update field of the front-end interface.

[0010] Based on the above method, the desired update information can be loaded from the preset configuration table in the cloud database. Since the preset configuration table can be flexibly set according to the content required or desired to be updated by the cloud management platform interface, when the content required or desired to be updated by the cloud management platform interface is added or changed, only the preset configuration table needs to be configured, which improves the flexibility of refreshing the cloud management platform interface and enhances the user experience.

[0011] In one optional implementation, the cloud database includes data from multiple cloud platforms managed by the cloud management platform. Acquiring log information sent by the cloud database after starting the log push service includes: sending a preset instruction to the cloud database based on the master-slave replication principle, so that the cloud database treats the log module as a slave device; sending a preset request to the cloud database, the preset request being used to request the cloud database to enable the log push service; and receiving log information pushed by the cloud database in real time, the log information being logs generated when the cloud database updates data due to user update operations on at least one cloud platform.

[0012] Based on the above method, the log module can disguise itself as a slave device of the cloud database, receive log information pushed by the cloud database, and facilitate users to perform update operations on at least one cloud platform. This allows the cloud database to obtain log information in a timely manner when updating data, so as to refresh the front-end interface of the cloud management platform in real time.

[0013] In one optional implementation, the update information includes: primary key identifier, operation type of update operation, database corresponding to the updated data in the cloud database, data table corresponding to the updated data, field information corresponding to the updated data, resource type corresponding to the updated data, and function type corresponding to the updated content; the update content is determined based on the field information corresponding to the updated data; the update object is determined based on the database corresponding to the updated data, data table corresponding to the updated data, and fields corresponding to the updated data in the cloud database.

[0014] Based on the above method, the update object and update content can be determined based on the content included in the update information, which facilitates the subsequent determination of the target interface in the front-end interface and the method for refreshing the target interface.

[0015] In one optional implementation, the expected update information includes the expected database update, the expected data table update, and the expected update field update. When the update information includes the expected update information, the update information is encapsulated into an update message of a preset format, and the update message of the preset format is sent to the front end, including:

[0016] The updated information is compared with the expected updated information. If the database corresponding to the updated data is the same as the expected updated database, the data table corresponding to the updated data is the same as the expected updated data table, and the field information corresponding to the updated data is the same as the expected updated field, then it is determined that the updated information includes the expected updated information. When the updated information includes the expected updated information, the updated information is encapsulated into an update message in a preset format. The update message in the preset format includes the operation type, update content, update object, resource type, and function type corresponding to the updated data. The update message in the preset format is then sent to the front end.

[0017] Among them, resource type is used by the front end to determine the target interface corresponding to the resource type from the interface; function type is used by the front end to determine the update position corresponding to the function type in the target interface; operation type is used by the front end to determine the method to refresh the target interface; update object is used by the front end to determine the update object at the update position; and update content is used by the front end to determine the update data of the update object.

[0018] Based on the above method, it can be determined whether to update the front-end interface with the update information, and if it is determined that the update information should be updated with the front-end interface, the target interface to be updated or refreshed can be determined to refresh the target interface.

[0019] In one optional implementation, if the database corresponding to the updated data is inconsistent with the database to be updated, then it is determined that the updated information does not include the expected updated information; or, if the data table corresponding to the updated data is inconsistent with the data table to be updated, then it is determined that the updated information does not include the expected updated information; or, if the field information corresponding to the updated data is inconsistent with the field to be updated, then it is determined that the updated information does not include the expected updated information.

[0020] Based on the above method, it can be determined that the updated information does not include the expected updated information, which makes it easier to determine whether to refresh the front-end interface in the future.

[0021] In one alternative implementation, if the update information does not include the expected update information, then the update information processing is stopped and the front-end interface is not refreshed.

[0022] Based on the above method, the updated information does not include the expected updated information, that is, the updated information is not the content that the front-end interface needs or expects to update. Therefore, there is no need to refresh the front-end interface.

[0023] Secondly, the present invention provides an interface refresh device, comprising an acquisition module for acquiring expected update information of the front-end interface of a cloud management platform, the front-end interface including multiple resource interfaces; acquiring log information sent by the cloud database of the cloud management platform after starting the log push service, the log module being treated as a slave device of the cloud database; and a processing module for parsing the log information to obtain update information, the update information indicating the update content and update object; when the update information includes expected update information, the update information is encapsulated into an update message of a preset format and sent to the front-end to refresh the target interface in the front-end interface, the data corresponding to the update object in the refreshed target interface being the update content.

[0024] Thirdly, the present invention provides a computer 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 computer instructions to perform the interface refresh method of the first aspect or any corresponding embodiment described above.

[0025] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the interface refresh method of the first aspect or any corresponding embodiment described above.

[0026] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the interface refresh method of the first aspect or any corresponding embodiment described above. Attached Figure Description

[0027] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of a cloud management platform 10 according to an embodiment of the present invention;

[0029] Figure 2 This is a flowchart illustrating the interface refresh method according to an embodiment of the present invention;

[0030] Figure 3 This is a structural block diagram of an interface refresh device according to an embodiment of the present invention;

[0031] Figure 4 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] Virtualization platforms excel at managing virtualized resources such as computing, storage, and networking, but are relatively weak in areas like operations, billing, reporting, and tenant management. Therefore, cloud management platforms have emerged to address this need. By incorporating virtualization platforms into their management, cloud management platforms can not only manage virtualized computing, storage, and networking resources, but also, based on specific design and algorithms, implement advanced functions such as billing, reporting, and operations.

[0034] As described in the background section, periodically synchronizing data to the cloud management platform cannot refresh the cloud management platform's interface data in real time, and users need to refresh the cloud management platform's interface to see the refreshed data, resulting in a poor user experience.

[0035] To address the aforementioned issues, this invention provides a UI refresh method applied to the server-side of a cloud management platform. The server-side includes a log module. The method includes: acquiring expected update information for the front-end interface of the cloud management platform; acquiring log information sent by the cloud database after starting the log push service; and when the update information includes the expected update information, encapsulating the update information into a preset format update message and sending the preset format update message to the front-end to refresh the target interface on the front-end. This approach solves the problem of not being able to refresh the interface data of the cloud management platform in real time.

[0036] like Figure 1The diagram shown is a schematic of a cloud management platform 10 provided in an embodiment of the present invention. The cloud management platform 10 manages multiple cloud platforms. Figure 1 In the cloud management platform 10, there are server 101, front-end 102, and cloud database 103. Server 101 includes a log module 1011. Optionally, server 101 may also include a computing module 1012, a network module 1013, and a storage module 1014.

[0037] The server (also called the interface refresh device) in this embodiment of the invention, such as server 101, can be any device with communication and computing capabilities, and can be used as a slave device of the cloud database. For example, the server is a server, cloud server, or cloud device, etc.

[0038] The log module in this embodiment of the invention, such as log module 1011, can interact with the cloud database and the front end. The log module only processes data creation, deletion, and modification, namely, WriteRowsEventData, DeleteRowsEventData, and UpdateRowsEventData.

[0039] The computing module in this embodiment of the invention, for example, computing module 1012, is used to manage computing resources of multiple cloud platforms.

[0040] The network module in this embodiment of the invention, for example, network module 1013, is used to manage network resources of multiple cloud platforms.

[0041] The storage module in this embodiment of the invention, for example, storage module 1014, is used to manage storage resources of multiple cloud platforms.

[0042] The front end in this embodiment of the invention, such as front end 102, can be any device with communication and display capabilities. For example, the front end can be a mobile phone, tablet, wearable watch, or in-vehicle device. It is understood that the front end can display a front-end interface.

[0043] The cloud database in this embodiment of the invention, such as cloud database 103, can be any type of database. For example, the cloud database can be a distributed cloud database or a MariaDB database.

[0044] Figure 1 The cloud management platform 10 shown is for illustrative purposes only and is not intended to limit the technical solutions of this application. Those skilled in the art should understand that in specific implementations, the cloud management platform 10 may include more devices, without limitation.

[0045] According to an embodiment of the present invention, an embodiment of an interface refresh method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0046] This embodiment provides a UI refresh method, which can be used in the aforementioned server or the log module or UI refresh device included in the server. Figure 2 This is a flowchart of an interface refresh method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0047] S201: Obtain expected update information for the front-end interface of the cloud management platform.

[0048] The front-end interface includes various resource interfaces, including computing resource interfaces, network resource interfaces, and storage resource interfaces.

[0049] The computing resource interface displays the computing resource status of multiple cloud platforms managed by the cloud management platform. For example, the computing resource status includes the usage and remaining computing resources of each cloud platform.

[0050] The network resource interface displays the network resource status of multiple cloud platforms managed by the cloud management platform. This includes information such as network resource usage, bandwidth, and network addresses for each cloud platform.

[0051] The storage resource interface displays the storage resource status of multiple cloud platforms managed by the cloud management platform. For example, storage resource status includes the occupied percentage of the shared storage pool and the remaining storage resources on each cloud platform.

[0052] In this embodiment of the invention, the expected update information includes an expected update database, an expected update data table, and expected update field information. The expected update database may be the database to which the data to be updated belongs. The expected update data table may be the data table to which the data to be updated belongs. The expected update field information may be the field to which the data to be updated belongs.

[0053] In some alternative implementations, the server loads the desired update information from a preset configuration table in the cloud database.

[0054] Among them, cloud databases include data from multiple cloud platforms managed by the cloud management platform.

[0055] In this embodiment of the invention, the preset configuration table is stored in a cloud database. The preset configuration table can be set according to actual needs and is not limited thereto.

[0056] For example, the computing resource interface might want to add updated content: the maximum percentage of computing resources used on each cloud platform within a month. Accordingly, the preset configuration table will be updated with corresponding configuration information. This added configuration information will match the information required by the server to update the "added content".

[0057] Understandably, the preset configuration table can be flexibly set according to the content that the front-end interface needs or expects to update. When the content that the front-end interface needs or expects to update is added or changed, only the preset configuration table needs to be configured. This approach can improve the flexibility of refreshing the front-end interface and enhance the user experience.

[0058] S202: Obtain the log information sent by the cloud database of the cloud management platform after starting the log push service.

[0059] The log information is binlog logs. Binlog logs are logs in binary data format. The log information is generated when a user performs update operations on at least one cloud platform, causing the cloud database to update data.

[0060] In some optional implementations, the server-side log module, based on the master-slave replication principle, sends preset instructions to the cloud database so that the cloud database treats the log module as a slave device of the cloud database; sends preset requests to the cloud database to request the cloud database to enable the log push service; and receives log information pushed by the cloud database in real time.

[0061] In one example, with Figure 1 For example, server 101 includes a log module 1011 that, based on master-slave replication, sends a preset command to cloud database 103. Upon receiving the preset command, cloud database considers log module 1011 to be a slave device. Log module 1011 then sends a dump request to cloud database 103 to request it to enable log push service. When cloud database 103 receives the dump request, it enables the log push service and generates binlog logs when updating data, pushing these binlog logs to log module 1011. Log module 1011 receives the binlog logs pushed by cloud database in real time.

[0062] S203: Parse the log information to obtain the update information.

[0063] The update information includes: primary key identifier, operation type of update operation, database corresponding to the updated data in cloud database, data table corresponding to the updated data, field information corresponding to the updated data, resource type corresponding to the updated data, and function type corresponding to the updated content.

[0064] The operation type for update operations indicates the appropriate method for users to update data on the cloud platform. Update operation types include create, delete, and modify operations.

[0065] The database corresponding to the updated data includes the database identifier.

[0066] The updated data table includes the table's identifier.

[0067] The updated data includes the field identifier and the updated value of that field.

[0068] The resource types corresponding to the updated data include computing resources, network resources, and storage resources.

[0069] The function type corresponding to the updated content indicates the function that the updated data represents on the front-end interface. For example, the function type could be a cloud platform management function or a network management function. Understandably, the function type can include many other function types without limitation.

[0070] In this embodiment of the invention, the update information is used to indicate the update content and the update object.

[0071] The updated content is determined by the field information corresponding to the updated data. The updated content is the updated value of the field.

[0072] The update object is determined based on the database, table, and fields corresponding to the updated data in the cloud database. Specifically, the update object is the object identified by the field identifier in the table of the database containing the updated data.

[0073] S204: When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format and sent to the front end to refresh the target interface in the front end.

[0074] In this context, the data corresponding to the updated object in the refreshed target interface is the updated content.

[0075] In this embodiment of the invention, the preset format can be a WebSocket message format.

[0076] In this embodiment of the invention, the update message in a preset format includes the operation type, update content, update object, resource type, and function type corresponding to the update data. Specifically, the resource type is used by the front-end to determine the target interface corresponding to the resource type from the interface. The function type is used by the front-end to determine the update position corresponding to the function type in the target interface; the operation type is used by the front-end to determine the method for refreshing the target interface; the update object is used by the front-end to determine the update object at the update position; and the update content is used by the front-end to determine the update data for the update object.

[0077] In one example, an update message with a preset format might look like this:

[0078] {

[0079] "resourceId": "Identifier of the target interface",

[0080] "resource":"Update content",

[0081] "targetType":"Updated object",

[0082] "operationType":"operation type",

[0083] "func":"Function type"

[0084] }

[0085] Understandably, the front end can establish a connection with the server via a WebSocket address based on the STOMP protocol to conduct bidirectional real-time communication.

[0086] In some optional implementations, the server compares the updated information with the expected updated information. If the database corresponding to the updated data is the same as the database to be updated, the data table corresponding to the updated data is the same as the data table to be updated, and the field information corresponding to the updated data is the same as the field to be updated, then it is determined that the updated information includes the expected updated information. When the updated information includes the expected updated information, the updated information is encapsulated into an update message in a preset format. The update message in the preset format is then sent to the front end.

[0087] Understandably, after receiving the update message in the preset format, the front end determines the target interface corresponding to the resource type from the interface, and determines the update position corresponding to the function type in the target interface. Following the method of refreshing the target interface, the data corresponding to the update object at the update position is updated to the updated value in the update content, thus ensuring the consistency of data between the front end and the back end.

[0088] Optionally, the update information may also include the timestamp corresponding to the updated data. In one example, if there are multiple update messages, the server sorts them according to a preset rule to obtain update messages in a preset order. The server then encapsulates these preset-order update messages into a preset-format update message and sends it to the front end in the preset order.

[0089] In one design, preset rules can be set according to actual needs without restriction. For example, preset rules can be based on the priority of resource types in the update information, or they can be based on the timestamps corresponding to the update data, or they can be based on a combination of the priority of resource types in the update information and the timestamps corresponding to the update data.

[0090] Understandably, the server selects priority update information according to preset rules. When there is a lot of log information, it can refresh the data of higher priority update objects first. This ensures the real-time performance of important indicators corresponding to higher priority update objects when users view the computing, network, or storage resources of various cloud platforms on the front-end interface, thereby improving the user experience.

[0091] In some optional implementations, if the database corresponding to the updated data is inconsistent with the database to be updated, the server determines that the updated information does not include the expected updated information; or, if the data table corresponding to the updated data is inconsistent with the data table to be updated, the server determines that the updated information does not include the expected updated information; or, if the field information corresponding to the updated data is inconsistent with the field information to be updated, the server determines that the updated information does not include the expected updated information.

[0092] In one example, if the update information does not include the expected update information, the server stops processing the update information and does not refresh the front-end interface.

[0093] Understandably, the information that the server can update does not include the information that is expected to be updated. That is, the updated information is not the content that the front-end interface needs or expects to update. Therefore, there is no need to refresh the front-end interface.

[0094] Based on S201-S204 above, the server can obtain the expected update information from the cloud management platform's front-end interface, obtain log information sent by the cloud database, and when the update information includes the expected update information, encapsulate the update information into a preset format update message and send the preset format update message to the front-end to refresh the target interface. Since the log module can be treated as a slave device of the cloud database, deployment on the server side can start the log push service and obtain log information sent by the cloud database in real time; uninstallation on the server side will stop the cloud database from sending log information. The log module adopts an independent plug-in design, allowing for flexible plug-and-play functionality without affecting other business operations, solving the problem of code intrusion, and avoiding the complex scenario of developing multiple modules.

[0095] In addition, since the log module can obtain log information sent by the cloud database in real time, and when the update information obtained by parsing the log information includes the expected update information, it can interact with the front end in real time and send update information to the front end to refresh the target interface in the front end interface. This achieves real-time refresh of the interface data of the cloud management platform, and the refreshed data will be displayed without the user having to refresh the interface, thus improving the user experience.

[0096] This embodiment also provides an interface refresh device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0097] This embodiment provides a screen refresh device, such as... Figure 3 As shown, it includes:

[0098] The acquisition module 301 is used to acquire the expected update information of the front-end interface of the cloud management platform, which includes various resource interfaces; and to acquire the log information sent by the cloud database of the cloud management platform after starting the log push service, with the interface refresh device being regarded as a slave device of the cloud database.

[0099] The processing module 302 is used to parse log information to obtain update information, which is used to indicate the update content and update object. When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format and sent to the front end to refresh the target interface in the front end. The data corresponding to the update object in the refreshed target interface is the update content.

[0100] In some optional implementations, the acquisition module 301 is specifically used to load expected update information from a preset configuration table in the cloud database. The expected update information includes the expected update database, expected update data table and expected update field of the front-end interface.

[0101] In some optional implementations, the cloud database includes data from multiple cloud platforms managed by the cloud management platform. The acquisition module 301 is further specifically used to send a preset instruction to the cloud database based on the master-slave replication principle, so that the cloud database treats the log module as a slave device of the cloud database; the acquisition module 301 is further specifically used to send a preset request to the cloud database, the preset request being used to request the cloud database to enable the log push service; the acquisition module 301 is further specifically used to receive log information pushed by the cloud database in real time, the log information being logs generated when the cloud database updates data due to user update operations on at least one cloud platform.

[0102] In some optional implementations, the update information includes: primary key identifier, operation type of update operation, database corresponding to the updated data in the cloud database, data table corresponding to the updated data, field information corresponding to the updated data, resource type corresponding to the updated data, and function type corresponding to the updated content; the update content is determined based on the field information corresponding to the updated data; the update object is determined based on the database corresponding to the updated data, data table corresponding to the updated data, and field information corresponding to the updated data in the cloud database.

[0103] In some optional implementations, the expected update information includes the expected update database, the expected update data table, and the expected update field information. The processing module 302 is specifically used to compare the update information with the expected update information. If the database corresponding to the updated data is consistent with the expected update database, the data table corresponding to the updated data is consistent with the expected update data table, and the field information corresponding to the updated data is consistent with the expected update field, then it is determined that the update information includes the expected update information.

[0104] The processing module 302 is also specifically used to encapsulate the update information into an update message of a preset format when the update information includes the expected update information. The update message of the preset format includes the operation type, update content, update object, resource type and function type corresponding to the update data.

[0105] The processing module 302 is also specifically used to send update messages in a preset format to the front end.

[0106] Among them, resource type is used by the front end to determine the target interface corresponding to the resource type from the interface; function type is used by the front end to determine the update position corresponding to the function type in the target interface; operation type is used by the front end to determine the method to refresh the target interface; update object is used by the front end to determine the update object at the update position; and update content is used by the front end to determine the update data of the update object.

[0107] In some optional implementations, the processing module 302 is further configured to determine that the update information does not include the expected update information if the database corresponding to the updated data is inconsistent with the database to be updated; or, the processing module 302 is further configured to determine that the update information does not include the expected update information if the data table corresponding to the updated data is inconsistent with the data table to be updated; or, the processing module 302 is further configured to determine that the update information does not include the expected update information if the field information corresponding to the updated data is inconsistent with the field information to be updated.

[0108] In some optional implementations, the processing module 302 is further configured to stop processing the update information and not refresh the front-end interface when the update information does not include the expected update information.

[0109] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0110] In this embodiment, the interface refresh device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0111] This invention also provides a computer device having the above-described features. Figure 3 The interface refresh device shown.

[0112] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 10 as an example.

[0113] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 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 programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0114] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0115] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0116] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0117] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0118] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0119] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0120] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for refreshing an interface, characterized in that, The method, applied to the server side of a cloud management platform, includes: Obtain the expected update information of the front-end interface of the cloud management platform, wherein the front-end interface includes multiple resource interfaces; The server is used to obtain log information sent by the cloud database of the cloud management platform after the log push service is started, and the server is regarded as the slave device of the cloud database. The log information is parsed to obtain update information, which is used to indicate the update content and the update object. When the update information includes the desired update information, the update information is encapsulated into an update message in a preset format, and the update message in the preset format is sent to the front end to refresh the target interface in the front end interface. The data corresponding to the update object in the refreshed target interface is the update content.

2. The method according to claim 1, characterized in that, The expected update information for obtaining the front-end interface of the cloud management platform includes: The expected update information is loaded from the preset configuration table in the cloud database. The expected update information includes the expected update database, expected update data table and expected update field of the front-end interface.

3. The method according to claim 1, characterized in that, The cloud database includes data from multiple cloud platforms managed by the cloud management platform. The step of obtaining log information sent by the cloud database after starting the log push service includes: Based on the master-slave replication principle, a preset instruction is sent to the cloud database so that the cloud database treats the log module as the slave device of the cloud database; Send a preset request to the cloud database, the preset request being used to request the cloud database to enable the log push service; The system receives log information pushed by the cloud database in real time. The log information is generated when the user performs an update operation on at least one of the cloud platforms, causing the cloud database to update data.

4. The method according to claim 1, characterized in that, The update information includes: primary key identifier, operation type of the update operation, database corresponding to the update data in the cloud database, data table corresponding to the update data, field information corresponding to the update data, resource type corresponding to the update data, and function type corresponding to the update content; The updated content is determined based on the field information corresponding to the updated data; The update object is determined based on the database corresponding to the update data in the cloud database, the data table corresponding to the update data, and the field information corresponding to the update data.

5. The method according to claim 1, characterized in that, The expected update information includes the expected database update, the expected data table update, and the expected field update information. When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format, and the update message in the preset format is sent to the front end, including: The updated information is compared with the expected updated information. If the database corresponding to the updated data is the same as the expected updated database, the data table corresponding to the updated data is the same as the expected updated data table, and the field information corresponding to the updated data is the same as the expected updated field, then it is determined that the updated information includes the expected updated information. When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format. The update message in the preset format includes the operation type, update content, update object, resource type, and function type corresponding to the update data. Send the update message in the preset format to the front end; Wherein, the resource type is used by the front end to determine the target interface corresponding to the resource type from the interface; the function type is used by the front end to determine the update position corresponding to the function type in the target interface; the operation type is used by the front end to determine the method for refreshing the target interface; the update object is used by the front end to determine the update object at the update position; and the update content is used by the front end to determine the update data of the update object.

6. The method according to claim 5, characterized in that, The method further includes: If the database corresponding to the updated data is inconsistent with the database to be updated, then it is determined that the updated information does not include the expected updated information; or, If the data table corresponding to the updated data is inconsistent with the expected updated data table, then it is determined that the updated information does not include the expected updated information; or, If the field information corresponding to the updated data is inconsistent with the expected updated field information, then it is determined that the updated information does not include the expected updated information.

7. The method according to claim 6, characterized in that, The method further includes: If the update information does not include the expected update information, then the update information processing will stop and the front-end interface will not be refreshed.

8. A screen refresh device, characterized in that, The device includes: The acquisition module is used to acquire expected update information of the front-end interface of the cloud management platform, which includes multiple resource interfaces; and to acquire log information sent by the cloud database of the cloud management platform after the log push service is started, wherein the interface refresh device is regarded as a slave device of the cloud database. The processing module is used to parse the log information to obtain update information, which is used to indicate the update content and the update object. When the update information includes the expected update information, the update information is encapsulated into an update message in a preset format and the update message in the preset format is sent to the front end to refresh the target interface in the front end interface. The data corresponding to the update object in the refreshed target interface is the update content.

9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the interface refresh method of 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 for causing the computer to perform the interface refresh method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system of online update of remote server

    CN103164236A

  • Message subscription-based user interface refreshing method under cloud platform

    CN108304236A