Data comparison method, data comparison device, monitoring system and electronic device

By using feature similarity comparison method in the monitoring system, the frame number interval and similarity score of audio and video files are obtained, and the problem of poor scoring flexibility of audio and video files in different application scenarios is solved, and a more accurate and flexible scoring process is achieved.

CN118861709BActive Publication Date: 2025-01-03ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411346707.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-03
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The existing technology has poor flexibility and high difficulty in data analysis and scoring audio and video files generated in different application scenarios, and has limited ability to recognize props.

Method used

Provide a data comparison method, by obtaining the source material of the target scoring scene selected by the user and the files to be compared in this scenario generated by the monitoring system, using feature similarity comparison to obtain similarity score results, including determining the frame number interval , frame-by-frame feature comparison, weighted summing to achieve scoring.

Benefits of technology

It improves the flexibility of data analysis and scoring of audio and video files in different application scenarios, reduces the difficulty of analysis, and enhances the ability to accurately compare and score comparison files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118861709B_ABST
    Figure CN118861709B_ABST
Patent Text Reader

Abstract

The present application relates to a data comparison method, a data comparison device, a monitoring system and an electronic device, wherein the data comparison method comprises: in the case where the source material is a first file format of continuous multiple frames, determining the first frame number interval corresponding to the frame data to be compared in the source material; performing feature similarity comparison frame by frame between the frame data to be compared and each frame of material data in the first frame number interval, obtaining the highest similarity value corresponding to the frame data to be compared, and the highest similarity frame corresponding to the highest similarity value in the source material, and then obtaining the similarity scoring result between the file to be compared and the source material. It can perform accurate similarity comparison and similarity scoring for the source material and the file to be compared in different scenarios selected by the user, thereby improving the flexibility of data analysis and scoring of the files to be compared in different application scenarios and reducing the difficulty of analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio and video data analysis, and in particular to a data comparison method, a data comparison device, a monitoring system and an electronic device. Background Art

[0002] With the widespread use of security cameras in home environments, security products are not only used for security monitoring, but also gradually being discovered for their potential value in entertainment, education and self-improvement. For example, security monitoring equipment is used to record audio and video in various hobby scenes, such as ball games, dance, painting and even experimental teaching. In such scenes, how to concisely and objectively judge the works recorded by security monitoring equipment has become a key challenge that needs to be solved urgently.

[0003] At present, in the relevant technology, the level of ski slalom in skiing scenes is evaluated using key evaluation indicators based on the human kinematic parameters obtained by monocular video acquisition and analysis. This method requires powerful computing power and storage resources, and is not suitable for application scenarios where kinematic parameters cannot be extracted. Alternatively, human key points are extracted from human action images to score human actions. This method requires manual selection of action categories, and there is a possibility of missing certain types of actions. It also requires providing information on the image acquisition angle and position, which will increase the difficulty of use for users. It is mainly aimed at human features, and has limited recognition capabilities for props.

[0004] With regard to the problem in related technologies that data analysis and scoring of audio and video files generated in different application scenarios is relatively inflexible and difficult, no effective solution has been proposed so far. Summary of the invention

[0005] In this embodiment, a data comparison method, a data comparison device, a monitoring system and an electronic device are provided to solve the problem of poor flexibility and high difficulty in data analysis and scoring of audio and video files generated in different application scenarios in the related art.

[0006] In a first aspect, a data comparison method is provided in this embodiment for use in a monitoring system, the method comprising:

[0007] Acquire a source material for a target scoring scene selected by a user, and a file to be compared generated by a camera of the monitoring system under the target scoring scene; the file format of the source material is consistent with that of the file to be compared;

[0008] In the case where the source material is a first file format of multiple consecutive frames, each frame data in the to-be-compared file is successively used as the to-be-compared frame data, and a first frame number interval corresponding to the to-be-compared frame data in the source material is determined; the first frame number interval is determined based on the frame number of the to-be-compared frame data and a preset interval length;

[0009] Performing feature similarity comparison frame by frame between the frame data to be compared and each frame of material data in the first frame number interval, to obtain a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value;

[0010] A similarity score result between the file to be compared and the source material is obtained according to the highest similarity value and the highest similarity frame corresponding to each frame of data of the file to be compared.

[0011] In some embodiments, the preset interval length is a preset multiple of the source material frame rate; the frame number of the starting frame of the first frame number interval is the frame number of the frame data to be compared.

[0012] In some embodiments, the frame data to be compared is subjected to feature similarity comparison frame by frame with each frame of material data in the first frame number interval, and a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value are obtained, including:

[0013] Determine a first characteristic floating point value of the frame data to be compared;

[0014] Determine a second characteristic floating point value of each frame of material data within the first frame number interval;

[0015] Performing similarity comparison between the first characteristic floating-point value and the second characteristic floating-point value of each frame of material data frame by frame, to obtain a similarity value between the second characteristic floating-point value and the first characteristic floating-point value of each frame of material data;

[0016] A highest similarity value is determined from all the similarity values, and a highest similarity frame in the source material corresponding to the highest similarity value is determined.

[0017] In some embodiments, obtaining a similarity score result between the file to be compared and the source material according to the highest similarity value and the highest similarity frame corresponding to each frame of data of the file to be compared includes:

[0018] Determine the initial score level interval of each frame of the file to be compared according to the frame number of the highest similar frame;

[0019] Determine the initial scoring result of each frame of data in the file to be compared according to the initial score level interval of each frame of data in the file to be compared and the corresponding highest similarity value;

[0020] According to the initial scoring result of each frame of data of the file to be compared, a similarity scoring result between the file to be compared and the source material is obtained.

[0021] In some embodiments, determining the initial score level interval of each frame of the file to be compared according to the frame number of the most similar frame includes:

[0022] Acquire a plurality of pre-divided second frame number intervals;

[0023] According to the frame number of the highest similar frame, determining, from a plurality of second frame number intervals, a target frame number interval into which the highest similar frame falls;

[0024] According to the target frame number interval and a preset level mapping relationship, an initial score level interval corresponding to each frame of data in the file to be compared is determined; the level mapping relationship includes a correspondence between different second frame number intervals and different initial score level intervals.

[0025] In some embodiments, determining the initial scoring result of each frame of data in the to-be-compared file according to the initial score level interval of each frame of data in the to-be-compared file and the corresponding highest similarity value includes:

[0026] Determine the initial score of each frame of data in the to-be-compared file according to the upper and lower limits of the initial score level interval of each frame of data in the to-be-compared file;

[0027] According to the preset weight distribution, the initial score and the corresponding highest similarity value are weighted and summed to obtain the initial scoring result of each frame of data in the file to be compared.

[0028] In some embodiments, the method further comprises:

