DOORS license management method, electronic device and storage medium
By regularly detecting and automatically ending the timeout DOORS process, the long-term occupancy problem of licenses is solved, dynamic management and preemption of licenses are realized, and resource utilization efficiency is improved.
Patent Information
- Application Number
- CN202111315209.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-11-08
AI Technical Summary
The prior art cannot effectively manage the DOORS process on the local computer, resulting in the inability to obtain and process operations by other users when the license is occupied for a long time.
By detecting the DOORS process whose survival time exceeds the threshold at a certain time, and determining the end process option based on the keyboard and mouse operation, automatically ending the timeout process, updating process information, and realizing dynamic monitoring and preemption of the license.
It realizes automatic closing of the DOORS process with survival timeout, releases the license, which is convenient for other users to use, improves the flexibility and accuracy of license management, and avoids waste of resources caused by long-term license occupation.
Smart Images

Figure CN113934527B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a DOORS license management method, electronic device and storage medium. Background Art
[0002] Currently, there are web crawlers that obtain the license occupancy status on the DOORS server and display the information on the web page.
[0003] However, the web page cannot obtain the DOORS process IDs on the local computer, nor can it further operate these processes. When someone occupies a DOORS license for too long and cannot operate the computer, others cannot obtain the license. Summary of the invention
[0004] In order to solve one of the above technical defects, the present application provides a DOORS license management method, an electronic device and a storage medium.
[0005] In a first aspect, the present application provides a DOORS license management method, the method comprising:
[0006] At every first time period, check whether there is a DOORS process whose survival time exceeds the second time period;
[0007] If it exists, determine whether the end process option is triggered;
[0008] If triggered, the DOORS process whose survival time exceeds the second time period is terminated.
[0009] Optionally, determining whether the process termination option is triggered includes:
[0010] Every third time period, detecting whether the duration during which neither the keyboard nor the mouse is operated exceeds a fourth time period;
[0011] When it is detected that the duration for which neither the keyboard nor the mouse has been operated exceeds a fourth duration, it is determined that the process termination option is triggered.
[0012] Optionally, the method further comprises:
[0013] Update the DOORS process ID and survival time to the window list;
[0014] Refresh all windows.
[0015] Optionally, the method further comprises:
[0016] Every fifth period, obtain the IDs and start times of all DOORS processes;
[0017] Determine newly added and newly ended processes based on the identification and start time of all DOORS processes;
[0018] The process dictionary is updated according to the newly added and newly ended processes.
[0019] Optionally, during the timing of the first duration, if a preset control is triggered, the timing of the current first duration is terminated, and when a timing resumption condition is met, the timing of the next first duration is started;
[0020] The preset control is used to preempt the DOORS license.
[0021] Optionally, after terminating the timing of the first duration, the method further includes:
[0022] Read the window text of all current DOORS processes through Windows API;
[0023] Determining whether there is an occupied license according to the window text;
[0024] If there is no occupied license, determine whether there is a problem that causes the inability to log in;
[0025] If there is no problem causing the inability to log in, then all current DOOR processes are terminated and the thread is started;
[0026] From the threads, start a DOORS process through any thread, record the time from starting the DOORS process to the corresponding window popping up, identify the corresponding window text, and determine whether the license is occupied according to the corresponding window text;
[0027] If the license is occupied, the thread is terminated and the started DOORS process is retained;
[0028] If the license is not occupied, then every sixth time period, repeat the steps of starting a DOORS process through any unselected thread, record the time from the start of the DOORS process to the pop-up of the corresponding window, identify the text of the corresponding window, and determine whether the license is occupied based on the text of the corresponding window, until the license is determined to be occupied for the first time, terminate the thread, and retain the started DOORS process.
[0029] Optionally, the resumption timing condition is that there is an occupied license, or there is a problem that causes a failure to log in, or the thread is terminated and the started DOORS process is retained to be executed.
[0030] Optionally, before terminating the DOORS process whose survival time exceeds the second time, the method further includes:
[0031] The window content corresponding to the DOORS process whose survival time exceeds the second time period is saved.
[0032] In a second aspect of the present application, an electronic device is provided, comprising:
[0033] Memory;
[0034] Processor; and
[0035] Computer programs;
[0036] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect above.
[0037] According to a third aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the method described in the first aspect above.
[0038] The present application provides a DOORS license management method, an electronic device and a storage medium. The method detects whether there is a DOORS process whose survival time exceeds a second time period at every first time period; if so, determines whether an option to terminate the process is triggered; if triggered, terminates the DOORS process whose survival time exceeds the second time period.
[0039] Among them, the method provided by the present application detects whether there is a DOORS process with a survival timeout every preset time period, and automatically ends the DOORS process with a survival timeout after the process end option is triggered. The DOORS process with a survival timeout can be automatically closed to facilitate the management of licenses.
[0040] In addition, in one implementation, every third time period, it is detected whether the continuous time during which neither the keyboard nor the mouse has been operated exceeds the fourth time period; when it is detected that the continuous time during which neither the keyboard nor the mouse has been operated exceeds the fourth time period, it is determined that the end process option is triggered, thereby ensuring the rationality of the closed DOORS process and improving the flexibility and accuracy of license management.
[0041] In addition, in one implementation, after the target DOORS process ends, the identification and survival time of the target DOORS process will be updated to the window list, and all windows will be refreshed, thereby realizing the linkage between the window and the process, ensuring that when the DOORS process is closed, its information is updated and its corresponding window is closed, thereby improving the comprehensiveness of license management.
[0042] In addition, in one implementation, the identification and start time of all DOORS processes are obtained every fifth period; based on the identification and start time of all DOORS processes, newly added and newly ended processes are determined; based on the newly added and newly ended processes, the process dictionary is updated, thereby realizing dynamic monitoring of DOORS processes and real-time management of licenses.
[0043] In addition, in one implementation, during the timing of the first time period, if a preset control is triggered, the timing of the first time period is terminated, and when the conditions for resuming timing are met, the timing of the next first time period begins, wherein the preset control is used to preempt the DOORS license, thereby realizing the termination of the timing when preempting the DOORS license, ensuring the independence of the DOORS license preemption and the accuracy of the timing, thereby ensuring the effectiveness of the license management.
[0044] In addition, in one implementation, the DOORS license is preempted after the timing of the first time period is terminated, so that the DOORS license can be reused after the DOORS process ends, making it easier for other users to obtain the license and facilitating the management of the license.
[0045] In addition, in one implementation, the recovery timing conditions are defined in detail, clarifying the cyclic detection process from the preemption process of the DOORS license to the normal process to determine whether the conditions for ending the survival timeout DOORS process have been met, allowing flexible and smooth switching between the preemption of the DOORS license and the normal DOORS license management, thereby ensuring the flexibility and management quality of the license.
[0046] In addition, in one implementation, the window content of the DOORS process that has timed out is saved before it is terminated, ensuring that unsaved document changes are not lost when the DOORS process is closed, further improving the comprehensiveness of license management.
[0047] The electronic device provided by the present application has a computer program on which a processor executes to detect whether there is a DOORS process that has timed out at preset intervals. After the process end option is triggered, the DOORS process that has timed out is automatically ended. The DOORS process that has timed out can be automatically closed to facilitate the management of licenses.
[0048] The computer-readable storage medium provided by the present application has a computer program thereon which is executed by a processor to detect whether there is a DOORS process with a survival timeout at preset intervals. After the process termination option is triggered, the DOORS process with a survival timeout is automatically terminated. The DOORS process with a survival timeout can be automatically closed to facilitate the management of licenses. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0050] Figure 1 A flowchart of a DOORS license management method provided in an embodiment of the present application;
[0051] Figure 2 A flowchart of another DOORS license management method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0053] In the process of implementing this application, the inventor found that there are web crawlers that obtain the license occupancy status on the DOORS server and display the information on the web page. However, the web page cannot obtain the IDs of each DOORS process on the local computer, nor can it further operate these processes. When someone occupies the DOORS license for too long and cannot operate the computer, others cannot obtain the license.
[0054] In view of the above problems, the embodiments of the present application provide a DOORS license management method, electronic device, and storage medium. The method detects whether there is a DOORS process whose survival time exceeds a second time period at a first time period; if so, determines whether an option to end the process is triggered; if triggered, ends the DOORS process whose survival time exceeds the second time period. The method provided by the present application detects whether there is a DOORS process with a survival timeout at a preset time period, and automatically ends the DOORS process with a survival timeout after the option to end the process is triggered. The DOORS process with a survival timeout can be automatically closed, which facilitates the management of the license.
[0055] See also Figure 1 The implementation process of a DOORS license management method provided in this embodiment is as follows:
[0056] 101. At every first time interval, check whether there is a DOORS process whose survival time exceeds a second time interval.
[0057] Among them, the first duration is a preset duration.
[0058] For example, an enterprise stipulates that the upper limit of usage is 240 minutes, and after reserving a certain amount of time, the first duration is set to 227 minutes.
[0059] The method provided in this embodiment detects, at intervals of a first time period, whether there is at least one DOORS process in the current DOORS process whose survival time exceeds a second time period.
[0060] The timing of each first time period can be completed by a timer.
[0061] For example, if the first duration is 20 seconds, a timer is started in the foreground and runs once every 20 seconds. During the running, it is detected whether there is a DOORS process whose survival time exceeds 240 minutes.
[0062] 102, if present, determine whether the end process option is triggered.
[0063] There are many ways to trigger the End Process option. Here are two examples:
[0064] The first method: every third time period, detect whether the duration for which the keyboard and mouse have not been operated exceeds a fourth time period; when it is detected that the duration for which the keyboard and mouse have not been operated exceeds the fourth time period, determine that the process termination option is triggered.
[0065] Specifically, the timing of the third duration can be completed through an infinite loop thread.
[0066] For example, if the third time length is 60 seconds, a background infinite loop thread is started when the interface is initialized, and runs once every 60 seconds to detect whether the continuous time when the keyboard and mouse have not been operated exceeds the fourth time length; when it is detected that the continuous time when the keyboard and mouse have not been operated exceeds the fourth time length, it is determined that the option to end the process is triggered.
[0067] The fourth duration is also a preset value, for example, the fourth duration is 70 minutes.
[0068] The end process option can not only implement the DOORS license management method provided by this proposal, automatically end the DOORS process, and release the DOORS license occupied by the process, but also allow users to perform manual DOORS processes at any time.
[0069] That is, the second method: displaying a trigger control, and when the control is clicked by the user, determining the implementation method of triggering the end process option.
[0070] All current processes are displayed in the interface list. When several items are selected in the interface list and trigger controls (such as controls for ending process options) are displayed, users can trigger the ending process option by clicking the controls for ending process options (such as an "End Selected Process" button).
[0071] In addition, when the End Process option is triggered, the background will check if the selected process ID does exist, and then start a task to end the process for each selected process. When no item is selected in the interface list, the user cannot click the control of the End Process option (such as the "End Selected Process" button).
[0072] 103. If triggered, terminate the DOORS process whose survival time exceeds the second time period.
[0073] This step can be achieved by starting an option to automatically end the process that has timed out of survival.
[0074] For example, after determining that the process termination option is triggered in step 102, the DOORS process whose survival time exceeds the second time period is terminated. After the DOORS process whose survival time exceeds the second time period is terminated, the option of terminating the process with survival timeout is turned off.
[0075] In addition, while executing the method provided in this embodiment, the identifier and survival time of the DOORS process will be updated to the window list at regular intervals, and all windows will be refreshed. The linkage between the window and the process is achieved, and the timely update of the DOORS process information is guaranteed. In addition, after closing the DOORS process whose survival time exceeds the second time period, the identifier and survival time of the DOORS process will also be updated to the window list, and all windows will be refreshed, thereby timely updating the information of the DOORS process. After closing the DOORS process whose survival time exceeds the second time period, its corresponding window will also be closed, thereby improving the comprehensiveness of license management.
[0076] For example, every third time period, the time without keyboard and mouse operation is obtained. When the time without keyboard and mouse operation is too long (i.e., exceeds the fourth time period), it is considered that the end process option is triggered, and then the option of ending the process with survival timeout is strongly started to end the DOORS process whose survival time exceeds the second time period. Then, the background DOORS process ID and survival time are updated to the list, and then the entire interface is refreshed.
[0077] In addition, the DOORS process is also monitored in real time. For example, every fourth period, the IDs and start times of all DOORS processes are obtained. Based on the IDs and start times of all DOORS processes, newly added and newly terminated processes are determined. Based on the newly added and newly terminated processes, the process dictionary is updated, thereby achieving dynamic monitoring of the DOORS process and real-time management of licenses.
[0078] The method provided in this embodiment will perform a detection every first time period, but the timing process of the first time period will be terminated, and the timing will be restarted after the termination.
[0079] Among them, the termination situation is the current preemption state of the DOORS license.
[0080] That is to say, if the DOORS license is currently in preemption state, the first duration will no longer be counted, and the first duration will be counted again when the preemption of the DOORS license ends (including successful preemption and unsuccessful preemption).
[0081] That is, during the timing of the first duration, if the preset control is triggered, the timing of the first duration is terminated, and when the timing resumption condition is met, the timing of the next first duration is started;
[0082] The preset control is used to preempt the DOORS license, such as a "grab" button.
[0083] The above process ensures that, when there is a DOORS process with a survival timeout, and the keyboard and mouse have not been operated for a long time, which means that the user has left the device and is no longer using the device, the process of automatically ending the DOORS process and the process of preempting the DOORS license are not performed at the same time. When the DOORS license preemption process is in progress, the DOORS process will be interrupted and ended. The timing termination when the DOORS license is preempted is realized, which ensures the independence of the DOORS license preemption and the accuracy of the timing, and ensures the effect of license management.
[0084] For example, when the interface is initialized, a background infinite loop thread is started and runs once every 60 seconds. It will not run when the DOORS license is preempted.
[0085] For another example, if you have selected several items in the current interface list and are not currently in the preemption state of the DOORS license, you can click the "End Selected Process" button. The background will check if the selected process ID does exist, and then start a task to end the process for each selected process. If no item is selected in the interface list, you cannot click the "End Selected Process" button.
[0086] For another example, when the DOORS license is not currently in preemption state, the "End All Processes" button can be clicked, and the background will check that each process ID does exist, and then start a task to end the process for each existing process.
[0087] for,
[0088] 1. The preemption process of DOORS license is implemented as follows:
[0089] (1) Read the window text of all current DOORS processes through Windows API.
[0090] (2) Determine whether there is an occupied license based on the window text.
[0091] (3) If there is no occupied license, determine whether there is a problem that causes the inability to log in.
[0092] (4) If there is no problem causing the inability to log in, terminate all current DOOR processes and start the thread.
[0093] Among them, the number of threads N can be preset, and N threads will be started at this time.
[0094] (5) From the threads, start a DOORS process through any thread, record the time from starting the DOORS process to the corresponding window popping up, identify the corresponding window text, and determine whether the license is occupied based on the corresponding window text.
[0095] For example, one thread is selected from N threads, and a DOORS process is started through the selected thread.
[0096] Record the time T1 from starting the DOORS process to the corresponding window popping up.
[0097] Identify the corresponding window text and determine whether the license is occupied according to the corresponding window text. (6)
[0099] If the license is occupied, the thread is terminated and the started DOORS process is retained. For example, N threads are terminated and the started DOORS process is retained.
[0100] If the license is not occupied, then every sixth time period, repeat the steps of starting a DOORS process through any unselected thread, recording the time from the start of the DOORS process to the pop-up of the corresponding window, identifying the text of the corresponding window, and judging whether the license is occupied according to the text of the corresponding window, until the license is determined to be occupied for the first time, terminating the thread and retaining the started DOORS process.
[0101] For example, every sixth time period (such as T2), select a thread that has not been selected to start a DOORS process, record the time T3 from the start of the DOORS process to the pop-up of the corresponding window, identify the text of the corresponding window, and determine whether the license is occupied based on the text of the corresponding window. If the license is occupied, terminate the thread selection every T2 time period, terminate N threads, and retain the started DOORS process.
[0102] Among them, the initial value of T2 is T1 / N, and the non-initial value of T2 is the arithmetic mean of all T3 / N.
[0103] In addition, each T3 can be stored in a queue, and when calculating T2, the arithmetic mean of the values in the queue can be directly calculated.
[0104] Through the above-mentioned DOORS license preemption process, the DOORS license can be reused after the DOORS process ends, making it convenient for other users to obtain the license and facilitating the management of the license.
[0105] For example, when you click the "Grab" button, first terminate the timing process of the first duration (i.e. stop the thread that monitors the survival time of the DOORS process), disable the button to end DOORS, and determine whether the correct DOORS full path and the appropriate number of threads N are configured. Then use the Windows API to read the window text of all current DOORS processes to determine whether the license is occupied. If not, determine whether there are other problems that cause the inability to log in. If the license is occupied or there are other problems that prevent login, there is no need to grab the license. If there are not enough licenses, all current DOORS processes can be ended and N threads can be started.
[0106] The first thread (select any site) starts a DOORS process, records the time T1 from the start to the pop-up window, identifies the window title and text, and ends the N thread reservation process if the license is grabbed. If the license is not grabbed, the following loop process is executed:
[0107] Loop process: Let T2 = T1 / N, take one thread to start DOORS every T2 time, record the time T3 from the start of one of the processes to the pop-up window, identify the window title and text of each process, if the license is grabbed, end N threads and keep the process, if the license is not grabbed, store T3 in the queue, calculate the arithmetic mean of the queue and update it to T1, and repeat the loop process until the license is grabbed.
[0108] In addition, when a license is grabbed, login is impossible due to abnormal status, DOORS process is terminated, or other abnormal situations occur, logs will be entered into the window.
[0109] 2. Restoration timing conditions, i.e., the end of preemption of the DOORS license, including successful preemption and unsuccessful preemption.
[0110] Specifically, the resumption timing condition is that there is an occupied license (ie, the preemption is unsuccessful), or there is a problem that causes the inability to log in (the preemption is unsuccessful), or N threads are terminated and the started DOORS process is retained and executed (ie, the preemption is successful).
[0111] The recovery timing condition is a cyclic detection process that recovers from the preemption process of the DOORS license to the normal process to see whether the conditions for ending the survival timeout DOORS process have been met, so that the preemption of the DOORS license and the normal DOORS license management can be switched flexibly and smoothly, ensuring the flexibility and management quality of the license.
[0112] In addition, before executing step 103 to end the DOORS process whose survival time exceeds the second time period, the window content corresponding to the DOORS process whose survival time exceeds the second time period will also be saved, ensuring that unsaved document changes will not be lost when the DOORS process is closed, further improving the comprehensiveness of license management.
[0113] In specific implementation, an option of automatically saving files before ending the process can be provided. If the option of automatically saving files before ending the process is selected, as long as step 103 is executed before ending the DOORS process, a save shortcut key will be sent to each subwindow of the process to save the window content corresponding to the DOORS process.
[0114] As can be seen from the above, the DOORS license management method provided in this embodiment realizes the timely release and reuse of the DOORS license by terminating the DOORS process, avoiding the occurrence in the prior art that the DOORS license is occupied for a long time by the DOORS process, making it impossible for other users to use the DOORS license, thereby improving the efficiency of the use of the DOORS license.
[0115] It can be seen from the above description that the DOORS license management method provided in this embodiment includes automatically terminating the DOORS process and manually terminating the DOORS process by the user, and also includes the DOORS license preemption process. Different processes are implemented in different locations (foreground or background), see Figure 2 , specifically including:
[0116] 1. The background obtains the ID and survival time of all DOORS processes every first time period, and detects whether there is a DOORS process survival time exceeding the second time period. If so, it determines whether the end process option is triggered. At the same time, the foreground detects that the duration of no keyboard and mouse operation exceeds the fourth time period every third time period. If it exceeds the fourth time period, it determines that the end process option is triggered. Alternatively, if the foreground obtains a trigger to manually end some / all processes, it determines that the end process option is triggered.
[0117] If there is a DOORS process whose survival time exceeds the second time period, and it is determined that the process termination option is triggered, the DOORS process termination process is performed, and the identifier and survival time of the target DOORS process are updated in the window list.
[0118] 2. After the foreground confirms that the "Grab" button is clicked, the background determines whether the correct DOORS full path and the appropriate number of threads N are configured. If configured correctly, it determines whether the license is occupied. If not, it determines whether there are other problems that cause the inability to log in. If not, it starts N threads, and the first thread starts a DOORS process, records the time T1 from the start to the pop-up window, caches T1, and divides T1 into N parts, each part is T2. Among the N threads, one thread is selected every T2 to start the DOORS process.
[0119] By using the method provided in this embodiment, when the local computer exits DOORS but the server does not receive the instruction, it can be learned from the web page information that the local computer is still occupying the license.
[0120] It is also very convenient to manage all DOORS processes on the local computer. The option to automatically close DOORS can be automatically activated when the employee leaves work or does not operate the computer for a long time. After this option is actively selected or activated, the DOORS process will be automatically closed when it survives for a certain period of time, and unsaved document changes will not be lost, making it convenient for other employees to get licenses to work. When starting DOORS, you can use multi-threading technology to start multiple processes, making it easier for employees to obtain DOORS licenses.
[0121] It should be noted that the "first", "second", "third", "fourth", "fifth" and "sixth" in the third duration, the first duration, the fourth duration, the second duration, the fifth duration and the sixth duration are only for identification purposes and are used to distinguish the durations of different objects, and have no other substantive meaning. In other words, the third duration is a duration that characterizes the frequency of detecting the duration of time when the keyboard and mouse are not operated. The first duration is a duration that characterizes the frequency of detecting whether all current DOORS processes have timed out. The fourth duration is a duration that characterizes how long the duration of time when the keyboard and mouse are not operated is considered to require triggering the process termination option. The second duration is a duration that characterizes how long a DOORS process survives before it is considered to have timed out. The fifth duration is a period of time that characterizes the frequency of obtaining the identification and start time of all DOORS processes. The sixth duration is also a period of time that characterizes the frequency of repeatedly judging whether a license is occupied when the license is not occupied.
[0122] In addition, the relationship between the third duration, the first duration, the fourth duration, the second duration, the fifth duration and the sixth duration is not limited in this embodiment, and they may be the same or different.
[0123] The method provided in this embodiment detects once every preset time period whether the condition for ending the survival timeout DOORS process is met. If met, the target DOORS process is ended after it is determined that the end process option is triggered, thereby realizing convenient management of the DOORS process. When the computer is not operated for a long time, the DOORS process can be closed after surviving for a certain period of time, which facilitates the release of licenses and the acquisition of licenses by other users, thereby facilitating the management of licenses.
[0124] Based on the same inventive concept of the above DOORS license management method, this embodiment provides an electronic device, including: a memory, a processor, and a computer program.
[0125] The computer program is stored in the memory and is configured to be executed by the processor to implement the following Figure 1 and Figure 2 The DOORS license management method shown.
[0126] Specifically,
[0127] At every first time period, check whether there is a DOORS process whose survival time exceeds the second time period;
[0128] If it exists, determine whether the end process option is triggered;
[0129] If triggered, the DOORS process whose survival time exceeds the second time period will be terminated.
[0130] Optionally, determining whether the end process option is triggered includes:
[0131] Every third time period, detecting whether the duration during which neither the keyboard nor the mouse is operated exceeds a fourth time period;
[0132] When it is detected that the duration for which neither the keyboard nor the mouse has been operated exceeds a fourth duration, it is determined that the process termination option is triggered.
[0133] Optionally, the method further comprises:
[0134] Update the DOORS process ID and survival time to the window list;
[0135] Refresh all windows.
[0136] Optionally, the method further comprises:
[0137] Every fifth period, obtain the IDs and start times of all DOORS processes;
[0138] Determine newly added and newly ended processes based on the identification and start time of all DOORS processes;
[0139] Update the process dictionary based on newly added and terminated processes.
[0140] Optionally, during the timing of the first duration, if a preset control is triggered, the timing of the first duration is terminated, and when the timing resumption condition is met, the timing of the next first duration is started;
[0141] The preset control is used to preempt the DOORS license.
[0142] Optionally, after terminating the timing of the first duration, the method further includes:
[0143] Read the window text of all current DOORS processes through Windows API;
[0144] Determine whether there is an occupied license based on the window text;
[0145] If there is no occupied license, determine whether there is a problem that causes the inability to log in;
[0146] If there is no problem causing the inability to log in, then all current DOOR processes are terminated and the thread is started;
[0147] From the threads, start a DOORS process through any thread, record the time from starting the DOORS process to the corresponding window popping up, identify the corresponding window text, and determine whether the license is occupied based on the corresponding window text;
[0148] If the license is occupied, the thread is terminated and the started DOORS process is retained;
[0149] If the license is not occupied, then every sixth time period, repeat the steps of starting a DOORS process through any unselected thread, record the time from starting the DOORS process to the pop-up of the corresponding window, identify the text of the corresponding window, and determine whether the license is occupied based on the text of the corresponding window, until the license is determined to be occupied for the first time, end the thread, and retain the started DOORS process.
[0150] Optionally, the resumption timing condition is that there is an occupied license, or there is a problem that causes a failure to log in, or the thread is terminated, and the started DOORS process is retained to be executed to completion.
[0151] Optionally, before terminating the DOORS process whose survival time exceeds the second time period, the method further includes:
[0152] The window content corresponding to the DOORS process whose survival time exceeds the second time length is saved.
[0153] The electronic device provided in this embodiment has a computer program executed by a processor to detect whether there is a DOORS process with a survival timeout every preset time period. After the end process option is triggered, the DOORS process with a survival timeout is automatically ended. The DOORS process with a survival timeout can be automatically closed to facilitate the management of licenses.
[0154] Based on the same inventive concept of the above-mentioned DOORS license management method, this embodiment provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement Figure 1 and Figure 2 The DOORS license management method shown.
[0155] Specifically,
[0156] At every first time period, check whether there is a DOORS process whose survival time exceeds the second time period;
[0157] If it exists, determine whether the end process option is triggered;
[0158] If triggered, the DOORS process whose survival time exceeds the second time period will be terminated.
[0159] Optionally, determining whether the end process option is triggered includes:
[0160] Every third time period, detecting whether the duration during which neither the keyboard nor the mouse is operated exceeds a fourth time period;
[0161] When it is detected that the duration for which neither the keyboard nor the mouse has been operated exceeds a fourth duration, it is determined that the process termination option is triggered.
[0162] Optionally, the method further comprises:
[0163] Update the DOORS process ID and survival time to the window list;
[0164] Refresh all windows.
[0165] Optionally, the method further comprises:
[0166] Every fifth period, obtain the IDs and start times of all DOORS processes;
[0167] Determine newly added and newly ended processes based on the identification and start time of all DOORS processes;
[0168] Update the process dictionary based on newly added and terminated processes.
[0169] Optionally, during the timing of the first duration, if a preset control is triggered, the timing of the first duration is terminated, and when the timing resumption condition is met, the timing of the next first duration is started;
[0170] The preset control is used to preempt the DOORS license.
[0171] Optionally, after terminating the timing of the first duration, the method further includes:
[0172] Read the window text of all current DOORS processes through Windows API;
[0173] Determine whether there is an occupied license based on the window text;
[0174] If there is no occupied license, determine whether there is a problem that causes the inability to log in;
[0175] If there is no problem causing the inability to log in, then all current DOOR processes are terminated and the thread is started;
[0176] From the threads, start a DOORS process through any thread, record the time from starting the DOORS process to the corresponding window popping up, identify the corresponding window text, and determine whether the license is occupied based on the corresponding window text;
[0177] If the license is occupied, the thread is terminated and the started DOORS process is retained;
[0178] If the license is not occupied, then every sixth time period, repeat the steps of starting a DOORS process through any unselected thread, record the time from starting the DOORS process to the pop-up of the corresponding window, identify the text of the corresponding window, and determine whether the license is occupied based on the text of the corresponding window, until the license is determined to be occupied for the first time, end the thread, and retain the started DOORS process.
[0179] Optionally, the resumption timing condition is that there is an occupied license, or there is a problem that causes a failure to log in, or the thread is terminated, and the started DOORS process is retained to be executed to completion.
[0180] Optionally, before terminating the DOORS process whose survival time exceeds the second time period, the method further includes:
[0181] The window content corresponding to the DOORS process whose survival time exceeds the second time length is saved.
[0182] The computer-readable storage medium provided in this embodiment has a computer program on which a processor executes to detect whether there is a DOORS process with a survival timeout at preset intervals. After the process termination option is triggered, the DOORS process with a survival timeout is automatically terminated. The DOORS process with a survival timeout can be automatically closed to facilitate the management of licenses.
[0183] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0185] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0187] In addition, the terms "first", "second", "third", and "fourth" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", and "fourth" may explicitly or implicitly include one or more of the feature. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0188] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0189] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A DOORS license management method, characterized in that: The method comprises: At every first time period, check whether there is a DOORS process whose survival time exceeds the second time period; If it exists, determine whether the end process option is triggered; If triggered, the DOORS process whose survival time exceeds the second time period is terminated; The method further comprises: Every fifth period, obtain the IDs and start times of all DOORS processes; Determine newly added and newly ended processes based on the identification and start time of all DOORS processes; Update the process dictionary according to the newly added and newly ended processes; During the timing of the first duration, if the preset control is triggered, the timing of the current first duration is terminated, and when the timing resumption condition is met, the timing of the next first duration is started; The preset control is used to preempt the DOORS license; After terminating the timing of the first duration, the method further includes: Read the window text of all current DOORS processes through Windows API; Determining whether there is an occupied license according to the window text; If there is no occupied license, determine whether there is a problem that causes the inability to log in; If there is no problem causing the inability to log in, then all current DOOR processes are terminated and the thread is started; From the threads, start a DOORS process through any thread, record the time from starting the DOORS process to the corresponding window popping up, identify the corresponding window text, and determine whether the license is occupied according to the corresponding window text; If the license is occupied, the thread is terminated and the started DOORS process is retained; If the license is not occupied, then every sixth time period, repeat the steps of starting a DOORS process through any unselected thread, record the time from the start of the DOORS process to the pop-up of the corresponding window, identify the text of the corresponding window, and determine whether the license is occupied based on the text of the corresponding window, until the license is determined to be occupied for the first time, terminate the thread, and retain the started DOORS process.
2. The method according to claim 1, characterized in that The step of determining whether the process termination option is triggered includes: Every third time period, detecting whether the duration during which neither the keyboard nor the mouse is operated exceeds a fourth time period; When it is detected that the duration for which neither the keyboard nor the mouse has been operated exceeds a fourth duration, it is determined that the process termination option is triggered.
3. The method according to claim 1, characterized in that: The method further comprises: Update the DOORS process ID and survival time to the window list; Refresh all windows.
4. The method according to claim 1, characterized in that: The resumption timing condition is that there is an occupied license, or there is a problem that causes a failure to log in, or the thread is terminated and the started DOORS process is retained to be executed.
5. The method according to any one of claims 1 to 4, characterized in that: Before terminating the DOORS process whose survival time exceeds the second time, the method further includes: The window content corresponding to the DOORS process whose survival time exceeds the second time period is saved.
6. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 5.
