A method and system for storing data of interest for a door lock

By distributing video frames in smart locks and detecting and synchronizing keyframes based on user interests, the problems of cumbersome cloud storage and limited local storage are solved, achieving convenient viewing and cost reduction.

CN121509698BActive Publication Date: 2026-05-12DESSMANN CHINA MACHINERY & ELECTRONICS
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DESSMANN CHINA MACHINERY & ELECTRONICS
Filing Date
2026-01-07
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing smart door locks' video/image storage methods suffer from significant issues: cloud storage consumes a large amount of space and is cumbersome to operate; local storage space on the door lock is limited and it is difficult to achieve efficient sharing among multiple users and quick location of key frames, resulting in poor user experience and wasted storage resources.

Method used

By distributing keyframes to different users' mobile terminals, the system detects the degree of interest based on user interaction behavior and generates interest identifiers, and synchronizes the required frame number range to achieve complete data restoration between terminals.

Benefits of technology

It enables users to easily view key data, reduces door lock and storage costs, and balances convenience and economy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509698B_ABST
    Figure CN121509698B_ABST
Patent Text Reader

Abstract

The application discloses a kind of door lock data of interest storage method and system, method includes: according to the mobile alarm event monitored by door lock, extract the key frame in video stream and number in time sequence, different numbered key frame is sequentially distributed and stored to the mobile terminal of different user;According to the interactive behavior of specific key frame on mobile terminal by user, detect the interest degree of user to the frame and generate interest identification;According to the interest identification detected, determine the frame number range that needs to be synchronized, and initiate frame synchronization request to all relevant mobile terminals;According to the key frame data stored by each mobile terminal, by the way of mutual synchronization between terminals, restore complete key frame sequence on all mobile terminals.Using the embodiment of the application, both the user can conveniently view key data, and reduce the cost of door lock and storage, and give consideration to convenience and economy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart door lock technology, and in particular to a method and system for storing data of interest in door locks. Background Technology

[0002] Currently, smart locks primarily rely on cloud storage or local lock storage for storing critical videos and images, which has significant limitations: cloud storage consumes a large amount of cloud space, requiring users to download additional videos to view key content, making the process cumbersome; local lock storage depends on hardware media, has limited space, and increases lock costs. Furthermore, in multi-user scenarios, each user needs to obtain video data separately, hindering efficient frame data sharing and making it difficult to quickly locate and reconstruct key segments of interest to the user. This results in a poor user experience, wasted storage resources, and an inability to balance convenience and cost control. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for storing data of interest in door locks, so as to overcome the shortcomings of the prior art. This method and system can not only allow users to conveniently view key data, but also reduce the cost of door locks and storage, thus balancing convenience and economy.

[0004] One embodiment of this application provides a method for storing data of interest in a door lock, the method comprising:

[0005] Distributed video frame storage: Based on the motion alarm events detected by the door lock, key frames in the video stream are extracted and numbered in chronological order, and key frames with different numbers are distributed and stored sequentially to the mobile terminals of different users.

[0006] Interest frame detection: Based on the user's interaction behavior with specific keyframes on the mobile terminal, detect the user's level of interest in the frame and generate interest tags;

[0007] Frame synchronization trigger: Based on the detected interest identifier, determine the range of frame numbers that need to be synchronized, and initiate a frame synchronization request to all relevant mobile terminals;

[0008] Complete data restoration: Based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization.

[0009] Optionally, the distributed storage of video frames includes:

[0010] Keyframe extraction: Based on the motion alarm signal in the door lock video stream, extract the I-frames from the video encoding as keyframes;

[0011] Frame number generation: Generate a unique number for each keyframe based on the extraction time sequence;

[0012] Distributed storage: Based on the order of the user terminal list, keyframes with different numbers are distributed sequentially to different user terminals for storage;

[0013] Storage record update: Based on the distribution results, record the storage location information of each key frame in the door lock database and the terminal database respectively;

[0014] Error handling: Based on the terminal response, a retry or skip mechanism is used for terminals that do not respond.

[0015] Optionally, the interest frame detection includes:

[0016] Interactive behavior monitoring: Based on the user's actions when viewing keyframes on the mobile terminal, record the number of views, zoom-in operations, and dwell time;

[0017] Interest level assessment: Based on preset threshold conditions, determine the user's level of interest in the current frame;

[0018] Interest identifier generation: When the level of interest exceeds a threshold, an interest identifier containing the frame number and video ID is generated;

[0019] Synchronization request initiation: Based on the generated interest identifier, a video synchronization request is sent to the door lock.