[0029] When the source material is in a second file format representing a picture material, obtaining an optimal picture to be compared that is pre-selected from the file to be compared;

[0030] The source material and the optimal image to be compared are compared for feature similarity, and the comparison result is mapped into a similarity score result of the file to be compared.

[0031] In a second aspect, a data comparison device is provided in this embodiment for use in a monitoring system. The device includes: an acquisition module, a comparison data determination module, a frame-by-frame comparison module, and a similarity scoring module; wherein:

[0032] The acquisition module is used to acquire the source material for the target scoring scene selected by the user, and the file to be compared generated by the camera of the monitoring system under the target scoring scene; the file format of the source material is consistent with that of the file to be compared;

[0033] The comparison data determination module is used to, when the source material is a first file format of multiple consecutive frames, successively use each frame data in the to-be-compared file as the to-be-compared frame data, and determine a first frame number interval in the source material corresponding to the to-be-compared frame data; the first frame number interval is determined based on the frame number of the to-be-compared frame data and a preset interval length;

[0034] The frame-by-frame comparison module is used to perform feature similarity comparison between the frame data to be compared and each frame of material data in the first frame number interval frame by frame to obtain a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value;

[0035] The similarity scoring module is used to obtain a similarity scoring result between the file to be compared and the source material according to the highest similarity value and the highest similarity frame corresponding to each frame of data of the file to be compared.

[0036] In a third aspect, a monitoring system is provided in this embodiment, including: a camera and a server; wherein the camera is connected to the server;

[0037] The camera is used to generate a file to be compared in a target scoring scenario based on an instruction input by a user;

[0038] The server is used to execute the data comparison method described in the first aspect above.

[0039] In a fourth aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data comparison method described in the first aspect when executing the computer program.

[0040] Compared with the related art, the present embodiment provides a data comparison method, a data comparison device, a monitoring system and an electronic device. The data comparison method obtains the source material selected by the user for the target scoring scene, and the file to be compared generated by the camera of the monitoring system in the target scoring scene; the file format of the source material is consistent with that of the file to be compared; when the source material is a first file format of multiple consecutive frames, each frame data in the file to be compared is successively used as the frame data to be compared, and the first frame number interval corresponding to the frame data to be compared in the source material is determined; the first frame number interval is determined based on the frame number of the frame data to be compared and the preset interval length; the frame data to be compared is compared with each frame of material data in the first frame number interval frame by frame for feature similarity, and the highest similarity value corresponding to the frame data to be compared and the highest similarity frame corresponding to the highest similarity value in the source material are obtained; according to the highest similarity value and the highest similarity frame corresponding to each frame data of the file to be compared, the similarity score result of the file to be compared and the source material is obtained. It performs frame-by-frame feature similarity comparison between the files to be compared collected by the security camera in real time and the source materials imported into the monitoring system within a certain range, and performs comparison scoring based on the comparison results. This enables accurate similarity comparison and similarity scoring between the source materials and files to be compared in different scenarios selected by the user, improving the flexibility of data analysis and scoring of files to be compared in different application scenarios and reducing the difficulty of analysis.

[0041] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 is a hardware structure block diagram of a terminal of the data comparison method of this embodiment;

[0044] Figure 2 Flow chart of the data comparison method of this embodiment;

[0045] Figure 3 is a flow chart of a data comparison method in some embodiments;

[0046] Figure 4 is a flow chart of a source material importing method provided by some embodiments;

[0047] Figure 5 is a flow chart of a source material analysis method provided by some embodiments;

[0048] Figure 6is a flow chart of a method for collecting files to be compared provided in some embodiments;

[0049] Figure 7 is a flow chart of a method for comparing feature similarity between source material and a file to be compared in some embodiments;

[0050] Figure 8 is a flow chart of a similarity scoring method of some of the embodiments;

[0051] Fig. 9 is a flow chart of a scoring result broadcasting method in some embodiments;

[0052] Fig.10 is a flow chart of a method for integrating works of some of the embodiments;

[0053] Fig.11 is a structural block diagram of the data comparison device of this embodiment;

[0054] Fig.12 Schematic diagram of the structure of the monitoring system of this embodiment. DETAILED DESCRIPTION

[0055] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0056] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0057] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the data comparison method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0058] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data comparison method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0059] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0060] In this embodiment, a data comparison method is provided. Figure 2 is a flow chart of the data comparison method of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0061] Step S210, obtaining the source material for the target scoring scene selected by the user and the file to be compared generated by the camera of the monitoring system in the target scoring scene; the file format of the source material is consistent with that of the file to be compared.

[0062] Specifically, the monitoring system may include a camera with an image acquisition function and a server with a data analysis and processing function. Users can use terminal devices such as mobile phones and tablets to bind to the monitoring system through installed applications (APP). Users can open the APP operation interface on the terminal and import the required source materials from it; or, users can also use the interactive interface provided by the monitoring system to inform the monitoring system of the required source materials by voice intercom, interface touch, etc., and the monitoring system downloads the corresponding source materials based on the user's instructions. This embodiment does not specifically limit the way in which users select source materials.

[0063] The target scoring scene can be any activity scene specified by the user that needs to analyze and score the user's behavior, such as a ball game scene, a dance scene, a painting scene, or an experimental teaching scene. The source material under the target scoring scene can specifically be the standard material that can be used as a scoring reference under the target scoring scene specified by the user. For example, if the user needs to judge whether a set of badminton swinging movements is standard, the badminton sports scene can be used as the target scoring scene, and the video of a selected set of badminton swinging teaching movements can be used as the source material under the target scoring scene and imported into the monitoring system.

[0064] The monitoring system can extract the duration, frame rate and characteristic floating-point value of each frame of the source material based on the intelligent analysis technology of the data. The characteristic floating-point value can be the characteristic floating-point value of the target identified by the monitoring system from the source material, and the target attribute characteristic value is extracted and output by processing the source material in the corresponding feature recognition algorithm. For example, the characteristic floating value can be the floating-point value of the color feature, the floating-point value of the texture feature and the floating-point value of the shape feature.

[0065] After receiving the source material selected by the user, the monitoring system will first determine the file format of the source material. The file format of the source material can be the first file format of continuous multiple frames, which can be a video format or an audio format; it can also be a picture format. When the source material is in picture format, the characteristic floating point value can be directly extracted based on the image recognition algorithm, recorded as SRC_F; when the source material is in video or audio format, the total duration of the source material is extracted, recorded as SRC_t, and the frame rate SRC_fps.

[0066] Afterwards, the monitoring system can prompt the user to issue an instruction to start making a work through the above-mentioned APP or the interactive interface with the user. After receiving the instruction issued by the user's voice or APP, such as receiving the instructions of "start making", "start recording", "restart", etc., the camera of the monitoring system will record the start time as t0, and start capturing or recording audio or images to generate the file to be compared in the target scoring scenario.

