Image recognition method and device applied to power transformation scene and computer equipment

By text enhancement processing on the actual detected images in the subelectric scene to generate enhanced samples, the problem of sample imbalance is solved and the accuracy of abnormal detection is improved.

CN119741685APending Publication Date: 2025-04-01SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411604328.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In subelectric scenes, existing image recognition methods have sample imbalance problems when dealing with complex environments and diversified anomaly events, resulting in low accuracy of abnormal detection.

Method used

By obtaining the actual detection images of the transformed scene, text enhancement processing is performed to generate an enhanced sample image set, and these enhanced samples are used to train the pre-trained feature comparison model to obtain the target recognition model.

Benefits of technology

The accuracy of abnormal detection in the case of insufficient samples is improved, and the training effect of the model is enhanced by generating diverse enhancement samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741685A_ABST
    Figure CN119741685A_ABST
Patent Text Reader

Abstract

The invention relates to an image recognition method and device applied to a power transformation scene, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring an actual detection image of a target power transformation scene in a reference time period; performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image, generating a plurality of enhanced sample images, and obtaining an enhanced sample image set; training a pre-trained feature comparison model by using the enhanced sample image set to obtain a target recognition model; and performing image recognition on the target power transformation scene by adopting the target recognition model. By adopting the method, the accuracy of power transformation scene abnormal image detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent image processing technology, and in particular to an image recognition method, device, computer equipment, storage medium and computer program product applied to a substation scene. Background Art

[0002] With the development of smart grids, the monitoring and management of substation scenarios are becoming more automated and intelligent.

[0003] At present, related monitoring methods still face many challenges in identifying abnormal situations, especially when dealing with complex environments and diverse abnormal events. Related image recognition methods often rely on a large amount of labeled data, but in actual usage scenarios, the frequency of abnormal events is low, resulting in a scarcity of abnormal samples and difficulty in obtaining abnormal samples. Therefore, this sample imbalance directly affects the training effect of the recognition model, thereby reducing the accuracy of the system's abnormality detection. Summary of the invention

[0004] Based on this, it is necessary to provide an image recognition method, device, computer equipment, computer-readable storage medium and computer program product for substation scenarios that can improve the accuracy of anomaly detection in response to the above technical problems.

[0005] In a first aspect, the present application provides an image recognition method applied to a power transformation scenario, comprising:

[0006] Acquire actual detection images of the target substation scene within a reference time period;

[0007] Performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set;

[0008] The enhanced sample image set is used to train the pre-trained feature contrast model to obtain a target recognition model;

[0009] The target recognition model is used to perform image recognition on the target substation scene.

[0010] In one embodiment, the text enhancement processing is performed on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images to obtain an enhanced sample image set, including:

[0011] Inputting the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and a foreignized text field;

[0012] Generate an assimilated sample image according to the assimilated text field and the actual detection image;

[0013] Generate an alienated sample image according to the alienated text field and the actual detection image;

[0014] The assimilated sample images and the alienated sample images are combined into an enhanced sample image set.

[0015] In one embodiment, the text enhancement model includes a text generation sub-model; and the step of acquiring the corresponding preset text field according to the actual detection image includes:

[0016] Matching the corresponding preset text field according to the actual detected image;

[0017] In the absence of the preset text field matching the actual detection image, acquiring image features of the actual detection image;

[0018] The image features are input into the text generation sub-model to obtain the preset text field.

[0019] In one embodiment, the method of using the enhanced sample image set to train a pre-trained feature contrast model to obtain a target recognition model includes:

[0020] Determine every two assimilated sample images as a positive sample pair;

[0021] Determine each of the alienated sample images and one of the assimilated sample images as a negative sample pair;

[0022] The pre-trained feature comparison model is trained using a plurality of the positive sample pairs and a plurality of the negative sample pairs to obtain a target recognition model.

[0023] In one embodiment, the step of acquiring an actual detection image of a target substation scene within a reference time period includes:

[0024] Obtaining a preset monitoring period, and determining a reference time period according to the preset monitoring period;

[0025] Obtain monitoring images of the target substation scene;

[0026] According to the reference time period, a portion of the monitoring image is captured as an actual detection image.

