Desktop application software restart continuous connection method based on real-time database

By using real-time databases to store interface data in desktop application software, the problem of loss of interface status after traditional software restart is solved, and the continuity and continuity of the interface after restart is achieved.

CN120020735APending Publication Date: 2025-05-20HIWING TECH ACAD OF CASIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311552585.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

Traditional desktop application software cannot maintain the interface state after restarting, resulting in the loss of operation records and display traces, and the continuous and uninterrupted interface function cannot be achieved.

Method used

By using a real-time database (such as a Redis database) to store and manage interface data, the indirect binding of the interface and real-time database data and background control logic are realized, so as to restore the interface state after the program is restarted.

Benefits of technology

It realizes the maintenance of the interface status of the desktop application software after restarting, ensuring that the display screen is not interrupted, and meeting the need for the process display to remain unchanged after restarting the software before the experiment is finished.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020735A_ABST
    Figure CN120020735A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of system software, and discloses a desktop application software restart continuous connection method based on a real-time database. The method comprises the steps that S100, a desktop program is started and automatically loaded and initialized, and binding of data and events is executed; s102, judging whether fixed display type data exists in a real-time database, if so, turning to S106, and otherwise, turning to S104; s104, storing the fixed display type data into a real-time database, and turning to S106; s106, periodically obtaining related data from the real-time database, binding the obtained related data with the interface data, and refreshing a binding result; s108, receiving an interface display control instruction, executing corresponding operation according to the interface display control instruction, and generating dynamic display type information according to the executed corresponding operation; and S110, storing the generated dynamic display type data into a real-time database. Therefore, the display picture can be ensured not to be interrupted after the program is restarted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of system software, and in particular, to a method for restarting and reconnecting a desktop application software based on a real-time database. Background Art

[0002] For traditional desktop application software (or programs), such as WinForm, WPF and other applications, when an operation logic error occurs or for other reasons, the program needs to be manually closed and restarted if it runs abnormally, or needs to be manually restarted after the program automatically shuts down. After restarting, the display state of the interface will return to the original state, that is, the operation records, display traces, button states, etc. in the interface before restarting cannot be restored to the original state (or reconnected) after restarting.

[0003] The reason for the inability to restart and reconnect is that after the program restarts, it usually first executes the initialization method of the interface display, and the interface state returns to the initial state. In addition, some interface display contents are associated with program memory variables. When the program is closed, the memory variables are automatically recycled.

[0004] In some business scenarios, it is required that the display interface of the desktop application program be continuous without interruption, and even after the program restarts, it is required to be repeatedly displayed. For example, a software that can display a certain test process needs to show which step of the process is being executed, which have been completed, and which have not started. Different execution states correspond to different display styles. By the operator clicking buttons such as "Next Step", "Previous Step", "Test Start", "Test End", etc., corresponding actions and display switches are executed. When the test is not over, if the software is restarted, it is required that the process display remains unchanged, otherwise only the operation actions before restart can be repeated, but this is not allowed.

[0005] The existing technical implementation methods generally adopt the master-slave redundancy technology. The master and slave machines work simultaneously. When the master machine fails, it automatically switches to the slave machine, that is, from the perspective of system stability, the program runs stably without reporting errors and automatically shuts down.

[0006] The existing technology can achieve the function of continued display after a crash, but has the following disadvantages:

[0007] (1) The master-slave redundancy technology has a high cost and requires two host machines to achieve.

[0008] (2) The technical difficulty is relatively high, and a separate monitoring module needs to be developed to monitor the states of the master and slave machines. Summary of the Invention

[0009] The present invention provides a method for restarting and reconnecting a desktop application software based on a real-time database, which can solve the problems in the existing technology.

[0010] The present invention provides a method for restarting and reconnecting a desktop application software based on a real-time database, wherein the method includes:

[0011] S100, The desktop program starts and automatically loads for initialization, and performs the binding of data and events;

[0012] S102, Determine whether there is fixed display type data in the real-time database. If so, go to S106; otherwise, go to S104;

[0013] S104, Store the fixed display type data into the real-time database, and go to S106;

[0014] S106, Periodically obtain relevant data from the real-time database, bind the obtained relevant data with the interface data, and refresh the binding result;