[0067] In particular, if the source material is in picture format, that is, the second file format, then based on the user's choice, the best picture DST_P among the files to be compared can be determined to be saved, or based on a preset screening mechanism (picture quality assessment, clarity, etc.), the best picture DST_P can be screened out from the files to be compared and saved; if the source material is in video format or audio format, that is, the first file format, then based on the total duration of the source material (for example, in minutes) SRC_t combined with the start time t0 of the camera acquisition, and 5 seconds before the recording duration reaches SRC_t, a voice reminder of "acquisition is about to be completed" is broadcast, and then the recording data DST_V from the start time t0 to SRC_t is intercepted.

[0068] Step S220, when the source material is in the first file format of multiple continuous frames, each frame data in the file to be compared is used as the frame data to be compared, and the first frame number interval corresponding to the frame data to be compared in the source material is determined; the first frame number interval is determined based on the frame number of the frame data to be compared and a preset interval length.

[0069] When the source material is in the first file format, the source material and the generated file to be compared can be respectively excluded from the redundant data of the previous frame, and then the source material and the file to be compared can be compared for similarity. Exemplarily, in video or audio processing, key frames that can represent content changes in a video sequence or an audio sequence can be extracted. By extracting key frames, redundant frames with little content change can be removed, thereby reducing redundant information in the video data or audio data. For example, for video formats, by analyzing the content changes of video frames, such as color, texture, shape and other features, frames that can represent the main content of the video can be extracted as key frames, and redundant frames can be removed.

[0070] When performing the comparison, a frame of data that needs to be compared in the file to be compared can be used as the current frame data to be compared. According to the frame number of the current frame data to be compared, the first frame number interval to be compared with the current frame data to be compared is determined in the source material. It can be understood that the first frame number intervals corresponding to the frame data to be compared in different frames of the file to be compared are different in the source material. For example, when the first frame data (DST_F0) in the file to be compared is used as the frame data to be compared, the corresponding first frame number interval in the source material can be from the first frame (SRC_F0) to the SRC_F (3×SRC_fps) frame; wherein SRC_fps is the frame rate of the source material. That is, the first 3×SRC_fps frames are taken as the first frame number interval with the first frame data in the file to be compared. When the second frame data (DST_F1) in the file to be compared is used as the frame data to be compared, the corresponding first frame number interval in the source material will be shifted backward by 1 frame, which is SRC_F1 to SRC_F (3×SRC_fps+1). Similarly, when DST_Fn in the file to be compared is used as the frame data to be compared, the corresponding first frame number interval in the source material is SRC_Fn to SRC_F (3×SRC_fps+n). This continues until the last frame data of the source material or the file to be compared is compared. The starting frame and interval length of the above-mentioned first frame number interval can also be set to other values ​​based on the requirements of the actual application scenario, taking into account the accuracy of the comparison and the system resource overhead, and this embodiment does not specifically limit this.

[0071] Step S230, performing feature similarity comparison frame by frame between the frame data to be compared and each frame of material data in the first frame number interval, and obtaining the highest similarity value corresponding to the frame data to be compared and the highest similarity frame in the source material corresponding to the highest similarity value.

[0072] Specifically, after determining the first frame number interval corresponding to the current frame data to be compared, each frame of material data in the first frame number interval is subjected to feature similarity comparison frame by frame with the current frame data to be compared, and the highest similarity value and the corresponding highest similarity frame corresponding to the current frame data to be compared are determined. For example, the first frame data DST_F0 in the file to be compared is used as the frame data to be compared, and the feature floating point value DFT_Cf0 is extracted, and the feature floating point value extracted from each frame of material data in the first frame number interval (SRC_F0, SRC_F (3×SRC_fps)) in the corresponding source material is respectively compared for similarity, and the similarity value SRC_Fs0 with the highest similarity to the first frame data DST_F0 in the current first frame number interval and the frame SRC_Fm0 corresponding to the highest similarity value are recorded. Next, the characteristic floating-point value DFT_Cf1 of the second frame data DST_F1 in the file to be compared is compared with the characteristic floating-point value of each frame of material data in the corresponding first frame number interval (SRC_F1, SRC_F (3×SRC_fps+1)), that is, SRC_Cf1 to SRC_Cf (3×SRC_fps+1), and the similarity value SRC_Fs1 with the highest similarity to the second frame data DST_F1 and the frame SRC_Fm1 corresponding to the highest similarity value are recorded, and so on, until the comparison is completed for the last frame data of the file to be compared, or the last frame data of the source material.

[0073] Among them, for the highest similarity value SRC_Fs(n-1), it can be calculated based on the following formula:

[0074] SRC_Fs(n-1)=max(similarity(SRC_Cf(n-1),DST_Cf(i)))

[0075] Where i∈[SRC_fps, 3×SRC_fps+n-1]; n is the frame number index, indicating the nth frame data to be compared. Similarity(A, B) indicates the similarity value between the calculated data A and B.

[0076] After determining the highest similarity value, the highest similarity frame corresponding to the frame data to be compared in the source material can be directly determined according to the frame number corresponding to the highest similarity value. In addition, the highest similarity frame SRC_Fm(n-1) can also be determined based on the following formula:

[0077] SRC_Fm(n-1)=argmax(similarity(SRC_Cf(n-1),DST_Cf(i)))

[0078] Where, i∈[SRC_fps, 3×SRC_fps+n-1]; similarity(A, B) represents the similarity value between the calculated data A and B. DST_Cf(i) represents the characteristic floating-point value of the i-th frame DST_F. SRC_Cf(n-1) represents the characteristic floating-point value of the n-1-th frame of the source material. SRC_fps is the frame rate of the source material.

[0079] Step S240, obtaining a similarity score result between the file to be compared and the source material according to the highest similarity value and the highest similarity frame corresponding to each frame of data of the file to be compared.

[0080] Afterwards, the overall feature similarity between the file to be compared and the source material is scored based on the highest similarity value and the highest similarity frame corresponding to each frame of the file to be compared, and the similarity score result is obtained. The similarity score can be determined by the similarity value and the frame number of the highest similar frame. Exemplarily, the final similarity score result can be obtained based on the frame number interval in which the highest similar frame is located and the highest similarity value. The similarity score result represents the degree of similarity in data features between the file to be compared and the source material and the degree of consistency in data changes in different frames.

[0081] Understandably, from the application scenario, when the feature similarity between the file to be compared and the source material, and the consistency of data changes are higher, it means that the overall data features in the file to be compared are more consistent with the source material, and thus the content represented by the file to be compared is more consistent with the source material. For example, for ball sports scenes, if the similarity score between the file to be compared and the source material is higher, it means that the sports action performed by the user in the file to be compared is closer to the reference action in the source material.