[0027] In one embodiment, after using the target recognition model to perform image recognition on the target substation scene, the method further includes:

[0028] The preset monitoring period is modified according to the image recognition result of the target substation scene.

[0029] In a second aspect, the present application also provides an image recognition device applied to a power transformation scenario, comprising:

[0030] An image acquisition module is used to acquire an actual detection image of a target substation scene within a reference time period;

[0031] A text enhancement module, used for performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image, generating a plurality of enhanced sample images, and obtaining an enhanced sample image set;

[0032] A contrast training module, used to train a pre-trained feature contrast model using the enhanced sample image set to obtain a target recognition model;

[0033] An image recognition module is used to use the target recognition model to perform image recognition on the target substation scene.

[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0035] Acquire actual detection images of the target substation scene within a reference time period;

[0036] Performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set;

[0037] The enhanced sample image set is used to train the pre-trained feature contrast model to obtain a target recognition model;

[0038] The target recognition model is used to perform image recognition on the target substation scene.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0040] Acquire actual detection images of the target substation scene within a reference time period;

[0041] Performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set;

[0042] The enhanced sample image set is used to train the pre-trained feature contrast model to obtain a target recognition model;

[0043] The target recognition model is used to perform image recognition on the target substation scene.

[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0045] Acquire actual detection images of the target substation scene within a reference time period;

[0046] Performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set;

[0047] The enhanced sample image set is used to train the pre-trained feature contrast model to obtain a target recognition model;

[0048] The target recognition model is used to perform image recognition on the target substation scene.

[0049] The above-mentioned image recognition method, device, computer equipment, storage medium and computer program product applied to the substation scene, by acquiring the actual detection image of the target substation scene within the reference time period, performing text enhancement processing on the actual detection image, can generate multiple enhanced sample images according to the preset text field and the actual detection image, and obtain an enhanced sample image set. At this time, the enhanced text image set is associated with the actual detection image of the target substation scene. Since the enhanced sample image set is generated according to the preset text field, the number and types of enhanced sample images can be increased by controlling the setting of the preset text field, thereby ensuring the diversity of samples. Next, the pre-trained feature comparison model is trained using the enhanced sample image set to obtain a target recognition model. The target recognition model is used to perform image recognition on the target substation scene, which can improve the accuracy of anomaly detection in the target substation scene when the sample images provided by the actual detection image are insufficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 An application environment diagram of an image recognition method applied to a power transformation scenario in an embodiment;

[0052] Figure 2 A schematic diagram of a flow chart of an image recognition method applied to a power transformation scenario in an embodiment;

[0053] Figure 3 This is a flow chart of step S204 of an image recognition method applied to a power transformation scenario in an embodiment;

[0054] Figure 4 is a structural block diagram of an image recognition device applied to a power transformation scenario in an embodiment;

[0055] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0056] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] The image recognition method applied to the power transformation scene provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, the terminal 102 can be used to obtain the actual detection image, and send the actual detection image to the server 104, the terminal 102 can be used to obtain the preset text field, and send the preset text field to the server 104, so as to store and store in the data storage system, the terminal 102 can also be used to receive the recognition result of the server 104, and output and display the recognition result. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store preset text fields, and can be used to store data such as the actual detection image and the corresponding enhanced sample image set. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0059] In an exemplary embodiment, Figure 2 As shown, an image recognition method applied to a power transformation scene is provided. Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:

[0060] Step S202, obtaining an actual detection image of the target substation scene within a reference time period.

[0061] The actual detection image is used to show the actual situation on site in the target substation scene. In different reference time periods, the on-site situation of the target substation scene is different, and the elements in the actual detection image are also different.

[0062] For example, the server 104 can obtain the monitoring video of the target substation scene from the terminal 102, and then capture the video image within the reference time period from the monitoring video, and use the video image as the actual detection image. Further, in order to ensure the validity of the image data, the monitoring video images captured by the terminal 102 can all be subjected to standard pre-processing steps, such as denoising, grayscale, size normalization, etc., to ensure the consistency of the image input.

[0063] Furthermore, the server 104 may obtain a preset monitoring cycle, determine a reference time period according to the preset monitoring cycle, obtain a monitoring image of the target substation scene, and capture a portion of the monitoring image as an actual detection image according to the reference time period.

