A method, device, electronic device and storage medium for determining target movement status

By identifying the movement characteristics of the target object and querying the database, the displacement amount and movement duration are calculated, which solves the problem that the existing technology cannot accurately track the displacement of the target object in real time, achieves accurate tracking and efficient monitoring in a dynamic environment, and adapts to a variety of scenarios. need.

CN118334073BActive Publication Date: 2024-09-06CHONGQING YINYAN FINANCIAL SUPPORTING SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410764954.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-06
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing technology cannot accurately track the displacement of target objects in real time, cannot meet the needs of dynamic environments and multiple scenes, and has low performance and accuracy.

Method used

By obtaining the current frame image, identify the target, set the label, time interval and distance threshold according to the target's motion characteristics, query the database to obtain historical records, calculate the displacement and movement duration, and compare with the threshold to determine the target's movement status, using The Redis database stores and updates data to ensure real-time performance and efficiency.

Benefits of technology

It achieves accurate tracking of the motion status of target objects in a dynamic environment, improves the real-time feedback capability and accuracy of displacement detection, reduces the storage burden, adapts to a variety of monitoring scenarios, reduces the false alarm rate, and improves the system's response speed and processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334073B
    Figure CN118334073B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and storage medium for judging the moving state of a target, and relates to the field of computer vision technology, wherein the method comprises: obtaining a current frame image, identifying the current frame image to obtain a target, setting a label, time interval and distance threshold of the target according to the motion characteristics of the target, obtaining the current position of the target according to the current frame image, querying a database according to the label of the target to obtain a corresponding historical record, obtaining the displacement and movement duration of the target according to the current position and historical record of the target, and comparing the displacement and movement duration of the target with the distance threshold and time interval respectively to obtain the moving state of the target. The present invention provides real-time displacement detection through a tracking model and a data processing flow, and solves the problem that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the requirements of dynamic environments and multiple scenes, and has low performance and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method, device, electronic device and storage medium for determining a target movement state. Background Art

[0002] At present, object tracking and displacement detection are widely used in security monitoring, traffic management, automatic monitoring and other fields. Traditional methods mainly rely on inter-frame comparison to determine the displacement of objects. When processing dynamic video surveillance data, it is often impossible to accurately track the displacement of the target object in real time because the algorithm processing speed is not fast enough or the data processing capacity is limited. In addition, the threshold setting of the displacement is fixed and inflexible, which cannot meet the needs of different scenarios.

[0003] In addition, traditional methods often ignore the correlation between object movement and time, and their accuracy is challenged in dynamic environments, such as camera jitter, light changes, etc. Most existing solutions are static and cannot effectively adapt to dynamic environments or meet specific monitoring needs. For example, existing technologies are not effective in processing small movements of objects or judging the stationary state of objects, and cannot effectively manage large amounts of real-time data, which is crucial to reducing storage burden and improving system efficiency.

[0004] Therefore, there is an urgent need for a target movement state judgment method that can monitor and analyze the motion trajectory and state of the target object in the image in real time, has high performance and accuracy, reduces the storage burden and improves the system efficiency. Summary of the invention

[0005] The embodiments of the present invention provide a method for determining the movement state of a target to solve the problem that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the requirements of dynamic environments and multiple scenes, and has low performance and accuracy. The technical solution is as follows:

[0006] According to one aspect of the present invention, a method for determining the movement state of a target includes: acquiring a current frame image, identifying the current frame image to obtain a target; setting a label, time interval and distance threshold of the target according to the movement characteristics of the target, and obtaining the current position of the target according to the current frame image; querying a database according to the label of the target to obtain a corresponding historical record, and obtaining the displacement and movement duration of the target according to the current position and historical record of the target; and comparing the displacement and movement duration of the target with the distance threshold and time interval, respectively, to obtain the movement state of the target.

[0007] In one of the embodiments, obtaining the corresponding historical records in a database according to the label of the target, and obtaining the displacement and movement duration of the target according to the current position and historical records of the target are achieved through the following steps: querying in a database whether there is a corresponding historical record according to the label of the target; if there is no historical record, recording the current position of the target in the database; if there is a historical record, obtaining the displacement of the target according to the current position of the target and the position in the historical record; and calculating the movement duration of the target according to the timestamp corresponding to the current frame image of the target and the timestamp in the historical record.