[0082] Therefore, this embodiment realizes the integration of innovative technologies of intelligent analysis and scoring applications in multiple scenarios in the field of security monitoring through the above steps S210 to S240. Specifically, the monitoring system allows users to upload or search for source materials for comparison. In addition, the duration, frame rate and characteristic floating point value of each frame of the source material are accurately analyzed by using image recognition or audio recognition algorithms. Afterwards, according to the real-time operation of the user, the camera automatically captures and generates pictures, video clips or audio clips created by the user to obtain the files to be compared, and caches and stores them safely. It is particularly worth mentioning that the core of this embodiment is the intelligent data analysis of the files to be compared and the source materials, which can efficiently realize the feature similarity comparison between the source materials and the user-generated content, calculate the similarity value index and the highest similarity frame, and comprehensively evaluate the similarity score between the files to be compared and the source materials, so as to serve as the quality evaluation of the files to be compared by the users. The above process not only improves the user experience, but also enhances the intelligence level of the security monitoring system and the flexibility and richness of data analysis and scoring in the application scenarios, and reduces the difficulty of analyzing and scoring different application scenarios.

[0083] Optionally, in some of the embodiments, the similarity score results obtained can be fed back to the user in real time in the form of voice broadcast, message push, graphic prompt, etc. The user can select satisfactory partial data frames in the file to be compared as the final recording work to be generated according to the similarity score results received, and perform post-rendering and editing through the template service built into the APP, such as adding optional video special effects, scenes, filters and other templates pushed by the APP, merging and generating videos or pictures, and finally generating personalized video products for download, thereby further improving the user experience and the richness of applications under security monitoring.

[0084] In this embodiment, users are supported to select source materials independently, and according to user operations, user-created works are automatically collected as files to be compared. By intelligently analyzing the characteristic floating-point values ​​of the source materials and the files to be compared, accurate comparison of the two can be achieved. Therefore, it can adapt to different scoring scenarios and achieve accurate similarity scoring of the user's files to be compared and source materials. Finally, based on the received scoring results, users can independently decide whether to apply satisfactory works to the APP template service and perform professional-level rendering and production, thereby creating more attractive video content for users to download and use, enriching the user's creative space and possibilities.

[0085] In the above steps S210 to S240, the source material for the target scoring scene selected by the user and the file to be compared generated by the camera of the monitoring system under the target scoring scene are obtained; the file format of the source material is consistent with that of the file to be compared; when the source material is a first file format of multiple consecutive frames, each frame data in the file to be compared is used as the frame data to be compared in turn, and the first frame number interval corresponding to the frame data to be compared in the source material is determined; the first frame number interval is determined based on the frame number of the frame data to be compared and a preset interval length; the frame data to be compared is subjected to feature similarity comparison frame by frame with each frame of material data within the first frame number interval, and the highest similarity value corresponding to the frame data to be compared and the highest similarity frame corresponding to the highest similarity value in the source material are obtained; according to the highest similarity value and the highest similarity frame corresponding to each frame data of the file to be compared, the similarity scoring result between the file to be compared and the source material is obtained. It performs frame-by-frame feature similarity comparison between the files to be compared collected by the security camera in real time and the source materials imported into the monitoring system within a certain range, and performs comparison scoring based on the comparison results. This enables accurate similarity comparison and similarity scoring between the source materials and files to be compared in different scenarios selected by the user, improving the flexibility of data analysis and scoring of files to be compared in different application scenarios and reducing the difficulty of analysis.

[0086] In one embodiment, the preset interval length is a preset multiple of the source material frame rate; the frame number of the starting frame of the first frame number interval is the frame number of the frame data to be compared. When the file to be compared and the source material are both in the audio format or video format of multiple consecutive frames, it is necessary to compare the characteristic floating point value of each frame data in the file to be compared with the characteristic floating point value of the corresponding frame in the source material to achieve accurate feature comparison.

[0087] Since in actual application scenarios, the features of multiple consecutive frames of source material are difficult to align with the features of the file to be compared according to the granularity of the frame, a frame comparison window with a preset multiple frame rate can be set, that is, the above-mentioned first frame number interval, and the frame-by-frame comparison of features is performed within this interval. In particular, the preset multiple can be set to 3 times by balancing the overhead of system computing resources and the accuracy of the comparison results. That is, the length of the first frame number interval can be 3 times the frame rate of the source material. It can be understood that the preset multiple can also be taken as other multiples, a larger multiple means a larger system resource overhead, and a smaller multiple means the loss of feature values ​​with a higher degree of similarity. Therefore, the preset multiple can be adjusted according to the needs of the actual application scenario.

[0088] In addition, in one embodiment, based on the above step S230, the frame data to be compared is subjected to feature similarity comparison frame by frame with each frame of material data in the first frame number interval, and the highest similarity value corresponding to the frame data to be compared and the highest similarity frame corresponding to the highest similarity value in the source material are obtained, which may specifically include:

[0089] Determine the first characteristic floating-point value of the frame data to be compared; determine the second characteristic floating-point value of each frame of material data within the first frame number interval; perform similarity comparison between the first characteristic floating-point value and the second characteristic floating-point value of each frame of material data frame by frame to obtain the similarity value between the second characteristic floating-point value and the first characteristic floating-point value of each frame of material data; determine the highest similarity value from all the similarity values, and the highest similarity frame in the source material corresponding to the highest similarity value.

[0090] Specifically, by calculating the similarity between the first characteristic floating-point value of the current frame data to be compared and the second characteristic floating-point value of each frame of material data in the first frame number interval, the corresponding similarity values ​​are obtained, thereby calculating the highest similarity value in the first frame number interval, and then determining the highest similarity frame in the first frame number interval. The similarity calculation can be implemented by cosine similarity, mutual information, Hamming distance of hash values, histogram comparison, etc., which is not specifically limited in this embodiment.

[0091] In this embodiment, by performing similarity comparison between the first characteristic floating-point value of the frame data to be compared and the second characteristic floating-point value of each frame material data frame by frame, accurate data comparison can be achieved in different scoring scenarios, thereby improving the accuracy of determining the similarity score between the final file to be compared and the source material as a whole.

[0092] Additionally, in one embodiment, based on the above step S240, according to the highest similarity value and the highest similarity frame corresponding to each frame of the file to be compared, a similarity score result between the file to be compared and the source material is obtained, which may specifically include:

[0093] According to the frame number of the highest similar frame, determine the initial score level range for each frame of the file to be compared; according to the initial score level range for each frame of the file to be compared and the corresponding highest similarity value, determine the initial scoring result for each frame of the file to be compared; according to the initial scoring result for each frame of the file to be compared, obtain the similarity scoring result between the file to be compared and the source material.