[0064] Step S204, performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image, generating a plurality of enhanced sample images, and obtaining an enhanced sample image set.

[0065] Among them, the actual detection image may include standard monitoring screen images and abnormal elements. When an abnormality occurs in the target substation scene, the standard monitoring screen image will include abnormal elements, among which the abnormal elements may include flames, damage, intrusion of moving objects, etc.

[0066] For example, the server 104 may pre-set multiple preset text fields describing abnormal elements, extract multiple preset text fields describing normal elements from the standard monitoring screen image, perform text enhancement processing on the actual detection image according to the preset text fields and the actual detection image, and guide the standard monitoring screen image corresponding to the actual detection image to generate enhanced sample images associated with each preset text field. When the number of preset sample images is larger and the types are richer, the obtained enhanced sample image set will be more comprehensive.

[0067] Step S206, using the enhanced sample image set to train the pre-trained feature comparison model to obtain a target recognition model.

[0068] The preset text fields include assimilated text fields and alienated text fields. The enhanced sample images generated according to the assimilated text fields are assimilated sample images; and the enhanced sample images generated according to the alienated text fields are alienated sample images.

[0069] Exemplarily, after generating diverse normal and abnormal images, the server 104 can use these images for contrastive learning. Contrastive learning is an unsupervised learning method that aims to learn useful feature representations by comparing the similarities and differences between different samples. First, the server 104 can use a pre-trained deep neural network (Transformer) to extract feature vectors from the generated normal and abnormal images. For each pair of images (normal and abnormal), the extracted feature vectors represent their positions in the feature space. In contrastive learning, each sample pair consists of a "positive sample pair" and one or more "negative sample pairs". A positive sample pair refers to two similar image pairs, such as a normal image of the same scene and an image generated by assimilating a text field; a negative sample pair is two Contrastive loss functions are the most common in contrastive learning, and their goal is to minimize the distance between positive sample pairs while maximizing the distance between negative sample pairs. Its mathematical expression is:

[0070]

[0071] in, It is The distance between pairs of samples, is a binary label indicating whether the sample pair is similar. is a predefined threshold that controls the minimum distance between pairs of negative samples. In feature space, the similarity between positive and negative pairs is measured by calculating the distance between their feature vectors. The goal is to bring the distance between positive pairs closer while keeping the distance between negative pairs as far apart as possible. This process helps the model learn feature representations that effectively distinguish normal and abnormal images.

[0072] Exemplarily, the server 104 may determine every two assimilated sample images as a positive sample pair, and each alienated sample image and one assimilated sample image as a negative sample pair, and use multiple positive sample pairs and multiple negative sample pairs to train the pre-trained feature comparison model to obtain a target recognition model.

[0073] Step S208: Use the target recognition model to perform image recognition on the target substation scene.

[0074] For example, the server 104 may also modify the preset monitoring period according to the image recognition result of the target substation scene. If the image recognition result indicates that an abnormality currently exists, the server 104 may adjust the preset monitoring period according to the abnormality level indicated by the recognition result, thereby increasing the monitoring frequency.

[0075] In the above-mentioned image recognition method applied to substation scenarios, by acquiring the actual detection image of the target substation scene within a reference time period, text enhancement processing is performed on the actual detection image, and multiple enhanced sample images can be generated according to the preset text field and the actual detection image to obtain an enhanced sample image set. At this time, the enhanced text image set is associated with the actual detection image of the target substation scene. Since the enhanced sample image set is generated according to the preset text field, the number and types of enhanced sample images can be increased by controlling the setting of the preset text field, thereby ensuring the diversity of samples. Next, the pre-trained feature comparison model is trained using the enhanced sample image set to obtain a target recognition model. The target recognition model is used to perform image recognition on the target substation scene. In this way, in the target substation scenario, when the sample images provided by the actual detection image are insufficient, the accuracy of anomaly detection can be improved.

[0076] In an exemplary embodiment, Figure 3 As shown, step S204 includes steps S302 to S306. Among them:

[0077] Step S302: input the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image.