[0008] In one of the embodiments, the displacement and movement duration of the target are compared with the distance threshold and time interval respectively, and the movement status of the target is obtained by the following steps: if the displacement of the target exceeds the distance threshold, an alarm signal is issued and the current position of the target and the timestamp corresponding to the current frame image are updated in the database; if the displacement of the target does not exceed the distance threshold, whether to update is determined based on the movement duration and time interval of the target.

[0009] In one of the embodiments, determining whether to update based on the target's movement duration and time interval is achieved through the following steps: determining whether the target's movement time exceeds the time interval, and if so, updating the target's current position and corresponding timestamp in the database; if not, not updating the database.

[0010] In one of the embodiments, after identifying the target in the current frame image, the following steps are also included: setting an error threshold of the target pixel displacement, and reacquiring the image if the relationship between the pixel displacement of the target in the current frame image and the error threshold does not meet the set conditions.

[0011] In one of the embodiments, the method further includes the following steps: assigning a unique tracking identifier to each target identified in the current frame image, traversing each target in the current frame image and updating the information of each target in the database; the tracking identifier is used to store and retrieve the target information.

[0012] In one of the embodiments, the database is a Redis database, which is used to store and update target information; an expiration time is set for the database, and the expiration time is used to control the timeliness and total amount of data in the database.

[0013] According to one aspect of the present invention, a device for determining a target movement state includes: a target recognition module, which is used to obtain a current frame image and identify the current frame image to obtain a target; a target position acquisition module, which is used to set a label, a time interval and a distance threshold of the target according to the movement characteristics of the target, and obtain the current position of the target according to the current frame image; a history record query module, which is used to query a database according to the label of the target to obtain a corresponding history record, and obtain the displacement and movement duration of the target according to the current position and history record of the target; and a movement state acquisition module, which is used to compare the displacement and movement duration of the target with the distance threshold and the time interval respectively, and obtain the movement state of the target.

[0014] According to one aspect of the present invention, an electronic device includes at least one processor and at least one memory, wherein the memory stores computer-readable instructions; the computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the target movement state judgment method as described above.

[0015] According to one aspect of the present invention, a storage medium stores computer-readable instructions, and the computer-readable instructions are executed by one or more processors to implement the target movement state determination method as described above.

[0016] The beneficial effects brought by the technical solution provided by the present invention are:

[0017] In the above technical scheme, the present invention first obtains the current frame image, identifies the current frame image to obtain the target, sets the target label, time interval and distance threshold according to the motion characteristics of the target, obtains the current position of the target according to the current frame image, queries the database according to the target label to obtain the corresponding historical record, obtains the displacement and movement duration of the target according to the current position and historical record of the target, compares the displacement and movement duration of the target with the distance threshold and time interval respectively, and obtains the moving state of the target. Through the tracking model and data processing flow, real-time displacement detection is provided, the real-time feedback capability and accuracy of displacement detection and the response speed and processing efficiency of target monitoring are improved, and the target object can be accurately tracked in a dynamic environment. Even under conditions of camera shaking or light changes, the accurate target motion state can be obtained, thereby effectively solving the problems that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the needs of dynamic environments and multiple scenes, and has low performance and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in describing the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0019] Figure 1 is a flow chart of a method for determining a target moving state according to an exemplary embodiment;

[0020] Figure 2 yes Figure 1 Flow chart corresponding to step 150 in the embodiment;

[0021] Figure 3 It is a schematic diagram of a method for determining the movement state of a target in an application scenario;

[0022] Figure 4 It is a logic diagram of a method for determining the moving state of a target in another application scenario;

[0023] Figure 5 yes Figure 4 A schematic diagram of an actual application scenario in which the object movement speed in the corresponding application scenario exceeds expectations;

[0024] Figure 6 is a block diagram of a target movement state determination device according to an exemplary embodiment;

[0025] Figure 7 is a hardware structure diagram of an electronic device according to an exemplary embodiment;