[0094] Specifically, the pre-divided initial score level interval can be matched according to the frame number of the most similar frame. For example, the closer the most similar frame is to the frame number of the frame file to be compared, the higher the initial score level interval matched; the farther the most similar frame is from the frame number of the frame file to be compared, the lower the initial score level interval matched. Afterwards, the initial score level interval corresponding to each frame data of the file to be compared is used as an indicator to measure the frame data, and the highest similarity value corresponding to the frame data is used as another indicator. The two indicators are combined to obtain the corresponding initial scoring result for each frame data of the file to be compared. Finally, the initial scoring results corresponding to all frame data in the file to be compared can be weighted and averaged to obtain the final similarity scoring result of the file to be compared.

[0095] In this embodiment, the initial scoring result of each frame of the file to be compared is determined based on the score level interval matched to the frame number of the most similar frame and the highest similarity value, and then the initial scoring results of all frames are counted to determine the similarity scoring result of the file to be compared as a whole with the source material, thereby further improving the accuracy of the scoring and reducing the difficulty of data analysis and scoring.

[0096] In one embodiment, determining the initial score level interval of each frame of the file to be compared according to the frame number of the most similar frame may specifically include:

[0097] Acquire multiple pre-divided second frame number intervals; determine, based on the frame number of the most similar frame, from the multiple second frame number intervals, a target frame number interval into which the most similar frame falls; determine, based on the target frame number interval and a preset level mapping relationship, an initial score level interval corresponding to each frame data of the file to be compared; the level mapping relationship includes a correspondence between different second frame number intervals and different initial score level intervals.

[0098] It should be noted that if the source material is in video format or audio format, when performing the feature similarity comparison mentioned in the above embodiment, the nth frame data DST_F (n-1) in the file to be compared is used as the frame data to be compared, and the corresponding feature floating point value DST_Cf (n-1) is compared with the feature floating point value SRC_Cf (n-1) from the frame material data SRC_F (n-1) to the frame material data SRC_F (3×SRC_fps+n-1) in the source material SRC. The feature difference values ​​are compared frame by frame. After that, the similarity value SRC_Fs (n-1) with the highest similarity and the corresponding highest similarity frame SRC_Fm (n-1) are recorded. Among them, n ranges from 0 to n, corresponding to the 1st frame to the nth frame in the file to be compared.

[0099] Exemplarily, in order to prevent the comparison from going beyond the boundary, it is necessary to determine whether the frame data to be compared is the last 3 frames. The total number of frames DST_Ft of the file to be compared is obtained from the total duration SRC_t (in minutes) of the extracted source material, where DST_Ft is (SRC_t×3600)×SRC_fps, and SRC_fps is the frame rate of the source material. If it is determined that the current frame data to be compared is the last 3 frames, then the j in the index (nj) corresponding to the highest similarity value and the highest similarity frame is set to 4, otherwise j is set to 1. Based on this, when traversing the highest similarity value SRC_Fs(nj) and the corresponding highest similarity frame SRC_Fm(nj) corresponding to each frame data of the file to be compared, if the highest similarity frame SRC_Fm(nj) corresponding to the highest similarity value SRC_Fs(nj) is in the second frame number interval of SRC_F(nj) to (SRC_F(nj)+SRC_fps), the corresponding initial score level is considered to be the highest score level (for example, a level of 90 to 100 points), and is comprehensively scored in combination with the highest similarity value SRC_Fs(nj); otherwise, if the frame SRC_Fm(nj) corresponding to the highest similarity value SRC_Fs(nj) is in the second frame number interval of (SRC_F(nj)+SRC_fps) to (SRC_F(nj)+SRC _fps×2), the corresponding initial score level is considered to be a higher score level (75 to 90 points), and is comprehensively scored in combination with the highest similarity value SRC_Fs(nj); otherwise, if the frame SRC_Fm(nj) corresponding to the highest similarity value SRC_Fs(nj) is in the second frame number interval of (SRC_F(nj)+SRC_fps×2) to (SRC_F(nj)+SRC_fps×3), the corresponding initial score level is considered to be a passing score level (60 to 75 points), and is comprehensively scored in combination with the highest similarity value SRC_Fs(nj); otherwise, the corresponding initial score level is considered to be a failing score level (0 to 60 points), and is comprehensively scored in combination with the highest similarity value SRC_Fs(nj).

[0100] It is understandable that the above-mentioned multiple second frame number intervals and score level intervals are only examples, and other division methods can be set according to actual application scenarios, which are not specifically limited in this embodiment. This embodiment divides multiple second frame number intervals and maps different score level intervals in advance to different second frame number intervals, so that each frame of the file to be compared can be accurately scored according to the frame number of the most similar frame.

[0101] Additionally, in one embodiment, determining the initial scoring result of each frame of data in the to-be-compared file according to the initial score level interval of each frame of data in the to-be-compared file and the corresponding highest similarity value may include:

[0102] According to the upper and lower limits of the initial score level range of each frame of the file to be compared, the initial score of each frame of the file to be compared is determined; according to the preset weight distribution, the initial score and the corresponding highest similarity value are weighted summed to obtain the initial scoring result of each frame of the file to be compared.

[0103] In this embodiment, if the emphasis is on similarity, the weight of the score level interval can be assigned to a lower value, such as 30%, and the weight of the similarity value can be assigned to a higher value, such as 70%, so that the final similarity score can be objectively calculated. According to the highest similarity value SRC_Fsn and the corresponding highest similar frame SRC_Fmn, the initial score result RSm of the corresponding frame data to be compared can be calculated according to the following formula:

[0104] RSm = (0.7 × SRC_Fsn)

[0105] +(0.3×(sqrt(sRL / 100)+log(1+((SRC_Fsn-sRL) / (sRU-sRL)))))

[0106] Wherein, sRL represents the lower limit of the score level interval, and sRU represents the upper limit of the score level interval. The above “(sqrt(sRL / 100)+log(1+((SRC_Fsn-sRL) / (sRU-sRL))))” is the initial score corresponding to the nth frame data of the file to be compared.

[0107] Additionally, in one embodiment, the data comparison method may further include:

[0108] When the source material is in the second file format representing the image material, the optimal image to be compared pre-selected from the file to be compared is obtained; the source material and the optimal image to be compared are compared for feature similarity, and the comparison result is mapped to a similarity score result of the file to be compared.

[0109] If the source material is in picture format, the feature floating point value DST_F of the optimal picture material DST_P selected by the user in the file to be compared can be compared with the feature floating point value SRC_F of the picture in the source material SRC for similarity and difference, and the result P_RS can be recorded.