[0015] S108, Receive an interface display control instruction, perform corresponding operations according to the interface display control instruction, and generate dynamic display type information according to the performed corresponding operations;

[0016] S110, Store the generated dynamic display type data into the real-time database.

[0017] Preferably, the obtained relevant data includes fixed display type data and dynamic display type information.

[0018] Preferably, the fixed display type information includes basic configuration information for forming a fixed interface.

[0019] Preferably, the basic configuration information includes the name of the display control, the position of the display control, the display level, the display method, and the display type.

[0020] Preferably, the dynamic display type information includes monitored value data, status value data, temporary variable data, and mode data.

[0021] Preferably, the interface display control instruction includes a start instruction, an end instruction, and a switch display instruction. Performing corresponding operations according to the interface display control instruction includes:

[0022] Performing a new operation or a start operation according to the start instruction;

[0023] Performing a save operation or a stop operation according to the end instruction;

[0024] Performing a next operation or a back operation according to the switch display instruction.

[0025] Preferably, the real-time database is a Redis database.

[0026] Through the above technical solution, the traditional interface can be changed from being driven by in-memory data to being driven by reading from a third-party real-time database, and the data storage method can be changed from in-memory storage to storage in a third-party real-time database. Moreover, through the indirect binding of the interface to the data in the third-party real-time database and the background control logic, the state of the interface resuming connection after the program restarts is achieved. That is, during the normal operation of the program, if the interface is actively closed and then restarted, it can remain unchanged. If the program is automatically closed due to a fault during operation, the interface can remain unchanged after it is opened again. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings included are used to provide a further understanding of the embodiments of the present invention, which form a part of the specification, are used to illustrate the embodiments of the present invention, and are used to explain the principles of the present invention together with the written description. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 The flowchart of a method for restarting and resuming connection of a desktop application software based on a real-time database according to an embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and in no way limits the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0030] It should be noted that the terms used here are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used here, unless otherwise clearly specified in the context, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "include" and / or "comprise" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0031] Unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationships. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the said technologies, methods, and devices should be regarded as part of the authorization specification. In all the examples shown and discussed here, any specific value should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, further discussion thereof is not required in subsequent drawings.

[0032] Figure 1 The flowchart of a method for restarting and resuming connection of a desktop application software based on a real-time database according to an embodiment of the present invention is shown.

[0033] As Figure 1 shown, the embodiment of the present invention provides a method for restarting and resuming connection of a desktop application software based on a real-time database, wherein the method includes:

[0034] S100, the desktop program starts and automatically loads and initializes, and performs the binding of data and events;

[0035] S102, determine whether there is fixed display type data in the real-time database. If so, go to S106; otherwise, go to S104;

[0036] Among them, if it exists, it means that the previous state is the start display state, then enter S106; if it does not exist, it means that it is the first time the system runs, and enter S104.

[0037] S104, store the fixed display type data into the real-time database (initialization state), and go to S106;

[0038] S106, periodically obtain relevant data from the real-time database, bind the obtained relevant data with the interface data, and refresh the binding result;

[0039] Among them, the interface data is the visual data of the display interface.

[0040] S108, receive the interface display control instruction, perform corresponding operations according to the interface display control instruction, and generate dynamic display type information according to the corresponding operations performed;

[0041] That is, the corresponding operations performed cause the interface to change from when it was first started, and generate dynamic display type information.

[0042] S110, store the generated dynamic display class data into the real-time database.

[0043] Through the above technical solution, the traditional interface can be changed from being driven by in-memory data to being driven by reading from a third-party real-time database, and the data storage method can be changed from in-memory storage to storage in a third-party real-time database. Moreover, through the indirect binding of the interface to the data in the third-party real-time database and the background control logic, the state of the interface being continuously connected after the program restarts is achieved. That is, during the normal operation of the program, if the interface is actively closed and then restarted, it can remain unchanged. If the program is automatically closed due to a fault during operation and then reopened, the interface can remain unchanged.

[0044] According to an embodiment of the present invention, the obtained relevant data includes fixed display class data and dynamic display class information.