[0026] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0027] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0028] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0029] The present invention provides a method for determining a target movement state, which provides real-time displacement detection through a tracking model and a data processing flow, improves the real-time feedback capability and accuracy of displacement detection, and the response speed and processing efficiency of target monitoring, solves the problem that the prior art cannot accurately track the displacement of a target object in real time, cannot meet the requirements of dynamic environments and multiple scenarios, and has low performance and accuracy. The method for determining a target movement state is applicable to a target movement state determination device, which can be an electronic device. The method for determining a target movement state in an embodiment of the present invention can be applied to a variety of scenarios, such as museum security, etc.

[0030] See also Figure 1 , an embodiment of the present invention provides a method for determining a target movement state, which is applicable to an electronic device.

[0031] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0032] like Figure 1 As shown, the method may include the following steps:

[0033] Step 110, obtaining the current frame image, and identifying the target on the current frame image.

[0034] In one possible implementation, a surveillance video is acquired from a surveillance camera, a current frame image is obtained based on the surveillance video, and a machine learning model is used to identify a target based on the current frame image.

[0035] Step 130, setting the target's label, time interval and distance threshold according to the target's motion characteristics, and obtaining the target's current position according to the current frame image.

[0036] In one possible implementation, the motion characteristics of the target are related to the application scenario. For example, the target moves faster in a high-speed scenario and slower in a walking scenario, etc. Therefore, it is necessary to set a time interval and distance threshold that conforms to the application scenario according to the motion characteristics of the target. The target's label is used to uniquely identify it in the database.

[0037] Step 150, query the database to obtain the corresponding historical records according to the target tag, and obtain the displacement and movement duration of the target according to the current position of the target and the historical records.

[0038] In one possible implementation, such as Figure 2 As shown, step 150 may include the following steps:

[0039] Step 210: query whether there is a corresponding historical record in the database according to the target tag.

[0040] Step 230, if there is no historical record, the current position of the target is recorded in the database, if there is a historical record, the displacement of the target is obtained according to the current position of the target and the position in the historical record.

[0041] Step 250 , calculating the movement duration of the target according to the timestamp corresponding to the current frame image of the target and the timestamp in the historical records.

[0042] Step 170 , the displacement and movement duration of the target are compared with the distance threshold and the time interval respectively to obtain the movement state of the target.

[0043] In one possible implementation, if the displacement of the target exceeds the distance threshold, an alarm signal is issued and the current position of the target and the timestamp corresponding to the current frame image are updated in the database. If the displacement of the target does not exceed the distance threshold, it is determined whether to update based on the target's movement duration and time interval.

[0044] In a possible implementation, it is determined whether the movement time of the target exceeds the time interval. If so, the current position of the target and the corresponding timestamp are updated in the database. If not, the database is not updated.

[0045] In a possible implementation, after the target is identified in the current frame image, an error threshold of the target pixel displacement is set, and if the relationship between the pixel displacement of the target in the current frame image and the error threshold does not meet the set condition, the image is reacquired.

[0046] In a possible implementation, a unique tracking identifier is assigned to each target identified in the current frame image, each target in the current frame image is traversed, and information of each target in the database is updated.

[0047] Among them, the tracking identifier is used to store and retrieve the target's information.

[0048] In a possible implementation, the database is a Redis database, which is used to store and update target information. An expiration time is set for the database, and the expiration time is used to control the timeliness and total amount of data in the database.

[0049] Through the above process, the present invention first obtains the current frame image, identifies the current frame image to obtain the target, sets the target label, time interval and distance threshold according to the motion characteristics of the target, obtains the current position of the target according to the current frame image, queries the database according to the target label to obtain the corresponding historical record, obtains the displacement and movement duration of the target according to the current position and historical record of the target, compares the displacement and movement duration of the target with the distance threshold and time interval respectively, and obtains the moving state of the target, provides real-time displacement detection through the tracking model and data processing flow, improves the real-time feedback capability and accuracy of displacement detection and the response speed and processing efficiency of target monitoring, can accurately track the target object in a dynamic environment, and can obtain the accurate target motion state even under the conditions of camera shaking or light changes, thereby effectively solving the problems that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the needs of dynamic environments and multiple scenes, and has low performance and accuracy.

[0050] In one application scenario, Figure 3 A flowchart of a method for determining target movement status is shown.

[0051] like Figure 3 As shown, the moving state determination of the target detected in each frame of image may include the following steps:

[0052] Step 310, tracking configuration verification.

[0053] Specifically, the system first verifies whether a tracking task is configured. If no tracking task is configured, the processing flow is terminated.

