Cultural relic monitoring method and device based on shared directory, medium and electronic equipment
By creating a target subdirectory in the shared directory, the MATLAB algorithm service can automatically detect cultural relics to be monitored, solving the problem of inefficient monitoring of cultural relics in the existing technology, and achieving efficient and automated cultural relics monitoring.
Patent Information
- Application Number
- CN202510534632.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-27
AI Technical Summary
In the prior art, when using the MATLAB algorithm service to monitor cultural relics, the efficiency is low, resulting in a large amount of labor costs.
By creating a target subdirectory corresponding to the monitoring data in the shared directory, the MATLAB algorithm service can automatically detect the cultural relics to be monitored and store the detection results in the target subdirectory.
It improves the efficiency of cultural relics monitoring, reduces labor costs, and realizes automated monitoring of cultural relics.
Smart Images

Figure CN120067403A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of cultural relics monitoring, and particularly to a cultural relics monitoring method, device, storage medium, and electronic device based on a shared directory. Background Art
[0002] MATLAB (Matrix Laboratory) is a powerful and easy-to-use mathematical software platform, which is widely used in fields such as scientific computing, engineering simulation, data analysis, image processing, and machine learning.
[0003] In the related art, after collecting the monitoring data of the cultural relics to be monitored, it is usually necessary for the monitoring personnel to manually input the monitoring data into MATLAB, and then use the algorithm services provided by MATLAB to calculate the monitoring data to obtain the final monitoring result, and finally manually fill in the monitoring result into the monitoring platform. When there are many calculation tasks, since the MATLAB algorithm service can only execute the calculation tasks sequentially, it is necessary for the monitoring personnel to repeat the above operations continuously, thus consuming a large amount of labor costs and resulting in low efficiency of cultural relics monitoring. Summary of the Invention
[0004] This application provides a cultural relics monitoring method, device, storage medium, and electronic device based on a shared directory to solve the problem of low efficiency in the current cultural relics monitoring using MATLAB algorithm services.
[0005] To solve the above problems, this application adopts the following technical solutions: In a first aspect, an embodiment of this application provides a cultural relics monitoring method based on a shared directory, which is applied to a monitoring platform. The method includes: When receiving the monitoring data uploaded by the user for the cultural relics to be monitored, create a target sub-directory corresponding to the monitoring data in the shared directory; Store the monitoring data in the target sub-directory, so that the MATLAB algorithm service scans the shared directory according to the first scanning period, and when scanning to the target sub-directory, use the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data to obtain a detection result, and store the detection result in the target sub-directory; Scan the target sub-directory according to the second scanning period, and when scanning to the detection result existing in the target sub-directory, read and save the detection result, and delete the target sub-directory.
[0006] In an embodiment of this application, the method further includes: Generate a task category label for the target sub-directory based on the task category information uploaded by the user for the cultural relics to be monitored; Based on the task category label, determine the target MATLAB algorithm in a preset MATLAB algorithm library; wherein, different task category labels correspond to different MATLAB algorithms.
[0007] In an embodiment of the present application, use the target MATLAB algorithm to detect the cultural relic to be monitored according to the monitoring data, and obtain a detection result, including: Based on the task category label, determine the threshold data of the monitoring data; Use the target MATLAB algorithm to detect the cultural relic to be monitored according to the monitoring data and the threshold data, and obtain a detection result.
[0008] In an embodiment of the present application, the monitoring data includes a thermal imaging picture and a temperature matrix file corresponding to the thermal imaging picture; Based on the task category label, determining the threshold data of the monitoring data includes: When the task category label represents weathering identification of the cultural relic to be monitored, based on the geographical location information and climate characteristics of the cultural relic to be monitored, determine the temperature threshold file of the thermal imaging picture; Determine the temperature threshold file as the threshold data of the monitoring data.
[0009] In an embodiment of the present application, according to the monitoring data and the threshold data, detect the cultural relic to be monitored, and obtain a detection result, including: Perform grayscale conversion on the thermal imaging picture to obtain a grayscale image; Based on the temperature matrix file and the temperature threshold file, determine the total area of the weathering region of the grayscale image; Based on the ratio of the total area of the weathering region to the area of the thermal imaging picture, determine the weathering degree of the cultural relic to be monitored, and determine the weathering degree as the detection result.
[0010] In an embodiment of the present application, based on the temperature matrix file and the temperature threshold file, determining the total area of the weathering region of the grayscale image includes: For any pixel of the grayscale image, based on the temperature matrix file, determine the current temperature of the pixel, and based on the temperature threshold file, determine the temperature threshold of the pixel; When the current temperature is less than the temperature threshold, determine the pixel as a weathering region; Based on each weathering region, determine the total area of the weathering region of the grayscale image.
[0011] In an embodiment of the present application, after deleting the target subdirectory, the method further includes: When it is detected that the target MATLAB algorithm is updated, execute the step of creating a target subdirectory corresponding to the monitoring data in the shared directory, so that the updated target MATLAB algorithm detects the cultural relic to be monitored according to the monitoring data, and obtains an updated detection result.
[0012] In a second aspect, based on the same inventive concept, an embodiment of the present application provides a cultural relic monitoring device based on a shared directory, which is applied to a monitoring platform. The device includes: A directory creation module, configured to create a target subdirectory corresponding to the monitoring data in the shared directory when receiving the monitoring data uploaded by the user for the cultural relic to be monitored; A cultural relic detection module, configured to store the monitoring data in the target subdirectory, so that the MATLAB algorithm service scans the shared directory according to a first scanning period, and when the target subdirectory is scanned, use the target MATLAB algorithm to detect the cultural relic to be monitored according to the monitoring data, obtain a detection result, and store the detection result in the target subdirectory; A result reading module, configured to scan the target subdirectory according to a second scanning period, and when it is scanned that the detection result exists in the target subdirectory, read and save the detection result, and delete the target subdirectory.
[0013] In an embodiment of the present application, the cultural relic monitoring device based on the shared directory further includes: A label generation module, configured to generate a task category label of the target subdirectory based on the task category information uploaded by the user for the cultural relic to be monitored; An algorithm determination module, configured to determine the target MATLAB algorithm in a preset MATLAB algorithm library based on the task category label; wherein, different task category labels correspond to different MATLAB algorithms.
[0014] In an embodiment of the present application, the cultural relic detection module includes: A threshold determination sub-module, configured to determine threshold data of the monitoring data based on the task category label; A cultural relic detection sub-module, configured to use the target MATLAB algorithm to detect the cultural relic to be monitored according to the monitoring data and the threshold data, and obtain a detection result.
[0015] In an embodiment of the present application, the monitoring data includes a thermal imaging picture and a temperature matrix file corresponding to the thermal imaging picture; the threshold determination sub-module includes: A temperature threshold determination unit, configured to determine a temperature threshold file of the thermal imaging picture based on the geographical location information and climate characteristics of the cultural relic to be monitored when the task category label represents weathering identification of the cultural relic to be monitored; A threshold data determination unit, configured to determine the temperature threshold file as the threshold data of the monitoring data.
[0016] In an embodiment of the present application, the cultural relic detection sub-module includes: A grayscale conversion unit, configured to perform grayscale conversion on the thermal imaging picture to obtain a grayscale image; An area determination unit, configured to determine the total weathering area of the grayscale image based on the temperature matrix file and the temperature threshold file; A detection result determination unit, configured to determine the weathering degree of the cultural relic to be monitored based on the ratio of the total weathering area to the area of the thermal imaging picture, and determine the weathering degree as the detection result.
[0017] In an embodiment of the present application, the area determination unit includes: A temperature information determination sub-unit, configured to, for any pixel of the grayscale image, determine the current temperature of the pixel based on the temperature matrix file, and determine the temperature threshold of the pixel based on the temperature threshold file; A weathering area determination sub-unit, configured to determine the pixel as a weathering area when the current temperature is less than the temperature threshold; An area determination sub-unit, configured to determine the total weathering area of the grayscale image based on the sum of the areas of each weathering area.
[0018] In an embodiment of the present application, the cultural relic monitoring device based on the shared directory further includes: A result update module, configured to, when detecting an update of the target MATLAB algorithm, perform the step of creating a target sub-directory corresponding to the monitoring data in the shared directory, so that the updated target MATLAB algorithm detects the cultural relic to be monitored according to the monitoring data to obtain an updated detection result.
[0019] In a third aspect, based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, on which an executable program is stored, and when the executable program is executed by a processor, the cultural relic monitoring method based on the shared directory proposed in the first aspect of the present application is implemented.
[0020] In a fourth aspect, based on the same inventive concept, an embodiment of the present application provides an electronic device, including: A memory, configured to store an executable program; A processor; When the executable program is executed by the processor, the method for monitoring cultural relics based on a shared directory proposed in the first aspect of the present application is implemented.
[0021] Compared with the prior art, the present application has the following advantages: A method for monitoring cultural relics based on a shared directory provided by an embodiment of the present application first creates a target sub-directory corresponding to the monitoring data in the shared directory when receiving the monitoring data uploaded by the user for the cultural relics to be monitored; then stores the monitoring data in the target sub-directory, so that the MATLAB algorithm service scans the shared directory according to the first scanning period, and when the target sub-directory is scanned, uses the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data, obtains the detection result, and stores the detection result in the target sub-directory; finally, scans the target sub-directory according to the second scanning period, and when it is scanned that there is a detection result in the target sub-directory, reads and saves the detection result, and deletes the target sub-directory. By constructing the target sub-directory corresponding to the monitoring data in the embodiment of the present application, the user only needs to upload the monitoring data of the cultural relics to be monitored to the monitoring platform, and the MATLAB algorithm service can automatically detect the cultural relics to be monitored according to the monitoring data stored in the target sub-directory, and store the detection result in the target sub-directory, thereby effectively improving the efficiency of cultural relics monitoring and reducing the labor cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 is a flowchart of the steps of a method for monitoring cultural relics based on a shared directory in an embodiment of the present application.
[0024] Figure 2 is a schematic diagram of the modules of a device for monitoring cultural relics based on a shared directory in an embodiment of the present application.
[0025] Figure 3 is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0027] It should be noted that currently, after the monitoring personnel collect the monitoring data of the cultural relics to be monitored, it is usually necessary to use the MATLAB algorithm service locally to complete the calculation of the cultural relics to be monitored, and then upload the calculation results to the monitoring platform. For example, for the identification of the weathering degree of a brick wall, a thermal imager is needed to detect the brick wall to generate an infrared thermal image. Next, the MATLAB algorithm is used to perform weathering detection based on the thermal image to obtain the final weathering degree result. Finally, data such as the thermal image, monitoring time, and weathering degree result are manually filled in the monitoring platform.
[0028] When there are many calculation tasks, for example, when it is necessary to monitor multiple cultural relics of the same type or different types of cultural relics to be monitored, since the MATLAB algorithm service can only execute the calculation tasks sequentially, the monitoring personnel need to repeat the above operations continuously, thus consuming a large amount of labor costs and resulting in low efficiency of cultural relics monitoring.
[0029] In the related art, there are usually two ways to apply the MATLAB algorithm to engineering applications. The first way is to implement the algorithm using the programming language of the monitoring platform. This way requires programmers to understand and translate the algorithm, and the implementation period is relatively long. Moreover, after the algorithm is modified, the code needs to be rewritten. The second way is to use the socket interface to interact with the outside. This way requires additional code for message reception and parsing on the basis of the MATLAB algorithm. Both of the above two ways have relatively large application difficulties and application costs. Therefore, there is an urgent need for an efficient and low-cost way to conveniently integrate the MATLAB algorithm into the existing monitoring platform to realize the automatic monitoring of cultural relics.
[0030] Aiming at the problem of low efficiency in cultural relics monitoring using the MATLAB algorithm service in the related art, the present application aims to provide a cultural relics monitoring method based on a shared directory. By constructing a target subdirectory corresponding to the monitoring data, the user only needs to upload the monitoring data of the cultural relics to be monitored to the monitoring platform, and the MATLAB algorithm service can automatically detect the cultural relics to be monitored according to the monitoring data stored in the target subdirectory, and store the detection results in the target subdirectory, thereby effectively improving the efficiency of cultural relics monitoring and reducing labor costs.
[0031] Refer to Figure 1, which shows a method for monitoring cultural relics based on a shared directory applied to a monitoring platform. The method may include the following steps: S101: When receiving the monitoring data uploaded by the user for the cultural relic to be monitored, create a target sub-directory corresponding to the monitoring data in the shared directory.
[0032] In this embodiment, the user can use the corresponding data acquisition device to collect data of the cultural relic to be monitored, and use the client to upload the monitoring data of the cultural relic to be monitored to the monitoring platform.
[0033] In this embodiment, according to different monitoring tasks, different data acquisition devices can be used to collect different monitoring data of the cultural relic to be monitored. For example, when it is necessary to identify the weathering of a brick wall, the monitoring data can be the thermal imaging picture of the brick wall; when it is necessary to monitor the structural stability of the brick wall, the monitoring data can be the vibration data of the brick wall.
[0034] In this embodiment, the user only needs to upload the monitoring data to the monitoring platform through the client to realize the automatic monitoring of the cultural relic to be monitored, without the need for additional operations.
[0035] In this embodiment, after the monitoring platform receives the monitoring data of the cultural relic to be monitored, it will create a target sub-directory corresponding to the monitoring data in the shared directory. Exemplarily, the shared directory can be set as: shared directory / work / ; the target sub-directory can be named according to the task ID. For example, when the user uploads the monitoring data, a target sub-directory "10001" will be created under "shared directory / work / ", and then the complete directory will be: shared directory / work / 10001. The directories of subsequent new monitoring tasks will be: shared directory / work / 10002, shared directory / work / 10003, and so on. When the monitoring platform receives different types of monitoring tasks, a target sub-directory "20001" can be created under "shared directory / work / ", and then the complete directory will be: shared directory / work / 20001. The directories of subsequent new monitoring tasks of this type will be: shared directory / work / 20002, shared directory / work / 20003, and so on.
[0036] S102: Store the monitoring data in the target sub-directory, so that the MATLAB algorithm service scans the shared directory according to the first scan period, and when scanning to the target sub-directory, use the target MATLAB algorithm to detect the cultural relic to be monitored according to the monitoring data, obtain the detection result, and store the detection result in the target sub-directory.
[0037] It should be noted that the MATLAB algorithm service refers to a service that provides one or more MATLAB algorithms. Among them, different MATLAB algorithms are used to complete different monitoring tasks.
[0038] In this embodiment, to enable the MATLAB algorithm service to complete multiple monitoring tasks, the MATLAB algorithm service integrates a MATLAB algorithm library containing multiple MATLAB algorithms. When the user uploads monitoring data, the user can select the corresponding task category information through the client, and then upload the task category information to the monitoring platform together. The monitoring platform then generates a task category label for the target subdirectory based on the task category information uploaded by the user for the cultural relics to be monitored; and based on the task category label, determines the target MATLAB algorithm in the preset MATLAB algorithm library; among them, different task category labels correspond to different MATLAB algorithms.
[0039] In a specific implementation, when the user uploads monitoring data, multiple preset task category information can be displayed on the human-computer interaction interface of the client, and the user can click on the corresponding task category information as needed. Exemplarily, the multiple preset task category information includes, but is not limited to, weathering degree identification, structural stability identification, and surface integrity identification. When the user needs to identify the weathering degree of a brick wall, the user can click on the virtual button representing weathering degree identification.
[0040] In this embodiment, after the monitoring platform completes the creation of the target subdirectory, it will store the monitoring data in the target subdirectory. The MATLAB algorithm service integrated in the monitoring platform will periodically scan the shared directory according to the first scan period, for example, every 5 seconds. If the target subdirectory is scanned, it will read the monitoring data stored in the target subdirectory and calculate the monitoring data using the corresponding target MATLAB algorithm to obtain the detection result.
[0041] In this embodiment, after the MATLAB algorithm service calculates the detection result, it will automatically store the detection result in the target subdirectory so that the monitoring platform can extract the detection result in a timely manner.
[0042] S103: Scan the target subdirectory according to the second scan period, and when it is detected that there is a detection result in the target subdirectory, read and save the detection result, and delete the target subdirectory.
[0043] In this embodiment, the second scan period can be the same as or different from the first scan period. For example, it can be set to periodically scan the target subdirectory every 5 seconds. If the target subdirectory is scanned and there is a detection result in the target subdirectory, it means that the MATLAB algorithm service has completed the monitoring task. Then, after reading and saving the detection result, the target subdirectory is deleted.
[0044] In this embodiment, by deleting the target subdirectory, the monitoring platform will not scan the target subdirectory in the next scanning cycle, thereby avoiding duplicate reading of detection results.
[0045] In this embodiment, data interaction between the monitoring platform and the MATLAB algorithm service is achieved through a shared directory, which can conveniently and quickly integrate the MATLAB algorithm service into the monitoring platform without developing new communication interfaces or recompiling the MATLAB algorithm service. In this way, by constructing a target subdirectory corresponding to the monitoring data in the shared directory, the user only needs to upload the monitoring data of the cultural relics to be monitored to the monitoring platform, and the MATLAB algorithm service can automatically detect the cultural relics to be monitored according to the monitoring data stored in the target subdirectory and store the detection results in the target subdirectory, thereby effectively improving the efficiency of cultural relics monitoring and reducing labor costs.
[0046] In a feasible embodiment, the step of using the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data in S102 to obtain the detection result may specifically include the following sub-steps: S102-1: Determine the threshold data of the monitoring data based on the task category label.
[0047] It should be noted that the threshold data is used to assist the target MATLAB algorithm to complete the data of the monitoring task.
[0048] In this embodiment, if the monitoring data includes a thermal imaging picture and a temperature matrix file corresponding to the thermal imaging picture, the threshold data of the monitoring data is the temperature threshold file of the thermal imaging picture.
[0049] It should be noted that the temperature matrix file represents a table file output by the thermal imager for the thermal imaging picture, and is used to characterize the temperature information of each region in the thermal imaging picture. The temperature threshold file includes the temperature thresholds set for each region of the thermal imaging picture.
[0050] In a specific implementation, when the task category label represents weathering identification of the cultural relics to be monitored, based on the geographical location information and climate characteristics of the cultural relics to be monitored, determine the temperature threshold file of the thermal imaging picture, and determine the temperature threshold file as the threshold data of the monitoring data.
[0051] In this embodiment, the geographical location information may specifically include information such as the longitude and latitude information and altitude of the cultural relics to be monitored; the climate characteristics may specifically include information such as the temperature information, humidity information, and climate type (such as dry, humid, temperate, tropical, etc.) at the current moment.
[0052] In specific implementation, the initial temperature threshold file can be determined first according to the geographical location information of the cultural relics to be monitored. Among them, different geographical location information corresponds to different initial temperature threshold files; then, the initial temperature threshold file is corrected based on the climate characteristics of the cultural relics to be monitored to obtain the final temperature threshold file.
[0053] In this embodiment, the temperature threshold formulated according to the specific geographical location and climate characteristics can better reflect the actual situation of the cultural relics to be monitored, thereby effectively improving the accuracy of weathering degree identification.
[0054] It should be noted that if the target MATLAB algorithm does not require the corresponding threshold data, the cultural relics to be monitored can be directly detected according to the monitoring data to obtain the detection result.
[0055] S102-2: Use the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data and the threshold data to obtain the detection result.
[0056] In this embodiment, after determining the appropriate threshold data, the target MATLAB algorithm can perform corresponding calculations according to the monitoring data and the threshold data to obtain the final detection result. Specifically, when the monitoring data includes the thermal imaging picture and the temperature matrix file corresponding to the thermal imaging picture, and the threshold data includes the temperature threshold file of the thermal imaging picture, the detection result is the weathering degree of the cultural relics to be monitored.
[0057] In specific implementation, the step of detecting the cultural relics to be monitored according to the monitoring data and the threshold data in S102-2 to obtain the detection result can specifically include the following sub-steps: S102-2-1: Perform grayscale conversion on the thermal imaging picture to obtain a grayscale image.
[0058] In this embodiment, by converting the thermal imaging picture into a grayscale image, only the brightness information used to reflect the temperature information can be retained, without considering the color, thereby simplifying the data processing process. By removing the color information, the computational complexity can be reduced and the processing speed can be improved; at the same time, in the weathering degree identification, it is necessary to segment the image according to the temperature threshold, and the grayscale image can perform threshold processing more effectively, making it easier to identify the areas with different weathering degrees.
[0059] S102-2-2: Determine the total area of the weathered area of the grayscale image based on the temperature matrix file and the temperature threshold file.
[0060] In this embodiment, after the target MATLAB algorithm converts the thermal imaging picture into a grayscale image, it can perform threshold processing on the grayscale image based on the temperature matrix file and the temperature threshold file, and then obtain the total area of the weathered area.
[0061] In a specific implementation, for any pixel of a grayscale image, based on the temperature matrix file, the current temperature of the pixel is determined, and based on the temperature threshold file, the temperature threshold of the pixel is determined; in the case where the current temperature is less than the temperature threshold, the pixel is determined to be a weathered area, and in the case where the current temperature is greater than or equal to the temperature threshold, the pixel is determined to be an unweathered area; based on the sum of the areas of the respective weathered areas, the total area of the weathered areas of the grayscale image is determined.
[0062] In this embodiment, for the convenience of visualization, in the case where the current temperature is less than the temperature threshold, the pixel can be determined as a first pixel value, and in the case where the current temperature is greater than or equal to the temperature threshold, the pixel can be determined as a second pixel value; wherein, the first pixel value represents that the pixel is a weathered area, and the second pixel value represents that the pixel is an unweathered area.
[0063] In this embodiment, by adjusting each pixel of the grayscale image, a more intuitive binary image can be obtained. For example, the first pixel value can be set to 255, that is, replaced by a white pixel; the second pixel value can be set to 0, that is, replaced by a black pixel. In this way, the grayscale image can be further converted into a binary image with distinct black and white. The white area in the binary image is the weathered area of the cultural relic to be monitored.
[0064] S102-2-3: Based on the proportion of the total area of the weathered areas in the area of the thermal imaging picture, determine the weathering degree of the cultural relic to be monitored, and determine the weathering degree as the detection result.
[0065] In this embodiment, by calculating the proportion of the total area of the weathered areas in the area of the thermal imaging picture, the weathering degree of the cultural relic to be monitored can be determined.
[0066] In a specific implementation, multiple proportion thresholds can be set to classify the weathering degree. Exemplarily, the multiple proportion thresholds can include a first proportion threshold and a second proportion threshold. When the area proportion is less than the first proportion threshold, the weathering degree is determined to be mild weathering; when the area proportion is greater than or equal to the first proportion threshold and less than or equal to the second proportion threshold, the weathering degree is determined to be moderate weathering; when the area proportion is greater than the second proportion threshold, the weathering degree is determined to be severe weathering. Among them, the first proportion threshold can be set to 10%, and the second proportion threshold can be set to 30%.
[0067] In a feasible embodiment, after S103, the cultural relic monitoring method based on the shared directory can further include the following steps: S104: In the case of detecting an update of the target MATLAB algorithm, execute the step of creating a target sub-directory corresponding to the monitoring data in the shared directory, so that the updated target MATLAB algorithm detects the cultural relic to be monitored according to the monitoring data, and obtains an updated detection result.
[0068] In this embodiment, considering that in traditional cultural relic monitoring methods, when the MATLAB algorithm is adjusted, monitoring personnel need to re-enter the monitoring data, then use the updated MATLAB algorithm to calculate the monitoring data to obtain the updated monitoring results, and finally manually fill in the updated monitoring results on the monitoring platform. Repeating the above operations requires a large amount of labor costs. Therefore, to avoid repeated operations by users, after the monitoring platform detects the update of the target MATLAB algorithm, it will recreate the target subdirectory corresponding to the monitoring data and repeat the steps of S102 - S103, so that the updated target MATLAB algorithm can detect the cultural relics to be monitored according to the monitoring data and obtain the updated detection results.
[0069] In this embodiment, after the user completes the update operation of the target MATLAB algorithm, the user can also manually trigger the update of the detection results as needed. Specifically, the user can click the button to update the historical data on the client to send the update instruction to the monitoring platform. The monitoring platform then responds to the update instruction and executes the step of creating the target subdirectory corresponding to the monitoring data in the shared directory, so that the updated target MATLAB algorithm can detect the cultural relics to be monitored according to the monitoring data and obtain the updated detection results.
[0070] In this embodiment, by automatically triggering the automatic update of the detection results when the target MATLAB algorithm is updated, the update efficiency of the detection results can be effectively improved without the need for users to repeat the update operation.
[0071] Second, referring to Figure 2 , the embodiment of the present application provides a cultural relic monitoring device 200 based on a shared directory, which is applied to a monitoring platform. The cultural relic monitoring device 200 based on a shared directory includes: A directory creation module 201, configured to create a target subdirectory corresponding to the monitoring data in the shared directory when receiving the monitoring data uploaded by the user for the cultural relics to be monitored; A cultural relic detection module 202, configured to store the monitoring data in the target subdirectory, so that the MATLAB algorithm service scans the shared directory according to the first scanning period, and when scanning to the target subdirectory, uses the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data, obtain the detection results, and store the detection results in the target subdirectory; A result reading module 203, configured to scan the target subdirectory according to the second scanning period, and when scanning that there are detection results in the target subdirectory, read and save the detection results, and delete the target subdirectory.
[0072] In an embodiment of the present application, the cultural relic monitoring device 200 based on a shared directory further includes: A label generation module, configured to generate a task category label for a target subdirectory based on task category information uploaded by a user for a cultural relic to be monitored. An algorithm determination module, configured to determine a target MATLAB algorithm in a preset MATLAB algorithm library based on the task category label; wherein, different task category labels correspond to different MATLAB algorithms.
[0073] In an embodiment of the present application, the cultural relic detection module 202 includes: A threshold determination sub-module, configured to determine threshold data of monitoring data based on the task category label. A cultural relic detection sub-module, configured to detect the cultural relic to be monitored using the target MATLAB algorithm according to the monitoring data and the threshold data to obtain a detection result.
[0074] In an embodiment of the present application, the monitoring data includes a thermal imaging picture and a temperature matrix file corresponding to the thermal imaging picture; the threshold determination sub-module includes: A temperature threshold determination unit, configured to determine a temperature threshold file of the thermal imaging picture based on the geographical location information and climate characteristics of the cultural relic to be monitored when the task category label indicates weathering identification of the cultural relic to be monitored. A threshold data determination unit, configured to determine the temperature threshold file as the threshold data of the monitoring data.
[0075] In an embodiment of the present application, the cultural relic detection sub-module includes: A grayscale conversion unit, configured to perform grayscale conversion on the thermal imaging picture to obtain a grayscale image. An area determination unit, configured to determine the total area of the weathering region of the grayscale image based on the temperature matrix file and the temperature threshold file. A detection result determination unit, configured to determine the weathering degree of the cultural relic to be monitored based on the ratio of the total area of the weathering region to the area of the thermal imaging picture, and determine the weathering degree as the detection result.
[0076] In an embodiment of the present application, the area determination unit includes: A temperature information determination sub-unit, configured to determine the current temperature of a pixel of the grayscale image based on the temperature matrix file and determine the temperature threshold of the pixel based on the temperature threshold file for any pixel of the grayscale image. A weathering region determination sub-unit, configured to determine the pixel as a weathering region when the current temperature is less than the temperature threshold. An area determination sub-unit, configured to determine the total area of the weathering region of the grayscale image based on the sum of the areas of each weathering region.
[0077] In an embodiment of the present application, the cultural relic monitoring device 200 based on a shared directory further includes: A result update module, configured to, when detecting an update of a target MATLAB algorithm, perform a step of creating a target sub-directory corresponding to monitoring data in a shared directory, so that the updated target MATLAB algorithm detects a cultural relic to be monitored according to the monitoring data, and obtains an updated detection result.
[0078] It should be noted that the specific implementation manner of the cultural relic monitoring device 200 based on the shared directory in the embodiments of the present application refers to the specific implementation manner of the cultural relic monitoring method based on the shared directory proposed in the first aspect of the embodiments of the present application, which will not be elaborated herein.
[0079] In a third aspect, based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, on which an executable program is stored, and when the executable program is executed by a processor, the cultural relic monitoring method based on the shared directory proposed in the first aspect of the present application is implemented.
[0080] It should be noted that the specific implementation manner of the computer-readable storage medium in the embodiments of the present application refers to the specific implementation manner of the cultural relic monitoring method based on the shared directory proposed in the first aspect of the embodiments of the present application, which will not be elaborated herein.
[0081] In a fourth aspect, referring to Figure 3 , based on the same inventive concept, an embodiment of the present application provides an electronic device 300, including: A memory 301, configured to store an executable program; A processor 302; When the executable program is executed by the processor 302, the cultural relic monitoring method based on the shared directory proposed in the first aspect of the present application is implemented.
[0082] It should be noted that the specific implementation manner of the electronic device 300 in the embodiments of the present application refers to the specific implementation manner of the cultural relic monitoring method based on the shared directory proposed in the first aspect of the embodiments of the present application, which will not be elaborated herein.
[0083] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present invention can adopt the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or a device for implementing the functions specified in multiple blocks.
[0085] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or a device for implementing the functions specified in multiple blocks.
[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or a device for implementing the functions specified in multiple blocks.
[0087] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0088] Finally, it should also be noted that in this text, relational terms such as first and second are only used 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 term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.
[0089] The above has introduced in detail a cultural relic monitoring method, device, storage medium and electronic device based on a shared directory provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A cultural relics monitoring method based on a shared directory, characterized in that: Applied to the monitoring platform, the method comprises: When receiving monitoring data uploaded by a user for a cultural relic to be monitored, creating a target subdirectory corresponding to the monitoring data in the shared directory; The monitoring data is stored in the target subdirectory, so that the MATLAB algorithm service scans the shared directory according to the first scanning cycle, and when the target subdirectory is scanned, the target MATLAB algorithm is used to detect the cultural relics to be monitored according to the monitoring data to obtain the detection result, and the detection result is stored in the target subdirectory; The target sub-directory is scanned according to a second scanning cycle, and when it is found that the target sub-directory has the detection result, the detection result is read and saved, and the target sub-directory is deleted.
2. A cultural relics monitoring method based on a shared directory according to claim 1, characterized in that: The method further comprises: Based on the task category information uploaded by the user for the cultural relics to be monitored, generating a task category label for the target sub-directory; Based on the task category label, the target MATLAB algorithm is determined in a preset MATLAB algorithm library; wherein different task category labels correspond to different MATLAB algorithms.
3. A cultural relics monitoring method based on a shared directory according to claim 2, characterized in that: Using the target MATLAB algorithm to detect the cultural relics to be monitored according to the monitoring data, the detection results are obtained, including: Based on the task category label, determining threshold data of the monitoring data; The target MATLAB algorithm is used to detect the cultural relics to be monitored according to the monitoring data and the threshold data to obtain a detection result.
4. The cultural relics monitoring method based on a shared directory according to claim 3 is characterized in that: The monitoring data includes a thermal imaging picture and a temperature matrix file corresponding to the thermal imaging picture; Determining threshold data of the monitoring data based on the task category label includes: In the case where the task category label represents weathering identification of the cultural relic to be monitored, determining a temperature threshold file of the thermal imaging image based on the geographical location information and climate characteristics of the cultural relic to be monitored; The temperature threshold file is determined as the threshold data of the monitoring data.
5. The cultural relics monitoring method based on a shared directory according to claim 4 is characterized in that: According to the monitoring data and the threshold data, the cultural relics to be monitored are detected to obtain detection results, including: Performing grayscale conversion on the thermal imaging picture to obtain a grayscale image; Determining the total area of the weathered region of the grayscale image based on the temperature matrix file and the temperature threshold file; Based on the proportion of the total area of the weathered region to the area of the thermal imaging image, the weathering degree of the cultural relic to be monitored is determined, and the weathering degree is determined as the detection result.
6. The method for monitoring cultural relics based on a shared directory according to claim 5, characterized in that: Determining the total area of the weathered region of the grayscale image based on the temperature matrix file and the temperature threshold file includes: For any pixel of the grayscale image, determine the current temperature of the pixel based on the temperature matrix file, and determine the temperature threshold of the pixel based on the temperature threshold file; When the current temperature is less than the temperature threshold, determining that the pixel is a weathered area; The total area of the weathered regions in the grayscale image is determined based on the sum of the areas of the weathered regions.
7. The cultural relics monitoring method based on a shared directory according to claim 1 is characterized in that: After deleting the target subdirectory, the method further includes: When it is detected that the target MATLAB algorithm is updated, a step of creating a target subdirectory corresponding to the monitoring data in the shared directory is performed, so that the updated target MATLAB algorithm detects the cultural relics to be monitored according to the monitoring data to obtain updated detection results.
8. A cultural relic monitoring device based on a shared directory, characterized in that: Applied to a monitoring platform, the device comprises: A directory creation module, for creating a target subdirectory corresponding to the monitoring data in a shared directory upon receiving monitoring data uploaded by a user for a cultural relic to be monitored; A cultural relic detection module, used for storing the monitoring data in the target sub-directory, so that the MATLAB algorithm service scans the shared directory according to the first scanning cycle, and when the target sub-directory is scanned, the target MATLAB algorithm is used to detect the cultural relics to be monitored according to the monitoring data, obtain the detection result, and store the detection result in the target sub-directory; The result reading module is used to scan the target sub-directory according to the second scanning cycle, and when the detection result is found in the target sub-directory, read and save the detection result, and delete the target sub-directory.
9. A computer-readable storage medium having an executable program stored thereon, characterized in that: When the executable program is executed by the processor, the cultural relics monitoring method based on the shared directory as described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: A memory for storing an executable program; processor; When the executable program is executed by the processor, the cultural relics monitoring method based on a shared directory as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Monitoring data updating and processing integrated system and method based on Revit and Matlab
CN106126789A
APP memory data classified storage method, classified storage system and server
CN118733303A
Stone cultural relic surface deterioration degree evaluation method based on thermal infrared imaging
CN119510504A
Directory scanning program
JP2012216111A