[0078] Among them, the preset text fields include assimilated text fields and alienated text fields. Among them, the assimilated text field refers to the text description that guides the standard monitoring screen image to generate diversified images under normal conditions, such as "the light becomes brighter or darker", "the season changes to spring, summer, autumn, winter", "add clouds, rain, fog", etc. These text descriptions do not change the fundamental nature of the image, but increase the diversity of the image by changing the environment or visual conditions. The assimilated text field refers to the text description that guides the standard monitoring screen image to generate abnormal images, such as "add flames", "add damage", "small animals appear", etc. These descriptions directly simulate abnormal situations, thereby converting normal images into abnormal images.

[0079] Exemplarily, the text enhancement model may include a text generation sub-model. The server 104 may match the corresponding preset text field according to the actual detection image; if there is no preset text field matching the actual detection image, obtain the image features of the actual detection image; and input the image features into the text generation sub-model to obtain the preset text field.

[0080] Step S304: generating an assimilated sample image according to the assimilated text field and the actual detection image, and generating an alienated sample image according to the alienated text field and the actual detection image.

[0081] Exemplarily, the server 104 can use prompt-to-prompt technology to generate assimilated text images and alienated text images. For normal images, multiple images under normal conditions are generated through the guidance of the assimilated text field. These images show different environments or visual changes while maintaining the normal state, thereby increasing the diversity of samples. Through the guidance of the alienated text field, the normal image is converted into an abnormal image, thereby generating a large number of images simulating abnormal conditions. These generated abnormal images together with the original abnormal images constitute a more balanced abnormal image set.

[0082] Step S306: Combining the assimilated sample images and the alienated sample images into an enhanced sample image set.

[0083] Exemplarily, the server 104 may store the generated assimilated sample images and alienated sample images in correspondence with the target substation scene to obtain an enhanced sample image set.

[0084] In another exemplary embodiment, the server 104 obtains an actual detection image of the target substation scene within a reference time period, obtains a preset monitoring period, and determines a reference time period according to the preset monitoring period, obtains a monitoring image of the target substation scene, and then intercepts a portion of the image in the monitoring image as the actual detection image according to the reference time period. Next, the server 104 matches the corresponding preset text field according to the actual detection image, obtains the image features of the actual detection image when there is no preset text field matching the actual detection image, inputs the image features into the text generation submodel, and obtains the preset text field. The server 104 generates an assimilated sample image according to the assimilated text field and the actual detection image; generates an alienated sample image according to the alienated text field and the actual detection image; and combines the assimilated sample image and the alienated sample image into an enhanced sample image set.

[0085] Subsequently, the server 104 determines every two assimilated sample images as a positive sample pair; determines every alienated sample image and one assimilated sample image as a negative sample pair; uses multiple positive sample pairs and multiple negative sample pairs to train the pre-trained feature comparison model to obtain a target recognition model. Finally, the target recognition model is used to perform image recognition on the target substation scene, obtain a recognition result, and output the result through the terminal 102.

[0086] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0087] Based on the same inventive concept, the embodiment of the present application also provides an image recognition device applied to a substation scene for implementing the above-mentioned image recognition method applied to a substation scene. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the image recognition device applied to a substation scene provided below can refer to the limitations of the image recognition method applied to a substation scene above, and will not be repeated here.

[0088] In an exemplary embodiment, Figure 4 As shown, an image recognition device applied to a power transformation scenario is provided, comprising: an image acquisition module 402, a text enhancement module 404, a comparison training module 406 and an image recognition module 408, wherein:

[0089] An image acquisition module 402 is used to acquire an actual detection image of a target substation scene within a reference time period;

[0090] The text enhancement module 404 is used to perform text enhancement processing on the actual detection image, generate multiple enhanced sample images according to the preset text field and the actual detection image, and obtain an enhanced sample image set;

[0091] A contrast training module 406 is used to train the pre-trained feature contrast model using the enhanced sample image set to obtain a target recognition model;

[0092] The image recognition module 408 is used to perform image recognition on the target substation scene using a target recognition model.

[0093] In one embodiment, the text enhancement module 404 includes:

[0094] A text generation unit, used for inputting the actual detection image into the text enhancement model to obtain a corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and an alienated text field;