[0020] Optionally, the frame synchronization trigger includes:

[0021] Synchronization range determination: Calculate the frame number sequence within the preset range before and after the frame number in the interest identifier;

[0022] Terminal address acquisition: Based on the stored information recorded in the door lock database, obtain the network addresses of all relevant mobile terminals;

[0023] Synchronization message distribution: Send a synchronization instruction containing a frame number range to all relevant mobile terminals.

[0024] Optionally, the complete data restoration includes:

[0025] Data collection: Based on the synchronization instructions received by each mobile terminal, collect keyframe data within a specified number range stored locally;

[0026] Data exchange: Based on the obtained terminal address information, each mobile terminal exchanges the stored keyframe data with each other;

[0027] Data integration: Based on the received keyframe data, integrate them locally on each mobile terminal to form a complete keyframe sequence;

[0028] Storage Update: Update the keyframe storage records in the local database based on the integration results.

[0029] Optionally, the method further includes:

[0030] Transmission failure handling: Based on the transmission failure response during the keyframe distribution process, automatically skip the terminal and continue distributing to the next terminal;

[0031] Terminal offline handling: Based on the terminal's offline status, a state subscription mechanism is used to re-initiate the synchronization operation after the terminal comes back online;

[0032] Data consistency guarantee: Based on the data exchange results between terminals, ensure that all terminals eventually obtain complete keyframe data.

[0033] Another embodiment of this application provides a storage system for door lock data of interest, the system comprising:

[0034] The storage module is used for distributed storage of video frames: based on the motion alarm events detected by the door lock, key frames in the video stream are extracted and numbered in chronological order, and key frames with different numbers are distributed and stored to the mobile terminals of different users in sequence.

[0035] The detection module is used for interest frame detection: based on the user's interaction behavior on a specific keyframe on the mobile terminal, it detects the user's level of interest in the frame and generates an interest identifier;

[0036] The triggering module is used for frame synchronization triggering: based on the detected interest identifier, it determines the range of frame numbers that need to be synchronized and initiates a frame synchronization request to all relevant mobile terminals;

[0037] The restoration module is used for complete data restoration: based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization.

[0038] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0039] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0040] Compared with existing technologies, the present invention provides a method for storing data of interest to door locks. Based on motion alarm events detected by the door lock, key frames are extracted from the video stream and numbered chronologically. Key frames with different numbers are then distributed and stored sequentially on different users' mobile terminals. Based on user interaction with specific key frames on the mobile terminals, the user's level of interest in the frame is detected, and an interest identifier is generated. Based on the detected interest identifiers, the range of frame numbers to be synchronized is determined, and a frame synchronization request is initiated to all relevant mobile terminals. Based on the key frame data stored on each mobile terminal, the complete key frame sequence is restored on all mobile terminals through inter-terminal synchronization. This method allows users to conveniently view key data while reducing door lock and storage costs, achieving a balance between convenience and economy. Attached Figure Description

[0041] Figure 1 Hardware structure block diagram of a computer terminal for a method of storing door lock data of interest provided in an embodiment of the present invention;

[0042] Figure 2 A flowchart illustrating a method for storing data of interest in a door lock according to an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of a storage system for door lock data of interest provided in an embodiment of the present invention. Detailed Implementation

[0044] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0045] Smart locks typically store critical videos and images either in the cloud or on the lock's own storage media. Cloud storage consumes significant cloud storage space and makes it inconvenient for the lock owner to quickly view critical videos on their mobile phone. Furthermore, if the owner wants to retain certain content, they need to download it from the cloud, which is cumbersome. Storing on the lock's own storage media requires support from the lock's hardware structure, and this media usually has limited storage space.

[0046] This invention first provides a method for storing data of interest in door locks. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0047] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a method of storing door lock data of interest provided in an embodiment of the present invention. Figure 1As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0048] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any method of storing data of interest to the door lock.

[0049] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0050] Internal memory provides an environment for the execution of computer programs stored in non-volatile storage media. When executed by a processor, the computer program can enable the processor to perform any method of storing data of interest to the door lock.

[0051] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0052] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0053] See Figure 2 The present invention provides a method for storing door lock data of interest, which may include the following steps:

[0054] S201, Distributed video frame storage: Based on the motion alarm event detected by the door lock, key frames are extracted from the video stream and numbered sequentially by time. Key frames with different numbers are then distributed and stored to different users' mobile terminals. Specifically, the distributed video frame storage includes:

[0055] Keyframe extraction: Based on the motion alarm signal in the door lock video stream, extract the I-frames from the video encoding as keyframes;