[0054] Step 320, initializing the tracking target.

[0055] Specifically, once it is confirmed that the tracking task has been configured, the tracking model is immediately activated and obtains the specified target tag, assigning a unique tracking identifier to all matching target objects, which will serve as the key to store and retrieve target information.

[0056] Step 330: target traversal and historical data query.

[0057] Specifically, each target object in the current frame is traversed to query whether each target has historical tracking data.

[0058] Step 340: New target data is stored.

[0059] Specifically, if there is no historical data for a target, it is identified as a newly appeared target, and the current timestamp and position of the new target in the image are recorded to establish basic data for future displacement calculations.

[0060] Step 350, historical target displacement analysis.

[0061] Specifically, if historical data exists, the displacement between the current position and the historical position is calculated, and the calculated displacement is compared with a preset threshold.

[0062] Step 360: Alarm for exceeding threshold value behavior.

[0063] Specifically, if the displacement exceeds a preset threshold, an alarm signal of excessive movement is triggered, and the target record in the database is updated, including the latest timestamp and location information.

[0064] Step 370, time interval determination.

[0065] Specifically, if the displacement does not exceed the threshold, it is further determined whether the time interval meets the preset conditions. If it does not reach the preset time interval, the status quo remains unchanged. If it reaches or exceeds the time interval, the recorded data is updated for distance and moving speed evaluation in the next time period.

[0066] In the above process, the embodiment of the present invention adopts the Redis database to store and update the information of the target object. As an in-memory data structure storage system, Redis provides extremely high read and write speeds and is very suitable for real-time tracking systems that require fast access and updates. Each storage operation adopts a replacement update. This method can effectively avoid the expansion of the database, and by setting the expiration time, the timeliness of the data can be guaranteed, avoiding the server burden caused by long-term accumulation.

[0067] The fact that the displacement determination condition is configurable in actual applications provides the embodiment of the present invention with extremely high flexibility to meet different monitoring requirements. For example, if the monitoring target is to determine whether the object is relatively stationary, the logical condition can be adjusted to "displacement exceeds" the set value to trigger an alarm. This flexible adjustment of the logic allows the system to adapt to various complex actual application scenarios, whether it is monitoring high-speed moving targets or maintaining static monitoring requirements.

[0068] Through the above process, the embodiment of the present invention provides real-time displacement detection through the tracking model and data processing flow, improves the real-time feedback capability and accuracy of displacement detection as well as the response speed and processing efficiency of target monitoring, and can accurately track the target object in a dynamic environment, and can obtain the accurate target motion state even under conditions of camera jitter or light changes, thereby effectively solving the problem that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the requirements of dynamic environments and multiple scenarios, and has low performance and accuracy.

[0069] In another application scenario, Figure 4 A logical schematic diagram of a method for determining a target moving state is provided.

[0070] like Figure 4 As shown in the figure, in-depth demand research is first carried out in real application scenarios to establish the target characteristics that the system needs to identify and track. Based on these research results, target tracking labels and corresponding time and distance thresholds are set. This not only improves the tracking accuracy, but also enhances the system's adaptability to the actual operating environment and application flexibility.

[0071] Traditional methods for determining the moving state of a target usually use frame-to-frame target comparison to calculate the displacement of an object. However, in real-world applications, the movement of an object is often closely related to time. For example, evaluating whether an object is stationary requires going beyond a single spatial analysis. Considering factors such as camera vibration, an object may show tiny movements in a video. In this scenario, the present invention uses a logical analysis method. If the object moves very little over a long period of time, it can be inferred that it is static. Similarly, to determine whether a car is speeding, the present invention defines a logical parameter. For example, if the car moves more than 500 pixels within 5 seconds, it can be determined to be speeding.

[0072] Under the above logic of target movement state judgment, the actual application scenario of monitoring the relative static state of an object is set as follows: a precious cultural relic is placed on a display stand in a museum. To ensure the safety of the cultural relic, it is necessary to monitor whether it has been moved.

[0073] Since the environment may be affected by factors such as air conditioning and ground vibration, the camera may shake slightly, so it is necessary to calculate and set an error range to distinguish between actual movement and camera shaking.

[0074] The specific steps are as follows:

[0075] The first step is demand research and environmental analysis: Investigate the internal environment of the museum and record factors that may affect the stability of the camera, such as visitor flow, air conditioning wind direction, etc.

[0076] The second step is camera stability assessment: Through long-term monitoring, analyze the camera's jitter pattern and determine the average pixel displacement range caused by the jitter.

[0077] The third step is to set the error threshold: after determining the range of pixel displacement caused by jitter, set an error threshold to distinguish between actual object movement and camera jitter.

[0078] Step 4: Displacement detection system configuration: Based on the error threshold, configure the displacement detection system so that it can identify movements beyond the error range and regard this as actual movement of the cultural relic.

[0079] Step 5: Set up the alarm mechanism: If the system detects movement beyond the error range, it will trigger an alarm and notify security personnel to check.

[0080] Under the above logic of target movement state judgment, the actual application scenario where the object moves faster than expected is set as follows: electric tour buses in a theme park are responsible for transporting tourists within the park. In order to ensure the safety of tourists, especially during crowded hours or when vehicles are close to pedestrian areas, it is necessary to monitor the running speed of the tour buses to ensure that they do not exceed the speed limit of the park.

[0081] The specific steps are as follows:

[0082] Step 510, demand survey and specified speed setting: analyze the tourist flow in different areas of the park and set the maximum operating speed of the tour buses in each area.

[0083] Step 520, camera positioning and installation: Install cameras at key points along the tour bus route, especially on downhill sections where the vehicle may accelerate or in places where there are many tourists.

[0084] Step 530, actual distance and pixel mapping: measure the length of the specific road section covered by the camera, and calculate the actual distance represented by one pixel according to the camera resolution.

[0085] Step 540, displacement detection configuration: different pixel displacement thresholds are set in the displacement detection system according to the characteristics of the road section, which is reflected as the speed limit of the tour bus in the park.

[0086] Step 550, speed monitoring and speeding alarm: The system monitors the pixel displacement of the tour bus in real time and compares it with a preset time window (such as every second). If the number of pixels moved by the tour bus within the time window exceeds the threshold of the corresponding area, the system will trigger a speeding alarm.

[0087] like Figure 5As shown, the video screen has a resolution of 800*600, and the actual measured road length is 80 meters. If it is preset that the speed of the park vehicles on this section of road shall not exceed 36KM / h, then through preliminary research, the parameters of 1 second and 100 pixel distance can be set in the system to ensure that the moving speed of the park vehicles on this section of road does not exceed the expected value with a granularity of 1 second.

[0088] Through the above process, the embodiment of the present invention first conducts an in-depth demand investigation to establish the target characteristics that the system needs to identify and track, and sets the target tracking label and the corresponding time and distance thresholds according to these investigation results, which not only improves the tracking accuracy, but also enhances the system's adaptability to the actual operating environment and the flexibility of application. It can meet the actual application of monitoring the relative static state of objects, and can also meet the actual application of objects moving faster than expected. It improves the real-time feedback capability and accuracy of displacement detection and the response speed and processing efficiency of target monitoring, and can accurately track the target object in a dynamic environment. Even under conditions of camera shaking or light changes, the accurate target motion state can be obtained, thereby effectively solving the problems that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the needs of dynamic environments and multiple scenarios, and has low performance and accuracy.

[0089] The following is an embodiment of the device of the present invention, which can be used to execute the target movement state determination method involved in the present invention. For details not disclosed in the embodiment of the device of the present invention, please refer to the method embodiment of the target movement state determination method involved in the present invention.

[0090] See also Figure 6 , an embodiment of the present invention provides a target movement state judgment device 800.

[0091] The target movement state determination device 800 includes but is not limited to: a target recognition module 810 , a target position acquisition module 830 , a history query module 850 and a movement state acquisition module 870 .

[0092] The target recognition module 810 is used to obtain the current frame image and recognize the target on the current frame image.

[0093] The target position acquisition module 830 is used to set the target label, time interval and distance threshold according to the motion characteristics of the target, and obtain the current position of the target according to the current frame image.

[0094] The history query module 850 is used to query the database to obtain the corresponding history records according to the target tag, and obtain the displacement and movement duration of the target according to the current position of the target and the history records.

[0095] The movement state acquisition module 870 is used to compare the displacement and movement duration of the target with the distance threshold and the time interval respectively to obtain the movement state of the target.