[0095] An image generation unit, used to generate an assimilated sample image according to the assimilated text field and the actual detection image; and to generate an alienated sample image according to the alienated text field and the actual detection image;

[0096] The image combining unit is used to combine the assimilated sample images and the alienated sample images into an enhanced sample image set.

[0097] In one embodiment, the text enhancement model includes a text generation sub-model; the text generation unit is specifically used to: match the corresponding preset text field according to the actual detection image; in the absence of a preset text field matching the actual detection image, obtain image features of the actual detection image; input the image features into the text generation sub-model to obtain the preset text field.

[0098] In one embodiment, the contrast training module 406 is specifically used to: determine every two assimilated sample images as a positive sample pair; determine each alienated sample image and one assimilated sample image as a negative sample pair; use multiple positive sample pairs and multiple negative sample pairs to train the pre-trained feature contrast model to obtain a target recognition model.

[0099] In one embodiment, the image acquisition module 402 is specifically used to: obtain a preset monitoring cycle and determine a reference time period based on the preset monitoring cycle; obtain a monitoring image of the target substation scene; and capture a portion of the monitoring image as an actual detection image based on the reference time period.

[0100] In one of the embodiments, the device is also used to: modify the preset monitoring period according to the image recognition result of the target substation scene.

[0101] Each module in the above-mentioned image recognition device applied to the substation scene can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0102] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store preset text fields, which can be used to store data such as actual detection images and corresponding enhanced sample image sets. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image recognition method applied to a substation scene is implemented.

[0103] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image recognition method applied to a substation scene is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0104] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0105] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: acquiring an actual detection image of a target substation scene within a reference time period; performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image to generate a plurality of enhanced sample images to obtain an enhanced sample image set; using the enhanced sample image set to train a pre-trained feature contrast model to obtain a target recognition model; and using the target recognition model to perform image recognition on the target substation scene.

[0106] In one embodiment, when the processor executes the computer program, the following steps are also implemented: inputting the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and an alienated text field; generating an assimilated sample image according to the assimilated text field and the actual detection image; generating an alienated sample image according to the alienated text field and the actual detection image; and combining the assimilated sample image and the alienated sample image into an enhanced sample image set.

