Database-based equipment maintenance cycle data storage method and computer program
By creating the basic equipment table, periodic equipment table and task execution total table in the database, and splitting the maintenance schedule, the serious computer resource occupation in the maintenance cycle management of equipment along the heavy-load railway is solved, and efficient query of low resource occupation is achieved.
Patent Information
- Application Number
- CN202510330983.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-04
AI Technical Summary
When the prior art manages the maintenance cycle of a large number of equipment along the heavy-load railway, database query operations lead to serious occupation of computer resources, making it difficult to efficiently manage the expiration time of the maintenance cycle of the equipment.
By creating the basic equipment table, periodic equipment table and task execution total table in the database, split the maintenance schedule, adopt a multi-table structure based on execution time, and polling only data tables that need to be executed in the near future to reduce query load.
It realizes that when managing a large number of devices, computer resource occupation is maintained at a low level, improving query efficiency and reducing the performance problems of database queries.
Smart Images

Figure CN120257951A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of railway maintenance, and particularly to a method for saving equipment maintenance cycle data based on a database and a computer program. Background Art
[0002] At present, there are a large number of devices along heavy-haul railways that need to be regularly inspected and maintained, such as: rail lines, switches, point machines, signal lamps, track circuits, catenary cables, etc. These devices are characterized by a large quantity and diverse types. Each device may require various maintenance processes such as daily inspections, daily maintenance, intermediate repairs, and major repairs. The maintenance cycle also varies according to device type, device location, importance, and the working ability of the responsible work area.
[0003] Generally, for the devices along heavy-haul railways that need to be regularly inspected and maintained, the daily inspection and daily maintenance cycles are from several days to several weeks, and the intermediate repair and major repair cycles are longer, usually reaching the level of several years.
[0004] In related technologies, to calculate the expiration of the equipment maintenance cycle, common methods include: regular polling of the database and the timer method; among them, the main processing means of the method of regular polling of the database is to sequentially determine whether each record reaches the execution time; the main processing means of the timer method is to set a timer for each maintenance process of the equipment, trigger the corresponding maintenance reminder after expiration, and set the timer for the next cycle.
[0005] Since the task execution cycles of the devices along heavy-haul railways that need to be regularly inspected and maintained are long, ranging from daily routine inspections to equipment major repairs once every few years, when the amount of equipment data is large, directly performing database SELECT query operations will cause serious performance problems. Summary of the Invention
[0006] The purpose of the present invention is to provide at least a method for saving equipment maintenance cycle data based on a database and a computer program. By splitting the maintenance plan table and proposing a new calculation method for querying the expiration time of the equipment maintenance cycle, it is achieved that even when managing a large number of devices, the computer resource occupancy will remain at a low level during database SELECT query operations.
[0007] To solve the above technical problems, at least one embodiment of the present application provides a method for saving equipment maintenance cycle data based on a database, the method comprising:
[0008] Create an equipment basic table, an equipment cycle table, and a task execution summary table in the database;
[0009] Obtain the basic information of the target device and save the basic information in the equipment basic table;
[0010] Obtain the maintenance process information of the target device and save the maintenance process information in the device cycle table; wherein, the maintenance process information includes: maintenance process type, maintenance cycle, and whether to perform a maintenance reminder flag;
[0011] According to the basic information and maintenance process information of the target device, determine the maintenance information and maintenance reminder information respectively, and save the maintenance information and the maintenance reminder information in the task execution summary table; wherein, both the maintenance information and the maintenance reminder information include: execution time, execution action, device ID, and the task execution summary table includes multiple tables generated based on the execution time.
[0012] At least one embodiment of the present application further provides a device maintenance cycle data storage system, including:
[0013] A table creation module for creating a device basic table, a device cycle table, and a task execution summary table in the database;
[0014] A basic information saving module for obtaining the basic information of the target device and saving the basic information in the device basic table;
[0015] A maintenance process information saving module for obtaining the maintenance process information of the target device and saving the maintenance process information in the device cycle table; wherein, the maintenance process information includes: maintenance process type, maintenance cycle, and whether to perform a maintenance reminder flag;
[0016] A maintenance information saving module for determining the maintenance information and the maintenance reminder information respectively according to the basic information and the maintenance process information of the target device, and saving the maintenance information and the maintenance reminder information in the task execution summary table; wherein, both the maintenance information and the maintenance reminder information include: execution time, execution action, device ID, and the task execution summary table includes multiple tables generated based on the execution time.
[0017] At least one embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the steps of the method as described above.
[0018] At least one embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method as described above are implemented.
[0019] At least one embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method for saving device maintenance cycle data based on a database as described above are implemented.
[0020] The method for storing equipment maintenance cycle data based on a database provided by the embodiments of the present application, compared with the prior art, realizes that even when managing a large number of devices, the computer resource occupancy will remain at a relatively low level through a method for splitting a maintenance plan table and calculating the due time of the equipment maintenance cycle.
[0021] In some alternative embodiments, both the maintenance information and the maintenance reminder information include the following information:
[0022] Execution time, execution action, and the device ID of the device to be maintained. The maintenance information and the maintenance reminder information stored in the data table are both stored through these fields of execution time, execution action, and the device ID of the device to be maintained.
[0023] In some alternative embodiments, the storing of the maintenance information and the maintenance reminder information in the total task execution table includes:
[0024] Based on the execution time of the maintenance information, determine a first target data table from the total task execution table based on the preset search strategy of the data table, and store the maintenance information in the first target data table;
[0025] When the execution time of the maintenance reminder information is not empty, based on the execution time of the maintenance reminder information, determine a second target data table from the total task execution table based on the preset storage strategy, and store the maintenance reminder information in the second target data table. Determine the first target data table for storing the maintenance information according to the execution time of the maintenance information, and determine the second target data table for storing the maintenance reminder information according to the execution time of the maintenance reminder information; wherein, the first target data table and the second target data table may be the same table or different tables. For example, if it is a task to be executed this year, the task is stored in the monthly task table corresponding to the corresponding month of this year; if it is a task for next year, the task is stored in the next year's task table; if it is a task for a later time, the task is stored in the long-term task table; at the same time, the cycle of the task is also judged. If it is a very frequent daily task, the task can be directly stored in the daily task table.
[0026] In some alternative embodiments, the total task execution table includes:
[0027] Monthly task table, next year's task table, long-term task table, daily task table, to-be-executed task table, and tomorrow's task table; where:
[0028] The monthly task table is used to save the tasks to be executed each month by month; the next-year task table is used to save the tasks to be executed in the next year; the long-term task table is used to save the tasks to be executed after the next year; the daily task table is used to save the tasks that need to be executed every day; the to-be-executed task table is used to save the tasks that need to be executed on the current date; the tomorrow task table is used to save the tasks that need to be executed on the day after the current date. The total task execution table is split in multiple dimensions, and when querying relevant data, even if a large number of devices are managed, the computer resource occupancy will remain at a low level.
[0029] In some alternative embodiments, the method further includes:
[0030] In response to a data table update operation, perform an update operation on the to-be-executed task table and the tomorrow task table. As time goes by, each task table needs to be updated (such as adding data, deleting data, or modifying data, etc.) at fixed time intervals (such as monthly and / or daily) so that each task table stores the latest data.
[0031] In some alternative embodiments, the update operation of the tomorrow task table includes the following steps:
[0032] Determine the monthly task table corresponding to the current month, and filter out the maintenance information and maintenance reminder information corresponding to tomorrow from the monthly task table corresponding to the current month based on the current date;
[0033] Save the filtered maintenance information and maintenance reminder information in the tomorrow task table. The tomorrow task table needs to be updated daily to ensure data accuracy. Filter out all tasks that need to be executed tomorrow from the monthly task table and copy them to the tomorrow task table.
[0034] In some alternative embodiments, the method further includes:
[0035] Execute a data copy operation to copy the data in the daily task table to the tomorrow task table. The tomorrow task table needs to be updated daily to ensure data accuracy. Among them, the data in the daily task table are the tasks that need to be executed every day, so they also need to be copied to the tomorrow task table.
[0036] In some alternative embodiments, after performing the maintenance reminder operation according to the maintenance reminder information, the method further includes:
[0037] Re-determine new maintenance reminder information according to the maintenance cycle of the target device;
[0038] When the execution time of the new maintenance reminder information is not empty, save the new maintenance reminder information in the total task execution table. After performing the maintenance reminder operation according to the maintenance reminder information, it is necessary to re-determine the new maintenance reminder information based on the maintenance cycle of the target device and save it in the total task execution table again.
[0039] In some alternative embodiments, saving the new maintenance reminder information in the total task execution table includes:
[0040] Based on the execution time of the new maintenance reminder information, determine the data table to be inserted from the total task execution table according to the preset search strategy of the data table;
[0041] Save the new maintenance reminder information in the data table to be inserted. When re-saving the new maintenance reminder information in the total task execution table, it is necessary to determine the corresponding task table according to the execution time of the new maintenance reminder information, and then insert the new maintenance reminder information into this task table.
[0042] In some alternative embodiments, respectively determining the maintenance information and the maintenance reminder information according to the basic information and the maintenance information of the target device includes:
[0043] Determine the maintenance information according to the basic information, the maintenance type and the maintenance cycle of the maintenance information;
[0044] Determine the maintenance reminder information according to the basic information, the maintenance reminder flag and the maintenance cycle of the maintenance information. The maintenance information stores relevant information of the device to be executed, action information to be executed (for example, which type of maintenance operation to perform), maintenance execution time, and information related to the maintenance type, etc.; the maintenance reminder information stores relevant information of the device to be executed, action information to be executed (for example, how to remind), and maintenance reminder execution time, etc. Description of the Drawings
[0045] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, the drawings in the figures do not constitute a proportional limitation.
[0046] Figure 1 It is a flowchart of a method for saving device maintenance cycle data based on a database provided by an embodiment of the present disclosure. Detailed Embodiments
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will elaborate on each embodiment of the present invention in conjunction with the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present invention, many technical details are presented to help readers better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present invention can still be implemented.
[0048] In view of the deficiencies of the prior art, the objective of the embodiments of the present invention is to provide a method for storing equipment maintenance cycle data based on a database. Compared with the prior art, through a method of splitting a maintenance schedule and calculating the due date of equipment maintenance cycles, even when managing a large number of devices, the computer resource occupancy will remain at a relatively low level.
[0049] Embodiment 1:
[0050] The embodiments of the present invention relate to a method for storing equipment maintenance cycle data based on a database.
[0051] The following specifically describes the implementation details of the method for storing equipment maintenance cycle data based on a database in this embodiment. The following content is only implementation details provided for easy understanding and is not necessary for implementing this solution.
[0052] The method for storing equipment maintenance cycle data based on a database in this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities.
[0053] As Figure 1 shown, the method for storing equipment maintenance cycle data based on a database provided in this embodiment includes the following steps:
[0054] Step 110: Create an equipment basic table, an equipment cycle table, and a total task execution table in the database.
[0055] Create three tables in the database, namely an equipment basic table, an equipment cycle table, and a total task execution table.
[0056] Step 120: Obtain the basic information of the target device and save the basic information in the equipment basic table.
[0057] Obtain the basic information of the target device (including: equipment ID, equipment type, etc. in the basic information), and save the basic information of the target device through the equipment basic table.
[0058] Step 130: Obtain the maintenance process information of the target device and save the maintenance process information in the equipment cycle table; among them, the maintenance process information includes: maintenance process type, maintenance cycle, and whether to perform a maintenance reminder flag.
[0059] Obtain the maintenance information of the target device (the maintenance information includes: maintenance type, maintenance cycle, and whether to perform maintenance reminder flag, etc.), and save the maintenance information of the target device through the equipment cycle table.
[0060] Step 140: Determine the maintenance information and maintenance reminder information respectively according to the basic information and maintenance information of the target device, and save the maintenance information and maintenance reminder information in the total task execution table; among them, both the maintenance information and the maintenance reminder information include: execution time, execution action, device ID, and the total task execution table includes multiple tables generated based on the execution time.
[0061] Among them, the execution time includes the time for executing the corresponding maintenance task or maintenance reminder task, the execution action includes the task category and / or task execution method, etc. of the corresponding maintenance task or maintenance reminder task, and the device ID includes the device ID of the device to which the corresponding maintenance or maintenance reminder task is to be executed.
[0062] Determine the maintenance information and maintenance reminder information respectively according to the basic information and maintenance information of the target device. Among them, the maintenance information is used to store the relevant maintenance information of the target device; and the maintenance reminder information is used to store the reminder information of the relevant maintenance tasks to send reminder messages for the corresponding maintenance tasks at the corresponding time points.
[0063] In the related art, the total task execution table stores the tasks to be executed of all devices (including maintenance tasks and maintenance reminder tasks, etc.), and the task execution cycle range is very large, and it may exist from daily routine inspections to equipment overhauls once every few years. Therefore, when the device data volume is large, directly performing a database SELECT query operation will bring serious performance problems.
[0064] Based on the method provided in this embodiment, when querying the expiration time of the equipment maintenance cycle, it is not necessary to poll all devices (in the prior art, the total task execution table is a data table, and all tasks are saved in this one data table of the total task execution table), and only need to poll the data table that saves the tasks to be executed in the near future (in this application, the total task execution table is split based on the execution time of the task, and multiple data tables are obtained), which greatly improves the query efficiency and saves computer resources.
[0065] The method for saving equipment maintenance cycle data based on the database provided in this embodiment, compared with the prior art, through a method of splitting the maintenance plan table and calculating the expiration time of the equipment maintenance cycle query, realizes that even when managing a large number of devices, the computer resource occupancy will remain at a relatively low level.
[0066] Embodiment 2:
[0067] Based on the above embodiments, this embodiment further explains and illustrates the method for saving equipment maintenance cycle data based on a database provided by the above embodiments.
[0068] In step 110: Create an equipment basic table, an equipment cycle table, and a total task execution table in the database.
[0069] Create three tables in the database, namely an equipment basic table, an equipment cycle table, and a total task execution table.
[0070] As a specific example, the equipment basic table: can be used to store the basic information of the equipment. Among them, the equipment repair date information is not stored in this table, and only basic information such as equipment ID, equipment type, and equipment name is stored; the equipment cycle table: each piece of data in this table represents a type of repair cycle information of an equipment. For example, if equipment A has three types of repairs: daily maintenance, medium repair, and major repair, and each repair cycle is different, then three records will be added to this table. Among them, the fields of each record at least include equipment ID, repair type, and repair cycle; the total task execution table: each piece of data in this table represents an action task to be processed; for example, if equipment B needs to complete maintenance before April 1st and relevant personnel need to be reminded one month in advance, then two records will be added to this table, that is: execute the reminder task on March 1st, and execute the task of handling overdue maintenance on April 1st. The fields of each record at least include execution time, execution action, and the equipment ID of the equipment to be executed.
[0071] In some embodiments, the total task execution table includes:
[0072] The monthly task table, the next year's task table, the long-term task table, the daily task table, the to-be-executed task table, and the tomorrow's task table; among them:
[0073] The monthly task table is used to save the tasks that need to be executed each month by month; the next year's task table is used to save the tasks that need to be executed in the next year; the long-term task table is used to save the tasks that need to be executed after the next year; the daily task table is used to save the tasks that need to be executed every day; the to-be-executed task table is used to save the tasks that need to be executed on the current date; the tomorrow's task table is used to save the tasks that need to be executed on the day after the current date.
[0074] Illustrate with examples, the total task execution table includes multiple tables generated based on the task execution time. For example, it may include: the daily task table, the task execution table for 2025, the task execution table for 2026, and the task execution tables for January 2025, February 2025, March 2025,... December 2025, the long-term task table, and so on. In addition, the total task execution table may also include: the to-be-executed task table (saving the maintenance and / or maintenance reminder tasks that need to be executed on the same day), the tomorrow's task table, etc.
[0075] In view of this, when a new maintenance task is added to the overall task execution list, instead of directly putting the newly added maintenance task into the overall task execution list, it is first classified according to the execution time of the maintenance task. For example, if it is a maintenance task that needs to be executed this year, then the maintenance task is put into the monthly task list of the corresponding month; if it is a maintenance task for next year, then the maintenance task is put into the next-year task list; if it is a maintenance task for a later time, then the maintenance task is put into the long-term task list. At the same time, the cycle of the maintenance task is also judged. If it is a very frequent daily maintenance task, then the maintenance task is directly put into the daily task list.
[0076] Among them, the to-be-executed task list is used to store the tasks to be executed today, and the tomorrow task list is used to store the tasks to be executed tomorrow. It should be noted that these two tables, the to-be-executed task list and the tomorrow task list, need to be updated daily.
[0077] For example, on a new day, first, the to-be-executed task list needs to be read, which is the equipment that needs to be maintained or reminded today, and reminders are made according to the preset services. After the reminder tasks for today are completed, it is also necessary to calculate the equipment to be reminded tomorrow and update it to the tomorrow task list. After the reminder tasks for today are completed and the reminder tasks for tomorrow are all generated, the to-be-executed task list will be cleared, and the records in the tomorrow task list will be stored in the to-be-executed task list for execution tomorrow.
[0078] In step 120: Obtain the basic information of the target device and save the basic information in the device basic table.
[0079] Obtain the basic information of the target device (including in the basic information: device ID, device type, etc.), and save the basic information of the target device through the device basic table.
[0080] In step 130: Obtain the maintenance process information of the target device and save the maintenance process information in the device cycle table; among them, in the maintenance process information, it includes: maintenance process type, maintenance process cycle, and whether to perform a maintenance reminder flag.
[0081] Obtain the maintenance process information of the target device (including in the maintenance process information: maintenance process type, maintenance process cycle, and whether to perform a maintenance reminder flag, etc.), and save the maintenance process information of the target device through the device cycle table.
[0082] In step 140: According to the basic information and maintenance process information of the target device, determine the maintenance information and maintenance reminder information respectively, and save the maintenance information and maintenance reminder information in the overall task execution list; among them, in both the maintenance information and the maintenance reminder information, it includes: execution time, execution action, device ID, and the overall task execution list includes multiple tables generated based on the execution time.
[0083] According to the basic information and repair process information of the target device, the maintenance information and maintenance reminder information are respectively determined. Among them, the maintenance information is used to store the relevant maintenance information for the target device; while the maintenance reminder information is used to store the reminder information for the relevant maintenance tasks, so as to send a reminder message for the corresponding maintenance task at the corresponding time point.
[0084] In some embodiments, both the maintenance information and the maintenance reminder information include the following information:
[0085] Execution time, execution action, and the device ID of the device to be executed.
[0086] In some embodiments, the maintenance information and the maintenance reminder information are saved in the total task execution table, including:
[0087] According to the execution time of the maintenance information, the first target data table is determined from the total task execution table based on the preset search strategy of the data table, and the maintenance information is saved in the first target data table;
[0088] When the execution time of the maintenance reminder information is not empty, according to the execution time of the maintenance reminder information, the second target data table is determined from the total task execution table based on the preset search strategy of the data table, and the maintenance reminder information is saved in the second target data table.
[0089] It can be understood that if the execution time of the maintenance reminder information is not empty, it means that a reminder is required for the corresponding maintenance task; if the execution time of the maintenance reminder information is empty, it means that no reminder is required for the corresponding maintenance task.
[0090] It should be noted that through the preset search strategy of the data table, the target data table for saving the maintenance information and the maintenance reminder information can be determined based on the execution time. The preset search strategy can be specifically set according to actual needs.
[0091] As an example, the preset search strategy of the data table can be set as: if the execution time is the current day, the target data table can be the task to be executed table; if the execution time is tomorrow, the target data table can be the tomorrow's task table; if the execution time is many years later, the target data table can be the long-term task table; and so on.
[0092] In some embodiments, according to the basic information and repair process information of the target device, the maintenance information and the maintenance reminder information are respectively determined, including:
[0093] Determine the maintenance information according to the basic information, the repair process type and the repair cycle of the repair process information;
[0094] Determine the maintenance reminder information according to the basic information, the maintenance reminder flag of the repair process information and the repair cycle.
[0095] Those skilled in the art can understand that maintenance information and maintenance reminder information are stored in the data in text or other data types; and when these maintenance information and maintenance reminder information are sent to relevant operators, for these operators, the received maintenance information is the maintenance task that needs to be executed by them, and the received maintenance reminder information is the maintenance reminder task that needs to be executed by them.
[0096] In some embodiments, the method further includes:
[0097] In response to the data table update operation, perform an update operation on the to-be-executed task table and the tomorrow's task table.
[0098] Among them, it can be set to update regularly, and different data tables can be set with different update times.
[0099] In some embodiments, the update operation of the tomorrow's task table includes the following steps:
[0100] Determine the monthly task table corresponding to the current month, and screen out the maintenance information and maintenance reminder information corresponding to tomorrow from the monthly task table corresponding to the current month based on the current date;
[0101] Save the screened-out maintenance information and maintenance reminder information in the tomorrow's task table.
[0102] In some embodiments, the method further includes:
[0103] Execute a data copy operation to copy the data in the daily task table to the tomorrow's task table.
[0104] As an example, the update logic recorded in the tomorrow's task table is:
[0105] According to the current month, scan the monthly task table corresponding to the corresponding month, and screen out the tasks to be executed tomorrow from it. The monthly task table only contains the tasks of this month, and the quantity is much less than that of the total task execution table. The cost of scanning once a day is usually acceptable; then, copy a record in the daily task table to the tomorrow's task table; in this way, the update of the tomorrow's task table can be completed.
[0106] It should be noted that whenever a maintenance reminder task for a device is completed, it is also necessary to recalculate the time of the next maintenance reminder according to the repair cycle configuration of the device, and generate relevant tasks and insert them back into the corresponding task table.
[0107] In some embodiments, after performing the maintenance reminder operation according to the maintenance reminder information, the method further includes:
[0108] Re-determine the new maintenance reminder information according to the repair cycle of the target device;
[0109] When the execution time of the new maintenance reminder information is not empty, save the new maintenance reminder information in the total task execution table.
[0110] In some embodiments, saving the new maintenance reminder information in the total task execution table includes:
[0111] Based on the execution time of the new maintenance reminder information, determine the data table to be inserted in the total task execution table according to the preset search strategy of the data table;
[0112] Save the new maintenance reminder information in the data table to be inserted.
[0113] In addition to updating the above two related tables of daily tasks, four types of tables split from the total task execution table need to be updated once a year. Split the next year's task table into monthly task tables from January to December, and extract the tasks of the next year from the long-term task table and put them into the next year's task table.
[0114] The method for saving equipment maintenance cycle data based on a database provided in this embodiment, compared with the prior art, through a method of splitting a maintenance plan table and querying the calculation method of the expiration time of the equipment maintenance cycle, realizes that even when managing a large number of devices, the computer resource occupancy will remain at a relatively low level.
[0115] Embodiment Three:
[0116] Another embodiment of the present application relates to a system for saving equipment maintenance cycle data based on a database.
[0117] The implementation details of the system for saving equipment maintenance cycle data based on a database in this embodiment are specifically described below. The following content is only the implementation details provided for easy understanding and is not necessary for implementing this solution. The system for saving equipment maintenance cycle data based on a database provided in this embodiment includes:
[0118] A table creation module, used to create an equipment basic table, an equipment cycle table, and a total task execution table in the database;
[0119] A basic information saving module, used to obtain the basic information of the target device and save the basic information in the equipment basic table;
[0120] A repair process information saving module, used to obtain the repair process information of the target device and save the repair process information in the equipment cycle table; where, the repair process information includes: repair process type, repair process cycle, and whether to perform a maintenance reminder flag;
[0121] The maintenance information storage module is used to determine maintenance information and maintenance reminder information according to the basic information and maintenance process information of the target device, and store the maintenance information and maintenance reminder information in the overall task execution table; wherein, both the maintenance information and the maintenance reminder information include: execution time, execution action, and device ID, and the overall task execution table includes multiple tables generated based on the execution time.
[0122] In some embodiments, the maintenance information storage module includes: a target data table determination unit and an information storage unit; wherein,
[0123] The data table determination unit is used to determine a first target data table from the overall task execution table based on the preset search strategy of the data table according to the execution time of the maintenance information, and store the maintenance information in the first target data table;
[0124] The information storage unit is used to, when the execution time of the maintenance reminder information is not empty, determine a second target data table from the overall task execution table based on the preset search strategy of the data table according to the execution time of the maintenance reminder information, and store the maintenance reminder information in the second target data table.
[0125] In some embodiments, the overall task execution table includes:
[0126] Monthly task table, next year's task table, long-term task table, daily task table, pending task table, and tomorrow's task table; wherein:
[0127] The monthly task table is used to save the tasks that need to be executed each month by month; the next year's task table is used to save the tasks that need to be executed in the next year; the long-term task table is used to save the tasks that need to be executed after the next year; the daily task table is used to save the tasks that need to be executed every day; the pending task table is used to save the tasks that need to be executed on the current date; the tomorrow's task table is used to save the tasks that need to be executed on the day after the current date.
[0128] In some embodiments, the system further includes an update module;
[0129] The update module is used to perform an update operation on the pending task table and the tomorrow's task table in response to a data table update operation.
[0130] In some embodiments, the task table determination unit is further used to determine the monthly task table corresponding to the current month, and filter out the maintenance information and maintenance reminder information corresponding to tomorrow from the monthly task table corresponding to the current month based on the current date;
[0131] The information storage unit is further used to store the filtered maintenance information and maintenance reminder information in the tomorrow's task table.
[0132] In some embodiments, the system further includes a copy module; wherein,
[0133] A copy module, configured to perform a data copy operation to copy the data in the daily task table to the tomorrow task table.
[0134] In some embodiments, the system further includes a first update unit and a second update unit; wherein,
[0135] The first update unit is configured to, after performing a maintenance reminder operation according to the maintenance reminder information, re-determine new maintenance reminder information according to the maintenance cycle of the target device;
[0136] The second update unit is configured to save the new maintenance reminder information in the total task execution table when the execution time of the new maintenance reminder information is not empty.
[0137] In some embodiments, the second update unit includes a determination subunit and an insertion subunit; wherein,
[0138] The determination subunit is configured to determine a data table to be inserted from the total task execution table based on a preset search strategy of the data table according to the execution time of the new maintenance reminder information;
[0139] The insertion subunit is configured to save the new maintenance reminder information in the data table to be inserted.
[0140] In some embodiments, the maintenance information storage module includes a maintenance information determination subunit and a maintenance reminder information determination subunit; wherein,
[0141] The maintenance information determination subunit is configured to determine maintenance information according to the basic information, the maintenance type and the maintenance cycle of the maintenance process information;
[0142] The maintenance reminder information determination subunit is configured to determine maintenance reminder information according to the basic information, the maintenance reminder flag of the maintenance process information and the maintenance cycle.
[0143] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working processes of the modules in the device maintenance cycle data storage system based on a database can refer to the corresponding processes in the foregoing method embodiments, and are not repeated herein.
[0144] It should be noted that each module involved in this embodiment is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, units not closely related to solving the technical problems proposed in this application are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
[0145] Embodiment 4:
[0146] Another embodiment of the present application relates to an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method for saving equipment maintenance cycle data based on a database in the above embodiments.
[0147] Among them, the memory and the processor are connected by a bus. The bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and the memory together. The bus may also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, so they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be a component or multiple components, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor.
[0148] The processor is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory may be used to store the data used by the processor when executing operations.
[0149] Embodiment 5:
[0150] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method embodiments described above are implemented.
[0151] That is, those skilled in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions for enabling a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0152] In some embodiments of the present application, a computer program product is further provided, including a computer program, which implements the steps of the method described in the above embodiments when executed by a processor.
[0153] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present application, and in practical applications, various changes can be made to them in form and details without departing from the spirit and scope of the present application.
Claims
1. A method for storing equipment maintenance cycle data based on a database, characterized in that, Including: Create a basic equipment table, an equipment cycle table, and a total task execution table in the database; Obtain the basic information of the target equipment and save the basic information in the basic equipment table; Obtain the repair process information of the target equipment and save the repair process information in the equipment cycle table; wherein, the repair process information includes: repair process type, repair process cycle, and whether to perform a maintenance reminder flag; Determine the maintenance information and the maintenance reminder information respectively according to the basic information and the repair process information of the target equipment, and save the maintenance information and the maintenance reminder information in the total task execution table; wherein, both the maintenance information and the maintenance reminder information include: execution time, execution action, equipment ID, and the total task execution table includes multiple tables generated based on the execution time.
2. The method according to claim 1, characterized in that The step of saving the maintenance information and the maintenance reminder information in the total task execution table includes: Based on the execution time of the maintenance information, determine the first target data table from the total task execution table according to the preset search strategy of the data table, and save the maintenance information in the first target data table; When the execution time of the maintenance reminder information is not empty, based on the execution time of the maintenance reminder information, determine the second target data table from the total task execution table according to the preset saving strategy, and save the maintenance reminder information in the second target data table.
3. The method according to claim 1 or 2, characterized in that, The total task execution table includes: Monthly task table, next year's task table, long-term task table, daily task table, pending task table, and tomorrow's task table; wherein: The monthly task table is used to save the tasks that need to be executed each month by month; the next year's task table is used to save the tasks that need to be executed in the next year; the long-term task table is used to save the tasks that need to be executed after the next year; the daily task table is used to save the tasks that need to be executed every day; the pending task table is used to save the tasks that need to be executed on the current date; the tomorrow's task table is used to save the tasks that need to be executed on the day after the current date.
4. The method according to claim 3, wherein The method further includes: In response to a data table update operation, perform an update operation on the pending task table and the tomorrow's task table.
5. The method according to claim 4, characterized in that, The update operation of the tomorrow's task table includes the following steps: Determine the monthly task table corresponding to the current month, and filter out the maintenance information and the maintenance reminder information corresponding to tomorrow from the monthly task table corresponding to the current month based on the current date; Save the filtered maintenance information and the maintenance reminder information in the tomorrow's task table.
6. The method according to claim 5, wherein The method further includes: Execute a data copy operation to copy the data in the daily task table to the tomorrow's task table.
7. The method according to claim 1, characterized in that After performing the maintenance reminder operation according to the maintenance reminder information, the method further includes: Re-determine the new maintenance reminder information according to the repair process cycle of the target equipment; When the execution time of the new maintenance reminder information is not empty, save the new maintenance reminder information in the total task execution table.
8. The method according to claim 7, wherein The step of saving the new maintenance reminder information in the total task execution table includes: According to the execution time of the new maintenance reminder information, determine the data table to be inserted from the total task execution table based on the preset search strategy of the data table; Save the new maintenance reminder information in the data table to be inserted.
9. The method according to claim 1, characterized in that, The determining of the maintenance information and the maintenance reminder information according to the basic information and the maintenance process information of the target device respectively includes: Determine the maintenance information according to the basic information, the maintenance process type and the maintenance cycle of the maintenance process information; Determine the maintenance reminder information according to the basic information, the maintenance reminder flag of the maintenance process information and the maintenance cycle.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 9.