CN109086152B - Picture analysis method, device and system, computer equipment and storage medium - Google Patents

Picture analysis method, device and system, computer equipment and storage medium Download PDF

Info

Publication number
CN109086152B
CN109086152B CN201710447623.7A CN201710447623A CN109086152B CN 109086152 B CN109086152 B CN 109086152B CN 201710447623 A CN201710447623 A CN 201710447623A CN 109086152 B CN109086152 B CN 109086152B
Authority
CN
China
Prior art keywords
task
picture analysis
sub
picture
computing node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710447623.7A
Other languages
Chinese (zh)
Other versions
CN109086152A (en
Inventor
周明耀
浦世亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201710447623.7A priority Critical patent/CN109086152B/en
Publication of CN109086152A publication Critical patent/CN109086152A/en
Application granted granted Critical
Publication of CN109086152B publication Critical patent/CN109086152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0715Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a system implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a picture analysis method, a device and a system, computer equipment and a storage medium, comprising the following steps: when a certain computing node of the image analysis system is subjected to program crash, generating a task set to be screened according to a task which causes the program crash of the certain computing node; executing each sub-picture analysis task in a task set to be screened through a computing node of a picture analysis system, and screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of program crash of the computing node caused by each sub-picture analysis task; executing the suspicious sub-picture analysis task through the computing node until the computing node is crashed; and discarding the suspicious sub-picture analysis tasks causing the program crash of the computing node. The invention solves the problem that the long-time frame loss phenomenon can be caused in the video playing process because the picture analysis task which causes the program crash of the computing node is discarded.

Description

Picture analysis method, device and system, computer equipment and storage medium
Technical Field
The present invention relates to the field of video analysis technologies, and in particular, to a method, an apparatus, and a system for picture analysis, a computer device, and a storage medium.
Background
The picture analysis technology is a technology for analyzing, describing, classifying and explaining a scene by using a mode recognition and artificial intelligence method, and is also called scene analysis or image understanding.
The image analysis system generally comprises a central node and a plurality of computing nodes, the central node packs the massive images into a plurality of image analysis tasks, each image analysis task can comprise a plurality of associated images (for example, an image transmitted in each second in the video is an image analysis task), and each computing node executes respective image analysis tasks in parallel after acquiring different image analysis tasks.
Because each picture analysis task includes multiple pictures, when a picture in a format that is not supported by a computing node exists in a picture analysis task acquired by the computing node, a program crash (also called a process crash) occurs in the process that the computing node executes the picture analysis task.
Although a task of causing a program crash to a compute node may be discarded at first, then the compute node with the program crash is restored, and after the compute node is restored, a next picture analysis task may be executed, however, since the whole picture analysis task is discarded, all pictures therein are lost correspondingly, and a long-time frame loss phenomenon may occur in a video playing process, the reliability of the current picture analysis is low.
Disclosure of Invention
In order to solve the problem that a long-time frame loss phenomenon may occur in a video playing process due to discarding of a picture analysis task causing program crash of a computing node in the related art, embodiments of the present invention provide a picture analysis method, an apparatus and a system, a computer device, and a storage medium. The technical scheme is as follows:
in a first aspect, a picture analysis method is provided, where the picture analysis method is used for a central node, and the method includes:
when a program of a certain computing node of an image analysis system is crashed, generating a task set to be screened, which comprises at least one sub-image analysis task, according to a task which causes the program of the certain computing node to be crashed, wherein each sub-image analysis task consists of one image in the task which causes the program of the certain computing node to be crashed;
executing each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, and screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of the program crash of the computing node caused by each sub-picture analysis task;
executing the suspicious sub-picture analysis task through a computing node of the picture analysis system until the computing node is crashed;
and discarding the suspicious sub-picture analysis tasks causing the program crash of the computing node.
Optionally, the step of executing, by the computing node of the image analysis system, each sub-image analysis task in the task set to be screened, and screening a suspicious sub-image analysis task in the task set to be screened according to a total number of times of program crash of the computing node caused by each sub-image analysis task includes:
performing a task screening process, the task screening process comprising:
executing each sub-picture analysis task of the task set to be screened through a computing node of the picture analysis system, updating the task set to be screened according to an execution result, and generating total crash times of program crash of the computing node by each sub-picture analysis task in the task set to be screened;
judging whether a sub-picture analysis task which enables the total number of times of program collapse of the computing nodes to be larger than or equal to the preset number of times of collapse exists in the task set to be screened;
when the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse does not exist in the task set to be screened, the task screening process is repeatedly executed until the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
and when the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse exist in the task set to be screened, determining all the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse in the task set to be screened as the suspicious sub-picture analysis tasks.
Optionally, the determining whether a sub-picture analysis task exists in the task set to be screened, where a total number of times of crash of the computing node caused by program crash is greater than or equal to a preset number of times of crash, includes:
when a first sub-picture analysis task causes a program crash of a computing node, updating the total number of times of the program crash of the computing node caused by the first sub-picture analysis task, wherein the first sub-picture analysis task is any one sub-picture analysis task in the task set to be screened;
and after the total number of times of program collapse of the computing node caused by the first sub-picture analysis task is updated every time, judging whether the total number of times of program collapse of the computing node caused by the first sub-picture analysis task is greater than or equal to a preset number of times of collapse.
Optionally, a suspicious picture task queue is disposed in the central node, and the suspicious picture task queue is configured to record a sub-picture analysis task obtained by splitting a picture analysis task that causes a program crash of the computing node, and a total number of times of crash of the program crash of the computing node caused by the sub-picture analysis task,
when the first sub-picture analysis task causes the program crash of the computing node, updating the total number of times of the program crash of the computing node caused by the first sub-picture analysis task, including:
when the first sub-picture analysis task in the suspicious picture task queue causes program crash of a computing node, updating the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue;
the executing the suspicious sub-picture analysis task by the computing node of the picture analysis system includes:
and sequentially sending the suspicious sub-picture analysis tasks in the suspicious picture task queue to a computing node of the picture analysis system.
Optionally, each suspicious sub-picture analysis task is sent after the previous suspicious sub-picture analysis task is executed, and when a computing node of the picture analysis system executes any suspicious sub-picture analysis task, the computing node stops executing other picture analysis tasks, where the other picture analysis tasks are all picture analysis tasks except for any suspicious sub-picture analysis task.
Optionally, the executing, by the computing node of the picture analysis system, each sub-picture analysis task of the task set to be filtered includes:
and mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted picture analysis tasks, and sending the mixed sub-picture analysis tasks to the computing node of the picture analysis system.
Optionally, a normal picture task queue is disposed in the central node, and the normal picture task queue is configured to record all picture analysis tasks to be analyzed, each picture analysis task includes at least one picture,
the mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted sub-picture analysis tasks and sending the mixed sub-picture analysis tasks to the computing node includes:
sequentially writing the sub-picture analysis tasks in the task set to be screened into the normal picture task queue;
and sequentially sending the picture analysis tasks recorded by the normal picture task queue to the computing node.
Optionally, after discarding the suspicious sub-picture analysis task causing the computing node to perform a program crash, the method further includes:
and deleting all the sub-picture analysis tasks in the suspicious picture task queue.
In a second aspect, there is provided a picture analysis apparatus for a central node, the apparatus comprising:
the image analysis system comprises a generation module, a processing module and a processing module, wherein the generation module is used for generating a task set to be screened, which comprises at least one sub-image analysis task according to a task of causing a program of a certain computing node to crash when the program of the certain computing node of the image analysis system crashes, and each sub-image analysis task consists of one image in the task of causing the program of the certain computing node to crash;
the screening module is used for executing each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, and screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of program crash of the computing node caused by each sub-picture analysis task;
the execution module is used for executing the suspicious sub-picture analysis task through the computing node of the picture analysis system until the computing node is crashed;
and the discarding module is used for discarding the suspicious sub-picture analysis task which causes the program crash of the computing node.
Optionally, the screening module includes:
an execution submodule for executing a task screening process, the execution submodule comprising:
the updating unit is used for executing each sub-picture analysis task of the task set to be screened through a computing node of the picture analysis system, updating the task set to be screened according to an execution result, and generating total crash times of program crash of the computing node by each sub-picture analysis task in the task set to be screened;
the judging unit is used for judging whether the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
the repeated execution unit is used for repeatedly executing the task screening process when the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse does not exist in the task set to be screened until the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
and the determining unit is used for determining all the sub-picture analysis tasks in the task set to be screened, which cause the total program crash frequency of the computing nodes to be greater than or equal to the preset crash frequency, as the suspicious sub-picture analysis tasks when the sub-picture analysis tasks exist in the task set to be screened, wherein the total crash frequency of the computing nodes to be subjected to program crash is greater than or equal to the preset crash frequency.
Optionally, the determining unit includes:
the updating subunit is configured to update, when a first sub-picture analysis task causes a program crash of a computing node, a total number of times of the program crash of the computing node caused by the first sub-picture analysis task, where the first sub-picture analysis task is any one sub-picture analysis task in the task set to be screened;
and the judging subunit is used for judging whether the total times of the program crash of the computing node caused by the first sub-picture analysis task is greater than or equal to the preset times of the program crash after the total times of the program crash of the computing node caused by the first sub-picture analysis task is updated each time.
Optionally, a suspicious picture task queue is disposed in the central node, and the suspicious picture task queue is configured to record a sub-picture analysis task obtained by splitting a picture analysis task that causes a program crash of the computing node, and a total number of times of crash of the program crash of the computing node caused by the sub-picture analysis task,
the update subunit is configured to:
when the first sub-picture analysis task in the suspicious picture task queue causes program crash of a computing node, updating the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue;
the execution module is further configured to:
and sequentially sending the suspicious sub-picture analysis tasks in the suspicious picture task queue to a computing node of the picture analysis system.
Optionally, each suspicious sub-picture analysis task is sent after the previous suspicious sub-picture analysis task is executed, and when a computing node of the picture analysis system executes any suspicious sub-picture analysis task, the computing node stops executing other picture analysis tasks, where the other picture analysis tasks are all picture analysis tasks except for any suspicious sub-picture analysis task.
Optionally, the screening module is configured to:
and mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted picture analysis tasks, and sending the mixed sub-picture analysis tasks to the computing node of the picture analysis system.
Optionally, a normal picture task queue is disposed in the central node, and the normal picture task queue is configured to record all picture analysis tasks to be analyzed, each picture analysis task includes at least one picture,
the screening module is further configured to:
sequentially writing the sub-picture analysis tasks in the task set to be screened into the normal picture task queue;
and sequentially sending the picture analysis tasks recorded by the normal picture task queue to the computing node.
Optionally, the apparatus further comprises:
and the deleting module is used for deleting all the sub-picture analysis tasks in the suspicious picture task queue.
In a third aspect, a picture analysis system is provided, the system comprising: the apparatus and computing node of any of the second aspect.
In a fourth aspect, a computer device, comprising a processor and a memory,
wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory, and implement the picture analysis method according to any one of the first aspect.
In a fifth aspect, there is provided a storage medium having stored thereon a computer program capable of executing the picture analysis method of any one of the first aspect when the program in the storage medium is executed by a processor.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the picture analysis method, the device and the system, the computer equipment and the storage medium provided by the embodiment of the invention can generate a task set to be screened according to a task of causing a program crash of a computing node of a picture analysis system when the program crash occurs to the computing node, screen suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of causing the program crash of the computing node by each sub-picture analysis task, execute the suspicious sub-picture analysis tasks by the computing node, discard the suspicious sub-picture analysis tasks causing the program crash of the computing node when any suspicious sub-picture analysis task causes the program crash of the computing node, compared with the related technology, the picture analysis method provided by the embodiment of the invention only discards pictures causing the program crash of the computing node for a plurality of times in the picture analysis tasks and reserves other pictures in the picture analysis tasks, the number of lost pictures is effectively reduced, the time of frame loss in the video playing process is shortened, and the reliability of picture analysis is improved.
Drawings
Fig. 1 is a schematic structural diagram of an image analysis system according to an image analysis method provided in an embodiment of the present invention;
fig. 2 is a flowchart of a picture analysis method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for picture analysis according to an embodiment of the present invention;
fig. 4-1 is a schematic structural diagram of a picture task queue of a central node according to an embodiment of the present invention;
fig. 4-2 is a schematic structural diagram of a picture task queue of another central node according to an embodiment of the present invention;
fig. 4-3 is a schematic structural diagram of a picture task queue of another central node according to an embodiment of the present invention;
fig. 4-4 are schematic structural diagrams of a picture task queue of a central node according to an embodiment of the present invention;
fig. 4-5 are schematic structural diagrams of a picture task queue of a central node according to another embodiment of the present invention;
fig. 4-6 are schematic structural diagrams of another image task queue of a central node according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an image analysis apparatus according to an embodiment of the present invention;
FIG. 6-1 is a schematic structural diagram of a screening module according to an embodiment of the present invention;
FIG. 6-2 is a schematic structural diagram of an execution submodule provided in the embodiment of the present invention;
fig. 6-3 is a schematic structural diagram of a determining unit according to an embodiment of the present invention;
fig. 6-4 are schematic structural diagrams of another image analysis apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a picture analysis system 10 related to a picture analysis method provided in an embodiment of the present invention, and as shown in fig. 1, the picture analysis system 10 may include: a central node 101 and at least one computing node 102.
The central node 101 may be a server, a server cluster composed of several servers, or a cloud computing service center, for example, the central node may be a video server. The computing node 102 may be a server, a server cluster composed of several servers, or a cloud computing service center.
The connection between the central node 101 and the computing node 102 may be established through a wired network or a wireless network.
In an optional embodiment of the present invention, the central node may be provided with two picture task queues, which are a normal picture task queue and a suspicious picture task queue, respectively. The normal picture task queue is used for recording all picture analysis tasks to be analyzed, wherein the picture analysis tasks comprise picture analysis tasks generated by a central node, and each picture analysis task comprises at least one picture; the suspicious picture task queue is used for recording sub-picture analysis tasks obtained by splitting a picture analysis task which causes the program crash of the computing node, wherein each sub-picture analysis task comprises a picture, and the total crash times of the program crash of the computing node are caused by the sub-picture analysis tasks.
Optionally, the central node may further include a completed picture task queue, where the completed picture task queue is configured to record analysis results obtained by the computing node managed by the central node executing the picture analysis task, and each analysis result includes an analysis result of at least one picture.
Optionally, the number of times that the task (including the picture analysis task, the sub-picture analysis task, and the like) causes the computing node to crash may be recorded in the task queue, may be recorded in an attribute of each task, or may be recorded in a correspondence relationship between an identifier of the task and the number of crashes stored in the central node, and the like, which is not limited herein.
In practical application, after acquiring a video stream, the central node may package pictures in the video to generate a picture analysis task, and store the picture analysis task in a normal picture task queue, and after acquiring the picture analysis task in the normal picture task queue, the central node may send the picture analysis task to the computing node, and the computing node may execute the picture analysis task.
Fig. 2 is a flowchart of an image analysis method provided in an embodiment of the present invention, which may be applied to the central node 101 in the image analysis system 10 shown in fig. 1, and as shown in fig. 2, the method may include:
step 201, when a certain computing node of the picture analysis system is in a program crash, generating a task set to be screened, which includes at least one sub-picture analysis task, according to a task that causes the program crash of the certain computing node, where each sub-picture analysis task is composed of one picture in the task that causes the program crash of the certain computing node.
When the program of the certain computing node crashes, a task set to be screened is generated according to the multiple picture analysis tasks executed on the certain computing node, that is, when the central node crashes the program of the certain computing node, the multiple picture analysis tasks on the certain computing node are all determined as the picture analysis tasks causing the program of the certain computing node to crash.
Step 202, executing each sub-picture analysis task in the task set to be screened through the computing node of the picture analysis system, and screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of the program crash of the computing node caused by each sub-picture analysis task.
The suspicious sub-picture analysis task is a sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse in the task set to be screened.
In step 202, the computing node may sequentially execute each task in the task set to be screened, so that a single sub-picture analysis task may be repeatedly executed by the computing node for multiple times, and each time one sub-picture analysis task causes a crash of the computing node, the central node may update a total crash number of times that the sub-picture analysis task causes a program crash of the computing node, for example, add 1 to the total crash number of times of the task.
And step 203, executing the suspicious sub-picture analysis task through the computing node of the picture analysis system until the computing node is crashed.
And step 204, discarding the suspicious sub-picture analysis task causing the program crash of the computing node.
To sum up, the picture analysis method provided in the embodiments of the present invention may generate a task set to be screened according to a task that causes a program crash of a computing node of a picture analysis system when the program crash occurs at the computing node, screen a suspicious sub-picture analysis task in the task set to be screened according to a total number of times of crash that each sub-picture analysis task causes the program crash of the computing node, and then execute the suspicious sub-picture analysis task through the computing node, and discard the suspicious sub-picture analysis task that causes the crash of the computing node when any suspicious sub-picture analysis task causes the program crash of the computing node, compared with the related art, the picture analysis method provided in the embodiments of the present invention only discards pictures that cause the program crash of the computing node multiple times in the picture analysis task, and retains other pictures in the picture analysis task, thereby effectively reducing the number of lost pictures, the time of frame loss in the video playing process is shortened, and the reliability of picture analysis is improved.
In this embodiment of the present invention, it is assumed that a central node manages a plurality of computing nodes, where the central node manages a first computing node, a second computing node, and a third computing node, and each of the first computing node, the second computing node, and the third computing node may be at least one computing node in an image analysis system, and fig. 3 is a flowchart of another image analysis method provided in an embodiment of the present invention, which may be used in an image analysis system 10 shown in fig. 1, and as shown in fig. 3, the method may include:
step 301, the central node sends a first picture analysis task to the first computing node.
In an optional embodiment of the present invention, after a first computing node in the image analysis system is powered on, the first computing node applies for executing an image analysis task to the central node, and when the central node determines that the first computing node has the capability of executing the image analysis task, the image analysis task may be allocated to the first computing node.
Optionally, assuming that the central node is a video server, after acquiring the video stream, the central node may pack a large number of pictures in the video stream into picture analysis tasks one by one, where each picture analysis task includes at least one picture. In order to increase the processing speed, generally, one picture analysis task includes multiple pictures, where the multiple pictures are pictures having an association relationship, for example, pictures transmitted in a video every second, the packed picture analysis task is stored in a normal picture task queue of a central node, the central node sends a first picture analysis task in the normal picture task queue to a first computing node, and the first picture analysis task is a task determined by the normal picture task queue according to a preset sequence.
Optionally, after the central node sends the first picture analysis task to the first computing node, the first picture analysis task may also be stored in a normal picture task queue of the central node, and when the central node receives the first picture analysis task that is analyzed by the first computing node, an analysis result of the first picture analysis task is stored in a completed picture task queue and the first picture analysis task in the normal picture task queue is deleted; or after the central node sends the first picture analysis task to the first computing node, the central node may directly delete the first picture analysis task in the normal picture task queue, and wait for the first computing node to perform corresponding feedback on the first picture analysis task.
Step 302, the first computing node executes a first picture analysis task.
In an optional embodiment of the present invention, after receiving the first picture analysis task sent by the central node, the first computing node starts to execute the first picture analysis task, and analyzes each picture in the first picture analysis task.
Step 303, when the first computing node crashes in the process of executing the first picture analysis task, sending first analysis failure information to the central node.
In an alternative embodiment of the present invention, during the process of executing the first picture analysis task, if an irreversible condition occurs (for example, there is a picture in the first picture analysis task in a format that is not supported by the first computing node), a program crash may occur to the first computing node. After the first computing node is crashed, the first computing node feeds back first analysis failure information to the central node, wherein the first analysis failure information is used for indicating that the first computing node fails to analyze the first picture analysis task, and the program is crashed. If the first picture analysis task is deleted after the central node sends the first picture analysis task to the first computing node from the normal picture task queue, the first computing node carries the first picture analysis task in the first analysis failure information, so that the central node can perform subsequent processing on the first picture analysis task; if the first picture analysis task is also stored in the normal picture task queue of the central node, the first picture analysis task does not need to be carried in the first analysis failure information sent by the first computing node, and only an error prompt needs to be reported. The error prompt may carry an identification of the first picture analysis task.
Optionally, the central node may monitor the first computing node for a program crash. For example, after the central node sends the first picture analysis task to the first computing node, if an analysis result corresponding to the first picture analysis task sent by the first computing node is not received within a preset time period, the central node may determine that the first computing node is in a program crash, and if the first picture analysis task is also stored in the normal picture task queue, the central node may directly perform subsequent processing on the first picture analysis task stored in the normal picture task queue; if the first picture analysis task is not stored in the normal picture task queue, the first picture analysis task may be obtained from the first computing node and be subsequently processed.
Step 304, the central node generates a task set to be screened, which comprises at least one sub-picture analysis task, according to the first analysis failure information, wherein each sub-picture analysis task is composed of one picture in the first picture analysis task.
In an optional embodiment of the present invention, each sub-picture analysis task in the task set to be screened is recorded in the suspicious picture task queue.
Optionally, each sub-picture analysis task in the suspicious picture task queue is assigned with a picture Identity (Identity, for short, ID) and a total number of times of program crash of the computing node caused by the sub-picture analysis task.
Wherein each picture ID includes: a source ID, where the source ID is used to identify a picture analysis task from which each sub-picture analysis task originates, for example, each sub-picture analysis task in a plurality of sub-picture analysis tasks obtained by splitting the first picture analysis task originates from the first picture analysis task, each sub-picture analysis task carries a corresponding picture ID, and a source ID included in the picture ID is used to indicate the first picture analysis task.
Optionally, each picture ID further includes a picture sequence number, which is used to identify the arrangement order of the pictures in the picture analysis task indicated by the source ID. For example, in a plurality of sub-picture analysis tasks split by the first picture analysis task, a picture sequence number included in the picture ID of each sub-picture analysis task is used to identify the order of the corresponding picture in the first picture analysis task. The source ID is used to identify the picture analysis task from which each sub-picture analysis task originates, for example, the source ID in the plurality of sub-picture analysis tasks split by the first picture analysis task may be a timestamp of when the first picture analysis task was generated. For another example, the source ID in the plurality of sub-picture analysis tasks split by the first picture analysis task may be the number of the first picture analysis task.
For example, assuming that the first picture analysis task includes 5 pictures, the central node splits the 5 pictures into 5 sub-picture analysis tasks, and the picture IDs carried by each sub-picture analysis task may be: 201610251855-1, 201610251855-2, 201610251855-3, 201610251855-4 and 201610251855-5, wherein 201610251855 is a source ID. Optionally, the source ID may be a timestamp of the first picture analysis task when the first picture analysis task is generated, a timestamp of the first picture analysis task when the central node sends the first picture analysis task to the first computing node, or another tag or sequence number.
For example, assuming that the first picture analysis task includes 3 pictures, the number of the first picture analysis task is a108, and the picture ID carried by each sub-picture analysis task may be: a1081, a1082, a1083, wherein a108 is the source ID.
Assuming that the total number of times of program crashes of the computing node in the picture analysis system caused by the sub-picture analysis task with the picture ID of 201610251855-1 at the current time is 3, the total number of times of program crashes of the computing node caused by the sub-picture analysis task with the picture ID of 201610251855-1 is recorded in the suspicious picture task queue is 3.
Optionally, the method for generating, by the central node, the task set to be filtered including at least one sub-picture analysis task according to the first picture analysis task includes:
s41, judging whether the first picture analysis task comprises a plurality of pictures or not; when the first picture analysis task includes a plurality of pictures, executing S42; when only one picture is included in the first picture analysis task, S43 is performed.
S42, the central node divides the first picture analysis task into a plurality of sub-picture analysis tasks, and the plurality of sub-picture analysis tasks are added to the task set to be screened.
After the central node splits the first picture analysis task into a plurality of sub-picture analysis tasks, a picture ID is distributed to each sub-picture analysis task and is added to a suspicious picture task queue.
In an alternative embodiment of the present invention, the initialization number of times that each sub-picture analysis task causes a program crash of a computing node may be set according to a specific scenario. For example, when it is assumed that the first picture analysis task causes the first computing node to have a program crash, which is equivalent to that the plurality of sub-picture analysis tasks in the first picture analysis task cause the computing node to have a program crash for the first time, the number of times that each sub-picture analysis task newly added in the suspicious picture task queue causes the computing node to have a program crash is recorded as 1. When the first picture analysis task causes the program crash of the first computing node not to be the program crash of the plurality of sub-picture analysis tasks in the first picture analysis task for the first time, the number of times that the program crash of the computing node occurs by each newly added sub-picture analysis task in the suspicious picture task queue is marked as 0, and at the moment, the program crash of the computing node by the first picture analysis task is only used for identifying the plurality of sub-picture analysis tasks obtained by splitting the first picture analysis task in the suspicious picture task queue, and is not used for calculating the total number of times that the program crash occurs by the plurality of sub-picture analysis tasks.
S43, judging whether the first picture analysis task is in a suspicious picture task queue; when the first picture analysis task is not in the suspicious picture task queue, executing step S44; when the first picture analysis task is in the suspicious picture task queue, step S45 is performed.
And judging whether the first picture analysis task is in the suspicious picture task queue, namely judging whether the suspicious picture task queue comprises the picture analysis task with the same picture ID as that of the first picture analysis task.
And S44, adding the first picture analysis task into the task set to be screened.
The central node may assign a picture ID for the first picture analysis task and add to the suspicious picture task queue.
And S45, not generating a task set to be screened.
And when the first picture analysis task is in the suspicious picture task queue, updating the total crash times of the first picture analysis task in the suspicious picture task queue to cause the program crash of the computing node.
In an optional embodiment of the present invention, after generating the task set to be filtered, the central node performs a task filtering process, where the task filtering process may include:
executing each sub-picture analysis task of the task set to be screened through a computing node of the picture analysis system, updating the task set to be screened according to an execution result, and generating total crash times of program crash of the computing node by each sub-picture analysis task in the task set to be screened; judging whether a sub-picture analysis task which enables the total number of times of program collapse of the computing nodes to be larger than or equal to the preset number of times of collapse exists in the task set to be screened;
when the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse does not exist in the task set to be screened, the task screening process is repeatedly executed until the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
when the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse exist in the task set to be screened, all the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse in the task set to be screened are determined as suspicious sub-picture analysis tasks.
The embodiment of the present invention is described by taking an example that a central node executes a task screening process through a second computing node, where the second computing node may be one or more computing nodes in a picture analysis system, for example, the central node may allocate a plurality of sub-picture analysis tasks to one computing node for analysis, or may allocate the sub-picture analysis tasks to a plurality of computing nodes for parallel processing, and the computing nodes that process the sub-picture analysis tasks are collectively referred to as second computing nodes, and the second computing nodes may include recovered first computing nodes. See in particular steps 305 to 310 below.
And 305, the central node sends the sub-picture analysis task in the task set to be screened to the second computing node.
Optionally, the central node mixes the sub-picture analysis task in the task set to be filtered with the non-executed picture analysis task, and sends the mixed task to the second computing node, and the method may include:
and the central node writes the sub-picture analysis tasks in the task set to be screened into a normal picture task queue in sequence, and then sends the picture analysis tasks recorded in the normal picture task queue to the second computing node in sequence. When the central node sequentially writes the sub-picture analysis tasks in the task set to be screened into the normal picture task queue, the written sub-picture analysis tasks can be mixed with the picture analysis tasks which are not executed in the normal picture task queue.
And step 306, executing each sub-picture analysis task of the task set to be screened by the second computing node.
In an optional embodiment of the present invention, after receiving the picture analysis task sent by the central node, the second computing node starts to execute the picture analysis task.
And 307, the second computing node sends second analysis failure information to the central node.
Optionally, the second analysis failure information may include: for a picture analysis task causing a program crash of the second computing node, the step 303 may be referred to for a specific explanation of this step, which is not described herein again in this embodiment of the present invention.
And step 308, the central node takes the sub-picture analysis task which causes the second computing node to generate program crash as an updated task set to be screened.
In an optional embodiment of the present invention, when the second computing node executes the sub-picture analysis task, when the analysis completes one sub-picture analysis task, the analysis result of the sub-picture analysis task is recorded in the completed picture task queue, and the sub-picture analysis task in the task set to be screened is deleted, the central node generates a new task set to be screened according to the second analysis failure information, where the new task set to be screened includes the sub-picture analysis task, and updates the total number of times of program crash of the computing node due to the sub-picture analysis task in the suspicious picture task queue.
Step 309, the central node determines whether there is a sub-picture analysis task in the task set to be screened, where the total number of times of collapse causing program collapse of the computing node is greater than or equal to a preset number of times of collapse.
In an optional embodiment of the present invention, when there is no sub-picture analysis task for causing the total number of times of program crash of the computing node to be greater than or equal to the preset number of times of crash, the above steps 305 to 309 are repeatedly performed until there is a sub-picture analysis task for causing the total number of times of program crash of the computing node to be greater than or equal to the preset number of times of crash.
Optionally, the determining whether a sub-picture analysis task exists in the task set to be screened, where the total number of times of crash of the computing node caused by program crash is greater than or equal to a preset number of times of crash, includes:
and S81, when the first sub-picture analysis task causes the program crash of the computing node, updating the total crash times of the first sub-picture analysis task causing the program crash of the computing node, wherein the first sub-picture analysis task is any one sub-picture analysis task in the task set to be screened.
Optionally, when a first sub-picture analysis task in the suspicious picture task queue causes a program crash of the computing node, the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue is updated.
For example, assuming that the total number of times of crash corresponding to a first sub-picture analysis task in the suspicious picture task queue is 5, when the first sub-picture analysis task causes a program crash of a certain computing node, the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue is updated to 6.
S82, after the total number of times of program crash of the computing node caused by the first sub-picture analysis task is updated each time, determining whether the total number of times of program crash of the computing node caused by the first sub-picture analysis task is greater than or equal to a preset number of times of crash.
Optionally, the preset number of times of collapse may be 10, and the preset number of times of collapse may be determined according to actual application requirements without limitation in the embodiment of the present invention.
In step 310, when there is a sub-picture analysis task that causes the total number of times of program crash of the computing node to be greater than or equal to the preset number of times of crash, the central node determines the sub-picture analysis task that causes the total number of times of program crash of the computing node to be greater than or equal to the preset number of times of crash as a suspicious sub-picture analysis task.
In an optional embodiment of the present invention, when the number of times that each sub-picture analysis task newly added to the suspicious picture task queue causes the program crash of the computing node is recorded as 1, the preset crash number is set to 10, and when the number of times that each sub-picture analysis task newly added to the suspicious picture task queue causes the program crash of the computing node is recorded as 0, the preset crash number is set to 9. Both of these setting methods satisfy: and when the program crash frequency of a computing node in the image analysis system reaches 10 times by a certain sub-image analysis task, determining that the sub-image analysis task is a suspicious sub-image analysis task.
Optionally, the number of times that each suspicious sub-picture analysis task causes the computing node to crash may be recorded in a suspicious-picture task queue, may be recorded in an attribute of each suspicious sub-picture analysis task, or may be recorded in a correspondence between an identifier of a task and the number of crashes stored in the central node, and so on, which is not limited herein.
Step 311, the central node sends the suspicious sub-picture analysis task in the suspicious picture task queue to the third computing node.
Optionally, when the central node determines that there are multiple suspicious sub-picture analysis tasks, the multiple suspicious sub-picture analysis tasks are sequentially sent to the third computing node, that is, after the third computing node completes a suspicious sub-picture analysis task and the suspicious sub-picture analysis task does not cause program crash of the third computing node, the central node sends the next suspicious sub-picture analysis task to the third computing node.
In an optional embodiment of the present invention, the central node sends the suspicious sub-picture analysis task to the third computing node, and simultaneously stops sending other picture analysis tasks to the computing nodes in the picture analysis system, where the other picture analysis tasks are all picture analysis tasks except the suspicious sub-picture analysis task sent by the central node, and the other picture analysis tasks include picture analysis tasks in a normal picture task queue. Because a single computing node in the picture analysis system simultaneously analyzes a plurality of picture analysis tasks at the same time, when a certain picture analysis task causes the program of the computing node to crash, other picture analysis tasks which are analyzing on the computing node are also recorded in a suspicious picture task queue, so that the specific picture analysis task which causes the program of the computing node to crash can not be distinguished, therefore, when the computing node executes the suspicious sub-picture analysis task, the picture analysis tasks in the normal picture task queue are stopped to be executed, and the suspicious sub-picture analysis task which causes the program of the computing node to crash can be accurately searched.
And step 312, the third computing node executes the suspicious sub-picture analysis task until the third computing node crashes.
In an optional embodiment of the present invention, after a third computing node completes a suspicious sub-picture analysis task in a normal analysis manner, an analysis result of the suspicious sub-picture analysis task is stored in a complete picture task queue, and when a certain suspicious sub-picture analysis task causes a program crash of the third computing node, the third computing node in the picture analysis system stops executing the suspicious sub-picture analysis task.
Step 313, the third computing node sends the third analysis failure information to the central node.
Optionally, the third analysis failure information may include: for a suspicious sub-picture analysis task causing a program crash on the third computing node, the specific explanation of this step may refer to step 303 described above, and this embodiment of the present invention is not described herein again.
And step 314, the central node discards a suspicious sub-picture analysis task which causes a program crash of the third computing node.
In the embodiment of the invention, the central node discards one picture which causes the program crash of the computing node, reserves other pictures in the picture analysis task, effectively reduces the number of lost pictures, can reduce the data loss amount in the picture analysis process as much as possible, and improves the reliability of picture analysis.
Step 315, the central node deletes all sub-picture analysis tasks in the suspicious picture task queue.
Optionally, after a suspicious sub-picture analysis task causing the program crash of the computing node is discarded, all the sub-picture analysis tasks in the suspicious picture task queue are emptied, so that on one hand, the memory occupied by the suspicious picture task queue can be reduced, and on the other hand, the interference of the sub-picture analysis tasks in the suspicious picture task queue on the process of searching the suspicious sub-picture analysis task when the program crash of the computing node occurs next time can be avoided.
Further, the central node may package and integrate analysis results of sub-picture analysis tasks in the picture task queue into a target analysis result, where the target analysis result includes all analysis results carrying the same source ID. For example, the target analysis result may include all pictures in the first picture analysis task transmitted in each second in the video except for the discarded pictures in the suspicious sub-picture analysis task, and the pictures belonging to the first picture analysis task are integrated, so that a phenomenon that a playing picture is not smooth due to disorder of pictures in a video playing process can be avoided.
Specifically, the central node integrates all queue elements carrying analysis results of the source ID in the image task queue to obtain one queue element, where the queue element may include a target analysis result. Optionally, the target analysis result obtained by the integration may be stored in a position where the first analysis result carrying the source ID in the completed picture task queue is located, and the positions of other picture analysis tasks in the picture task queue are adjusted according to a preset queue arrangement rule, so that a phenomenon that a certain queue element in the queue is empty is avoided.
In an optional embodiment of the present invention, the image analysis method provided in the embodiment of the present invention may be applied to a Central Processing Unit (CPU), such as an X86 machine, or a Graphics Processing Unit (GPU), such as a heterogeneous machine, and the same image analysis method may be used on different hardware platforms, and the application range of the image analysis method is wide.
The following exemplary embodiment is used to describe a process of executing a picture analysis task by a node in a picture analysis system, and the process includes:
in an alternative embodiment of the present invention, as shown in fig. 4-1 to 4-6, the central node 101 may be provided with a normal picture task queue 101a, a suspicious picture task queue 101b, and a completed picture task queue 101 c.
The picture task queue of the central node is shown in fig. 4-1, a first picture analysis task and a second picture analysis task are recorded in the normal picture task queue 101a, the first picture analysis task belongs to one queue element, it is assumed that the first picture analysis task includes 5 pictures, and picture sequence numbers of the 5 pictures are respectively marked as 1, 2, 3, 4 and 5 according to the arrangement sequence; the second picture analysis task belongs to another queue element, and it is assumed that the second picture analysis task includes 2 pictures, and the picture sequence numbers of the 2 pictures are respectively marked as 1 and 2 according to the arrangement order.
When the first computing node is in a program crash, the picture task queue of the central node is as shown in fig. 4-2, the central node 101 obtains the first picture analysis task, and splits 5 pictures in the first picture analysis task into 5 sub-picture analysis tasks, where picture IDs carried by each sub-picture analysis task may be: 201610251855-1, 201610251855-2, 201610251855-3, 201610251855-4 and 201610251855-5, and storing 5 sub-picture analysis tasks in a suspicious picture task queue 101b, wherein the suspicious picture task queue respectively records the number n of times that the 5 sub-picture analysis tasks cause program crash of the computing node as 1; and the central node writes the split 5 sub-picture analysis tasks into the normal picture task queue 101a in sequence.
And the second computing node executes the picture analysis tasks in the normal picture task queue, and if 3 picture analysis tasks exist to cause program crash of the computing node in the picture analysis system, the updated task set to be screened comprises the 3 picture analysis tasks. The picture task queue of the central node is shown in fig. 4-3, the 3 picture analysis tasks include two sub-picture analysis tasks and a second picture analysis task in the first picture analysis task, picture IDs of the two sub-picture analysis tasks are 201610251855-2 and 201610251855-4 respectively, and then the number n of times of program crash of the computing node caused by the two sub-picture analysis tasks in the suspicious picture task queue is updated to 2; the second picture analysis task includes two pictures, and is split into two sub-picture analysis tasks by the central node, and picture IDs carried by the two sub-picture analysis tasks may be: 201610251900-1 and 201610251900-2, storing the two sub-picture analysis tasks in a suspicious picture task queue 101b, recording the number n of times that the 2 sub-picture analysis tasks in the suspicious picture task queue cause the computing node to have program crash as 1, and then respectively writing the sub-picture analysis tasks with the picture IDs of 201610251855-2, 201610251855-4, 201610251900-1 and 201610251900-2 into a normal picture task queue by the central node. The above steps are repeatedly executed.
Assuming that the preset number of times of collapse is 10, the picture task queue of the central node at a certain time is as shown in fig. 4-4, and the total number of times of collapse of the program of the computing node is 10 due to the sub-picture analysis tasks with the picture IDs of 201610251855-2, 201610251855-4, and 201610251900-1 in the suspicious picture task queue, it is determined that the three sub-picture analysis tasks are suspicious sub-picture analysis tasks, at this time, the central node stops sending the picture analysis tasks in the normal picture task queue to the third computing node in the picture analysis system, and sequentially sends the suspicious sub-picture analysis tasks with the picture IDs of 201610251855-2, 201610251855-4, and 201610251900-1 to the third computing node.
Assuming that the suspicious sub-picture analysis task with the picture ID of 201610251855-4 causes a program crash of the third computing node, the picture task queue of the central node is as shown in fig. 4-5, the picture analysis task with the picture ID of 201610251855-4 in the normal picture task queue is deleted, and all the sub-picture analysis tasks in the suspicious picture task queue are emptied.
Optionally, after a computing node in the picture analysis system completes analysis of the first picture analysis task and the second picture analysis task, the analysis results of the sub-picture analysis tasks of the first picture analysis task and the analysis results of the sub-picture analysis tasks of the second picture analysis task in the picture task queue are respectively packed and integrated into one target analysis result, where each target analysis result belongs to one queue element, as shown in fig. 4 to 6, the target analysis result of the first picture analysis task includes 4 pictures, and the picture IDs of the 4 pictures are respectively: 201610251855-1, 201610251855-2, 201610251855-3, and 201610251855-5, the target analysis results of the second picture analysis task include 2 pictures whose picture IDs are 201610251900-1 and 201610251900-2.
In an optional embodiment of the present invention, the order of the steps of the image analysis method provided in the embodiment of the present disclosure may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by a person skilled in the art within the technical scope of the present disclosure is included in the protection scope of the present disclosure, and therefore, the description thereof is omitted.
To sum up, the picture analysis method provided in the embodiments of the present invention may generate a task set to be screened according to a task that causes a program crash of a computing node of a picture analysis system when the program crash occurs at the computing node, screen a suspicious sub-picture analysis task in the task set to be screened according to a total number of times of crash that each sub-picture analysis task causes the program crash of the computing node, and then execute the suspicious sub-picture analysis task through the computing node, and discard the suspicious sub-picture analysis task that causes the crash of the computing node when any suspicious sub-picture analysis task causes the program crash of the computing node, compared with the related art, the picture analysis method provided in the embodiments of the present invention only discards one picture that causes the program crash of the computing node multiple times in the picture analysis task, and retains other pictures in the picture analysis task, thereby effectively reducing the number of lost pictures, the time of frame loss in the video playing process is shortened, and the reliability of picture analysis is improved.
Fig. 5 is a schematic structural diagram of an image analysis apparatus 50 according to an embodiment of the present invention, which may be used for the central node 10 in the image analysis system 10 shown in fig. 1, where the apparatus 50 may include:
the generating module 501 is configured to, when a program of a certain computing node of the picture analysis system crashes, generate a to-be-screened task set including at least one sub-picture analysis task according to a task that causes the program of the certain computing node to crash, where each sub-picture analysis task is composed of one picture in the task that causes the program of the certain computing node to crash.
The screening module 502 is configured to execute each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, and screen a suspicious sub-picture analysis task in the task set to be screened according to a total number of times of program crash of the computing node caused by each sub-picture analysis task.
The suspicious sub-picture analysis task is a sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse in the task set to be screened.
The execution module 503 is configured to execute the suspicious sub-picture analysis task through a computing node of the picture analysis system until the computing node crashes.
A discarding module 504, configured to discard a suspicious sub-picture analysis task that causes a program crash to occur on the computing node.
To sum up, the picture analysis apparatus provided in the embodiments of the present invention, when a program crash occurs in a computing node of a picture analysis system, generates a set of tasks to be screened according to a task that causes the computing node to be program crashed by a generation module, screens suspicious sub-picture analysis tasks in the set of tasks to be screened according to a total number of times of crash that each sub-picture analysis task causes the computing node to be program crashed by a screening module, executes the suspicious sub-picture analysis tasks by the computing node by an execution module, discards the suspicious sub-picture analysis tasks that cause the computing node to be crashed by a discarding module when any suspicious sub-picture analysis task causes the computing node to be program crashed, compared with the related art, the picture analysis method provided in the embodiments of the present invention only discards one picture that causes the computing node to be program crashed multiple times in the picture analysis tasks, and other pictures in the picture analysis task are reserved, so that the number of lost pictures is effectively reduced, the time of frame loss in the video playing process is shortened, and the reliability of picture analysis is improved.
Alternatively, as shown in fig. 6-1, the screening module 502 may include: the execution submodule 5021 is used for executing the task screening process.
As shown in fig. 6-2, the execution submodule 5021 may include:
the updating unit 21a is configured to execute each sub-picture analysis task of the task set to be screened by a computing node of the picture analysis system, update the task set to be screened according to an execution result, and generate a total number of times of program crash of the computing node by each sub-picture analysis task in the task set to be screened.
The determining unit 21b is configured to determine whether a sub-picture analysis task exists in the task set to be screened, where a total number of times of program crash of the computing node is greater than or equal to a preset number of times of crash.
The repeated execution unit 21c is configured to, when there is no sub-picture analysis task in the to-be-screened task set that causes the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse, repeatedly execute the task screening process until there is a sub-picture analysis task in the to-be-screened task set that causes the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse.
The determining unit 21d is configured to determine, as a suspicious sub-picture analysis task, all sub-picture analysis tasks in the task set to be screened, which make the total number of times of program crash of the computing node greater than or equal to the preset number of times of crash, when there is a sub-picture analysis task in the task set to be screened, which makes the total number of times of program crash of the computing node greater than or equal to the preset number of times of crash.
Further, as shown in fig. 6-3, the determining unit 21b may include:
and the updating subunit 21b1, configured to update the total number of times of program crash of the computing node caused by the first sub-picture analysis task when the first sub-picture analysis task causes the computing node to generate program crash, where the first sub-picture analysis task is any one of the sub-picture analysis tasks in the set of tasks to be filtered.
The determining subunit 21b2 is configured to, after the total number of times of program crash of the computing node caused by the first sub-picture analysis task is updated each time, determine whether the total number of times of program crash of the computing node caused by the first sub-picture analysis task is greater than or equal to a preset number of times of crash.
Optionally, a suspicious picture task queue may be disposed in the central node, where the suspicious picture task queue is configured to record a sub-picture analysis task obtained by splitting a picture analysis task that causes a program crash of the computing node, and a total number of times of crash of the program crash of the computing node caused by the sub-picture analysis task,
wherein the update subunit may be configured to:
and when the first sub-picture analysis task in the suspicious picture task queue causes the program crash of the computing node, updating the total crash times corresponding to the first sub-picture analysis task in the suspicious picture task queue.
Accordingly, the executing module 503 may also be configured to:
and sequentially sending the suspicious sub-picture analysis tasks in the suspicious picture task queue to a computing node of the picture analysis system.
In an optional embodiment of the present invention, each suspicious sub-picture analysis task is sent after the previous suspicious sub-picture analysis task is executed, and when a computing node of the picture analysis system executes any suspicious sub-picture analysis task, the computing node stops executing other picture analysis tasks, where the other picture analysis tasks are all picture analysis tasks except for the suspicious sub-picture analysis task.
Optionally, the screening module 502 may be configured to:
and mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted picture analysis tasks, and sending the mixed sub-picture analysis tasks to the computing nodes of the picture analysis system.
Optionally, a normal picture task queue may be further disposed in the central node, where the normal picture task queue is configured to record all picture analysis tasks to be analyzed, each picture analysis task includes at least one picture,
accordingly, the screening module 502 may further be configured to:
sequentially writing the sub-picture analysis tasks in the task set to be screened into a normal picture task queue;
and sequentially sending the picture analysis tasks recorded by the normal picture task queue to the computing nodes.
Optionally, as shown in fig. 6-4, the apparatus 50 may further include:
and a deleting module 505, configured to delete all the sub-picture analysis tasks in the suspicious picture task queue.
To sum up, the picture analysis apparatus provided in the embodiments of the present invention, when a program crash occurs in a computing node of a picture analysis system, generates a set of tasks to be screened according to a task that causes the computing node to be program crashed by a generation module, screens suspicious sub-picture analysis tasks in the set of tasks to be screened according to a total number of times of crash that each sub-picture analysis task causes the computing node to be program crashed by a screening module, executes the suspicious sub-picture analysis tasks by the computing node by an execution module, discards the suspicious sub-picture analysis tasks that cause the computing node to be crashed by a discarding module when any suspicious sub-picture analysis task causes the computing node to be program crashed, compared with the related art, the picture analysis method provided in the embodiments of the present invention only discards one picture that causes the computing node to be program crashed multiple times in the picture analysis tasks, and other pictures in the picture analysis task are reserved, so that the number of lost pictures is effectively reduced, the time of frame loss in the video playing process is shortened, and the reliability of picture analysis is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present invention provides a picture analysis system, which may include: the apparatus and compute node shown in fig. 5 or fig. 6-4.
An embodiment of the present invention provides a computer device, where the computer device may be the central node, and as shown in fig. 7, the computer device 01 includes: including a processor 12 and a memory 16,
wherein the content of the first and second substances,
a memory 16 for storing a computer program;
the processor 12 is configured to execute the program stored in the memory 16 to implement the picture analysis method according to the foregoing embodiments, and for example, the method may include:
when a program of a certain computing node of an image analysis system is crashed, generating a task set to be screened, which comprises at least one sub-image analysis task, according to a task which causes the program of the certain computing node to be crashed, wherein each sub-image analysis task consists of one image in the task which causes the program of the certain computing node to be crashed;
executing each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, and screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of the program crash of the computing node caused by each sub-picture analysis task;
executing the suspicious sub-picture analysis task through a computing node of the picture analysis system until the computing node is crashed;
and discarding the suspicious sub-picture analysis tasks causing the program crash of the computing node.
In particular, processor 12 includes one or more processing cores. The processor 12 executes various functional applications and data processing by running a computer program stored in the memory 16, which includes software programs and units.
The computer programs stored by the memory 16 include software programs and units. In particular, memory 16 may store an operating system 162, an application unit 164 required for at least one function. Operating system 162 may be a Real Time eXceptive (RTX) operating system, such as LINUX, UNIX, WINDOWS, or OS X. Wherein the application unit 164 may include a generation unit 164a, a filtering unit 164b, an execution unit 164c, and a discarding unit 164 d.
The generating unit 164a has the same or similar functions as the generating module 501.
And a screening unit 164b having the same or similar functions as the screening module 502.
The execution unit 164c, has the same or similar functionality as the execution module 503.
The discarding unit 164d has the same or similar function as the discarding module 504.
An embodiment of the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor of a terminal, enables the terminal to execute the picture analysis method according to the above-described embodiment.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The invention is not to be considered as limited to the particular embodiments shown and described, but is to be understood that various modifications, equivalents, improvements and the like can be made without departing from the spirit and scope of the invention.

Claims (19)

1. A picture analysis method, for a central node, the method comprising:
when a program of a certain computing node of an image analysis system is crashed, generating a task set to be screened, which comprises at least one sub-image analysis task, according to a task which causes the program of the certain computing node to be crashed, wherein each sub-image analysis task consists of one image in the task which causes the program of the certain computing node to be crashed;
executing each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, screening suspicious sub-picture analysis tasks in the task set to be screened according to the total crash times of the program of the computing node caused by each sub-picture analysis task, wherein the suspicious sub-picture analysis tasks are sub-picture analysis tasks of which the total crash times of the program of the computing node caused by the program crash in the task set to be screened is greater than or equal to the preset crash times;
executing the suspicious sub-picture analysis task through a computing node of the picture analysis system until the computing node is crashed;
and discarding the suspicious sub-picture analysis tasks causing the program crash of the computing node.
2. The method according to claim 1, wherein the performing, by a computing node of the picture analysis system, each sub-picture analysis task in the set of tasks to be screened and screening suspicious sub-picture analysis tasks in the set of tasks to be screened according to a total number of times that each sub-picture analysis task causes a program crash of the computing node comprises:
performing a task screening process, the task screening process comprising:
executing each sub-picture analysis task of the task set to be screened through a computing node of the picture analysis system, updating the task set to be screened according to an execution result, and generating total crash times of program crash of the computing node by each sub-picture analysis task in the task set to be screened;
judging whether a sub-picture analysis task which enables the total number of times of program collapse of the computing nodes to be larger than or equal to the preset number of times of collapse exists in the task set to be screened;
when the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse does not exist in the task set to be screened, the task screening process is repeatedly executed until the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
and when the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse exist in the task set to be screened, determining all the sub-picture analysis tasks which enable the total number of times of program collapse of the computing nodes to be greater than or equal to the preset number of times of collapse in the task set to be screened as the suspicious sub-picture analysis tasks.
3. The method of claim 2,
the step of judging whether the sub-picture analysis task which enables the total number of times of program collapse of the computing node to occur to be greater than or equal to the preset number of times of collapse exists in the task set to be screened includes:
when a first sub-picture analysis task causes a program crash of a computing node, updating the total number of times of the program crash of the computing node caused by the first sub-picture analysis task, wherein the first sub-picture analysis task is any one sub-picture analysis task in the task set to be screened;
and after the total number of times of program collapse of the computing node caused by the first sub-picture analysis task is updated every time, judging whether the total number of times of program collapse of the computing node caused by the first sub-picture analysis task is greater than or equal to a preset number of times of collapse.
4. The method according to claim 3, wherein a suspicious picture task queue is arranged in the central node, and the suspicious picture task queue is used for recording sub-picture analysis tasks obtained by splitting a picture analysis task which causes a program crash of the computing node, and the total number of times of crash of the program crash of the computing node caused by the sub-picture analysis tasks;
when the first sub-picture analysis task causes the program crash of the computing node, updating the total number of times of the program crash of the computing node caused by the first sub-picture analysis task, including:
when the first sub-picture analysis task in the suspicious picture task queue causes program crash of a computing node, updating the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue;
the executing the suspicious sub-picture analysis task by the computing node of the picture analysis system includes:
and sequentially sending the suspicious sub-picture analysis tasks in the suspicious picture task queue to a computing node of the picture analysis system.
5. The method according to claim 4, wherein each of the suspicious sub-picture analysis tasks is sent after a previous suspicious sub-picture analysis task is completed, and the computing node of the picture analysis system stops executing other picture analysis tasks when executing any suspicious sub-picture analysis task, wherein the other picture analysis tasks are all picture analysis tasks except for any suspicious sub-picture analysis task.
6. The method of claim 1,
the executing, by the computing node of the picture analysis system, each sub-picture analysis task in the task set to be screened includes:
and mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted picture analysis tasks, and sending the mixed sub-picture analysis tasks to the computing node of the picture analysis system.
7. The method of claim 6,
a normal picture task queue is arranged in the central node and used for recording all picture analysis tasks to be analyzed, and each picture analysis task comprises at least one picture;
the mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted sub-picture analysis tasks and sending the mixed sub-picture analysis tasks to the computing node includes:
sequentially writing the sub-picture analysis tasks in the task set to be screened into the normal picture task queue;
and sequentially sending the picture analysis tasks recorded by the normal picture task queue to the computing node.
8. The method of claim 4, wherein after discarding suspicious sub-picture analysis tasks that cause the computing node to crash programs, the method further comprises:
and deleting all the sub-picture analysis tasks in the suspicious picture task queue.
9. An apparatus for picture analysis, for use in a central node, the apparatus comprising:
the image analysis system comprises a generation module, a processing module and a processing module, wherein the generation module is used for generating a task set to be screened, which comprises at least one sub-image analysis task according to a task of causing a program of a certain computing node to crash when the program of the certain computing node of the image analysis system crashes, and each sub-image analysis task consists of one image in the task of causing the program of the certain computing node to crash;
the screening module is used for executing each sub-picture analysis task in the task set to be screened through a computing node of the picture analysis system, screening suspicious sub-picture analysis tasks in the task set to be screened according to the total number of times of program collapse of the computing node caused by each sub-picture analysis task, wherein the suspicious sub-picture analysis tasks are sub-picture analysis tasks which enable the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse in the task set to be screened;
the execution module is used for executing the suspicious sub-picture analysis task through the computing node of the picture analysis system until the computing node is crashed;
and the discarding module is used for discarding the suspicious sub-picture analysis task which causes the program crash of the computing node.
10. The apparatus of claim 9, wherein the screening module comprises:
an execution submodule for executing a task screening process, the execution submodule comprising:
the updating unit is used for executing each sub-picture analysis task of the task set to be screened through a computing node of the picture analysis system, updating the task set to be screened according to an execution result, and generating total crash times of program crash of the computing node by each sub-picture analysis task in the task set to be screened;
the judging unit is used for judging whether the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
the repeated execution unit is used for repeatedly executing the task screening process when the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse does not exist in the task set to be screened until the sub-picture analysis task which enables the total number of times of program collapse of the computing node to be greater than or equal to the preset number of times of collapse exists in the task set to be screened;
and the determining unit is used for determining all the sub-picture analysis tasks in the task set to be screened, which cause the total program crash frequency of the computing nodes to be greater than or equal to the preset crash frequency, as the suspicious sub-picture analysis tasks when the sub-picture analysis tasks exist in the task set to be screened, wherein the total crash frequency of the computing nodes to be subjected to program crash is greater than or equal to the preset crash frequency.
11. The apparatus of claim 10,
the judging unit includes:
the updating subunit is configured to update, when a first sub-picture analysis task causes a program crash of a computing node, a total number of times of the program crash of the computing node caused by the first sub-picture analysis task, where the first sub-picture analysis task is any one sub-picture analysis task in the task set to be screened;
and the judging subunit is used for judging whether the total times of the program crash of the computing node caused by the first sub-picture analysis task is greater than or equal to the preset times of the program crash after the total times of the program crash of the computing node caused by the first sub-picture analysis task is updated each time.
12. The device according to claim 11, wherein a suspicious picture task queue is disposed in the central node, and the suspicious picture task queue is configured to record a sub-picture analysis task split by a picture analysis task that causes a program crash of the computing node, and a total number of times of crash of the program crash of the computing node by the sub-picture analysis task;
the update subunit is configured to:
when the first sub-picture analysis task in the suspicious picture task queue causes program crash of a computing node, updating the total number of times of crash corresponding to the first sub-picture analysis task in the suspicious picture task queue;
the execution module is further configured to:
and sequentially sending the suspicious sub-picture analysis tasks in the suspicious picture task queue to a computing node of the picture analysis system.
13. The apparatus according to claim 12, wherein each of the suspicious sub-picture analysis tasks is sent after a previous suspicious sub-picture analysis task is completed, and the computing node of the picture analysis system stops executing other picture analysis tasks when executing any suspicious sub-picture analysis task, and the other picture analysis tasks are all picture analysis tasks except for any suspicious sub-picture analysis task.
14. The apparatus of claim 9,
the screening module is used for:
and mixing the sub-picture analysis tasks in the task set to be screened with the unexecuted picture analysis tasks, and sending the mixed sub-picture analysis tasks to the computing node of the picture analysis system.
15. The apparatus of claim 14,
a normal picture task queue is arranged in the central node and used for recording all picture analysis tasks to be analyzed, and each picture analysis task comprises at least one picture;
the screening module is further configured to:
sequentially writing the sub-picture analysis tasks in the task set to be screened into the normal picture task queue;
and sequentially sending the picture analysis tasks recorded by the normal picture task queue to the computing node.
16. The apparatus of claim 12, further comprising:
and the deleting module is used for deleting all the sub-picture analysis tasks in the suspicious picture task queue.
17. A picture analysis system, the system comprising: the apparatus and computing node of any of claims 9 to 16.
18. A computer device comprising a processor and a memory,
wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory to implement the picture analysis method according to any one of claims 1 to 8.
19. A storage medium on which a computer program is stored, wherein the program in the storage medium is capable of performing the picture analysis method of any one of claims 1 to 8 when executed by a processor.
CN201710447623.7A 2017-06-14 2017-06-14 Picture analysis method, device and system, computer equipment and storage medium Active CN109086152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710447623.7A CN109086152B (en) 2017-06-14 2017-06-14 Picture analysis method, device and system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710447623.7A CN109086152B (en) 2017-06-14 2017-06-14 Picture analysis method, device and system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109086152A CN109086152A (en) 2018-12-25
CN109086152B true CN109086152B (en) 2021-12-14

Family

ID=64839423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710447623.7A Active CN109086152B (en) 2017-06-14 2017-06-14 Picture analysis method, device and system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109086152B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140030660A (en) * 2012-09-03 2014-03-12 서울대학교산학협력단 Performance analysis method and performance analysis apparatus for at least one execution unit
CN103907347A (en) * 2011-08-31 2014-07-02 诺基亚公司 Multiview video coding and decoding
CN104581423A (en) * 2013-10-12 2015-04-29 北京航天长峰科技工业集团有限公司 Comprehensive scheduling and load balancing method for intelligent massive video analysis system
CN106713944A (en) * 2016-12-30 2017-05-24 北京奇虎科技有限公司 Method and apparatus for processing streaming data task

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907347A (en) * 2011-08-31 2014-07-02 诺基亚公司 Multiview video coding and decoding
KR20140030660A (en) * 2012-09-03 2014-03-12 서울대학교산학협력단 Performance analysis method and performance analysis apparatus for at least one execution unit
CN104581423A (en) * 2013-10-12 2015-04-29 北京航天长峰科技工业集团有限公司 Comprehensive scheduling and load balancing method for intelligent massive video analysis system
CN106713944A (en) * 2016-12-30 2017-05-24 北京奇虎科技有限公司 Method and apparatus for processing streaming data task

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"视频诊断技术的最新发展与应用";陈县,周明耀;《中国安防》;20140531(第9期);第59-63页 *

Also Published As

Publication number Publication date
CN109086152A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
US11296923B2 (en) Network fault originator identification for virtual network infrastructure
US20220327003A1 (en) Cloud edge device virtualization
KR20190020073A (en) Acceleration resource processing method and apparatus, and network function virtualization system
CN110865867A (en) Method, device and system for discovering application topological relation
CN110427324B (en) Joint debugging system, joint debugging method, computer equipment and storage medium
US9342369B2 (en) System and method for increasing throughput of a PaaS system
US11917023B2 (en) Fast session restoration for latency sensitive middleboxes
US11221943B2 (en) Creating an intelligent testing queue for improved quality assurance testing of microservices
US10075514B2 (en) Scalable monitoring of long running multi-step data intensive workloads
JP2017520845A (en) Identifying files for data write operations
CN108235134B (en) Picture analysis method and device
CN111479095B (en) Service processing control system, method and device
WO2018117453A1 (en) High-capacity event log replay method and high-capacity event log replay system
WO2020015751A1 (en) Container service snapshot management method and apparatus
CN112988377B (en) Resource allocation method, system and medium for cloud service
CN109086152B (en) Picture analysis method, device and system, computer equipment and storage medium
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
CN113032111B (en) Application migration method, device, system and computer readable storage medium
US10579446B2 (en) Per-request event detection to improve request-response latency
CN109086125B (en) Picture analysis method, device and system, computer equipment and storage medium
CN112286622A (en) Virtual machine migration processing and strategy generating method, device, equipment and storage medium
CN109254833B (en) Picture analysis method, device and system and computer equipment
CN114661458A (en) Method and system for migration of provisioning to cloud workload through cyclic deployment and evaluation migration
CN115103020B (en) Data migration processing method and device
CN113032141B (en) AI platform resource switching method, system and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant