Preventive maintenance equivalent troubleshooting optimization method and device and related medium
By sorting and logically judging the data reports of preventive maintenance projects in fixed column order, the problem of low accuracy of manual identification is solved, efficient equivalent project recognition is achieved, maintenance costs are reduced and the stability of overhaul projects is improved.
Patent Information
- Application Number
- CN202510547298.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the equivalent identification of preventive maintenance projects mainly relies on manual methods, resulting in low identification accuracy, easy omissions and misjudgments, increasing maintenance costs and safety risks, and affecting the stability of overhaul projects.
By extracting the preventive project spare parts application list and historical application records from the predetermined data source, the original data report and material application report are generated, and the fixed column order is sorted out to determine whether there is historical equivalent between the two. The logical judgment results include inconsistency, partial consistency and complete consistency, and the results are written into the original data report.
It improves the identification accuracy of preventive maintenance equivalent items, reduces omissions and misjudgments, reduces maintenance costs and improves the stability of the repair plan.
Smart Images

Figure CN120471602A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nuclear power data processing, and in particular to an optimization method, device and related medium for equivalent troubleshooting of preventive maintenance. Background Art
[0002] Equipment maintenance is generally divided into two categories: preventive maintenance and corrective maintenance. Preventive maintenance is one of the important means of ensuring equipment reliability in equipment maintenance management. It usually maintains the specified functional status of the equipment through regular inspection, maintenance, component replacement or whole-unit replacement. It has the characteristics of fixed cycles and clear schedules. Correspondingly, corrective maintenance is usually a maintenance project implemented due to equipment defects, abnormalities during operation, or field experience feedback. It has the characteristics of random occurrence and time uncertainty. In actual equipment maintenance management work, if the corrective maintenance implemented on site includes some or all of the content required by the preventive maintenance project, then the corrective maintenance project can be regarded as an "equivalent maintenance project" of the preventive maintenance project. At this time, the planning personnel can re-determine the execution time of the next cycle of preventive maintenance projects based on the actual execution time of the equivalent maintenance project to avoid repeated maintenance or excessive maintenance.
[0003] At present, the judgment and identification of whether corrective maintenance items are equivalent to preventive maintenance items mainly rely on manual methods. This manual identification method is highly dependent on the experience level of relevant personnel, the accuracy and completeness of on-site information records, the standardization of identification work, and cross-disciplinary communication and coordination, and is greatly affected by human factors. In actual operation, manual identification often has obvious shortcomings, especially when facing the equivalence judgment of overhaul preventive items, which is more prone to omissions and misjudgments. When the omission of identification of equivalent maintenance items occurs, the following problems will arise:
[0004] First, preventive maintenance projects that do not need to be implemented are performed repeatedly, which not only increases maintenance costs, increases the workload and safety risks of on-site staff, but also causes waste of resources.
[0005] Second, since the determination of preventive maintenance items for overhaul generally needs to be carried out one year in advance, if a preventive maintenance item that can be equivalent to a corrective maintenance item is missed, the item may be temporarily cancelled or changed when the overhaul is approaching, thereby affecting the stability of the overhaul project and reducing the effectiveness of the preliminary preparation work. Summary of the Invention
[0006] The embodiments of the present invention provide an optimization method, device and related medium for equivalent troubleshooting of preventive maintenance, aiming to solve the problem in the prior art that equivalent identification of overhaul preventive items is performed manually, resulting in reduced identification accuracy.
[0007] In a first aspect, an embodiment of the present invention provides an optimization method for equivalent troubleshooting of preventive maintenance, including:
[0008] Extract preventive project spare parts requisition lists and spare parts historical requisition records from predetermined data sources to generate corresponding raw data reports and material requisition reports;
[0009] Arrange the original data report and the material requisition report in a fixed column order to obtain a report arrangement result;
[0010] Based on the report sorting result, it is determined whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report (i.e., equivalent maintenance items, the same below), and a logical judgment result is obtained; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
[0011] In a second aspect, an embodiment of the present invention provides an optimization device for equivalent troubleshooting of preventive maintenance, including:
[0012] A data acquisition unit is used to extract the preventive project spare parts requisition list and spare parts historical requisition records from a predetermined data source to generate corresponding original data reports and material requisition reports;
[0013] A report generation unit, configured to respectively arrange the original data report and the material requisition report in a fixed column order to obtain a report arrangement result;
[0014] A judgment writing unit is used to judge whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report based on the report sorting result, and obtain a logical judgment result; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
[0015] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the optimization method for preventive maintenance equivalent troubleshooting of the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the optimization method for the preventive maintenance equivalent inspection of the first aspect is implemented.
[0017] An embodiment of the present invention provides an optimization method for preventive maintenance equivalence screening, comprising: extracting a preventive project spare parts requisition list and spare parts historical requisition records from a predetermined data source to generate corresponding original data reports and material requisition reports; arranging the original data reports and material requisition reports in a fixed column order to obtain report sorting results; judging whether the nth row in the original data report and the mth row in the material requisition report have historical equivalence based on the report sorting results, and obtaining a logical judgment result; wherein the logical judgment result includes inconsistency, partial consistency, and complete consistency; and simultaneously writing the logical judgment result into the original data report to obtain an automatic screening result. The present invention obtains a logical judgment result by judging the equivalence between the two reports, and writes the logical judgment result into the original data report to obtain an automatic screening result. Subsequent operations can be performed based on the automatic screening, thereby reducing omissions and misjudgments and improving recognition accuracy.
[0018] The embodiment of the present invention also provides an optimization device, computer equipment and storage medium for preventive maintenance equivalent troubleshooting, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A flowchart of an optimization method for equivalent troubleshooting of preventive maintenance provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a judgment flow of an optimization method for equivalent troubleshooting of preventive maintenance provided by an embodiment of the present invention;
[0022] Figure 3 A schematic block diagram of an optimization device for preventive maintenance equivalent troubleshooting provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0024] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0025] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0026] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0027] See below Figure 1 , Figure 1 A flowchart of an optimization method for equivalent troubleshooting of preventive maintenance provided by an embodiment of the present invention specifically includes steps S101 to S103.
[0028] S101. Extracting a preventive project spare parts requisition list and spare parts historical requisition records from a predetermined data source to generate corresponding raw data reports and material requisition reports;
[0029] S102, respectively sorting the original data report and the material requisition report in a fixed column order to obtain a report sorting result;
[0030] S103. Based on the report sorting result, determine whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report, and obtain a logical judgment result; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency, and at the same time write the logical judgment result into the original data report to obtain an automatic troubleshooting result.
[0031] In one embodiment, before step S101, the method further includes:
[0032] Activate the current workbook and adjust the state of the workbook to active;
[0033] Turn off screen updates and disable pop-up alerts.
[0034] In this embodiment, it is necessary to activate the current Excel workbook used to perform data processing, and adjust the workbook status to the active state to ensure that the subsequent macro program can run smoothly in the correct working environment, avoiding program operation errors caused by the workbook not being activated. Furthermore, the screen update function of the Excel application is turned off through the macro program to avoid frequent screen refreshes during program execution, thereby improving the program's operating efficiency. At the same time, the warning or confirmation box that may pop up during the execution of the Excel application is disabled to ensure that the macro program runs automatically and continuously, avoid manual intervention, and further improve the degree of automation and stability of data processing. The following instructions can be called through the VBA macro program to complete the above operations:
[0035] Turn off screen updating: Application.ScreenUpdating = False
[0036] Disable alert popups: Application.DisplayAlerts = False.
[0037] In step S101, the predetermined data source may be a SAP data processing system, and the data derived therefrom includes a list of spare parts required for this round of preventive maintenance and a historical record of spare parts usage during equipment maintenance in the past few years.
[0038] In one embodiment, step S101 includes:
[0039] Extracting the preventive project spare parts requisition list and spare parts historical requisition records from the SAP data processing system to obtain data extraction information;
[0040] Receive demand instructions, and organize the data extraction information according to the demand instructions to generate original data reports and material requisition reports that meet format requirements.
[0041] In this embodiment, the spare parts requisition list for the current preventive maintenance project and the historical spare parts requisition records for a specific period of time are exported from the SAP data processing system to obtain data extraction information. For example, the spare parts requisition list for the current preventive maintenance project may be a list of Class A spare parts that must be replaced during the current overhaul cycle, while the historical spare parts requisition records may include information on spare parts actually used during past equipment maintenance, covering several years of historical data. A macro program receives user or system request instructions, which define the content and format requirements for each column in the original data report and material requisition report. The historical spare parts requisition record includes at least one column, including historical requisition function location column information, historical requisition date column information, historical requisition work order number column information, historical work order type column information, historical work order description column information, and historical version column information. Based on the request instructions, the macro program automatically organizes the extracted data information in a targeted manner, converting it into original data reports and material requisition reports that conform to the format specified by the request instructions, ensuring that the report content and structure meet the requirements of the subsequent automated logical analysis steps.
[0042] In step S102, the order of the data table columns needs to be unified to ensure the consistency of the data structure, so as to facilitate the logical judgment of the data in the subsequent steps. At the same time, any information not used in the subsequent logical judgment can also be included in the report as reference information for subsequent manual verification by engineers.
[0043] In one embodiment, step S102 includes:
[0044] Exporting a first field of the original data report from the SAP data processing system, wherein the first field includes at least one of order, work order description, maintenance center, material, material description, material price, functional location, material and functional location, system, material and system, cycle, and basic start date;
[0045] extracting a predetermined number of characters before the function position in the first field as first system information, and arranging the first field and the first system information into a fixed sequence column in the original data report;
[0046] Exporting a second field of the material requisition report from the SAP data processing system, wherein the second field includes at least one of order, material, functional location, posting date, material and functional location, system, material and system, requirement date, historical work order description, historical version, and historical work order type;
[0047] extracting a predetermined number of characters before the functional position in the second field as second system information, and arranging the second field and the second system information into a fixed sequence column of the material requisition report;
[0048] The fixed sequence columns of the original data report and the fixed sequence columns of the material requisition report are sorted respectively to obtain the report sorting result.
[0049] In this embodiment, the first field required for the raw data report is exported from the SAP data processing system, where the first field includes at least one of the following information: order, work order description, maintenance center, material, material description, material price, functional location, material + functional location, system, material + system, cycle, and basic start date. The first predetermined number of characters, for example, the first 11 characters, of the functional location are extracted from the first field as first system information. The first system information is then combined with other data in the first field to form unified combined field information, including combining material and functional location to form "material + functional location" and combining material and system to form "material + system." Furthermore, the extracted and combined first field and first system information are organized into fixed-order columns of the raw data report according to a predefined fixed column order, thereby completing the raw data report organization.
[0050] Similarly, the second field required for the material requisition report is exported from the SAP data processing system, where the second field includes at least one of the following information: order, material, functional location, posting date, material + functional location, system, material + system, requirement date, historical work order description, historical version, and historical work order type. A predetermined number of characters, for example, the first 11 characters, are similarly extracted from the functional location information in the second field as the second system information. This second system information is then combined with the other information in the second field to form unified combined field information, including combining the material and functional location to form "material + functional location" and combining the material and system to form "material + system." Furthermore, the processed second field information and second system information are organized into fixed-sequence columns of the material requisition report, similarly according to a predefined fixed column order, thereby completing the compilation of the material requisition report.
[0051] In step S103, based on the report sorting results, logical judgment is performed on the material requisition status of each preventive project in the original data report line by line to identify whether there are equivalent historical maintenance projects in the material requisition report, and then the corresponding logical judgment results are obtained; at the same time, the logical judgment results are written into the original data report to obtain the automatic troubleshooting results.
[0052] Combine Figure 2 As shown, in one embodiment, step S103 includes:
[0053] Comparing the nth row of the original data report with the mth row of the corresponding material requisition report through a logic judgment process, the logic judgment process including:
[0054] Determine the time length between the material requisition interval of the current row of the material requisition report and the predetermined period, and obtain a first output result;
[0055] Determine whether the current row of the original data report matches the current row of the material requisition report in terms of material and functional position, and obtain a second output result;
[0056] Determine the time sequence between the demand date of the current row of the material requisition report and the historical demand date to obtain a third output result;
[0057] Determine whether the current row of the original data report matches the current row of the material requisition report in the material and system, and obtain a fourth output result;
[0058] Based on the first output result, the second output result, the third output result and the fourth output result, a corresponding logic judgment result is generated.
[0059] In this embodiment, each of the first output result, the second output result, the third output result, and the fourth output result can be written as completely consistent, partially consistent, or inconsistent according to the judgment. Specifically, the judgment can be performed according to the following method, and the output result can be written accordingly:
[0060] Determine whether the spare parts requisition interval in the material requisition report is greater than a predetermined period. If so, and the row in the original data report has not been determined to be completely consistent or partially consistent, determine that the row in the material requisition report is inconsistent and write a logical judgment result.
[0061] If it is greater than the predetermined period, and the row of the original data report has been determined to be completely consistent or partially consistent, then the current determination is terminated;
[0062] If it is not greater than the predetermined period, then determine whether the material + functional position in the original data report is consistent with the material + functional position in the material requisition report; if the material + functional position is consistent, and the length of the functional position is not a preset value, and the row of the original data report is determined to be completely consistent for the first time, then determine that the row of the material requisition report is completely consistent and write the logical judgment result;
[0063] If the material + functional position are consistent, and the length of the functional position is not a preset value, and this is not the first time that this row of the original data report is determined to be completely consistent, then determine whether the demand date in the material requisition report is later than the demand date that was last determined to be completely consistent. If it is later than the last time, then determine that this row of the material requisition report is completely consistent and write the logical judgment result. If it is not later than the last time, then end this judgment to retain the last written result of this row of the material requisition report.
[0064] If the material + functional position are consistent, and the length of the functional position is the preset value, then the behavior of the material requisition report is determined to be partially consistent and the logical judgment result is written;
[0065] If the material + function location is inconsistent, determine whether the material + system in the original data report is consistent with the material + system in the material requisition report; if the material + system is consistent, and the row in the original data report has not been determined to be completely consistent, and the length of the function location is the preset value, then determine that the row in the material requisition report is partially consistent and write the logical judgment result;
[0066] If the material + system are inconsistent or the material + system are consistent and the row in the original data report has been determined to be completely consistent, then this judgment ends;
[0067] If the material + system is consistent, and the line of the original data report has not been determined to be completely consistent, and the length bit of the functional position is not the preset value, then the line of the material requisition report is determined to be inconsistent to write the logical judgment result.
[0068] Specifically, based on the basic start date of the preventive maintenance project to be judged and the scheduled period corresponding to the project (such as maintenance period 7C, where 1C is approximately 510 days), determine line by line whether the time interval between the spare parts requisition interval (i.e., the demand date) and the basic start date in the material requisition report is greater than the scheduled period: if the spare parts requisition interval is greater than the scheduled period, and the nth line of the current original data report has not yet been judged as "completely consistent" or "partially consistent", then the mth line of the material requisition report is judged as "inconsistent", and the logical judgment result is written into the result field of the corresponding line in the original data report.
[0069] If the spare parts collection interval is greater than the predetermined period, but the nth row of the original data report has been judged as "completely consistent" or "partially consistent", the current judgment is terminated directly without updating the corresponding logical judgment result.
[0070] If the spare parts requisition interval is no longer than the predetermined period, the system continues to determine whether the "Material + Functional Location" field in the original data report is consistent with the corresponding field in the material requisition report. If the "Material + Functional Location" field is consistent, and the length of the functional location is not the preset value (e.g., 11 digits), and this is the first time that the nth row of the original data report has been determined to be "completely consistent," the mth row of the material requisition report is determined to be "completely consistent," and the logical judgment result is written to the original data report.
[0071] If the "Material + Functional Location" is consistent, the length of the functional location is not the preset value, but this is not the first time that row n of the original data report has been judged as "Completely Consistent," the system continues to determine whether the "Requirement Date" in the material requisition report is later than the "Requirement Date" previously judged as "Completely Consistent." If so, the current row m is judged as "Completely Consistent" and the logical judgment result in the original data report is updated. Otherwise, the current judgment ends and the previously written logical judgment result remains unchanged.
[0072] If the "material + functional position" is consistent and the length of the functional position is equal to the preset value, the mth row of the material requisition report is judged as "partially consistent" and the logical judgment result is written into the original data report.
[0073] If the "Material + Functional Location" field is inconsistent, the "Material + System" field in the original data report is further determined to be consistent with the corresponding field in the material requisition report. If they are consistent, and the nth row of the original data report has not been determined to be "completely consistent" and the length of the functional location is equal to the preset value, the mth row of the material requisition report is determined to be "partially consistent" and the logical judgment result is recorded.
[0074] If the "Material + System" fields are inconsistent, or if they are consistent but the nth row of the original data report has been judged as "completely consistent", the current judgment process ends.
[0075] If the "Material + System" fields are consistent, and the nth row of the original data report has not been judged as "completely consistent", but the length bit of the functional position is not the preset value, then the mth row of the material requisition report will be judged as "inconsistent" and the logical judgment result will be written.
[0076] After writing is completed, automatic comparison and equivalent identification of preventive maintenance items and historical maintenance records are realized, which greatly improves the accuracy of equivalent maintenance item identification, avoids the risk of omissions caused by manual identification, effectively reduces the cost of equipment maintenance management and improves the stability of maintenance plans.
[0077] In one embodiment, the step S103 further includes:
[0078] Determine whether the m-th row in the material requisition report is equal to the total number of rows j of the material requisition report. If the m-th row in the material requisition report is not equal to the total number of rows j of the material requisition report, then compare the n-th row in the original data report with the (m + 1)-th row in the material requisition report in the above logical judgment process, and then use the (m + 1)-th row in the material requisition report as the new m-th row until the new m-th row in the material requisition report is equal to the total number of rows j of the material requisition report;
[0079] Determine whether the n-th row in the original data report is equal to the total number of rows i of the original data report. If the n-th row in the original data report is not equal to the total number of rows i of the original data report, then compare the (n + 1)-th row in the original data report with the m-th row in the material requisition report in the above logical judgment process, and then use the (n + 1)-th row in the original data report as the new n-th row until the new n-th row in the original data report is equal to the total number of rows i of the original data report; where the m-th row in the material requisition report starts from m = 2.
[0080] In this embodiment, to achieve row-by-row comparison of all records in the original data report and the material requisition report and complete the logical judgment process, a control process for traversal judgment is further included. Specifically, first determine whether the m-th row in the currently processed material requisition report is the last row of this report, that is, whether it is equal to the total number of rows j of the material requisition report. If the m-th row has not reached the total number of rows j, that is, m < j, then execute the above logical judgment process on the n-th row in the current original data report and the (m + 1)-th row in the material requisition report, and generate a logical judgment result accordingly. After completing this round of comparison, use the (m + 1)-th row of the material requisition report as the new m-th row and continue to execute the next round of comparison. This process continues until the updated m-th row is equal to the total number of rows j of the material requisition report, that is, the logical judgment of all records in the material requisition report corresponding to the current n-th row is completed.
[0081] After completing the comparison of all rows in the material requisition report corresponding to the n-th row of the original data report, further determine whether the n-th row of the current original data report is the last row of this report, that is, whether it is equal to the total number of rows i of the original data report. If the n-th row has not reached the total number of rows i, that is, n < i, then re-perform the logical judgment process (starting from m = 2) on the (n + 1)-th row of the original data report and the m-th row of the material requisition report, and generate a new logical judgment result accordingly. Subsequently, use the (n + 1)-th row as the new n-th row and repeat the above comparison process until the updated n-th row is equal to the total number of rows i of the original data report, thereby completing the traversal comparison of all data between the original data report and the material requisition report.
[0082] Through the above control logic, logical judgment coverage of all possible combinations between two data reports is achieved, ensuring the comprehensiveness and accuracy of the equivalence identification process and providing a complete data foundation for the subsequent generation of automatic troubleshooting results.
[0083] In one embodiment, the step S103 further includes:
[0084] When there are multiple completely consistent ones in the material requisition report, the data with a later demand date in the material requisition report is obtained and written into the original data report to obtain the automatic troubleshooting result; wherein, the completely consistent one has a higher priority than the partial consistent one, and the partial consistent one has a higher priority than the inconsistency, and the high-priority write result of the original data report will overwrite the low-priority write result of the original data report.
[0085] In this embodiment, for a row in the original data report, if the result of data comparison with each row in the material requisition report is inconsistent or no data is written, it indicates that no historical maintenance project that is equivalent to the current preventive maintenance project has been found within the predetermined period. If at least one row of records in the material requisition report is judged to be completely consistent or partially consistent, selection is made according to a predetermined priority rule, where complete consistency takes precedence over partial consistency. At the same time, when there are multiple historical requisition records that meet the conditions, the record with a later requisition date is the final selected record. When there are multiple historical requisition records for a certain preventive maintenance project in the material requisition report and they are judged to be completely consistent or partially consistent at the same time, these historical requisition records are sorted and filtered according to the preset rules. Specifically, the material requirement date in each historical requisition record is used as the basis for judgment, and the record with the later material requirement date is selected, that is, the historical requisition record that is closest in time to the basic start date of the current preventive maintenance project is selected. The corresponding column information in the selected historical requisition record (including but not limited to historical requisition function location, historical requisition date, historical requisition work order number, historical work order type, historical work order description, and historical version) is written one by one into the corresponding column position of the original data report to ensure that the written data can most accurately reflect the equivalence relationship between the latest historical maintenance project and the current preventive maintenance project.
[0086] In actual application, take the data of order 800005449449 in the original data report of L410 overhaul as an example:
[0087] Work Order Description: Sub-Ticket: RIC002AR Drive board is replaced regularly;
[0088] Material number: 1060201334;
[0089] Functional location: LA-4-03-RIC-002AR;
[0090] Material + functional location: 1060201334 + LA-4-03-RIC-002AR;
[0091] Basic start date: September 26, 2025;
[0092] Cycle: 10C (for this unit, 1C is approximately 510 days, the total cycle is 5100 days, and the number of days per C is adaptively adjusted according to the conditions of different units).
[0093] The specific judgment process is as follows:
[0094] First, take the demand date from the material requisition report one by one (the demand date is the same as the historical work order execution date) and compare it with the basic start date of this project (September 26, 2025):
[0095] If the time interval between [September 26, 2025 - Required Date] is no greater than 5100 days (510 days x 10), proceed to the next step. If the interval is greater than 5100 days and there has been no previous judgment of complete or partial consistency, determine it as inconsistent and write the judgment result. If there has been a previous judgment of complete or partial consistency, end this logical judgment.
[0096] When a historical record meets the above conditions (the time interval is no more than 5100 days), continue to compare the "Material + Functional Location" field of the historical record:
[0097] If the "Material + Functional Location" in the historical record is completely consistent with the item to be judged this time (1060201334 + LA-4-03-RIC-002AR), and the length of the functional location is not 11 digits, and it is the first time that it is judged to be completely consistent, it is judged to be completely consistent and the corresponding result is written; if it is not the first time that it is judged to be completely consistent, it is necessary to judge whether the demand date in this material requisition report is greater than the demand date written last time. If it is greater, write the current judgment result and corresponding data; if it is not greater, end the judgment and retain the last written result; if the length of the functional location is 11 digits, it is judged to be partially consistent.
[0098] During the specific program operation, it was found that for the record with the historical order number 800005112196, its "material + functional location" was also 1060201334 + LA-4-03-RIC-002AR, and the length of the functional location was not 11 digits (LA-4-03-RIC-002AR has a total of 17 digits). At the same time, it was judged to be completely consistent for the first time, so the program judged the record as "completely consistent" and wrote the corresponding historical project information in the original data report.
[0099] Further operation found that the record with historical order number 800005267035 also had "material + functional location" of 1060201334 + LA-4-03-RIC-002AR, and the length of the functional location was not 11 digits (LA-4-03-RIC-002AR has a total of 17 digits). This was not the first time that it was judged to be completely consistent (the record with historical order number 800005112196 had been judged to be completely consistent). Comparing the demand dates of orders 800005267035 and 800005112196, the demand date of order 800005267035 (2024 / 4 / 3) was greater than the demand date of order 800005112196 (2023 / 1 / 20). Therefore, the program judged the record of 800005267035 as "completely consistent" and wrote the corresponding historical project information in the original data report (overwriting the original written information).
[0100] Of course, the embodiment of the present invention also provides corresponding VBA macro program codes, which are as follows:
[0101] Step 1: Activate the workbook and disable screen updates
[0102] At the beginning of the VBA program, activate the current workbook and set the application state using the following code:
[0103] ThisWorkbook.Activate
[0104] Application.ScreenUpdating=False
[0105] Application.DisplayAlerts=False
[0106] Step 1 makes the current workbook active, preventing other workbooks from taking focus during data processing. It also disables screen updates and warning prompts to improve program execution efficiency and avoid interruptions.
[0107] Step 2: Import the original data report
[0108] Use the following code to request the user to select a raw data report file and open it:
[0109] fil=Application.GetOpenFilename(Title:="Please select the original reserved report")
[0110] Iffil=False Then Exit Sub
[0111] SetWK_OIC=Application.Workbooks.Open(fil)
[0112] arr38=WK_OIC.Sheets(1).UsedRange
[0113] At this point, the program opens the specified raw data report and stores the data in the [arr38] array. The UsedRange method is used to extract all used data ranges in the report.
[0114] Next, the program determines the data range by calculating the number of rows (m) and columns (n) in the report:
[0115] m=UBound(arr38,1)-LBound(arr38,1)+1'y-axis quantity
[0116] n=UBound(arr38,2)-LBound(arr38,2)+1'x-axis number.
[0117] Step 3: Clear existing data and organize original data
[0118] After importing the data, the program will clear the existing data in the workbook so that it can be filled with the sorted data later:
[0119] ThisWorkbook.Sheets(1).Activate
[0120] Rows("2:1048576").Select
[0121] Selection.Delete Shift:=xlUp
[0122] Then, the program will fill the corresponding column information into the specific column of the current workbook according to the column name of the original data. For example, if the first column is "Order", the "Order" column information in the original data report will be filled into the first column of the current workbook:
[0123] Fori=1To n
[0124] Ifarr38(1,i)="Order"Then
[0125] Forj=2To m
[0126] ThisWorkbook.Sheets(1).Cells(j,1)=arr38(j,i)
[0127] Next
[0128] End If
[0129] Subsequent columns are processed in a similar way, with data being determined and filled in based on the column name. In this way, the program traverses each row of the original data report and fills the relevant data into the fixed position of the corresponding column.
[0130] Step 4: Generate derived fields "Material + Functional Location" and "Material + System"
[0131] After tidying up the raw data, the program generates two new derived fields for subsequent data processing:
[0132] Material + Functional Location: By concatenating the material number and the functional location, a new field is generated and stored in the 11th column:
[0133] For n=2 To i
[0134] ThisWorkbook.Sheets(1).Cells(n,11)=arrall(n,5)&"+"&arrall(n,10)
[0135] Next
[0136] System information: System information is extracted based on the first four segments of the functional location and stored in column 12:
[0137] For n=2 To i
[0138] arr1=Split(arrall(n,10),"-")
[0139] ThisWorkbook.Sheets(1).Cells(n,12)=arr1(0)&"-"&arr1(1)&"-"&arr1(2)&"-"&arr1(3)
[0140] Next
[0141] Material + System: Concatenate the material number and the extracted system information to generate the "Material + System" field and store it in the 13th column:
[0142] For n=2 To i
[0143] ThisWorkbook.Sheets(1).Cells(n,13)=arrall(n,5)&"+"&arrall(n,12)
[0144] Next.
[0145] Step 5: Import material requisition report data
[0146] Similar to importing the original data report, the program imports the data of the material withdrawal report through the following code:
[0147] fil=Application.GetOpenFilename(Title:="Please select material requisition report")
[0148] Iffil=False Then Exit Sub
[0149] SetWK_51=Application.Workbooks.Open(fil)
[0150] arr38=WK_51.Sheets(1).UsedRange.
[0151] This step allows the user to select a material requisition report file, and the program imports the file and stores the data.
[0152] Step 6: Clear and organize material requisition report data
[0153] After importing the material withdrawal report data, the program will clear the existing material withdrawal data and organize the data into workbooks according to the corresponding column names, similar to the processing method of the original data report:
[0154] For i=1 To n
[0155] If arr38(1,i)="Order"Then
[0156] For j=2To m
[0157] ThisWorkbook.Sheets(2).Cells(j,1)=arr38(j,i)
[0158] Next
[0159] End If
[0160] Subsequent columns are processed similarly.
[0161] Step 7: Generate derived fields "Material + Functional Location" and "Material + System" for material requisition report
[0162] Similarly, the program generates the derived fields "Material+Functional Location" and "Material+System" for the material withdrawal report:
[0163] For n=2To i
[0164] ThisWorkbook.Sheets(2).Cells(n,5)=arrall(n,2)&"+"&arrall(n,3)
[0165] Next
[0166] As well as extracting function locations and generating system information:
[0167] For n=2To i
[0168] arr1=Split(arrall(n,3),"-")
[0169] ThisWorkbook.Sheets(2).Cells(n,6)=arr1(0)&"-"&arr1(1)&"-"&arr1(2)&"-"&arr1(3)
[0170] Next.
[0171] Step 8: Call data comparison logic for equivalence judgment
[0172] After the data is collated, the program calls the contarst subroutine to perform logical analysis of the data. Its main task is to compare the fields of the original data report with the material requisition report to determine whether there are any equivalents between historical maintenance items and current preventive maintenance items. Specifically, the contarst subroutine compares the "Material + Functional Location" and "Material + System" fields in the original data report with the corresponding fields in the material requisition report line by line. Based on the logical analysis, it marks any fields as "completely consistent," "partially consistent," or "inconsistent," and updates the corresponding column information:
[0173]
[0174]
[0175]
[0176]
[0177] Continue to determine the matching of fields such as Material + Functional Location and Material + System. The execution results of this subroutine will write the judgment results (such as "completely consistent", "partially consistent", "inconsistent") into the corresponding columns of the original data report to ensure that all data is properly marked and recorded.
[0178] Step 9: Complete data processing and display a message box
[0179] After all data processing is completed, the program will display a prompt message box to remind the user that data processing is complete:
[0180] MsgBox("Completed")
[0181] At the same time, restore screen updates and alert box prompts:
[0182] Application.ScreenUpdating=True
[0183] Application.DisplayAlerts=True.
[0184] The above describes the implementation process of a VBA macro program, from data import and organization to logical analysis and automatic troubleshooting output. This solution enables automatic comparison and equivalence identification of preventive overhaul items with historical maintenance records, significantly improving data processing efficiency and accuracy.
[0185] Combine Figure 3 As shown, Figure 3 A schematic block diagram of an optimization device for preventive maintenance equivalent troubleshooting provided by an embodiment of the present invention is provided. The optimization device 300 for preventive maintenance equivalent troubleshooting includes:
[0186] The data acquisition unit 301 is used to extract the preventive project spare parts requisition list and spare parts historical requisition records from a predetermined data source to generate corresponding original data reports and material requisition reports;
[0187] A report generation unit 302 is used to arrange the original data report and the material requisition report in a fixed column order to obtain a report arrangement result;
[0188] The judgment writing unit 303 is used to judge whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report based on the report sorting result, and obtain a logical judgment result; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
[0189] In this embodiment, the data acquisition unit 301 extracts the preventive project spare parts requisition list and the spare parts historical requisition record from a predetermined data source to generate corresponding original data reports and material requisition reports; the report generation unit 302 arranges the original data reports and the material requisition reports in a fixed column order to obtain report arrangement results; the judgment writing unit 303 judges whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report based on the report arrangement results, and obtains a logical judgment result; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
[0190] In one embodiment, the optimization device 300 for equivalent troubleshooting of preventive maintenance further includes:
[0191] A state activation unit, used to activate the current workbook and adjust the state of the workbook to an active state;
[0192] Parameter setting unit, used to turn off screen updates and disable pop-up warning boxes.
[0193] In one embodiment, the data acquisition unit 301 includes:
[0194] A data extraction unit is used to extract the preventive project spare parts requisition list and spare parts historical requisition records from the SAP data processing system to obtain data extraction information;
[0195] The instruction receiving unit is used to receive the demand instruction and organize the data extraction information according to the demand instruction to generate an original data report and a material requisition report that meet the format requirements.
[0196] In one embodiment, the report generating unit 302 includes:
[0197] a first exporting unit, configured to export a first field of the original data report from the SAP data processing system; wherein the first field includes at least one of an order, a work order description, a maintenance center, a material, a material description, a material price, a functional location, a material and a functional location, a system, a material and a system, a cycle, and a basic start date;
[0198] a first integration unit, configured to extract a predetermined number of characters preceding the function position in the first field as first system information, and to arrange the first field and the first system information into a fixed sequence column of the original data report;
[0199] a second exporting unit configured to export a second field of the material requisition report from the SAP data processing system, wherein the second field includes at least one of order, material, functional location, posting date, material and functional location, system, material and system, requirement date, historical work order description, historical version, and historical work order type;
[0200] The second integration unit is used to extract a predetermined number of characters before the functional position in the second field as the second system information, and to arrange the second field and the second system information into a fixed sequence column of the material requisition report;
[0201] The data merging unit is used to respectively sort out the fixed sequence columns of the original data report and the fixed sequence columns of the material requisition report to obtain the report sorting result.
[0202] In one embodiment, the judgment writing unit 303 includes:
[0203] A logic judgment unit is used to compare the nth row of the original data report with the mth row of the corresponding material requisition report according to a logic judgment process, and the logic judgment unit includes:
[0204] A first judgment unit is used to judge the time sequence between the material requisition interval of the current row of the material requisition report and the predetermined period, and obtain a first output result;
[0205] The second judgment unit is used to judge whether the current row of the original data report matches the current row of the material requisition report in terms of material and functional position, and obtain a second output result;
[0206] A third judgment unit is used to judge the time sequence between the demand date of the current row of the material requisition report and the historical demand date, and obtain a third output result;
[0207] A fourth judgment unit is used to judge whether the current row of the original data report matches the current row of the material requisition report in the material and system, and obtain a fourth output result;
[0208] A logic generation unit is used to generate a corresponding logic judgment result based on the first output result, the second output result, the third output result and the fourth output result.
[0209] In one embodiment, the judgment writing unit 303 further includes:
[0210] a first execution unit, configured to determine whether the mth row in the material requisition report is equal to the total number of rows j in the material requisition report; if the mth row in the material requisition report is not equal to the total number of rows j in the material requisition report, then performing a comparison between the nth row in the original data report and the m+1th row in the material requisition report by the logic judgment unit, and then using the m+1th row in the material requisition report as the new mth row, until the new mth row in the material requisition report is equal to the total number of rows j in the material requisition report;
[0211] The second execution unit is used to determine whether the nth row in the original data report is equal to the total number of rows i in the original data report. If the nth row in the original data report is not equal to the total number of rows i in the original data report, the n+1th row in the original data report is compared with the mth row in the material requisition report by the logic judgment unit, and then the n+1th row in the original data report is used as the new nth row, until the new nth row in the original data report is equal to the total number of rows i in the original data report; wherein, the mth row in the material requisition report starts from m=2.
[0212] In one embodiment, the judgment writing unit 303 further includes:
[0213] The priority writing unit is used to obtain the data with a later demand date in the material requisition report and write it into the original data report to obtain the automatic troubleshooting result when there are multiple completely consistent ones in the material requisition report; wherein, the completely consistent one has a higher priority than the partially consistent one, and the partially consistent one has a higher priority than the inconsistent one. The high-priority writing result of the original data report will overwrite the low-priority writing result of the original data report.
[0214] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0215] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed, the computer program can implement the steps provided in the above embodiments. The storage medium may include a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.
[0216] The present invention also provides a computer device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, the steps provided in the above embodiment can be implemented. Of course, the computer device may also include various network interfaces, a power supply, and other components.
[0217] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0218] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A preventive maintenance equivalent inspection optimization method, characterized in that: include: Extract preventive project spare parts requisition lists and spare parts historical requisition records from predetermined data sources to generate corresponding raw data reports and material requisition reports; Arrange the original data report and the material requisition report in a fixed column order to obtain a report arrangement result; Based on the report sorting result, it is determined whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report, and a logical judgment result is obtained; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
2. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 1, characterized in that: The determining, based on the report sorting result, whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report, and obtaining a logical judgment result, includes: Comparing the nth row of the original data report with the mth row of the corresponding material requisition report through a logic judgment process, the logic judgment process including: Determine the time length between the material requisition interval of the current row of the material requisition report and the predetermined period, and obtain a first output result; Determine whether the current row of the original data report matches the current row of the material requisition report in terms of material and functional position, and obtain a second output result; Determine the time sequence between the demand date of the current row of the material requisition report and the historical demand date to obtain a third output result; Determine whether the current row of the original data report matches the current row of the material requisition report in the material and system, and obtain a fourth output result; Based on the first output result, the second output result, the third output result and the fourth output result, a corresponding logic judgment result is generated.
3. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 2, characterized in that: The step of determining whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report based on the report sorting result, and obtaining a logical judgment result, further includes: Determine whether the mth row in the material requisition report is equal to the total number of rows j in the material requisition report; if the mth row in the material requisition report is not equal to the total number of rows j in the material requisition report, compare the nth row in the original data report with the m+1th row in the material requisition report according to the logic judgment process, and then use the m+1th row in the material requisition report as the new mth row, until the new mth row in the material requisition report is equal to the total number of rows j in the material requisition report; Determine whether the nth row in the original data report is equal to the total number of rows i in the original data report. If the nth row in the original data report is not equal to the total number of rows i in the original data report, compare the n+1th row in the original data report with the mth row in the material requisition report according to the logical judgment process, and then use the n+1th row in the original data report as the new nth row, until the new nth row in the original data report is equal to the total number of rows i in the original data report; wherein, the mth row in the material requisition report starts from m=2.
4. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 1, characterized in that: The step of writing the logical judgment result into the original data report to obtain the automatic troubleshooting result includes: When there are multiple completely consistent ones in the material requisition report, the data with a later demand date in the material requisition report is obtained and written into the original data report to obtain the automatic troubleshooting result; wherein, the completely consistent one has a higher priority than the partial consistent one, and the partial consistent one has a higher priority than the inconsistency, and the high-priority write result of the original data report will overwrite the low-priority write result of the original data report.
5. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 1, characterized in that: The said extracting the preventive project spare parts requisition list and spare parts historical requisition records from the predetermined data source to generate the corresponding original data report and material requisition report includes: Extracting the preventive project spare parts requisition list and spare parts historical requisition records from the SAP data processing system to obtain data extraction information; Receive demand instructions, and organize the data extraction information according to the demand instructions to generate original data reports and material requisition reports that meet format requirements.
6. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 5, characterized in that: The original data report and the material requisition report are respectively sorted in a fixed column order to obtain a report sorting result, including: Exporting a first field of the original data report from the SAP data processing system, wherein the first field includes at least one of order, work order description, maintenance center, material, material description, material price, functional location, material and functional location, system, material and system, cycle, and basic start date; extracting a predetermined number of characters before the function position in the first field as first system information, and arranging the first field and the first system information into a fixed sequence column in the original data report; Exporting a second field of the material requisition report from the SAP data processing system, wherein the second field includes at least one of order, material, functional location, posting date, material and functional location, system, material and system, requirement date, historical work order description, historical version, and historical work order type; extracting a predetermined number of characters before the functional position in the second field as second system information, and arranging the second field and the second system information into a fixed sequence column of the material requisition report; The fixed sequence columns of the original data report and the fixed sequence columns of the material requisition report are sorted respectively to obtain the report sorting result.
7. The optimization method for equivalent troubleshooting of preventive maintenance according to claim 1, characterized in that: Before extracting the preventive project spare parts requisition list and spare parts historical requisition records from the predetermined data source to generate the corresponding original data report and material requisition report, the method further includes: Activate the current workbook and adjust the state of the workbook to active; Turn off screen updates and disable pop-up alerts.
8. An optimization device for equivalent troubleshooting of preventive maintenance, characterized in that: include: A data acquisition unit is used to extract the preventive project spare parts requisition list and spare parts historical requisition records from a predetermined data source to generate corresponding original data reports and material requisition reports; A report generation unit, configured to respectively arrange the original data report and the material requisition report in a fixed column order to obtain a report arrangement result; A judgment writing unit is used to judge whether there is a historical equivalence between the nth row in the original data report and the mth row in the material requisition report based on the report sorting result, and obtain a logical judgment result; wherein, the logical judgment result includes inconsistency, partial consistency and complete consistency; at the same time, the logical judgment result is written into the original data report to obtain an automatic troubleshooting result.
9. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the optimization method for the preventive maintenance equivalent inspection as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the optimization method for preventive maintenance equivalent troubleshooting according to any one of claims 1 to 7 is implemented.