Power System Control System and Control Method Based on Historical Records
By setting the main control thread in the power system to refresh and deal with the external memory running distance, and setting symbols for external memory by equiping threads, the side effects caused by refreshing the external memory partition number is solved, which reduces the adverse impact on the user and the number of tasks on the Windows operating platform, and improves execution efficiency.
Patent Information
- Application Number
- CN202211221282.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-10-08
AI Technical Summary
In power systems, refreshing the partition number of external memory will cause serious side effects to the relevant Windows operating platform processes or execution processes, and the prior art fails to effectively reduce the adverse impact on the user and the number of Windows operating platform tasks when handling external memory refresh.
By setting up the main control thread on the workstation, focus on refreshing and disposing of the running distance from the external memory, reducing the frequency of re-accessing connections to external memory, and setting symbols and associations for external memory by equiping threads to ensure the correctness of external memory access connections when the Windows operating platform is initialized again.
It effectively weakens the adverse impact of external memory refresh on users, reduces the number of tasks on the Windows operating platform, improves execution efficiency, and improves the accuracy of refresh correction through means such as correction of the degree of departure and boot factor.
Smart Images

Figure CN115756305B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system control and management, and particularly relates to a power system control and management system and a control and management method based on historical records. Background Art
[0002] A power system is a unified whole composed of power generation, power supply (power transmission, transformation, and distribution), power consumption facilities, and secondary facilities such as regulation and control, relay protection, safety automation devices, metering devices, dispatching automation, and power communication required to ensure its normal operation. That is to say, a power system is an electric energy production and consumption system composed of power plants, power transmission and transformation lines, power supply and distribution substations, and power consumption. Its function is to convert primary energy in nature into electric energy through power generation power devices, and then supply the electric energy to each user through power transmission, transformation, and distribution. To achieve this function, the power system also has relevant information and control systems at each link and different levels to measure, adjust, control, protect, communicate, and dispatch the production process of electric energy to ensure that users obtain safe and high-quality electric energy.
[0003] In the query of historical records in the power system, usually between the connected master station and workstations, after the master station sets the retrieval conditions, it sends a historical record request to the workstations, and displays the retrieval results on the retrieval interface according to the historical record feedback information returned by the workstations.
[0004] The external memory of the workstation is used to pre-store historical records. When operating several external memories on the Windows operating platform of the workstation, the external memories will be defined as DRVIER1:, DRVIER2:..... in sequence according to the access connection order between the external memories and the microkernel program of the Windows operating platform of the workstation. Such a definition mode often causes the partition number of an external memory to change, that is, the partition number is refreshed, after the external memory undergoes hot replacement or the Windows operating platform is initialized and run again. This is not conducive to some software that operates based on the partition number of the external memory, such as accessing and connecting according to the partition number of the external memory in document reading.
[0005] To overcome the drawback of the partition number refresh of the external storage, the external storage is a storage device for the historical records of the workstation. To meet the storage requirements, several external storage devices are generally provided in the workstation. In the Windows operating platform of the workstation, for several external storage devices, the microkernel of the Windows operating platform generally assigns the partition numbers of the external storage in the order of detecting the hard disk devices during the initialization of the Windows operating platform. For example, they are increased sequentially in the order of DRVIER1:, DRVIER2:, DRVIER3:. However, after the initialization of the Windows operating platform, in some cases, the external storage needs to perform hot replacement again. For example, when a failure occurs in the external storage, the faulty external storage is removed, repaired or replaced and then reconnected. However, currently, when controlling the hard disk as the external storage, after the hot replacement of the external storage, the Windows operating platform will assign the partition number of the external storage again. For example, when an external storage is first connected to the motherboard interface of the workstation, the partition number of the external storage is DRVIER2:. After removing and reconnecting the external storage to the motherboard interface of the workstation, its partition number of the external storage becomes DRVIER4:. This is the partition number refresh of the external storage.
[0006] In the Windows operating platform, the partition numbers of the external storage often carry various Windows operating platform processes or execution processes that use it. Once the partition number of the external storage is refreshed, the relevant Windows operating platform processes or execution processes will suffer serious side effects, and it is cumbersome to change the partition numbers of the Windows operating platform processes or execution processes that use the external storage, and it will also waste more time.
[0007] Currently, there is a method for handling the partition number refresh of the external storage. When the external storage control process detects a message for accessing and connecting to the external storage, the external storage control process determines whether the partition number of the external storage is refreshed. Once it is found that the assigned partition number of the external storage is refreshed, the access connection related to the current partition number of the external storage is cancelled to cancel the use of the current external storage in the microkernel, and the external storage can be accessed and connected again in the mode of emulating hot replacement to make the microkernel process identifier of the external storage the same as the partition number of the external storage. However, during the use by the user, when the external storage is refreshed, the refresh level detection and hierarchical processing are not performed, and the external storage is directly accessed and connected again, which not only has an adverse effect on the user's use, but also increases the workload of the Windows operating platform and reduces the execution efficiency. Summary of the Invention
[0008] To address the deficiencies in the existing technology, the objective of the present invention is to provide a power system control system and control method based on historical records. The main control thread performs processing on the external memory refresh with a focus on the running distance of the external memory leaving, reducing the frequency of re-accessing and connecting to the external memory. Firstly, it weakens the adverse effects on the user. Secondly, it reduces the task volume of the Windows operating platform and improves the execution efficiency.
[0009] The present invention adopts the following technical solutions.
[0010] A control method for a power system control system based on historical records, comprising:
[0011] Step 1: Pre-store historical records on the external memory of the workstation and perform control on the external memory;
[0012] Step 2: After the master station sets the retrieval conditions, it sends a historical record request to the workstation and displays the retrieval result in the retrieval interface based on the historical record feedback information returned by the workstation.
[0013] Preferably, the control of the external memory in Step 1 includes:
[0014] Step 1-1: The acquisition thread obtains the common single identifier of each external memory;
[0015] Step 1-2: The configuration thread sets a symbol for each external memory and constructs the association between the symbol of the external memory and the common single identifier. When the association is constructed, the configuration thread pairs the external memory interface with the partition number of the relevant external memory and stores the pairing relationship;
[0016] Step 1-3: When the Windows operating platform is re-initialized, the main control thread accesses and connects to the external memory according to the partition number of the external memory related to the external memory interface;
[0017] Step 1-4: When the main control thread receives the external memory addition message sent by the detection thread, it determines the access connection point of the external memory according to the common single identifier of the external memory;
[0018] Step 1-5: When the main control thread receives the external memory removal message sent by the detection thread, it cancels the access connection point of the external memory in the Windows operating platform to cancel the external memory interface, and synchronously controls the configuration thread to remove the partition number of the external memory related to the external memory;
[0019] Step 1-6: When the detection thread detects that the external memory leaves the external memory interface, the main control thread controls the access point of the read head according to the running distance of the external memory leaving to eliminate the refresh effect or re-access and connect to the external memory;
[0020] Within the said Steps 1 - 3, when the main control thread is re - initialized on the Windows operating platform, it controls the detection thread to detect the external memory symbols related to the external memory interface. If relevant external memory symbols are detected, the main control thread executes the access connection to the external memory related to the external memory symbol;
[0021] If no relevant external memory symbols are detected, the main control thread controls the detection thread to detect the common single token of the external memory related to the external memory interface to connect the relevant external memory access.
[0022] Preferably, within the said Steps 1 - 4, when the main control thread receives the external memory addition message passed by the detection thread, it controls the detection thread to detect the common single token of the external memory to confirm whether it is the external memory registered for the workstation. If the detected common single token of the external memory is within the associated relationship, the main control thread confirms that the external memory is the external memory registered for the workstation and adapts the external memory to the paired external memory interface to execute the access connection;
[0023] If the detected common single token of the external memory is not within the associated relationship, the main control thread blocks and confirms that the external memory is a newly added external memory, controls the configuration thread to set a symbol for the newly added external memory and pair a usable external memory interface to execute the access connection.
[0024] Preferably, within the said Steps 1 - 6, when the detection thread detects that the external memory leaves the external memory interface, the main control thread confirms the external memory refresh level according to the running distance u of the external memory leaving to select the relevant handling prevention. The main control thread sets the cylinder one, cylinder two and cylinder three arranged in a circular pattern with the external memory interface as the mid - point. Here, the span of cylinder one from the mid - point is V1, the span of cylinder two from the mid - point is V2, and the span of cylinder three from the mid - point is V3, V1 < V2 and V2 < V3. If u is not higher than V1, the main control thread confirms that the external memory refresh is a first - layer refresh and controls the access point of the read head to eliminate the refresh effect;
[0025] If V1 < u and u is not higher than V2, the main control thread confirms that the external memory refresh is a second - layer refresh and detects the execution duration required for the external memory interface program to store a replacement history record;
[0026] If V2 < u and u is not higher than V3, the main control thread confirms that the external memory refresh is a third - layer refresh. The main control thread confirms that the external memory refresh cannot be calibrated, re - detects the external memory symbols related to the external memory interface and reconnects to the external memory.
[0027] Preferably, when the main control thread confirms that the external memory refresh is a one - layer refresh and the external memory is located at cylinder one, the main control thread determines whether to calibrate the degree of deviation of the external memory according to whether the external memory is in the access period; the main control thread sets a calibration deviation degree quantity w1. If the external memory is in the access period, the main control thread determines that there is no need to calibrate the deviation degree, controls the access position of the read head to match it with the pointer of the external memory to eliminate the refresh effect. After the record pointed to by the external memory pointer is replaced and the replaced record is stored locally, the main control thread uses the calibration deviation degree quantity w1 to correct the pointer to calibrate the deviation degree;
[0028] If the external memory is not in the access period, the main control thread uses the calibration deviation degree quantity w1 to correct the pointer to calibrate the deviation degree.
[0029] Preferably, when the main control thread confirms that the external memory refresh is a two - layer refresh and the external memory is located at cylinder two, the main control thread detects the execution time h required for the external memory interface program to store a replaced record and determines whether the execution time required for the external memory interface program to store a replaced record meets the specification according to h; the main control thread sets the standard execution time h0 of the external memory interface program and the calibration deviation degree quantity w2. Here, w2 is higher than w1. The main control thread compares h and h0,
[0030] If h is not higher than h0, the main control thread determines that the execution time required for the external memory interface program to store a replaced record meets the specification and controls the access position of the read head to match it with the pointer of the external memory to eliminate the refresh effect. After the replacement of the record pointed to by the external memory pointer is completed, the calibration deviation degree quantity w2 is used to calibrate the pointer of the external memory;
[0031] If h is higher than h0, the main control thread determines that the execution time required for the external memory interface program to store a replaced record does not meet the specification, re - detects the external memory symbol related to the external memory interface and reconnects to the external memory for access.
[0032] Preferably, when the main control thread confirms that the external memory refresh is a two - layer refresh and calibrates the pointer of the external memory using the calibration deviation degree quantity w2, the main control thread derives the subtraction amount obtained by subtracting the radius V1 of cylinder one from the running distance u of the external memory deviation, and simultaneously derives the subtraction amount obtained by subtracting the radius V2 of cylinder two from the running distance u of the external memory deviation. The main control thread sets a guiding factor k1 and a guiding factor k2. Here, k1 is lower than k2. If u - V1 is not higher than V2 - u, the main control thread uses the guiding factor k1 to correct the calibration deviation degree quantity w2 to a related quantity. The corrected deviation degree quantity is defined as w21, and it is set that w21 = w2 * k1;
[0033] If u-V1 is higher than V2-u, the main control thread uses the guiding factor k2 to correct the alignment departure amount w2 to a relevant value. The corrected departure amount is defined as w22, and it is set that w22 = w2 * k2.
[0034] Preferably, in step 1-5, when the main control thread receives the external memory removal message transmitted by the detection thread, the main control thread controls the detection thread to detect whether the access connection of the external memory in the system is cancelled. If the external memory is in the access connection state, then the main control thread cancels the partition number of the relevant external memory to cancel the external memory interface, and synchronously controls the configuration thread to remove the partition number of the external memory related to the external memory;
[0035] When the document content on the external memory is emptied again, the setting symbol related to the external memory is removed. When the main control thread is re-initialized on the Windows operating platform, it determines the corresponding externally accessed memory according to the common single mark for detecting the external memory. Synchronously, the main control thread controls the configuration thread to re-set the symbol for the external memory, construct a new associated relationship, and perform pairing with the relevant external memory interface;
[0036] In step 1-2, the partition number of the external memory includes the common single mark and the setting symbol of the external memory.
[0037] A power system management and control system based on historical records, comprising:
[0038] A main station and a workstation connected by communication;
[0039] The external memory of the workstation is used to pre-store historical records, and the main station is used to manage and control the external memory; the main station is used to set retrieval conditions and then transmit a historical record request to the workstation, and display the retrieval result in the retrieval interface according to the historical record feedback information returned by the workstation.
[0040] Preferably, the threads running on the workstation include:
[0041] An acquisition thread, used to acquire the common single mark of each external memory;
[0042] A configuration thread, used to set a symbol for each external memory and construct an associated relationship between the symbol of the external memory and the common single mark;
[0043] A detection thread, used to detect messages of addition or removal of external memory and the refreshed content of the external memory;
[0044] The main control thread, which is respectively connected to the acquisition thread, the allocation thread, and the detection thread, is used to control the detection thread to detect the external storage symbols related to the external storage interface to connect the external storage access related to the external storage symbols when the Windows operating platform on the workstation is re-initialized. If no relevant external storage symbols are detected, the main control thread controls the detection thread to detect the common single symbol of the external storage related to the external storage interface to connect the relevant external storage access; when the main control thread receives the external storage addition message transmitted by the detection thread, it controls the detection thread to detect the common single symbol of the external storage to confirm whether it is the external storage registered for the workstation; when the detection thread detects that the external storage leaves the external storage interface, the main control thread confirms the external storage refresh level according to the running distance u of the external storage leaving to select the relevant processing method.
[0045] The beneficial effects of the present invention are as follows. Compared with the prior art, the main control thread of the present invention disposes the external storage refresh with emphasis according to the running distance of the external storage leaving, reducing the frequency of re-access connection to the external storage. On the one hand, it weakens the adverse effect on the user. On the other hand, it reduces the workload of the Windows operating platform and improves the execution efficiency; the allocation thread sets a symbol for each external storage. When the Windows operating platform is re-initialized, the main control thread first accesses and connects to the external storage according to the set symbol. If no relevant external storage symbols are detected, the main control thread connects the relevant external storage access according to the common single symbol. On the one hand, it ensures the correctness of the external storage access connection when the Windows operating platform is re-initialized. On the other hand, accessing and connecting to the external storage through the symbol reduces the computing amount of the system and improves the execution efficiency; when the main control thread confirms that the external storage refresh is a first-level refresh, if the external storage is in the access period, the main control thread calibrates the departure degree after the replacement of the historical record pointed by the external storage pointer, which can further weaken the adverse effect of the external storage refresh on the user's use; when the main control thread confirms that the external storage refresh is a second-level refresh, the main control thread determines whether to re-access the external storage according to the execution time required for the external storage interface program to store a replacement historical record, reducing the frequency of re-access connection to the external storage, which can further weaken the adverse effect of the external storage refresh on the user's use; when the main control thread confirms that the external storage refresh is a second-level refresh and calibrates the pointer of the external storage with the calibration departure degree amount w2, it corrects the calibration departure degree amount w2 by selecting the relevant traction factor according to the running distance u of the external storage leaving, improving the correctness of the refresh calibration. Brief Description of the Drawings
[0046] Figure 1 is the flowchart of steps 1-1 to 1-6 in the present invention;
[0047] Figure 2 is the structural diagram of the thread running on the workstation in the present invention;
[0048] Figure 3 is the flow chart of steps 1 to 2 in the present invention. Detailed implementation manners
[0049] The meanings of some technical terms in the present invention are as follows:
[0050] The present application will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present application.
[0051] A control method for a power system control system based on historical records according to the present invention, as Figure 3 shown, includes:
[0052] Step 1: Pre-store historical records on the external memory of the workstation and perform control over the external memory; the external memory can be a hard disk or a flash memory.
[0053] As Figure 1 shown, the control over the external memory in step 1 includes:
[0054] Step 1-1: An acquisition thread obtains a common single identifier for each external memory; the single identifiers of each external memory are different from each other. The common single identifier of the external memory can be the identifier of the external memory. The acquisition thread obtains the common single identifier of each external memory and stores it locally, thereby registering the external memory.
[0055] Step 1-2: A configuration thread sets a symbol for each external memory and constructs an association relationship between the symbol of the external memory and the common single identifier. When the construction of the association relationship is completed, the configuration thread pairs the external memory interface with the partition number of the relevant external memory and stores the pairing relationship; the external memory interface is an interface such as a SCSI interface used when the external memory is connected to the motherboard of the workstation. The partition number of the external memory also forms an association relationship with the common single identifier of the external memory.
[0056] Step 1-3: When the main control thread re-initializes on the Windows operating platform, it connects the external memory access according to the partition number of the external memory related to the external memory interface; connecting the external memory access means connecting the external memory to the microkernel process structure of the Windows operating platform of the workstation, that is, communicating.
[0057] Step 1-4: When the main control thread receives the external memory addition message transmitted by the detection thread, it confirms the external memory access connection point according to the common single identifier of the external memory; the external memory access connection point is the communication connection point between the external memory and the microkernel process of the Windows operating platform of the workstation.
[0058] Step 1-5: When the main control thread receives the external memory removal message passed by the detection thread, it cancels the access connection of the external memory in the Windows operating platform to cancel the external memory interface, and synchronously controls the allocation thread to remove the partition number of the external memory related to the external memory;
[0059] Step 1-6: When the detection thread detects that the external memory leaves the external memory interface, the main control thread controls the access point of the read head according to the running distance of the external memory leaving to eliminate the refresh effect or perform a re-access connection to the external memory.
[0060] The main control thread of the present invention focuses on the external memory refresh according to the running distance of the external memory leaving, reducing the frequency of re-access connection to the external memory. First, it reduces the impact on the user. Second, it reduces the task volume of the Windows operating platform and improves the execution efficiency.
[0061] In a preferred but non-limiting embodiment of the present invention, in Step 1-3, when the Windows operating platform is re-initialized, the main control thread controls the detection thread to detect the external memory symbol related to the external memory interface. If the relevant external memory symbol is detected, the main control thread performs an access connection to the external memory related to the external memory symbol;
[0062] If the relevant external memory symbol is not detected, the main control thread controls the detection thread to detect the common single mark of the external memory related to the external memory interface to connect the relevant external memory.
[0063] In a preferred but non-limiting embodiment of the present invention, in Step 1-4, when the main control thread receives the external memory addition message passed by the detection thread, it controls the detection thread to detect the common single mark of the external memory to confirm whether it is the external memory registered for the workstation. If the detected common single mark of the external memory is within the associated relationship, the main control thread confirms that the external memory is the external memory registered for the workstation and adapts the external memory to the paired external memory interface to perform an access connection;
[0064] If the detected common single mark of the external memory is not within the associated relationship, the main control thread blocks and confirms that the external memory is a newly added external memory, controls the allocation thread to set a symbol for the newly added external memory and pair a usable external memory interface to perform an access connection.
[0065] For each external memory equipped in the present invention, a symbol is set. When the Windows operating platform is re-initialized, the main control thread first performs an access connection to the external memory according to the set symbol. If the relevant external memory symbol cannot be detected, the main control thread performs an access connection to the relevant external memory according to a common single mark. First, it ensures the correctness of the external memory access connection when the Windows operating platform is re-initialized. Second, by performing an access connection to the external memory via the symbol, the computing amount of the workstation is reduced and the execution efficiency is improved.
[0066] In a preferred but non-limiting embodiment of the present invention, within the steps 1-6, when the detection thread detects that the external memory leaves the external memory interface, the main control thread selects relevant handling prevention by confirming the external memory refresh level according to the running distance u of the external memory leaving. The main control thread sets a cylindrical surface one, a cylindrical surface two, and a cylindrical surface three arranged in a circular shape with the external memory interface as the midpoint. Here, the span of the cylindrical surface one from the midpoint is V1, the span of the cylindrical surface two from the midpoint is V2, and the span of the cylindrical surface three from the midpoint is V3. V1 is lower than V2 and V2 is lower than V3. If u is not higher than V1, the main control thread confirms that the external memory refresh is a one-layer refresh and controls the access location of the read head to eliminate the refresh effect;
[0067] If V1 is lower than u and u is not higher than V2, the main control thread confirms that the external memory refresh is a two-layer refresh and detects the execution duration required for the external memory interface program to store a replacement history record;
[0068] If V2 is lower than u and u is not higher than V3, the main control thread confirms that the external memory refresh is a three-layer refresh. The main control thread confirms that the external memory refresh cannot be calibrated, re-detects the external memory symbol related to the external memory interface, and performs an access connection to the external memory again.
[0069] In a preferred but non-limiting embodiment of the present invention, when the main control thread confirms that the external memory refresh is a one-layer refresh and the external memory is located at the cylindrical surface one, the main control thread determines whether to calibrate the external memory leaving degree according to whether the external memory is in the access period; the main control thread sets a calibration leaving degree amount w1. If the external memory is in the access period, the main control thread confirms that there is no need to calibrate the leaving degree, controls the access location of the read head to adapt it to the pointer of the external memory to eliminate the refresh effect. After the history record pointed to by the external memory pointer is replaced and the replaced history record is stored locally, the main control thread uses the calibration leaving degree amount w1 to correct the pointer to calibrate the leaving degree;
[0070] If the external memory is not in the access period, the main control thread uses the calibration leaving degree amount w1 to correct the pointer to calibrate the leaving degree.
[0071] When the main control thread of the present invention confirms that the external memory refresh is a first-level refresh, if the external memory is during access, after the replacement of the historical record pointed to by the external memory pointer is completed, the main control thread performs calibration on the departure degree, which can further weaken the adverse effect of external memory refresh on the user's application.
[0072] In a preferred but non-limiting embodiment of the present invention, when the main control thread confirms that the external memory refresh is a second-level refresh and the external memory is located at the second cylinder, the main control thread detects the execution time h required for the external memory interface program to store a replacement historical record and determines whether the execution time required for the external memory interface program to store a replacement historical record meets the specification according to h; the main control thread sets the standard execution time h0 of the external memory interface program and the calibration departure degree amount two w2, where w2 is higher than w1, and the main control thread compares h and h0.
[0073] If h is not higher than h0, the main control thread confirms that the execution time required for the external memory interface program to store a replacement historical record meets the specification and controls the access position of the read head to adapt it to the pointer of the external memory to eliminate the refresh effect, and calibrates the pointer of the external memory with the calibration departure degree amount two w2 after the replacement of the historical record pointed to by the external memory pointer is completed;
[0074] If h is higher than h0, the main control thread confirms that the execution time required for the external memory interface program to store a replacement historical record does not meet the specification, re-detects the external memory symbol related to the external memory interface, and reconnects to the external memory for re-access.
[0075] When the main control thread of the present invention confirms that the external memory refresh is a second-level refresh, the main control thread determines whether to reconnect to the external memory according to the execution time required for the external memory interface program to store a replacement historical record, reduces the frequency of reconnecting to the external memory, and can further weaken the adverse effect of external memory refresh on the user's application.
[0076] In a preferred but non-limiting embodiment of the present invention, when the main control thread confirms that the external memory refresh is a second-level refresh and calibrates the pointer of the external memory with the calibration departure degree amount two w2, the main control thread derives the subtraction amount obtained by subtracting the cylinder half-radius V1 from the running distance u of the external memory departure, and synchronously derives the subtraction amount obtained by subtracting the cylinder two radius V2 from the running distance u of the external memory departure. The main control thread sets the guiding factor one k1 and the guiding factor two k2, where k1 is lower than k2. If u - V1 is not higher than V2 - u, the main control thread uses the guiding factor one k1 to correct the calibration departure degree amount two w2 to a relevant amount, and the corrected departure degree amount is defined as w21, and it is set that w21 = w2 * k1;
[0077] If u - V1 is higher than V2 - u, the main control thread uses the guiding factor two k2 to correct the alignment departure amount two w2 to a relevant value. The corrected departure amount is defined as w22, and it is set that w22 = w2 * k2.
[0078] When the main control thread of the present invention confirms that the external memory refresh is a two - layer refresh and uses the alignment departure amount two w2 to perform alignment on the pointer of the external memory, it selects a relevant traction factor according to the running distance u of the external memory departure to correct the alignment departure amount two w2, improving the correctness of the refresh alignment.
[0079] That is to say, within the steps 1 - 5, when the main control thread receives the external memory removal message transmitted by the detection thread, the main control thread controls the detection thread to detect whether the access connection of the external memory in the system is revoked. If the external memory is in the access connection state, then the main control thread revokes the partition number of the relevant external memory to cancel the external memory interface, and simultaneously controls the configuration thread to remove the partition number of the external memory related to this external memory.
[0080] In a preferred but non - restrictive embodiment of the present invention, when the document content on the external memory is emptied again, the setting symbol related to the external memory is removed. When the main control thread is re - initialized on the Winuows operating platform, it determines the corresponding externally accessed memory according to the common single mark for detecting the external memory. Simultaneously, the main control thread controls the configuration thread to re - set the symbol for the external memory, construct a new associated relationship, and perform pairing with the relevant external memory interface.
[0081] In a preferred but non - restrictive embodiment of the present invention, within the steps 1 - 2, the partition number of the external memory includes the common single mark and the setting symbol of the external memory.
[0082] Step 2: After the master station sets the retrieval condition, it sends a historical record request to the workstation, and displays the retrieval result in the retrieval interface according to the historical record feedback information returned by the workstation. The retrieval condition is the query condition, the historical record request is the historical record call command, the retrieval result is the query result, and the retrieval interface is the query interface.
[0083] A power system management and control system based on historical records according to the present invention includes:
[0084] A master station and a workstation connected by communication; both the master station and the workstation can be a computer, a laptop, or an industrial control computer. The workstation is a remote telecontrol workstation.
[0085] The external memory of the workstation is used to pre - store historical records, and the master station is used to manage the external memory; the master station is used to set the retrieval condition and then send a historical record request to the workstation, and display the retrieval result in the retrieval interface according to the historical record feedback information returned by the workstation;
[0086] As shown Figure 2 below, the threads running on the workstation include:
[0087] An acquisition thread, used to acquire the common single token of each external memory;
[0088] A configuration thread, used to set a symbol for each external memory and construct the association between the symbol of the external memory and the common single token;
[0089] A detection thread, used to detect the messages of adding or removing external memories and the refreshed content of the external memories;
[0090] A main control thread, which is respectively connected to the acquisition thread, the configuration thread and the detection thread, and is used to control the detection thread to detect the external memory symbols related to the external memory interface to connect the external memory access related to the external memory symbols when the Windows operating platform on the workstation is re-initialized. If no relevant external memory symbols are detected, the main control thread controls the detection thread to detect the common single token of the external memory related to the external memory interface to connect the relevant external memory access; when the main control thread receives the external memory addition message transmitted by the detection thread, it controls the detection thread to detect the common single token of the external memory to confirm whether it is the external memory registered for the workstation; when the detection thread detects that the external memory leaves the external memory interface, the main control thread executes confirmation on the external memory refresh level according to the running distance u of the external memory leaving to select the relevant processing method.
[0091] The beneficial effects of the present invention are as follows. Compared with the prior art, the main control thread of the present invention performs processing on the external memory refresh with emphasis according to the running distance of the external memory leaving, reducing the frequency of re-accessing and connecting to the external memory. First, it weakens the adverse effects on the user. Second, it reduces the workload of the Windows operating platform and improves the execution efficiency. The allocation thread sets a symbol for each external memory. When the Windows operating platform is re-initialized, the main control thread first accesses and connects to the external memory according to the set symbol. If the relevant external memory symbol cannot be detected, the main control thread accesses and connects to the relevant external memory according to the common single mark. First, it ensures the correctness of the external memory access and connection when the Windows operating platform is re-initialized. Second, accessing and connecting to the external memory through the symbol reduces the computing amount of the system and improves the execution efficiency. When the main control thread confirms that the external memory refresh is a first-level refresh, if the external memory is being accessed, the main control thread calibrates the leaving degree after the historical record pointed by the external memory pointer is replaced, which can further weaken the adverse effects of the external memory refresh on the user's use. When the main control thread confirms that the external memory refresh is a second-level refresh, the main control thread determines whether to re-access and connect to the external memory according to the execution duration required for the external memory interface program to store a replaced historical record, reducing the frequency of re-accessing and connecting to the external memory, and further weakening the adverse effects of the external memory refresh on the user's use. When the main control thread confirms that the external memory refresh is a second-level refresh and calibrates the pointer of the external memory with the calibrated leaving degree amount w2, it corrects the calibrated leaving degree amount w2 by selecting the relevant traction factor according to the running distance u of the external memory, improving the correctness of the refresh calibration.
[0092] The applicant of the present invention has made a detailed description and illustration of the embodiments of the present invention in combination with the accompanying drawings of the specification. However, those skilled in the art should understand that the above embodiments are only the preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, rather than a limitation on the protection scope of the present invention. On the contrary, any improvement or modification made based on the spirit of the present invention should fall within the protection scope of the present invention.
Claims
1. A control method for a power system control system based on historical records, characterized in that, it includes: Step 1: Pre-store historical records on the external memory of the workstation and perform control on the external memory; Step 2: After the master station sets the retrieval conditions, it sends a historical record request to the workstation, and displays the retrieval result in the retrieval interface according to the historical record feedback information returned by the workstation; The control of the external memory in Step 1 includes: Step 1-1: The acquisition thread obtains the common single mark of each external memory; Step 1-2: The configuration thread sets a symbol for each external memory, and constructs the association relationship between the symbol of the external memory and the common single mark. When the association relationship is constructed, the configuration thread pairs the external memory interface with the partition number of the relevant external memory and stores the pairing relationship; Step 1-3: When the Windows operating platform is re-initialized, the main control thread connects to the external memory according to the partition number of the external memory related to the external memory interface; Step 1-4: When the main control thread receives the external memory addition message sent by the detection thread, it confirms the external memory access connection point according to the common single mark of the external memory; Step 1-5: When the main control thread receives the external memory removal message sent by the detection thread, it cancels the external memory access connection point in the Windows operating platform to cancel the external memory interface, and simultaneously controls the configuration thread to remove the partition number of the external memory related to the external memory; Step 1-6: When the detection thread detects that the external memory leaves the external memory interface, the main control thread controls the access point of the read head according to the running distance of the external memory leaving to eliminate the refresh effect or perform re-access connection to the external memory; In Step 1-3, when the Windows operating platform is re-initialized, the main control thread controls the detection thread to detect the external memory symbol related to the external memory interface. If the relevant external memory symbol is detected, the main control thread performs the access connection to the external memory related to the external memory symbol; If the relevant external memory symbol is not detected, the main control thread controls the detection thread to detect the common single mark of the external memory related to the external memory interface to connect to the relevant external memory; In Step 1-6, when the detection thread detects that the external memory leaves the external memory interface, the main control thread confirms the external memory refresh level according to the running distance u of the external memory leaving to select the relevant processing prevention. The main control thread sets the cylinder 1, cylinder 2 and cylinder 3 arranged in a circular pattern with the external memory interface as the midpoint. Here, the span of cylinder 1 from the midpoint is V1, the span of cylinder 2 from the midpoint is V2, and the span of cylinder 3 from the midpoint is V3. V1 is lower than V2 and V2 is lower than V3. If u is not higher than V1, the main control thread confirms that the external memory refresh is a one-layer refresh and controls the access point of the read head to eliminate the refresh effect; If V1 is lower than u and u is not higher than V2, the main control thread confirms that the external memory refresh is a two-layer refresh and detects the execution time required for the detection thread to store a replacement historical record; If V2 is lower than u and u is not higher than V3, the main control thread confirms that the external memory refresh is a three-layer refresh. The main control thread confirms that the external memory refresh cannot be calibrated, re-detects the external memory symbol related to the external memory interface, and reconnects to the external memory for access.
2. The control method of the power system control system based on historical records according to claim 1, characterized in that, within the steps 1-4, when the main control thread receives the external memory addition message transmitted by the detection thread, it controls the detection thread to detect the common single symbol of the external memory to confirm whether it is the external memory registered for the workstation. If the detected common single symbol of the external memory is within the associated relationship, the main control thread confirms that the external memory is the external memory registered for the workstation and adapts the external memory to the paired external memory interface for access connection; If the detected common single symbol of the external memory is not within the associated relationship, the main control thread block confirms that the external memory is a newly added external memory, controls the configuration thread to set a symbol for the newly added external memory, and pairs a usable external memory interface for access connection.
3. The control method of the power system control system based on historical records according to claim 2, characterized in that, when the main control thread confirms that the external memory refresh is a one-layer refresh and the external memory is located at the first cylinder, the main control thread determines whether to calibrate the degree of departure of the external memory according to whether the external memory is in the access period; the main control thread sets a calibration departure degree amount w1. If the external memory is in the access period, the main control thread confirms that there is no need to calibrate the degree of departure, controls the access position of the read head to match it with the pointer of the external memory to eliminate the refresh effect. After the historical record pointed by the external memory pointer is replaced and the replaced historical record is stored locally, the main control thread uses the calibration departure degree amount w1 to correct the pointer to calibrate the degree of departure; If the external memory is not in the access period, the main control thread uses the calibration departure degree amount w1 to correct the pointer to calibrate the degree of departure.
4. The control method of the power system control system based on historical records according to claim 3, characterized in that, when the main control thread confirms that the external memory refresh is a two-layer refresh and the external memory is located at the second cylinder, the main control thread detects the execution time h required for the external memory interface program to store a replaced historical record and determines whether the execution time required for the external memory interface program to store a replaced historical record meets the specification according to h; the main control thread sets the standard execution time h0 of the external memory interface program and the calibration departure degree amount w2. Here, w2 is higher than w1. The main control thread compares h and h0, If h is not higher than h0, the main control thread confirms that the execution time required for the external memory interface program to store a replaced historical record meets the specification, controls the access position of the read head to match it with the pointer of the external memory to eliminate the refresh effect, and uses the calibration departure degree amount w2 to calibrate the pointer of the external memory after the replacement of the historical record pointed by the external memory pointer is completed; If h is higher than h0, the main control thread confirms that the execution duration required for the external memory interface program to store a replacement history record does not meet the specification, re-detects the external memory symbols related to the external memory interface, and reconnects to the external memory for access.
5. The control method of the power system control system based on historical records according to claim 4, characterized in that, When the main control thread confirms that the external memory refresh is a two-layer refresh and calibrates the pointer of the external memory using the calibration departure degree measure w2, the main control thread derives the phase reduction amount obtained by subtracting the cylinder radius V1 from the running distance u of the external memory departure, and synchronously derives the phase reduction amount obtained by subtracting the cylinder radius V2 from the running distance u of the external memory departure. The main control thread sets the guiding factor k1 and the guiding factor k2. Here, k1 is lower than k2. If u - V1 is not higher than V2 - u, the main control thread uses the guiding factor k1 to correct the calibration departure degree measure w2 to a relevant amount, and the corrected departure degree measure is defined as w21, and it is set that w21 = w2 * k1; If u - V1 is higher than V2 - u, the main control thread uses the guiding factor k2 to correct the calibration departure degree measure w2 to a relevant value, and the corrected departure degree measure is defined as w22, and it is set that w22 = w2 * k2.
6. The control method of the power system control system based on historical records according to claim 1, characterized in that, In steps 1-5, when the main control thread receives the external memory removal message transmitted by the detection thread, the main control thread controls the detection thread to detect whether the access connection of the external memory in the system is cancelled. If the external memory is in the access connection state, then the main control thread cancels the partition number of the relevant external memory to cancel the external memory interface, and synchronously controls the configuration thread to remove the partition number of the external memory related to the external memory; When the document content on the external memory is emptied again, the setting symbols related to the external memory are removed. When the main control thread is re-initialized on the Windows operating platform, it determines the corresponding externally accessed memory by detecting the common single symbol of the external memory. Synchronously, the main control thread controls the configuration thread to re-set the symbols for the external memory, construct a new association, and pair with the relevant external memory interface; In steps 1-2, the partition number of the external memory includes the common single symbol and the setting symbol of the external memory.
Citation Information
Patent Citations
System and method for querying distant history records of power dispatching
CN106951500A
Method and system for realizing CLI command interface on single-chip microcomputer
CN111443915A