[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: matching the corresponding preset text field according to the actual detection image; in the absence of a preset text field matching the actual detection image, obtaining image features of the actual detection image; inputting the image features into the text generation sub-model to obtain the preset text field.

[0108] In one embodiment, when the processor executes the computer program, the following steps are also implemented: every two assimilated sample images are determined as a positive sample pair; each alienated sample image and an assimilated sample image are determined as a negative sample pair; and a pre-trained feature comparison model is trained using multiple positive sample pairs and multiple negative sample pairs to obtain a target recognition model.

[0109] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining a preset monitoring cycle and determining a reference time period based on the preset monitoring cycle; obtaining a monitoring image of the target substation scene; and based on the reference time period, capturing part of the monitoring image as an actual detection image.

[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the preset monitoring period is corrected according to the image recognition result of the target substation scene.

[0111] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining an actual detection image of a target substation scene within a reference time period; performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image, generating multiple enhanced sample images, and obtaining an enhanced sample image set; using the enhanced sample image set to train a pre-trained feature contrast model to obtain a target recognition model; using the target recognition model, performing image recognition on the target substation scene.

[0112] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inputting the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and an alienated text field; generating an assimilated sample image according to the assimilated text field and the actual detection image; generating an alienated sample image according to the alienated text field and the actual detection image; and combining the assimilated sample image and the alienated sample image into an enhanced sample image set.

[0113] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: matching the corresponding preset text field according to the actual detection image; in the absence of a preset text field that matches the actual detection image, obtaining image features of the actual detection image; inputting the image features into a text generation sub-model to obtain a preset text field.

[0114] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: every two assimilated sample images are determined as a positive sample pair; each alienated sample image and an assimilated sample image are determined as a negative sample pair; and a pre-trained feature comparison model is trained using multiple positive sample pairs and multiple negative sample pairs to obtain a target recognition model.

[0115] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining a preset monitoring cycle and determining a reference time period based on the preset monitoring cycle; obtaining a monitoring image of the target substation scene; and based on the reference time period, capturing part of the monitoring image as an actual detection image.

[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the preset monitoring period is modified according to the image recognition result of the target substation scene.

[0117] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: acquiring an actual detection image of a target substation scene within a reference time period; performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image, generating a plurality of enhanced sample images, and obtaining an enhanced sample image set; using the enhanced sample image set to train a pre-trained feature contrast model to obtain a target recognition model; and using the target recognition model to perform image recognition on the target substation scene.

[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inputting the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and an alienated text field; generating an assimilated sample image according to the assimilated text field and the actual detection image; generating an alienated sample image according to the alienated text field and the actual detection image; and combining the assimilated sample image and the alienated sample image into an enhanced sample image set.

[0119] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: matching the corresponding preset text field according to the actual detection image; in the absence of a preset text field that matches the actual detection image, obtaining image features of the actual detection image; inputting the image features into a text generation sub-model to obtain a preset text field.

[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: every two assimilated sample images are determined as a positive sample pair; each alienated sample image and an assimilated sample image are determined as a negative sample pair; and a pre-trained feature comparison model is trained using multiple positive sample pairs and multiple negative sample pairs to obtain a target recognition model.

[0121] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining a preset monitoring cycle and determining a reference time period based on the preset monitoring cycle; obtaining a monitoring image of the target substation scene; and based on the reference time period, capturing part of the monitoring image as an actual detection image.

[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the preset monitoring period is modified according to the image recognition result of the target substation scene.

[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image recognition method applied to a power transformation scene, characterized in that: The method comprises: Acquire actual detection images of the target substation scene within a reference time period; Performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set; The enhanced sample image set is used to train the pre-trained feature contrast model to obtain a target recognition model; The target recognition model is used to perform image recognition on the target substation scene.

2. The method according to claim 1, characterized in that The step of performing text enhancement processing on the actual detection image according to the preset text field and the actual detection image to generate a plurality of enhanced sample images and obtain an enhanced sample image set includes: Inputting the actual detection image into the text enhancement model to obtain the corresponding preset text field according to the actual detection image; wherein the preset text field includes an assimilated text field and a foreignized text field; Generate an assimilated sample image according to the assimilated text field and the actual detection image; Generate an alienated sample image according to the alienated text field and the actual detection image; The assimilated sample images and the alienated sample images are combined into an enhanced sample image set.

3. The method according to claim 2, characterized in that The text enhancement model includes a text generation sub-model; the step of acquiring the corresponding preset text field according to the actual detection image includes: Matching the corresponding preset text field according to the actual detected image; In the absence of the preset text field matching the actual detection image, acquiring image features of the actual detection image; The image features are input into the text generation sub-model to obtain the preset text field.

4. The method according to claim 2, characterized in that: The method of using the enhanced sample image set to train the pre-trained feature contrast model to obtain a target recognition model includes: Determine every two assimilated sample images as a positive sample pair; Determine each of the alienated sample images and one of the assimilated sample images as a negative sample pair; The pre-trained feature comparison model is trained using a plurality of the positive sample pairs and a plurality of the negative sample pairs to obtain a target recognition model.

5. The method according to any one of claims 1 to 4, characterized in that: The step of acquiring an actual detection image of a target substation scene within a reference time period includes: Obtaining a preset monitoring period, and determining a reference time period according to the preset monitoring period; Obtain monitoring images of the target substation scene; According to the reference time period, a portion of the monitoring image is captured as an actual detection image.

6. The method according to claim 5, characterized in that After the target recognition model is used to perform image recognition on the target substation scene, the method further includes: The preset monitoring period is modified according to the image recognition result of the target substation scene.

7. An image recognition device applied to a power transformation scene, characterized in that: The device comprises: An image acquisition module is used to acquire an actual detection image of a target substation scene within a reference time period; A text enhancement module, used for performing text enhancement processing on the actual detection image according to a preset text field and the actual detection image, generating a plurality of enhanced sample images, and obtaining an enhanced sample image set; A contrast training module, used to train a pre-trained feature contrast model using the enhanced sample image set to obtain a target recognition model; An image recognition module is used to use the target recognition model to perform image recognition on the target substation scene.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.