[0110] After that, the image feature floating point value similarity difference result P_RS is converted into a preset image score interval, such as mapping to an interval of 60 to 100 points. For example, when P_RS is less than or equal to 60, the score will be mapped to 60 points, if P_RS is greater than or equal to 100, the score will be mapped to 100 points; if the value of P_RS is between 60 and 100, the score will remain unchanged, and finally generate the score result RSm as the final similarity score result:

[0111] RSm=Min(Max(60,P_RS),100)

[0112] In this embodiment, a similarity score result between the file to be compared and the source material in the image format is determined based on feature similarity comparison.

[0113] Optionally, in some embodiments, regardless of whether the source material is in the first file format or the second file format, after obtaining the final similarity scoring result, the scoring result can be directly output to the user. If this scoring is not the first scoring, the current scoring result and the last scoring result can also be output separately, and a corresponding change prompt can be generated.

[0114] Optionally, in some embodiments, if the user is satisfied with the similarity scoring result, the user can click the preset "Satisfied" button on the scoring interface of the APP, or inform the monitoring system in the form of voice or touch through the APP interactive interface. In this regard, the APP will push the rendering template of the relevant pictures, videos or audios to the user. For example, for files in video format, after the user selects the required template, the monitoring system will combine the collected image materials to render the fusion template to generate a video or picture, and after prompting the user by voice or message push, the user can click to download and use it on the APP. If the user is not satisfied with the similarity scoring result, the voice will inform the monitoring system or send an instruction on the APP to make the camera of the monitoring system cache the file to be compared this time and repeat the generation and feature comparison process of the file to be compared involved in the above embodiment until the user is satisfied.

[0115] Figure 3 is a flow chart of a data comparison method of some embodiments, the data comparison method is used for monitoring a system, such as Figure 3 As shown, the data comparison method includes the following steps:

[0116] Step S301, responding to a connection request sent by a user via an APP at a terminal, and connecting with the APP.

[0117] Step S302, based on the user's operation, the source material selected by the user is obtained; for example, the user imports the source material through the APP, or the user sends a command to download the source material based on the interactive interface.

[0118] Step S303, determining whether the source material format is the first file format; if so, executing step S304; otherwise, executing step S306.

[0119] Step S304, performing feature similarity comparison between the source material and the collected files to be compared, and obtaining similarity score results of the files to be compared; the specific manner of performing feature comparison between the files to be compared and the source material can refer to the above embodiment, and this step will not be repeated.

[0120] Step S305, determine whether the user confirms the similarity scoring result this time; if so, execute step S307; otherwise, execute step S309; ​​wherein, when the user sends an instruction representing "confirmation" from the APP end or the interactive interface, it means that the user confirms the similarity scoring result this time.

[0121] Step S306, selecting the best picture file selected by the user from the generated files to be compared; and executing step S304.

[0122] Step S307, after fusion rendering of the user's file to be compared, a work is generated; wherein, a variety of rendering templates of corresponding pictures, videos and other data can be obtained from the cloud, and template matching is performed with the current file to be compared, and then fusion rendering is performed according to the matched template.

[0123] Step S308, providing the artwork generated after fusion rendering to the user for downloading and use.

[0124] Step S309, re-collect the files to be compared.

[0125] In the above steps S301 to S309, feature values ​​are extracted from the audio and video collected in real time by the security camera and the source material imported into the monitoring system, and the interval comparison between the real-time frame and the material frame is used to determine the highest similarity value and locate the highest similarity frame; the frame number interval corresponding to the highest similarity frame is divided into different intervals, and different scoring levels are mapped accordingly, and then converted into weighted interval scores, thereby improving the accuracy of the similarity scoring results. Based on high similarity as the main method and different scoring levels for the intervals corresponding to the frames as the auxiliary method, a more objective similarity score can be obtained by combining the two.

[0126] In the above embodiment, the user manually or by voice control imports or uploads source materials, thus avoiding the complicated operation process of the prior art that requires presetting multiple action categories, reducing the difficulty and complexity of feature comparison, and achieving ease of operation. The above embodiment eliminates the need to set up multiple professional equipment to score user activities, and only requires one camera to complete the operation, reducing hardware costs and restrictions on scenes. Through human-computer interaction, it adapts to different scenes, solves the limitations of a single scene, and makes the application of security monitoring more interesting and rich.

[0127] Figure 4 A flow chart of a source material import method provided for some of the embodiments, such as Figure 4 As shown, the source material import method includes the following steps:

[0128] Step S401, binding with the APP of the terminal.

[0129] Step S402: importing source materials specified by the user based on communication with the APP or a voice command of the user.

[0130] Step S403, performing data analysis on the source material; if the source material is in picture format, analyzing the characteristic floating point value thereof; if the source material is in video format or audio format, extracting information such as the total duration and frame rate of the source material.

[0131] Figure 5 A flow chart of a source material analysis method provided for some of the embodiments, such as Figure 5 As shown, the source material analysis method includes the following steps:

[0132] Step S501, receiving source material.

[0133] Step S502, determine whether the format of the source material is a picture format; if so, execute step S503; otherwise, execute step S504.

[0134] Step S503: extracting characteristic floating point values ​​of the picture of the source material.

[0135] Step S504: extract the total duration of the source material.

[0136] Step S505: extract the frame rate of the source material.

[0137] Figure 6 A flowchart of a method for collecting files to be compared is provided for some of the embodiments, such as Figure 6 As shown, the method for collecting files to be compared includes the following steps:

[0138] Step S601, monitoring the instructions for generating files to be compared issued by the user.

[0139] Step S602, judging whether to start collecting files to be compared according to the instruction issued by the user; if so, executing step S603; otherwise, returning to executing step S601.

[0140] Step S603, recording the time when collection starts.

[0141] Step S604: if the collected file to be compared is an image, image recognition is performed.

[0142] Step S605: If the collected file to be compared is audio or video, audio processing or video processing is performed.

[0143] Step S606: caching the collected files to be compared.

[0144] Step S607, determine whether the acquisition duration reaches the total duration of the source material; if so, execute step S608; otherwise, return to execute step S603.

[0145] Step S608, determine whether the format of the source material is a picture format, if so, execute step S609; otherwise, execute step S610.

[0146] Step S609: Determine the best image to be compared in the files to be compared according to the user's selection.

[0147] Step S610, intercepting a plurality of continuous frames of data that are consistent with the total duration of the source material as a file to be compared.

[0148] Figure 7 Flowchart of a method for comparing the similarity of features between source material and a file to be compared in some embodiments, such as Figure 7 As shown, the feature similarity comparison method includes the following steps:

[0149] Step S701, receiving source material and a file to be compared.

[0150] Step S702, determine whether the file format of the source material is a first file format; if so, execute step S703; otherwise, execute step S706. The first file format is an audio format or a video format.