[0056] Frame number generation: Generate a unique number for each keyframe based on the extraction time sequence;

[0057] Distributed storage: Based on the order of the user terminal list, keyframes with different numbers are distributed sequentially to different user terminals for storage;

[0058] Storage record update: Based on the distribution results, record the storage location information of each key frame in the door lock database and the terminal database respectively;

[0059] Error handling: Based on the terminal response, a retry or skip mechanism is used for terminals that do not respond.

[0060] S202, Interest Frame Detection: Based on the user's interaction behavior with a specific keyframe on the mobile terminal, detect the user's level of interest in the frame and generate an interest identifier; specifically, the interest frame detection includes:

[0061] Interactive behavior monitoring: Based on the user's actions when viewing keyframes on the mobile terminal, record the number of views, zoom-in operations, and dwell time;

[0062] Interest level assessment: Based on preset threshold conditions, determine the user's level of interest in the current frame;

[0063] Interest identifier generation: When the level of interest exceeds a threshold, an interest identifier containing the frame number and video ID is generated;

[0064] Synchronization request initiation: Based on the generated interest identifier, a video synchronization request is sent to the door lock.

[0065] S203, Frame synchronization trigger: Based on the detected interest identifier, determine the range of frame numbers that need to be synchronized, and initiate a frame synchronization request to all relevant mobile terminals; specifically, the frame synchronization trigger includes:

[0066] Synchronization range determination: Calculate the frame number sequence within the preset range before and after the frame number in the interest identifier;

[0067] Terminal address acquisition: Based on the stored information recorded in the door lock database, obtain the network addresses of all relevant mobile terminals;

[0068] Synchronization message distribution: Send a synchronization instruction containing a frame number range to all relevant mobile terminals.

[0069] S204, Complete Data Restoration: Based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization. Specifically, the complete data restoration includes:

[0070] Data collection: Based on the synchronization instructions received by each mobile terminal, collect keyframe data within a specified number range stored locally;

[0071] Data exchange: Based on the obtained terminal address information, each mobile terminal exchanges the stored keyframe data with each other;

[0072] Data integration: Based on the received keyframe data, integrate them locally on each mobile terminal to form a complete keyframe sequence;

[0073] Storage Update: Update the keyframe storage records in the local database based on the integration results.

[0074] Specifically, the method may further include: transmission failure handling: automatically skipping the terminal and continuing to distribute to the next terminal based on the transmission failure response during the keyframe distribution process; terminal offline handling: re-initiating the synchronization operation after the terminal comes online using a state subscription mechanism based on the terminal's offline status; and data consistency guarantee: ensuring that all terminals ultimately obtain complete keyframe data based on the data exchange results between the terminals.

[0075] In practical applications, to facilitate users' quick viewing and saving of key door lock videos, while effectively saving storage space, reducing user costs, and alleviating cloud storage pressure, this invention designs a distributed mobile-side storage solution. A specific implementation scheme includes the following:

[0076] 1. Core idea:

[0077] This technical solution proposes a method for storing video frame-by-frame on a distributed manner on the mobile phone. Different frames are sequentially distributed and stored on the mobile phones of different owners, with each owner storing unique frames. When needed, the complete video can be quickly and synchronously restored. This method involves sequentially numbering the frames of key video, then sending different frames to different owners one by one and storing them on their respective phones. After iterating through all the owner lists, the remaining frames are sent in a loop until all frames have been sent, thus completing the frame-by-frame distributed mobile phone storage of key video.

[0078] When any owner views a locally saved video frame on the APP, if it is determined that the owner is interested in a certain frame (the determination condition can be set to view a certain frame repeatedly more than 5 times, or zoom in on a certain frame and stay for more than 3 seconds, etc.), then other frames within a certain range before and after that frame (which can be set by the system) will be automatically synchronized from different owners' mobile phones to all owners' mobile phones, ensuring that each owner's mobile phone restores the complete video frames before and after that frame.

[0079] 2. The complete technical implementation process is as follows:

[0080] (1) Pre-set conditions:

[0081] A smart lock is installed on the main entrance door (each lock has a unique lock ID, IP address, etc.) and connected to a cloud platform. The lock is registered with the platform, and the lock's video is configured with motion alarm detection. When a motion alarm is triggered, the alarm video can be saved frame by frame to the lock's local storage or to cloud storage. The lock database records information such as the lock ID, lock IP address, video ID (local / cloud storage), frame number, frame index URL, and time. See Table 1 below:

[0082] Table 1. Storage Information Table in Door Lock Database

[0083]