[0045] For example, in the case of the system running for the first time, the obtained relevant data includes fixed display class data; in the case of the system not running for the first time (interrupted restart), the obtained relevant data includes fixed display class data and dynamic display class information.

[0046] According to an embodiment of the present invention, the fixed display class information includes the basic configuration information for forming a fixed interface.

[0047] According to an embodiment of the present invention, the basic configuration information includes the name of the display control, the position of the display control, the display level, the display method, and the display type.

[0048] According to an embodiment of the present invention, the dynamic display class information includes monitored value data, status value data, temporary variable data, and mode data.

[0049] Among them, the temporary variable data includes the in-memory variable data in the traditional development mode.

[0050] According to an embodiment of the present invention, the interface display control instructions include a start instruction, an end instruction, and a switching display instruction. Performing corresponding operations according to the interface display control instructions includes:

[0051] Performing a new operation or a start operation (start of the test) according to the start instruction;

[0052] Performing a save operation or a stop operation (end of the test) according to the end instruction;

[0053] Performing a next operation or a back (previous step) operation according to the switching display instruction.

[0054] According to an embodiment of the present invention, the real-time database is a Redis database.

[0055] Those skilled in the art should understand that the above database is merely exemplary and is not used to limit the present invention.

[0056] As can be seen from the above embodiments, the method for restarting and reconnecting a desktop application software based on a real-time database according to the present invention can save the real-time data before the program is closed to the real-time database. When the program is started again, it first obtains data from the real-time database to ensure that the display screen is not interrupted. Verified by actual projects, the method described in the present invention is feasible and stable.

[0057] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by orientation words such as "front, back, up, down, left, right", "horizontal, vertical, perpendicular, horizontal" and "top, bottom", etc. is usually based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description. Without contrary instructions, these orientation words do not indicate and imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the protection scope of the present invention; the orientation words "inside, outside" refer to the inside and outside relative to the outline of each component itself.

[0058] For the convenience of description, spatial relative terms such as "above...", "above...", "on the upper surface of...", "above" can be used here to describe the spatial positional relationship between a device or feature shown in the figure and other devices or features. It should be understood that the spatial relative terms are intended to include different orientations in use or operation in addition to the orientation described in the figure for the device. For example, if the device in the drawing is inverted, the device described as "above other devices or structures" or "above other devices or structures" will then be positioned as "below other devices or structures" or "beneath other devices or structures". Thus, the exemplary term "above..." can include both the orientations of "above..." and "below...". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and corresponding explanations are made for the spatial relative descriptions used here.

[0059] In addition, it should be noted that using words such as "first", "second" to limit components is only for the convenience of distinguishing the corresponding components. Without additional statements, the above words have no special meanings. Therefore, it cannot be understood as a limitation on the protection scope of the present invention.

[0060] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for restarting and reconnecting desktop application software based on a real-time database, characterized in that: The method includes: S100, the desktop program starts and automatically loads and initializes, and executes the binding of data and events; S102, determine whether there is fixed display data in the real-time database, if yes, go to S106, otherwise go to S104; S104, storing the fixed display data into a real-time database, and then proceeding to S106; S106, periodically obtaining relevant data from the real-time database, binding the obtained relevant data with the interface data, and refreshing the binding result; S108, receiving an interface display control instruction, performing a corresponding operation according to the interface display control instruction, and generating dynamic display information according to the performed corresponding operation; S110, storing the generated dynamic display data into a real-time database.

2. The method according to claim 1, characterized in that: The acquired related data includes fixed display data and dynamic display information.

3. The method according to claim 2, characterized in that Fixed display information includes basic configuration information for forming a fixed interface.

4. The method according to claim 3, characterized in that: The basic configuration information includes the name of the display control, the location of the display control, the display level, the display mode and the display type.

5. The method according to claim 4, characterized in that Dynamic display information includes monitoring value data, status value data, temporary variable data and mode data.

6. The method according to claim 5, characterized in that The interface display control instructions include start instructions, end instructions and switch display instructions. The corresponding operations performed according to the interface display control instructions include: Execute a new operation or start an operation according to the start instruction; Execute the save operation or stop operation according to the end instruction; Execute the next step or back operation according to the switch display instruction.

7. The method according to any one of claims 1 to 6, characterized in that The real-time database is the Redis database.