[0151] Step S703: extract the frame rate of the source material.

[0152] Step S704, set a to a value of 0 to (n-1), and cyclically compare the feature floating point values ​​SRC_Cfa to SRC_Cf (SRC_fps×3+a) in the first frame number interval in the source material with the a-th frame data in the file to be compared, until a is set to n-1 to complete the comparison, and obtain the highest similarity value and the highest similarity frame for each frame of the file to be compared.

[0153] Step S705, scoring the similarity of the files to be compared based on the highest similarity value and the highest similarity frame of each frame of the files to be compared; the specific calculation method can refer to the above embodiment and will not be repeated here.

[0154] Step S706, extracting characteristic floating point values ​​of the pictures in the source material.

[0155] Step S707, extracting the feature floating point value of the optimal image to be compared selected by the user from the file to be compared.

[0156] Step S708 , performing a similarity comparison on the feature floating point values ​​obtained in step S706 and step S707 , respectively, to obtain a comparison result, and mapping the comparison result into a similarity scoring result.

[0157] Figure 8 is a flowchart of a similarity scoring method for some of the embodiments, such as Figure 8 As shown, the similarity scoring method includes the following steps:

[0158] Step S801, receiving source material and files to be compared.

[0159] Step S802, determine whether the source material is in the first file format; if so, execute step S803; otherwise, execute step S816; wherein the first file format is an audio format or a video format.

[0160] Step S803, determine whether the frame number of the currently collected frame data to be compared is the last 3 frames; if so, execute step S804; otherwise, execute step S805; wherein, the total duration of the source material can be SRC_t (minutes), and the frame rate of the source material can be SRC_fps, then the total number of frames of the file to be compared is DST_Ft=(SRC_t×3600)×SRC_fps; then if the frame number of the current frame data to be compared is greater than ((SRC_t×3600-3)×SRC_fps), it is confirmed to be the last 3 frames; the frame data to be compared is a frame of data in the file to be compared that currently needs to be compared.

[0161] Step S804, set the current traversal index offset j to 4; execute step S806.

[0162] Step S805, set the current traversal index offset j to 1.

[0163] Step S806, determine whether the frame number of the highest similar frame corresponding to the (nj)th frame data of the file to be compared is within the second frame number range of SRC_F(nj) to (SRC_F(nj)+SRC_fps); if so, execute step S809; otherwise, execute step S807; wherein SRC_F is the frame number corresponding to the source material.

[0164] Step S807, determine whether the frame number of the highest similar frame corresponding to the (nj)th frame data of the file to be compared is in the second frame number range of (SRC_F(nj)+SRC_fps) to (SRC_F(nj)+SRC_fps×2). If so, execute step S810; otherwise, execute step S808.

[0165] Step S808, determine whether the frame number of the highest similar frame corresponding to the (nj)th frame data of the file to be compared is in the second frame number range of (SRC_F(nj)+SRC_fps×2) to (SRC_F(nj)+SRC_fps×3); if so, execute step S811; otherwise, execute step S812.

[0166] Step S809, confirming that the corresponding initial score level is the highest score level; for example, a level with a value of 90 to 100 points.

[0167] Step S810, confirming that the corresponding initial score level is a higher score level; for example, a level with a value of 75 to 90 points.

[0168] Step S811, confirming that the corresponding initial score level is a passing score level; for example, a level of 60 to 75 points.

[0169] Step S812, confirming that the initial score level is a failing score level; for example, a level ranging from 0 to 60 points.

[0170] Step S813, obtaining an initial scoring result for each frame of data in the file to be compared according to the initial score level and the highest similarity value.

[0171] Step S814, determining whether the current frame data to be compared is the last frame; if so, executing step S815; otherwise, returning to executing step S803;

[0172] Step S815, obtaining the similarity scoring result of the entire file to be compared based on the initial scoring result of each frame of data of the file to be compared.

[0173] Step S816, mapping the similarity comparison result between the feature floating point value of the file to be compared in the image format and the feature floating point value of the source material into a corresponding similarity scoring result.

[0174] Fig. 9 Flowchart of the scoring result broadcasting method in some embodiments; Fig. 9 As shown, the scoring result broadcasting method includes the following steps:

[0175] Step S901, obtaining the similarity score result between the file to be compared and the source material.

[0176] Step S902, determining whether the similarity scoring result is generated for the first time; if so, executing step S903; otherwise, executing step S904.

[0177] Step S903, voice broadcast the current similarity scoring result; and execute step S905.

[0178] Step S904: Voice broadcast the current similarity scoring result and the previous similarity scoring result; and execute step S906.

[0179] Step S905: Record the first similarity scoring result.

[0180] Step S906, determining whether the current similarity scoring result is greater than the previous similarity scoring result; if so, executing step S907; otherwise, executing step S908.

[0181] Step S907, outputting a first prompt; for example, outputting a praise prompt.

[0182] Step S908: output a second prompt; for example, output an encouraging prompt.

[0183] Fig.10 A flowchart of a method for integrating works of some of the embodiments is shown in FIG. Fig.10 As shown, the work fusion method includes the following steps:

[0184] Step S1001, announcing the similarity scoring result to the user via voice.

[0185] Step S1002, determine whether the user sends a work generation instruction; if so, execute step S1003; otherwise, execute step S1008; wherein the work generation instruction is an instruction generated by the user for the file to be compared.

[0186] Step S1003, providing the user with a plurality of templates for rendering works; wherein the template for rendering works may be a template for rendering data such as pictures and videos.

[0187] Step S1004: integrating special effects into the file to be compared according to the rendered template.

[0188] Step S1005: performing material processing on the file to be compared.

[0189] Step S1006, performing audio and letter matching on the file to be compared.

[0190] Step S1007, fusion rendering to generate the work.

[0191] Step S1008, re-collecting the files to be compared.

[0192] In the present embodiment, a data comparison device is also provided, and the data comparison device is used to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions that have been made are not repeated here. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0193] Fig.11 1 is a structural block diagram of a data comparison device 110 of this embodiment, and the data comparison device 110 is used for monitoring a system such as Fig.11 As shown, the data comparison device 110 includes: an acquisition module 112, a comparison data determination module 113, a frame-by-frame comparison module 114 and a similarity scoring module 115; wherein:

[0194] The acquisition module 112 is used to acquire the source material for the target scoring scene selected by the user, and the file to be compared generated by the camera of the monitoring system under the target scoring scene; the file format of the source material is consistent with that of the file to be compared; the comparison data determination module 113 is used to, when the source material is in the first file format of multiple consecutive frames, successively use each frame data in the file to be compared as the frame data to be compared, and determine the first frame number interval corresponding to the frame data to be compared in the source material; the first frame number interval is determined based on the frame number of the frame data to be compared and a preset interval length; the frame-by-frame comparison module 114 is used to perform feature similarity comparison frame by frame on the frame data to be compared with each frame of material data in the first frame number interval, to obtain the highest similarity value corresponding to the frame data to be compared, and the highest similarity frame corresponding to the highest similarity value in the source material; the similarity scoring module 115 is used to obtain the similarity scoring result of the file to be compared and the source material according to the highest similarity value and the highest similarity frame corresponding to each frame data of the file to be compared.

[0195] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0196] In this embodiment, a monitoring system is also provided. Fig.12 is a schematic diagram of the structure of the monitoring system 120 of this embodiment, as shown in Fig.12As shown, the monitoring system 120 includes: a camera 122 and a server 124; wherein the camera 122 is connected to the server 124; the camera 122 is used to generate a file to be compared in a target scoring scenario based on instructions input by a user; and the server 124 is used to execute the data comparison method provided in any of the above embodiments.

[0197] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0198] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0199] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0200] S1, obtaining the source material for the target scoring scene selected by the user and the file to be compared generated by the camera of the monitoring system in the target scoring scene; the file format of the source material and the file to be compared are consistent;

[0201] S2, when the source material is a first file format of multiple consecutive frames, successively taking each frame data in the file to be compared as the frame data to be compared, and determining a first frame number interval in the source material corresponding to the frame data to be compared; the first frame number interval is determined based on the frame number of the frame data to be compared and a preset interval length;

[0202] S3, performing feature similarity comparison frame by frame on the frame data to be compared and each frame of material data in the first frame number interval, to obtain the highest similarity value corresponding to the frame data to be compared and the highest similarity frame corresponding to the highest similarity value in the source material;

[0203] S4, obtaining a similarity score result between the file to be compared and the source material according to the highest similarity value and the highest similarity frame corresponding to each frame of data of the file to be compared.

[0204] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0205] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0207] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0208] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0209] The above-mentioned 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 patent protection. 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 scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A data comparison method, characterized in that: For use in a monitoring system, the method comprises: Acquire a source material for a target scoring scene selected by a user, and a file to be compared generated by a camera of the monitoring system under the target scoring scene; the file format of the source material is consistent with that of the file to be compared; In the case where the source material is a first file format of multiple consecutive frames, each frame data in the to-be-compared file is successively used as the to-be-compared frame data, and a first frame number interval corresponding to the to-be-compared frame data in the source material is determined; the first frame number interval is determined based on the frame number of the to-be-compared frame data and a preset interval length; Performing feature similarity comparison frame by frame between the frame data to be compared and each frame of material data in the first frame number interval, to obtain a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value; Determine the initial score level interval of each frame of the file to be compared according to the frame number of the highest similar frame; Determine the initial scoring result of each frame of data in the file to be compared according to the initial score level interval of each frame of data in the file to be compared and the corresponding highest similarity value; According to the initial scoring result of each frame of data of the file to be compared, a similarity scoring result between the file to be compared and the source material is obtained.

2. The data comparison method according to claim 1, characterized in that: The preset interval length is a preset multiple of the source material frame rate; the frame number of the starting frame of the first frame number interval is the frame number of the frame data to be compared.

3. The data comparison method according to claim 1, characterized in that: The frame data to be compared is compared with each frame of material data in the first frame number interval frame by frame for feature similarity, to obtain a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value, including: Determine a first characteristic floating point value of the frame data to be compared; Determine a second characteristic floating point value of each frame of material data within the first frame number interval; Performing similarity comparison between the first characteristic floating-point value and the second characteristic floating-point value of each frame of material data frame by frame, to obtain a similarity value between the second characteristic floating-point value and the first characteristic floating-point value of each frame of material data; A highest similarity value is determined from all the similarity values, and a highest similarity frame in the source material corresponding to the highest similarity value is determined.

4. The data comparison method according to claim 1, characterized in that: Determining the initial score level interval of each frame of the file to be compared according to the frame number of the highest similar frame, including: Acquire a plurality of pre-divided second frame number intervals; According to the frame number of the highest similar frame, determining, from a plurality of second frame number intervals, a target frame number interval into which the highest similar frame falls; According to the target frame number interval and a preset level mapping relationship, an initial score level interval corresponding to each frame of data in the file to be compared is determined; the level mapping relationship includes a correspondence between different second frame number intervals and different initial score level intervals.

5. The data comparison method according to claim 1, characterized in that: Determining the initial scoring result of each frame of data in the to-be-compared file according to the initial score level interval of each frame of data in the to-be-compared file and the corresponding highest similarity value, including: Determine the initial score of each frame of data in the to-be-compared file according to the upper and lower limits of the initial score level interval of each frame of data in the to-be-compared file; According to the preset weight distribution, the initial score and the corresponding highest similarity value are weighted and summed to obtain the initial scoring result of each frame of data in the file to be compared.

6. The data comparison method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the source material is in a second file format representing a picture material, obtaining an optimal picture to be compared that is pre-selected from the file to be compared; The source material and the optimal image to be compared are compared for feature similarity, and the comparison result is mapped into a similarity score result of the file to be compared.

7. A data comparison device, characterized in that: For use in a monitoring system, the device comprises: an acquisition module, a comparison data determination module, a frame-by-frame comparison module and a similarity scoring module; wherein: The acquisition module is used to acquire the source material for the target scoring scene selected by the user, and the file to be compared generated by the camera of the monitoring system under the target scoring scene; the file format of the source material is consistent with that of the file to be compared; The comparison data determination module is used to, when the source material is a first file format of multiple consecutive frames, successively use each frame data in the to-be-compared file as the to-be-compared frame data, and determine a first frame number interval in the source material corresponding to the to-be-compared frame data; the first frame number interval is determined based on the frame number of the to-be-compared frame data and a preset interval length; The frame-by-frame comparison module is used to perform feature similarity comparison between the frame data to be compared and each frame of material data in the first frame number interval frame by frame to obtain a highest similarity value corresponding to the frame data to be compared and a highest similarity frame in the source material corresponding to the highest similarity value; The similarity scoring module is used to determine the initial score level range of each frame data of the file to be compared according to the frame number of the highest similarity frame; determine the initial score result of each frame data of the file to be compared according to the initial score level range of each frame data of the file to be compared and the corresponding highest similarity value; and obtain the similarity score result between the file to be compared and the source material according to the initial score result of each frame data of the file to be compared.

8. A monitoring system, characterized in that: include: A camera and a server; wherein the camera is connected to the server; The camera is used to generate a file to be compared in a target scoring scenario based on an instruction input by a user; The server is used to execute the data comparison method according to any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the data comparison method according to any one of claims 1 to 6.