[0084] Each of the owners' (multiple) mobile phones has a door lock app installed. Each app has a unique ID (such as the username and phone number used during registration) and supports reporting information such as the app ID, username, and mobile IP address to the cloud platform. The door lock app database records a user list for each owner (multiple), which includes: serial number, app ID, username, mobile IP address of the user's app, and other user information. See Table 2 below:

[0085] Table 2. User information table stored in the door lock APP database.

[0086]

[0087] (2) Processing when the door lock camera generates a motion alarm: When the door lock camera generates a motion alarm signal, the door lock extracts its own video stream encoding and decoding information, reads the i-frame data per second according to the i-frame (the key frame at the beginning of each second in video encoding) marker, and numbers each i-frame in chronological order (e.g., i-0001, i-0002, i-0003...i-XXXN), then sends each i-frame sequentially to each APP-ID in the door lock user list and saves the data on the user's mobile phone. — Retaining the i-frames per second saves key information while saving storage space. Distributing (intermittently and without repetition) the i-frames to the mobile phone allows mobile users to quickly view relatively complete key information while saving storage space. The specific process is as follows:

[0088] The door lock sends the first frame i-0001 to the first user APP-001 in the user information table through the "data transmission message". The message header carries information such as door lock ID, door lock IP, video ID, frame number, and time, and the message body carries the streaming media data of i-0001.

[0089] After receiving the "data transmission message" from the door lock, APP-001 parses the message content and saves the streaming media data of frame i-0001 locally. It then replies with a "response OK message" to the door lock. The message header carries information such as APP-ID, video ID, frame number, frame index, and time. At the same time, it records the relevant information stored in the frame in the APP database table (see Table 3 for details).

[0090] After receiving the "OK response message" from APP-001, the door lock parses the message content and records the relevant information stored in the frame in the door lock database (see Table 4 for details).

[0091] This completes the storage of the first frame. Then, following the same process, the second i-frame i-0002 is sent to APP-002, and so on. An example is shown below:

[0092] Door lock will:

[0093] i-0001 sends a "data transfer request" to 1.0.1.1 (APP-001), and 1.0.1.1 replies with an OK response;

[0094] i-0002 sends a "data transfer request" to 1.0.1.2 (APP-002), and 1.0.1.2 replies with an OK response;

[0095] i-0003 sends a "data transfer request" to 1.0.1.3 (APP-003), and 1.0.1.3 replies with an OK response;

[0096] i-0004 sends a "data transfer request" to 1.0.1.4 (APP-004), and 1.0.1.4 replies with an OK response...

[0097] After iterating through the user list, start iterating again from the beginning of the user list and send the message, for example:

[0098] i-0005 sends a "data transfer request" to 1.0.1.1 (APP-001), and 1.0.1.1 replies with an OK response;

[0099] i-0006 sends a "data transfer request" to 1.0.1.2 (APP-002), and 1.0.1.2 replies with an OK response;

[0100] i-0007 sends a "data transfer request" to 1.0.1.3 (APP-003), and 1.0.1.3 replies with an OK response;

[0101] i-0008 sends a "data transfer request" to 1.0.1.4 (APP-004), and 1.0.1.4 replies with an OK response...

[0102] This continues until all video frames have been sent.

[0103] The relevant information for this frame stored in the door lock AAP database table is recorded as shown in Table 3 below:

[0104] Table 3. Example of data stored in the door lock APP database table

[0105]

[0106] The relevant information for this frame stored in the door lock database table is recorded as shown in Table 4:

[0107] Table 4. Example of data stored in the door lock database table

[0108]

[0109] At this point, each i-frame of the key video has been distributed and stored uniquely on the respective owners' mobile phones.

[0110] Exception handling:

[0111] If, after the door lock sends a "data transmission message," any APP-ID replies with a "response failure message," the lock skips that user and continues sending the current message to the next user. Example of an APP-002 responding with a failure message is shown below:

[0112] Door lock will:

[0113] i-0001 sends a "data transfer request" to 1.0.1.1 (APP-001), and 1.0.1.1 replies with an OK response;

[0114] i-0002 sent a "data transfer request" to 1.0.1.2 (APP-002), and 1.0.1.2 responded with a failure.

[0115] Then i-0002 sends a "data transfer request" to 1.0.1.3 (APP-003), and 1.0.1.3 replies with an OK response;

[0116] i-0003 sends a "data transfer request" to 1.0.1.4 (APP-004), and 1.0.1.4 replies with an OK response;

[0117] i-0004 sends a "data transfer request" to 1.0.1.1 (APP-001), and 1.0.1.1 replies with an OK response;

[0118] i-0005 sent a "data transfer request" to 1.0.1.2 (APP-002), and 1.0.1.2 responded with a failure.

[0119] Then, i-0005 sends a "data transfer request" to 1.0.1.3 (APP-003), and 1.0.1.3 replies with an OK response;

[0120] i-0006 sends a "data transfer request" to 1.0.1.4 (APP-004), and 1.0.1.4 replies with an OK response;

[0121] i-0007 sends a "data transfer request" to 1.0.1.1 (APP-001), and 1.0.1.1 replies with an OK response;

[0122] i-0008 sent a "data transfer request" to 1.0.1.2 (APP-002), and 1.0.1.2 responded with a failure.

[0123] Then, i-0008 sends a "data transfer request" to 1.0.1.3 (APP-003), and 1.0.1.3 replies with an OK response;

[0124] i-0009 sends a "data transfer request" to 1.0.1.4 (APP-004), and 1.0.1.4 replies with an OK response...

[0125] At this point, the relevant information about the frame stored in the AAP database table is recorded as shown in Table 5 below:

[0126] Table 5. Example of data stored in the door lock APP database table

[0127]

[0128] At this time, the relevant information stored in the door lock database table for this frame is recorded as shown in Table 6:

[0129] Table 6. Example of data stored in the door lock database table

[0130]

[0131] Similarly, if any N (N is less than the total number of users) APP-IDs fail to respond, the data can be saved on other users' mobile phones using the above method. If N equals the total number of users (meaning all users fail to respond), the original system storage scheme is maintained, which is irrelevant to this technical solution and will not be discussed here.

[0132] (3) Processing when the user is interested in a certain frame of the image: When the system detects that any user is interested in a certain frame of the video (the detection method will be described in detail below), the APP of this user will automatically send a "video synchronization request" message to the door lock, carrying the frame number of the frame of interest. The door lock determines a range of frame numbers (such as 10 frames before and after, configured by the system), and sends this range of frame numbers to all APP-IDs associated with this door lock. Then, all video frames are synchronized among the door locks. - Through the detection of the content of interest on the APP side, the complete video frames are automatically restored. This process does not require manual handling by the user and can quickly complete the restoration of the complete video frames on each mobile phone side. The specific detection method and process are as follows:

[0133] For example, when the user of APP-001 views the frame data saved locally on the APP side (the frame data can be converted into an image file for viewing through the APP's own capabilities), if the number of times this user repeatedly views a certain frame (such as i-0001) (interface call) > 5 (the numbers here are examples, and the specific values can be set through system settings), or when magnifying and staying (no other interfaces are triggered after the interface call) for more than 3 seconds when viewing a certain frame (the numbers here are examples, and the specific values can be set through system settings), it is determined that the user is interested in the current video frame. Then, the APP of this user automatically sends a "video synchronization request" message to the door lock, and the message carries the frame number. After receiving the message, the door lock determines the range of frame numbers to be synchronized (such as 10 frames before and after) through system configuration, and then sends a "video side synchronization" message to all APP-IDs. After receiving the message, each APP-ID sends its own frame data to the other APP-IDs according to the range of frame numbers. The specific process example is as follows:

[0134] APP-001 sends a "video synchronization request" message to the door lock, carrying the frame number of the current frame (frame of interest), the video ID to which it belongs, and the APP-ID;

[0135] After receiving the "video synchronization request" message, the door lock queries the first frame number (S) and the last frame number (E) of all the frame numbers existing for this video ID in the door lock database according to the video ID, and then, according to the frame fetching range configured by the system (such as 10 seconds before and after), performs N+10 and N-10 operations on the number (N) of the current frame of interest.

[0136] ---- If N+10>E (which means there are less than 10 seconds after the frame of interest), then take X=E, otherwise X=N+10;

[0137] ---- If N-10<S (which means there are less than 10 seconds before the frame of interest), then take Y=S, otherwise Y=N-10;

[0138] Then the door lock sends a "video terminal synchronization" message to each APP-ID, carrying frame numbers X and Y, as well as door lock ID, video ID, IP address of each APP-ID, etc.

[0139] After receiving the "Video End-to-End Synchronization" message, each APP-ID queries all the frame numbers and frame indices stored locally under the video ID based on the video ID, verifies the value M of the frame number, and if Y<=M<=X, reads the streaming media data of the frame index corresponding to the frame number M, and sends a "Data Synchronization Message" to other APP-IDs carrying information such as APP-ID, video ID, frame number, and time.

[0140] Each APP-ID sends a "data synchronization message" to other APP-IDs in the manner described above, and saves the frame data it synchronizes locally and records it in the APP database, including information such as video ID, video frame number, and time.

[0141] Taking user APP-001's interest in frame (i-0003) of video ID (V-001) as an example, the message interaction process is as follows:

[0142] APP-001 sends a "video synchronization request" message to door lock-001, carrying parameters (i-0003, V-001, APP-001), and door lock-001 replies to APP-001 with an OK response.

[0143] Door lock-001 sends a "video terminal synchronization" message to APP-001, carrying parameters (door lock-001, V-001, 1-9); the message contains the IP addresses of APP-002 / APP-003 / APP-004; APP-001 records the IP addresses of APP-002 / APP-003 / APP-004.

[0144] Door lock-001 sends a "video terminal synchronization" message to APP-002, carrying parameters (door lock-001, V-001, 1-9); the message contains the IP addresses of APP-001 / APP-003 / APP-004; APP-002 records the IP addresses of APP-001 / APP-003 / APP-004.

[0145] Door lock-001 sends a "video terminal synchronization" message to APP-003, carrying parameters (door lock-001, V-001, 1-9); the message contains the IP addresses of APP-001 / APP-002 / APP-004; APP-003 records the IP addresses of APP-001 / APP-002 / APP-004.

[0146] Door lock-001 sends a "video terminal synchronization" message to APP-004, carrying parameters (door lock-001, V-001, 1-9); the message contains the IP addresses of APP-001 / APP-002 / APP-003; APP-004 records the IP addresses of APP-001 / APP-002 / APP-003.

[0147] —Parameters 1-9 mean that the frame numbers that need to be synchronized are in the range of i-0001 to i-0009 (this video ID has a total of 9 frames):

[0148] APP-001 sends a "data synchronization" message to APP-002 / APP-003 / APP-004, carrying parameters (APP-001, V-001, i-0001 / i-0005 / i-0009, Time-0001 / Time-0005 / Time-0009) and streaming media data of i-0001 / i-0005 / i-0009 frames; APP-002 / APP-003 / APP-004 respectively reply to APP-001 with an OK response message;

[0149] APP-002 sends a "data synchronization" message to APP-001 / APP-003 / APP-004, carrying parameters (APP-002, V-001, i-0002 / i-0006, Time-0002 / Time-0006) and streaming media data of i-0002 / i-0006 frames; APP-001 / APP-003 / APP-004 respectively reply to APP-002 with an OK response message;

[0150] APP-003 sends a "data synchronization" message to APP-001 / APP-002 / APP-004, carrying parameters (APP-003, V-001, i-0003 / i-0007, Time-0003 / Time-0007) and streaming media data of i-0003 / i-0007 frames; APP-001 / APP-002 / APP-004 respectively reply to APP-003 with an OK response message;

[0151] APP-004 sends a "data synchronization" message to APP-001 / APP-002 / APP-003, carrying parameters (APP-004, V-001, i-0004 / i-0008, Time-0004 / Time-0008) and streaming media data of i-0004 / i-0008 frames; APP-001 / APP-002 / APP-003 respectively reply to APP-004 with an OK response message;

[0152] Exception handling:

[0153] Exception 1: If the door lock - 001 sends a "Video End - side Synchronization" message to APP - 002 and APP - 002 replies with a failure response, the door lock skips this message, continues to send the "Video End - side Synchronization" message to APP - 003, and traverses all APP - IDs in sequence;

[0154] Meanwhile, during the above traversal, for APP - 002 with a failed response and other APP - IDs (possibly N, N <= total number of APP - IDs), the door lock - 001 sends an "APP Status Subscription" message to the platform, carrying the APP - ID to be subscribed and related information, and waits for the notification message after the APP - ID goes online;

[0155] When the subscribed APP - ID goes online, the door lock receives a "Subscription Notification" message and immediately repeats sending the above "Video End - side Synchronization" message to this APP - ID to complete the foregoing process.

[0156] Exception 2: If APP - 001 sends a "Data Synchronization" message to APP - 002 and APP - 002 replies with a failure response, APP - 001 skips this message, continues to send the "Data Synchronization" message to APP - 003, and traverses all APP - IDs in sequence;

[0157] Meanwhile, during the above traversal, for APP - 002 with a failed response and other APP - IDs (possibly N, N < total number of APP - IDs), APP - 001 sends an "APP Status Subscription" message to the platform, carrying the APP - ID to be subscribed and related information, and waits for the notification message after the APP - ID goes online;

[0158] When the subscribed APP - ID goes online, APP - 001 receives a "Subscription Notification" message and immediately repeats sending the above "Data Synchronization" message to this APP - ID to complete the foregoing process.

[0159] (4) Processing when each master mobile APP receives a data synchronization message: After each APP - ID receives a "Data Synchronization" message, it analyzes the message content, extracts information such as the video ID, video frame numbers of each frame, and streaming media data of each frame, saves all frame streaming media data locally, and makes relevant information records in the database. The specific process is as follows:

[0160] APP - 001 receives a "Data Synchronization" message sent by APP - 002 / APP - 003 / APP - 004. After analyzing the message content, it saves the streaming media data of each frame number in the message locally and inserts a storage data record in the database, recording information such as the video ID, frame number, frame index (save path), and time;

[0161] Similarly,

[0162] APP-002 performs the above processing on the "data synchronization" messages sent by APP-001 / APP-003 / APP-004 respectively;

[0163] APP-003 performs the above processing on the "data synchronization" messages sent by APP-001 / APP-002 / APP-004 respectively;

[0164] APP-004 performs the above processing on the "data synchronization" messages sent by APP-001 / APP-002 / APP-003 respectively;

[0165] At this point, the surrounding frame data of the frame of interest has been synchronized and saved on each user's mobile phone.

[0166] At this point, taking APP-001 as an example, the data recorded in its storage database table is shown in Table 7 below:

[0167] Table 7. Example of stored data in the APP-001 database table

[0168]

[0169] Additional optional solutions:

[0170] Another alternative to the above solution is: the lock sends the IP addresses of each app to each app, so that each app has the IP address information of the other apps. When an app is interested in a frame, it directly initiates its synchronization request for frames surrounding the frame of interest to the other apps (without going through the lock). Once the app obtains a complete series of video frames, it packages these complete series of video frames together and sends them to the other apps. In this way, each app possesses important continuous video frames.

[0171] Beneficial effects: Door lock users can conveniently and promptly view key frames of critical videos on their mobile phones. At the same time, the use of i-frame storage significantly reduces the local storage pressure on the mobile phone; it also alleviates the storage pressure on cloud storage and avoids the use of local storage media on the door lock, thus reducing costs for both the door lock and the user.

[0172] 1. When a door lock camera generates motion alarm monitoring video that needs to be saved, the door lock numbers each i-frame of the video segment chronologically, then sends each i-frame to the mobile phones of users in the door lock's user list, and saves different i-frame data on different users' mobile phones. 2. When a user is interested in a particular frame on their mobile phone, an interest detection mechanism is established, which can automatically synchronize video frames within a certain range around the frame of interest across different apps, completing the restoration of continuous video frame data. 3. Based on an alternative solution, when an app is interested in a particular frame, it obtains the complete continuous video frame through an automatic collaboration mechanism between apps, and then actively sends the complete continuous video frame to other apps, ensuring that all apps have access to the important continuous video frame.

[0173] As can be seen, based on the motion alarm events detected by the door lock, key frames are extracted from the video stream and numbered chronologically. Key frames with different numbers are then distributed and stored sequentially on different users' mobile terminals. Based on the user's interaction with a specific key frame on the mobile terminal, the user's level of interest in that frame is detected and an interest identifier is generated. Based on the detected interest identifier, the range of frame numbers that need to be synchronized is determined, and a frame synchronization request is initiated to all relevant mobile terminals. Based on the key frame data stored on each mobile terminal, the complete key frame sequence is restored on all mobile terminals through inter-terminal synchronization. This allows users to conveniently view key data while reducing door lock and storage costs, thus balancing convenience and economy.

[0174] Another embodiment of the present invention provides a storage system for door lock data of interest, see [link to relevant documentation]. Figure 3 The system may include:

[0175] Storage module 301 is used for distributed storage of video frames: based on the motion alarm event detected by the door lock, key frames in the video stream are extracted and numbered in chronological order, and key frames with different numbers are distributed and stored to the mobile terminals of different users in sequence.

[0176] The detection module 302 is used for interest frame detection: based on the user's interaction behavior on a specific key frame on the mobile terminal, it detects the user's degree of interest in the frame and generates an interest identifier;

[0177] Trigger module 303 is used for frame synchronization triggering: based on the detected interest identifier, it determines the range of frame numbers that need to be synchronized and initiates a frame synchronization request to all relevant mobile terminals;

[0178] The restoration module 304 is used for complete data restoration: based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization.

[0179] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0180] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

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

[0182] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for storing data of interest in a door lock, characterized in that, The method includes: Distributed video frame storage: Based on the motion alarm events detected by the door lock, key frames in the video stream are extracted and numbered in chronological order, and key frames with different numbers are distributed and stored sequentially to the mobile terminals of different users. Interest frame detection: Based on the user's interaction behavior with specific keyframes on the mobile terminal, detect the user's level of interest in the frame and generate interest tags; Frame synchronization triggering: Based on the detected interest identifier, determine the range of frame numbers to be synchronized, and initiate a frame synchronization request to all relevant mobile terminals; wherein, the frame synchronization triggering includes: synchronization range determination: calculate the frame number sequence within a preset range before and after based on the frame number in the interest identifier; terminal address acquisition: obtain the network addresses of all relevant mobile terminals based on the storage information recorded in the door lock database; synchronization message distribution: send a synchronization instruction containing the frame number range to all relevant mobile terminals; Complete data restoration: Based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization.

2. The method according to claim 1, characterized in that, The distributed storage of video frames includes: Keyframe extraction: Based on the motion alarm signal in the door lock video stream, extract the I-frames from the video encoding as keyframes; Frame number generation: Generate a unique number for each keyframe based on the extraction time sequence; Distributed storage: Based on the order of the user terminal list, keyframes with different numbers are distributed sequentially to different user terminals for storage; Storage record update: Based on the distribution results, record the storage location information of each key frame in the door lock database and the terminal database respectively; Error handling: Based on the terminal response, a retry or skip mechanism is used for terminals that do not respond.