[0096] It should be noted that, when the target movement state judgment provided in the above embodiment is carried out, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the target movement state judgment device will be divided into different functional modules to complete all or part of the functions described above.

[0097] In addition, the target movement state judgment device and the target movement state judgment method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.

[0098] Figure 7 The present invention schematically illustrates the structure of an electronic device according to an exemplary embodiment.

[0099] It should be noted that the electronic device is only an example adapted to the present invention and cannot be considered to provide any limitation on the scope of use of the present invention. The electronic device cannot be interpreted as requiring dependence on or having Figure 7 One or more components of exemplary electronic device 2000 are shown.

[0100] The hardware structure of the electronic device 2000 may vary greatly due to differences in configuration or performance, such as Figure 7 As shown, the electronic device 2000 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .

[0101] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the electronic device 2000 .

[0102] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted by the present invention, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Figure 7 As shown, this is not intended to be a specific limitation.

[0103] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.

[0104] Among them, the operating system 251 is used to manage and control various hardware devices and application programs 253 on the electronic device 2000 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0105] The application program 253 is a computer-readable instruction that performs at least one specific task based on the operating system 251, and may include at least one module ( Figure 7 (not shown), each module may respectively include computer-readable instructions for the electronic device 2000. For example, the target movement state determination device may be regarded as an application 253 deployed in the electronic device 2000.

[0106] The data 255 may be signal information, etc., stored in the memory 250 .

[0107] The central processor 270 may include one or more processors, and is configured to communicate with the memory 250 through at least one communication bus to read the computer-readable instructions stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the target movement state determination method is completed by the central processor 270 reading a series of computer-readable instructions stored in the memory 250.

[0108] In addition, the present invention can also be implemented by hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present invention is not limited to any specific hardware circuits, software, or a combination of the two.

[0109] See also Figure 8 In an embodiment of the present invention, an electronic device 4000 is provided. The electronic device 4000 may include: a desktop computer, a laptop computer, a server, etc. with sensor recognition capability.

[0110] exist Figure 8 In the embodiment, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0111] The data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0112] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception, etc. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0113] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0114] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program instructions or codes in the form of instructions or data structures and can be accessed by the electronic device 4000, but is not limited to this.

[0115] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002 .

[0116] The computer-readable instructions are executed by one or more processors 4001 to implement the target movement state determination method in the above-mentioned embodiments.

[0117] In addition, an embodiment of the present invention provides a storage medium on which computer-readable instructions are stored. The computer-readable instructions are executed by one or more processors to implement the target movement state determination method as described above.

[0118] A computer program product is provided in an embodiment of the present invention. The computer program product includes computer-readable instructions. The computer-readable instructions are stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, so that the electronic device implements the target movement state judgment method as described above.

[0119] Compared with the related art, the present invention has the following beneficial effects:

[0120] 1. The present invention obtains a current frame image by first acquiring the current frame image, identifies the current frame image to obtain the target, sets the target's label, time interval and distance threshold according to the target's motion characteristics, obtains the target's current position according to the current frame image, queries a database according to the target's label to obtain the corresponding historical record, obtains the target's displacement and motion duration according to the target's current position and historical records, compares the target's displacement and motion duration with the distance threshold and time interval respectively, and obtains the target's moving state, provides real-time displacement detection through a tracking model and a data processing flow, improves the real-time feedback capability and accuracy of displacement detection as well as the response speed and processing efficiency of target monitoring, can accurately track the target object in a dynamic environment, and can obtain the accurate target motion state even under conditions of camera shaking or light changes, thereby effectively solving the problems that the prior art cannot accurately track the displacement of the target object in real time, cannot meet the requirements of dynamic environments and multiple scenarios, and has low performance and accuracy.

[0121] 2. The present invention can improve monitoring efficiency and enhance tracking accuracy: by achieving faster data processing and optimized tracking algorithms, it can provide real-time displacement detection, greatly improving the response speed and processing efficiency of the monitoring system. The advanced tracking model can accurately track the target object in a dynamic environment, and can maintain accurate tracking effects even under conditions of camera shaking or light changes.

[0122] 3. The present invention can reduce storage resource consumption and optimize data management: the Redis database and replacement update strategy are used to effectively avoid data expansion, reduce storage resource consumption, and reduce system maintenance costs. By setting the expiration time of the data, invalid or outdated data is automatically cleared, thereby reducing the long-term occupation of storage space and optimizing data management.

[0123] 4. The present invention is flexibly adaptable to a variety of application scenarios: by allowing users to adjust the displacement threshold and time interval according to specific needs, it can be flexibly adapted to a variety of monitoring scenarios, from high-speed moving vehicles to almost motionless objects.

[0124] 5. The present invention can reduce the false alarm rate and improve the scalability of the system: improving the accuracy of displacement detection can effectively reduce the false alarm rate and ensure that the alarm of the monitoring system is more reliable. The modular design makes it easy to integrate into the existing monitoring system, providing a high degree of compatibility and scalability for system upgrades.

[0125] 6. The present invention can improve the real-time feedback capability and accuracy of displacement detection, maintain stable tracking performance, significantly reduce the system burden by using an efficient data storage strategy, namely the Redis database and its high-speed read and write performance and data replacement and update strategy, and provide flexible displacement threshold and time interval settings, so that the system can more accurately judge the motion state of the target object.

[0126] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0127] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining a target movement state, characterized in that: The method comprises: Acquire a current frame image, and identify a target from the current frame image; Setting a label, a time interval and a distance threshold of the target according to the motion characteristics of the target, and obtaining a current position of the target according to the current frame image; According to the tag of the target, query whether there is a corresponding historical record in the database; if there is no historical record, record the current position of the target in the database; if there is a historical record, obtain the displacement of the target according to the current position of the target and the position in the historical record, and calculate the movement duration of the target according to the timestamp corresponding to the current frame image of the target and the timestamp in the historical record; The displacement and movement duration of the target are compared with the distance threshold and the time interval respectively to obtain the movement state of the target.

2. The target movement state determination method according to claim 1, characterized in that: The step of comparing the displacement and movement duration of the target with the distance threshold and the time interval respectively to obtain the movement state of the target includes: If the displacement of the target exceeds the distance threshold, an alarm signal is issued and the current position of the target and the timestamp corresponding to the current frame image are updated in the database; If the displacement of the target does not exceed the distance threshold, whether to update is determined based on the movement duration and time interval of the target.

3. The target movement state determination method according to claim 2, characterized in that: The step of determining whether to update based on the movement duration and time interval of the target includes: Determine whether the movement duration of the target exceeds the time interval, and if so, update the current position and the corresponding timestamp of the target in the database; If the time interval has not been exceeded, the database is not updated.

4. The target movement state determination method according to claim 1, characterized in that: After the current frame image is identified to obtain the target, the method further includes: An error threshold of the target pixel displacement is set, and if the relationship between the pixel displacement of the target in the current frame image and the error threshold does not satisfy a set condition, the image is reacquired.

5. The target movement state determination method according to claim 1, characterized in that: The method further comprises: A unique tracking identifier is assigned to each target identified in the current frame image, each target in the current frame image is traversed and the information of each target in the database is updated; the tracking identifier is used to store and retrieve the target information.

6. The target movement state determination method according to claim 1, characterized in that: The database is a Redis database, which is used to store and update target information; an expiration time is set for the database, and the expiration time is used to control the timeliness and total amount of data in the database.

7. A target movement state judgment device, characterized in that: The device is applied to the target movement state determination method according to any one of claims 1 to 6, and the device comprises: A target recognition module is used to obtain a current frame image and recognize a target from the current frame image; A target position acquisition module, used to set the target's label, time interval and distance threshold according to the target's motion characteristics, and obtain the target's current position according to the current frame image; A history query module, used to query the database to obtain the corresponding history records according to the tag of the target, and obtain the displacement and movement duration of the target according to the current position and history records of the target; The movement state acquisition module is used to compare the displacement and movement duration of the target with the distance threshold and time interval respectively to obtain the movement state of the target.

8. An electronic device, characterized in that: include: at least one processor and at least one memory, wherein: The memory has computer-readable instructions stored thereon; The computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the target movement state determination method according to any one of claims 1 to 6.

9. A storage medium having computer-readable instructions stored thereon, characterized in that: The computer-readable instructions are executed by one or more processors to implement the target movement state determination method according to any one of claims 1 to 6.