3. The method according to claim 2, characterized in that, The interest frame detection includes: Interactive behavior monitoring: Based on the user's actions when viewing keyframes on the mobile terminal, record the number of views, zoom-in operations, and dwell time; Interest level assessment: Based on preset threshold conditions, determine the user's level of interest in the current frame; Interest identifier generation: When the level of interest exceeds a threshold, an interest identifier containing the frame number and video ID is generated; Synchronization request initiation: Based on the generated interest identifier, a video synchronization request is sent to the door lock.

4. The method according to claim 3, characterized in that, The complete data restoration includes: Data collection: Based on the synchronization instructions received by each mobile terminal, collect keyframe data within a specified number range stored locally; Data exchange: Based on the obtained terminal address information, each mobile terminal exchanges the stored keyframe data with each other; Data integration: Based on the received keyframe data, integrate them locally on each mobile terminal to form a complete keyframe sequence; Storage Update: Update the keyframe storage records in the local database based on the integration results.

5. The method according to claim 4, characterized in that, The method further includes: Transmission failure handling: Based on the transmission failure response during the keyframe distribution process, automatically skip the terminal and continue distributing to the next terminal; Terminal offline handling: Based on the terminal's offline status, a state subscription mechanism is used to re-initiate the synchronization operation after the terminal comes back online; Data consistency guarantee: Based on the data exchange results between terminals, ensure that all terminals eventually obtain complete keyframe data.

6. A storage system for door lock data of interest, characterized in that, The system includes: The storage module is used for distributed storage of video frames: based on the motion alarm events detected by the door lock, key frames in the video stream are extracted and numbered in chronological order, and key frames with different numbers are distributed and stored to the mobile terminals of different users in sequence. The detection module is used for interest frame detection: based on the user's interaction behavior on a specific keyframe on the mobile terminal, it detects the user's level of interest in the frame and generates an interest identifier; The triggering module is used for frame synchronization triggering: based on the detected interest identifier, it determines the range of frame numbers to be synchronized and initiates a frame synchronization request to all relevant mobile terminals; wherein, the frame synchronization triggering includes: synchronization range determination: based on the frame number in the interest identifier, it calculates the frame number sequence within a preset range before and after; terminal address acquisition: based on the storage information recorded in the door lock database, it obtains the network addresses of all relevant mobile terminals; synchronization message distribution: it sends a synchronization instruction containing the frame number range to all relevant mobile terminals; The restoration module is used for complete data restoration: based on the keyframe data stored in each mobile terminal, the complete keyframe sequence is restored on all mobile terminals through inter-terminal synchronization.

7. The system according to claim 6, characterized in that, The storage module is specifically used for: Keyframe extraction: Based on the motion alarm signal in the door lock video stream, extract the I-frames from the video encoding as keyframes; Frame number generation: Generate a unique number for each keyframe based on the extraction time sequence; Distributed storage: Based on the order of the user terminal list, keyframes with different numbers are distributed sequentially to different user terminals for storage; Storage record update: Based on the distribution results, record the storage location information of each key frame in the door lock database and the terminal database respectively; Error handling: Based on the terminal response, a retry or skip mechanism is used for terminals that do not respond.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-5.