Seating position correction method, device, equipment, medium and product

By sorting and adjusting the seating position information after the surveillance video analysis, the problem of the seating position information and the actual position difference after the surveillance video analysis is solved, and the accurate correction and simulated display of the seating position are achieved.

CN119850900APending Publication Date: 2025-04-18GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311336144.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Due to factors such as camera shooting angle and pixels, there is a difference between the seating position information obtained based on surveillance video analysis and the actual seating position, which makes it impossible to accurately simulate and display the actual seating position of the participants.

Method used

By obtaining the total number of seats in each group after the surveillance video analysis and the coordinate values ​​of each seating target, sorting to determine the initial belonging row, and adjusting it according to the row order and the number of seating targets contained, the final belonging row is obtained to correct the seating position.

Benefits of technology

Accurate correction and simulated display of the seating positions of participants is achieved to ensure that the display results are more in line with the actual seating positions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850900A_ABST
    Figure CN119850900A_ABST
Patent Text Reader

Abstract

The invention relates to a seating position correction method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of determining an initial belonging row of each seating target in a group based on a coordinate value of each seating target, so that the determined initial belonging row is more fit with an actual belonging row of each seating target; according to the method, the initial belonging row is determined based on the size of the coordinate value, then the initial belonging row is adjusted based on the number of the seating targets included in each initial belonging row, and finally the final belonging row of each seating target is obtained, so that the belonging row of each seating target is determined and adjusted comprehensively from different angles. According to the method, the line to which each seating target belongs can be corrected to the maximum extent, so that the seating position of each seating target is accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a method, device, computer equipment, storage medium and computer program product for correcting a seat position. Background Art

[0002] After holding meetings, classroom teaching and other activities, visual algorithms can be used to analyze surveillance videos to obtain the seating position information of all participants. However, due to the influence of factors such as the camera's shooting angle and camera pixels, there may be differences between the seating position information obtained based on the surveillance video and the actual seating position information of the corresponding participants, resulting in the inability to accurately restore the actual seating position of the participants when simulating the seating position of the participants. Summary of the invention

[0003] Based on this, it is necessary to provide a seating position correction method, device, computer equipment, computer-readable storage medium and computer program product that can accurately obtain the seating position of the participants in order to address the above technical problems.

[0004] In a first aspect, the present application provides a method for correcting a seat position, the method comprising:

[0005] Obtaining the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, wherein the coordinate value is used to indicate the position of the seat target in the actual seat space;

[0006] For each group, sorting the coordinate values ​​of each seat target in the group, and determining the initial row to which each seat target belongs in the group in turn;

[0007] According to the row order of the initial rows in the group and the number of seating targets contained in each initial row, the rows of the seating targets in each initial row are adjusted in turn to obtain the final row of each seating target in the corresponding group.

[0008] In one embodiment, the step of determining the initial row of each seated target in the group in sequence according to the sorting of the coordinate values ​​of each seated target in the group includes:

[0009] Sort the coordinate values ​​of each seated target in the group and obtain the difference between every two adjacent coordinate values;

[0010] According to the difference between each two adjacent coordinate values, a difference reference value is obtained;

[0011] The seat target corresponding to the first coordinate value in the seat direction is taken as the first seat target, and the first row is determined as the initial row to which the first seat target belongs;

[0012] According to the sorting of the coordinate values ​​of the first row and each seated target in the group, the initial row to which each seated target after the first seated target belongs in the group is determined in sequence.

[0013] In one embodiment, the step of sorting the coordinate values ​​of the seating targets in the first row and the group and determining the initial row to which each seating target after the first seating target belongs in the group comprises:

[0014] The first row is taken as the current row, the first seat target is taken as the current seat target, and the next seat target of the current seat target is determined according to the coordinate values ​​of the seat targets in the group;

[0015] When the coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is greater than the difference reference value, the next row of the current row is determined as the initial row of the next seat target, and the current seat target is updated to the next seat target, and the current row is updated to the next row of the current row;

[0016] When the coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is not greater than the difference reference value, the current row is determined as the initial row to which the next seat target belongs, and the current seat target is updated as the next seat target;

[0017] Return to the step of sorting the coordinate values ​​of each seating target in the group, determining the next seating target of the current seating target, and continue executing until the current seating target is the last seating target.

[0018] In one embodiment, adjusting the rows of the seating targets in each initial row in turn according to the row order of the initial rows in the group and the number of seating targets included in each initial row to obtain the final row of each seating target in the corresponding group includes:

[0019] Get the reference value of the target number of rows, take the first initial row as the current initial row, and take the first row as the current row;

[0020] Compare the number of seating targets included in the current initial row with the number reference value, and if the number of seating targets included in the current initial row is greater than the number reference value, select seating targets from the current initial row so that the number of unselected seating targets in the current initial row is not greater than the number reference value, determine the current row as the final row of the unselected seating targets in the current initial row, and modify the initial row of the selected seating targets in the current initial row to the next initial row of the current initial row;

[0021] When the number of seating targets included in the current initial row is not greater than the reference value, determining the current row as the final row for each seating target in the current initial row;

[0022] Update the current row to the row next to the first row, update the current initial row to the next initial row, return to the step of comparing the number of seated targets contained in the current initial row with the reference value and continue executing until the current initial row is the last initial row and the number of seated targets contained is not greater than the reference value.

[0023] In one embodiment, obtaining a reference value of a target number of row seats includes:

[0024] Determine the total number of rows initially belonging to the group;

[0025] According to the total number of rows and the number of seating targets contained in each initial row, the average number of seating targets is calculated as a reference value for the number of row seating targets.

[0026] In one embodiment, the method further comprises:

[0027] According to the final row to which each seating target in each group belongs, a simulated seating display is performed on the seating target in the simulated seating space.

[0028] In a second aspect, the present application further provides a seat position correction device, the device comprising:

[0029] An acquisition module, used to acquire the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, wherein the coordinate value is used to indicate the position of the seat target in the actual seat space;

[0030] A determination module, configured to determine, for each group, the initial row to which each seated target belongs in the group according to the sorting of the coordinate values ​​of each seated target in the group;

[0031] The adjustment module is used to adjust the rows to which the seating targets belong in each initial row according to the row order of the initial rows in the group and the number of seating targets contained in each initial row, so as to obtain the final row to which each seating target belongs in the corresponding group.

[0032] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0034] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0035] The above-mentioned seating position correction method, device, computer equipment, storage medium and computer program product determine the initial row to which each seating target belongs in the group based on the size of the coordinate value of each seating target, so that the determined initial row is more consistent with the actual row to which each seating target belongs; first determine the initial row based on the size of the coordinate value, and then adjust the initial row based on the number of seating targets contained in each initial row, and finally obtain the final row to which each seating target belongs. In this way, the row to which each seating target belongs is determined and adjusted comprehensively from different angles, and the row to which each seating target belongs can be corrected to the maximum extent, thereby accurately determining the seating position of each seating target. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0037] Figure 1 A diagram showing an application environment of a method for correcting a seat position in an embodiment;

[0038] Figure 2 It is a flowchart of a method for correcting a seat position in one embodiment;

[0039] Figure 3 A schematic diagram of seating positions in a classroom teaching scene in one embodiment;

[0040] Figure 4 It is a flowchart of a method for determining an initial bank in one embodiment;

[0041] Figure 5 A comparison diagram of seating positions in a classroom teaching scene in one embodiment;

[0042] Figure 6 is a flowchart of a method for correcting a seat position in another embodiment;

[0043] Figure 7is a structural block diagram of a seat position correction device in one embodiment;

[0044] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0046] The seat position correction method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 is used to obtain the video data of the monitoring video and send the video data to the server 104. The server 104 uses a visual algorithm to parse the video data to obtain the total number of seats in each group, the horizontal coordinate and the vertical coordinate of each seat target. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0047] In an exemplary embodiment, Figure 2 As shown, a method for correcting the seat position is provided, and the method is applied to Figure 1 The server in the example is used to illustrate, including the following steps 202 to 206. Among them:

[0048] S202: Obtain the total number of seats in each group and the coordinate value of each seated target obtained after parsing the surveillance video, where the coordinate value is used to indicate the position of the seated target in the actual seated space.

[0049] Among them, the monitoring video may be a video captured by a camera in a collective activity scene, for example, the collective activity scene may be a meeting scene or a classroom teaching scene; the seating target refers to the participants in the collective activity scene, for example, the seating target may be a participant or a student; the total number of seats refers to the total number of participants in each group; the actual seating space refers to the space where the collective activity scene is located, for example, the actual seating space may be a meeting room or a classroom, the shape of the actual seating space may be a rectangular parallelepiped or a cylinder, the shape of the actual seating space may also be other, and the embodiments of the present application do not make specific limitations on this; the coordinate value of the seating target is determined based on a preset coordinate system, and the preset coordinate system is a two-dimensional coordinate system or a three-dimensional coordinate system established according to the shape of the actual seating space. For example, if the shape of the actual seating space is a rectangular parallelepiped or a cylinder, a three-dimensional rectangular coordinate system may be directly established, or a two-dimensional rectangular coordinate system may be established in the top view of the actual seating space. In addition, for the actual seating space in the shape of a cylinder, a polar coordinate system may also be established in its top view, and the form of the preset coordinate system may also be other, and the embodiments of the present application do not make specific limitations on this.

[0050] like Figure 3 As shown, Figure 3 This is a picture in a classroom surveillance video. The shape of the classroom is a rectangular parallelepiped. The upper half of the picture is the real scene of the classroom, and the lower half is a zoomed image of the classroom overhead view extracted from the real scene of the classroom and the position of each student. Each dot represents a student. According to the distribution of the position of each student, all the students in the classroom are divided into three groups. The group numbers of these three groups are group 0, group 1 and group 2 respectively; the length direction of the zoomed image is taken as the horizontal axis direction, and the width direction of the zoomed image is taken as the vertical axis direction. A point is selected from the four vertices in the zoomed image as the coordinate origin, thereby establishing a two-dimensional rectangular coordinate system. Based on this two-dimensional rectangular coordinate system, the horizontal coordinate and vertical coordinate of each student can be determined.

[0051] S204: For each group, sort the coordinate values ​​of each seated target in the group, and determine the initial row to which each seated target in the group belongs in turn.

[0052] Among them, coordinate value sorting refers to sorting the coordinate values ​​of the same dimension of all seated targets in the group according to a preset sorting rule. For example, in a two-dimensional rectangular coordinate system, the preset sorting rule can be sorting from large to small or from small to large according to the size of the coordinate value or the size of the horizontal coordinate value; the row to which the seated target belongs is a pre-set arrangement form in order to correct the seated position of the seated target, for example, Figure 3 As shown, in a classroom teaching scenario, the row direction of each row can be the horizontal axis direction.

[0053] S206. According to the row order of the initial rows in the group and the number of seating targets contained in each initial row, the rows of the seating targets in each initial row are adjusted in sequence to obtain the final row of each seating target in the corresponding group.

[0054] Among them, based on the row order of the initial rows, the final rows of the seating targets that do not meet the preset conditions in each initial row can be determined as the target row. For example, Figure 3 In the scenario shown, the preset condition may be that the number of seating targets contained in the corresponding initial row is less than a preset number, and the horizontal coordinate of the seating target is within the preset horizontal coordinate range, and the row to which the target belongs may be the next row of the initial row to which the corresponding seating target belongs. The row to which the seating target belongs may be adjusted by other methods based on the shape of the actual seating space and the established coordinate system, and the embodiments of the present application do not make specific limitations on this.

[0055] In the above-mentioned seating position correction method, the initial row to which each seating target belongs in the group is determined based on the size of the coordinate value of each seating target, so that the determined initial row is more consistent with the actual row to which each seating target belongs; the initial row is first determined based on the size of the coordinate value, and then the initial row is adjusted based on the number of seating targets contained in each initial row, and finally the final row to which each seating target belongs is obtained. In this way, the row to which each seating target belongs is determined and adjusted comprehensively from different angles, and the row to which each seating target belongs can be corrected to the maximum extent, thereby accurately determining the seating position of each seating target.

[0056] In some embodiments, Figure 4 As shown, according to the sorting of the coordinate values ​​of each seat target in the group, the initial row to which each seat target belongs in the group is determined in turn, including:

[0057] S402, sorting the coordinate values ​​of each seated target in the group, and obtaining the difference between every two adjacent coordinate values.

[0058] S404: Obtain a difference reference value according to the difference between every two adjacent coordinate values.

[0059] S406: The seating target corresponding to the first coordinate value in the seating direction is taken as the first seating target, and the first row is determined as the initial row to which the first seating target belongs.

[0060] S408. Sort the coordinate values ​​of the first row and each seat target in the group, and determine the initial row to which each seat target after the first seat target belongs in the group.

[0061] Among them, for each group, the difference reference value can be calculated based on all the differences and the preset function. For example, the difference reference value can be the average value of all the differences or the variance of all the differences; the seating orientation refers to the orientation of the seating target, for example, Figure 3 As shown in , in the classroom teaching scene, the students sit in the direction of the blackboard in front; the first row refers to the first row of seats in the actual seating space, for example, Figure 3 As shown, in a classroom teaching scene, the first row may be the first row of tables and chairs along the horizontal axis.

[0062] In this embodiment, the first row is determined as the initial row of the first seating target. Since the first row is the first row of seats actually existing in the actual seating space, the initial row of each seating target after the first seating target determined based on the first row is more consistent with the row of seats in the actual seating space.

[0063] In some embodiments, the initial row to which each seating target after the first seating target belongs in the group is determined in turn according to the coordinate values ​​of the first row and each seating target in the group, including: taking the first row as the current row, taking the first seating target as the current seating target, and determining the next seating target of the current seating target according to the coordinate values ​​of each seating target in the group; when the coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is greater than a difference reference value, determining the next row of the current row as the initial row to which the next seating target belongs, and updating the current seating target to the next row of the current row; when the coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is not greater than a difference reference value, determining the current row as the initial row to which the next seating target belongs, and updating the current seating target to the next row of the current row; returning to the step of determining the next seating target of the current seating target according to the coordinate value sorting of each seating target in the group and continuing to execute until the current seating target is the last seating target.

[0064] Among them, if the coordinate value is greater than the difference reference value, it means that the coordinate difference between the current seated target and the next seated target is too large, and it can be considered that the current seated target and the next seated target are not in the same row. However, since the coordinate value of the current seated target and the coordinate value of the next seated target are adjacent, it means that the two seated targets can only be in the same row or in two adjacent rows respectively. Therefore, the next row of the current row can be determined as the initial row of the next seated target; similarly, if the coordinate difference is not greater than the difference reference value, it means that the coordinate difference between the current seated target and the next seated target is small, and it can be considered that the current seated target and the next seated target are in the same row. Therefore, the initial row of the current seated target can be determined as the initial row of the next seated target.

[0065] In this embodiment, the corresponding coordinate difference is compared with the difference reference value, and the initial row of each seating target is determined based on the comparison result and the current row, so that the determined initial row is more consistent with the row of seats in the actual seating space.

[0066] In some embodiments, according to the row order of the initial rows in the group and the number of seating targets contained in each initial row, the rows to which the seating targets belong in each initial row are adjusted in turn to obtain the final row to which each seating target belongs in the corresponding group, including: obtaining a quantity reference value for the number of row seating targets, taking the first initial row as the current initial row, and taking the first row as the current row; comparing the number of seating targets contained in the current initial row with the quantity reference value, and if the number of seating targets contained in the current initial row is greater than the quantity reference value, selecting a seating target from the current initial row so that the number of unselected seating targets in the current initial row is not greater than the quantity reference value, and The row is determined as the final row of the seating targets that have not been selected in the current initial row, and the initial row of the seating targets that have been selected in the current initial row is modified to the next initial row of the current initial row; when the number of seating targets contained in the current initial row is not greater than the quantity reference value, the current row is determined as the final row of each seating target in the current initial row; the current row is updated to the row next to the first row, the current initial row is updated to the next initial row, and the step of comparing the number of seating targets contained in the current initial row with the quantity reference value is returned and continued until the current initial row is the last initial row and the number of seating targets contained is not greater than the quantity reference value.

[0067] Among them, the number of seating targets in a row refers to the number of seating targets included in each initial row; the quantity reference value is the benchmark value of the number of seating targets included in each row in each group, and whether the number of seating targets in each row is reasonable can be determined based on the quantity reference value.

[0068] When the number of seated targets included in the current initial row is greater than the reference value, a seated target can be selected from the current initial row based on the coordinate values ​​of a certain dimension of all seated targets included in the current initial row. For example, Figure 3 In the scenario shown, all seating targets contained in the current initial row can be sorted in ascending order of horizontal coordinate values, and the seating targets with smaller horizontal coordinate values ​​can be selected, so that the number of unselected seating targets in the current initial row is not greater than the reference value. The method of selecting seating targets from the current row can also be other methods, which are not specifically limited in the embodiments of the present application.

[0069] In this embodiment, after the initial row of each seating target is determined based on the corresponding coordinate value sequence, the final row of each seating target is determined based on the number of seating targets included in each initial row. In this way, the final row of the seating target is finally determined from multiple perspectives, making the determined final row more accurate.

[0070] In some embodiments, obtaining a quantitative reference value for the target number of seating in a row includes: determining the total number of initial rows in the group; and calculating an average value of the target number of seating based on the total number of rows and the target number of seating contained in each initial row as the quantitative reference value for the target number of seating in the row.

[0071] The total number of rows and the target number of seats contained in each initial row may be input into a preset function to obtain a corresponding quantity reference value.

[0072] In this embodiment, a quantity reference value is obtained based on the total number of rows and the number of seating targets contained in each initial row, so that the quantity reference value has more reference value, thereby making the final row of the seating target determined based on the quantity reference value more accurate.

[0073] In some embodiments, the above method further includes: performing a simulated seating display for the seating targets in the simulated seating space according to the final row to which each seating target in each group belongs.

[0074] The display method of the simulated seating display may be 2D display or 3D display, for example, Figure 5 As shown, Figure 5 In order to use the method of this embodiment to perform 3D display comparison images before and after correction of the student seating position in different classroom teaching scenarios, the white dots are the student seating positions after correction, and the gray dots are the student seating positions before correction. It can be seen from the figure that the seating positions after correction are more consistent with the actual positions of the seats in the classroom; the final row to which each seating target belongs and the coordinate values ​​of each seating target in each dimension in the preset coordinate system can be used to comprehensively simulate the position of each seating target. Specifically, each seating target can be preliminarily sorted based on the final row, and then the sorting results of the preliminary sorting can be adjusted based on the coordinate values ​​of each dimension, and finally the adjusted sorting results can be simulated for seat display. The method for simulating the display of the seating targets can also be other methods, which are not specifically limited in the embodiments of the present application.

[0075] In this embodiment, the final row to which each seating target belongs obtained after correction using the method of this embodiment is used to display the position of the seating target, so that the display result is more consistent with the actual seat position.

[0076] In one embodiment, Figure 6 As shown, another file transfer method is provided, which includes the following contents:

[0077] (1) Obtain the total number of seated targets in each group and the position coordinates of each seated target after the visual algorithm analyzes the classroom video. The position coordinates include the horizontal coordinate (X coordinate) and the vertical coordinate (Y coordinate), where the vertical direction is the front-to-back direction of the classroom and the horizontal direction is the left-to-right direction of the classroom.

[0078] (2) For each group, based on the size of the longitudinal coordinate of each seated target, all longitudinal coordinates are sorted in descending order, and the difference (diffY) of the longitudinal coordinates between each two adjacent seated targets is determined in turn. The average value (diffYAverage) of all differences in each group is determined, and the size of each difference is compared with the average value in descending order of the longitudinal coordinates. If the difference is not greater than the average value, the initial row size of the seated target with the smaller longitudinal coordinate of the difference is determined as the initial row size of the seated target with the larger longitudinal coordinate. If the difference is greater than the average value, the row size that is larger than the initial row size of the seated target with the smaller longitudinal coordinate by a preset row is determined as the initial row size of the seated target with the larger longitudinal coordinate. The direction of each row is the same as the horizontal direction.

[0079] (3) For each group, determine the total row size of the group based on the initial row size of each seating target, and determine the average number of seating targets for each row based on the total row size and the total number of seating targets.

[0080] (4) For each group, based on the initial row size of each seating target, determine the initial number of seating targets for each row. In order of initial row size from small to large, compare the initial number of seating targets for each row with the average number of seating targets. If the initial number of seating targets is greater than the average number of seating targets, then in order of horizontal coordinates from small to large, determine the current row as the target row size of the first average number of seating targets corresponding to the initial number of seating targets. Determine the row size that is one row larger than the row size of the current row as the target row size of the corresponding remaining seating targets. If the initial number of seating targets is not greater than the average number of seating targets, determine the current row as the target row size of all seating targets corresponding to the initial number of seating targets.

[0081] (5) Based on the target row size and lateral coordinate, determine the target corrected position of all seated targets in each group.

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

[0083] Based on the same inventive concept, the embodiment of the present application also provides a seat position correction device for implementing the seat position correction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more seat position correction device embodiments provided below can refer to the limitations of the seat position correction method above, and will not be repeated here.

[0084] In an exemplary embodiment, Figure 7 As shown, a seating position correction device 700 is provided, comprising: an acquisition module 701, a determination module 702 and an adjustment module 703, wherein:

[0085] The acquisition module 701 is used to obtain the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, and the coordinate value is used to indicate the position of the seat target in the actual seat space.

[0086] The determination module 702 is used to determine, for each group, the initial row to which each seated target belongs in the group according to the sorting of the coordinate values ​​of each seated target in the group.

[0087] The adjustment module 703 is used to adjust the rows to which the seating targets belong in each initial row according to the row order of the initial rows in the group and the number of seating targets contained in each initial row, so as to obtain the final row to which each seating target belongs in the corresponding group.

[0088] In some embodiments, the determination module 702 includes:

[0089] The first acquisition unit is used to obtain the difference between every two adjacent coordinate values ​​according to the order of the coordinate values ​​of each seat target in the group.

[0090] The second acquisition unit is used to acquire a difference reference value according to the difference between every two adjacent coordinate values.

[0091] The first determining unit is used to take the seating target corresponding to the first coordinate value in the seating direction as the first seating target, and determine the first row as the initial row to which the first seating target initially belongs.

[0092] The second determining unit is used to determine the initial row to which each seating target in the group belongs in sequence according to the sorting of the coordinate values ​​of the first row and each seating target in the group after the first seating target.

[0093] In some embodiments, the second determination unit is further used to take the first row as the current row, the first seating target as the current seating target, and determine the next seating target of the current seating target according to the sorting of the coordinate values ​​of each seating target in the group; when the vertical coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is greater than the difference reference value, determine the next row of the current row as the initial row to which the next seating target belongs, and update the current seating target to the next seating target, and update the current row to the next row of the current row; when the vertical coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is not greater than the difference reference value, determine the current row as the initial row to which the next seating target belongs, and update the current seating target to the next seating target; return to the step of determining the next seating target of the current seating target according to the sorting of the coordinate values ​​of each seating target in the group and continue to execute until the current seating target is the last seating target.

[0094] In some embodiments, the adjustment module 703 includes:

[0095] The third acquisition unit is used to obtain a reference value of a target number of row seats, take the first initial row as the current initial row, and take the first row as the current row.

[0096] A comparing unit is used to compare the number of seating targets included in the current initial row with the number reference value, and when the number of seating targets included in the current initial row is greater than the number reference value, select seating targets from the current initial row so that the number of seating targets not selected in the current initial row is not greater than the number reference value, determine the current row as the final row of the seating targets not selected in the current initial row, and modify the initial row of the selected seating targets in the current initial row to the next initial row of the current initial row.

[0097] The third determining unit is used to determine the current row as the final row for each seating target in the current initial row if the number of seating targets included in the current initial row is not greater than the reference value.

[0098] An updating unit is used to update the current row to the row next to the first row, update the current initial row to the next initial row, return to the step of comparing the number of seating targets contained in the current initial row with the reference value and continue to execute until the current initial row is the last initial row and the number of seating targets contained is not greater than the reference value.

[0099] In some embodiments, the third acquisition unit is also used to determine the total number of rows initially belonging to the group; based on the total number of rows and the number of seating targets contained in each initial row, the average number of seating targets is calculated as a reference value for the number of row seating targets.

[0100] In some embodiments, the seating position correction device 700 is specifically used to simulate the seating display of the seating targets in the simulated seating space according to the final row to which each seating target in each group belongs.

[0101] Each module in the above-mentioned seat position correction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0102] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for correcting the seat position is implemented.

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

[0104] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, wherein the coordinate value is used to indicate the position of the seat target in the actual seating space; for each group, sorting the coordinate values ​​of each seat target in the group, and determining in turn the initial row to which each seat target belongs in the group; adjusting in turn the row to which the seat targets belong in each initial row according to the row order of the initial row in the group and the number of seat targets contained in each initial row, and obtaining the final row to which each seat target belongs in the corresponding group.

[0105] In one embodiment, when the processor executes a computer program, the steps of sorting the coordinate values ​​of each seating target in the group and determining in sequence the initial row to which each seating target belongs in the group include: obtaining the difference between each two adjacent coordinate values ​​according to the sorting of the coordinate values ​​of each seating target in the group; obtaining a difference reference value according to the difference between each two adjacent coordinate values; taking the seating target corresponding to the first coordinate value in the seating direction as the first seating target, and determining the first row as the initial row to which the first seating target belongs; and determining in sequence the initial row to which each seating target after the first seating target belongs in the group according to the sorting of the coordinate values ​​of the first row and each seating target in the group.

[0106] In one embodiment, the steps implemented by the processor when executing the computer program, according to the sorting of the coordinate values ​​of the first row and each seated target in the group, and determining in sequence the initial row to which each seated target after the first seated target belongs in the group, include: taking the first row as the current row, taking the first seated target as the current seated target, and sorting the coordinate values ​​of each seated target in the group to determine the next seated target of the current seated target; and when the difference in ordinate between the coordinate value of the current seated target and the coordinate value of the next seated target is greater than the difference reference value, determining the next row of the current row as the next seated target. The initial row to which the next seating target belongs is determined, and the current seating target is updated to be the next seating target, and the current row is updated to be the next row of the current row; when the vertical coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is not greater than the difference reference value, the current row is determined as the initial row to which the next seating target belongs, and the current seating target is updated to be the next seating target; return to the step of sorting the coordinate values ​​of each seating target in the group, determining the next seating target of the current seating target, and continue to execute until the current seating target is the last seating target.

[0107] In one embodiment, the method implemented when the processor executes the computer program is to adjust the row to which the seating targets in each initial row belong in turn according to the row order of the initial rows in the group and the number of seating targets contained in each initial row to obtain the final row to which each seating target belongs in the corresponding group, including: obtaining a quantity reference value of the number of row seating targets, taking the first initial row as the current initial row, and taking the first row as the current row; comparing the number of seating targets contained in the current initial row with the quantity reference value, and if the number of seating targets contained in the current initial row is greater than the quantity reference value, selecting a seating target from the current initial row so that the number of unselected seating targets in the current initial row is not greater than the quantity reference value. The number reference value is used to determine the current row as the final row of the seating targets that have not been selected in the current initial row, and the initial row of the selected seating targets in the current initial row is modified to the next initial row of the current initial row; when the number of seating targets included in the current initial row is not greater than the number reference value, the current row is determined as the final row of the seating targets in the current initial row; the current row is updated to the row next to the first row, the current initial row is updated to the next initial row, and the step of comparing the number of seating targets included in the current initial row with the number reference value is returned and continued until the current initial row is the last initial row and the number of seating targets included is not greater than the number reference value.

[0108] In one embodiment, the method of obtaining a quantitative reference value of a target number of seating in a row implemented when a processor executes a computer program includes: determining the total number of rows initially belonging to the group; and calculating an average value of the target number of seating according to the total number of rows and the number of seating targets contained in each initial row as a quantitative reference value of the target number of seating in the row.

[0109] In one embodiment, the method implemented when the processor executes the computer program further includes: performing simulated seating display on the seating targets in the simulated seating space according to the final row to which each seating target in each group belongs.

[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining the total number of seats in each group obtained after parsing the surveillance video and the coordinate value of each seat target, the coordinate value being used to indicate the position of the seat target in the actual seating space; for each group, sorting according to the coordinate values ​​of each seat target in the group, and determining in turn the initial row to which each seat target belongs in the group; adjusting in turn the row to which the seat targets belong in each initial row according to the row order of the initial rows in the group and the number of seat targets contained in each initial row, and obtaining the final row to which each seat target belongs in the corresponding group.

[0111] In one embodiment, when the computer program is executed by the processor, the steps implemented by sorting the coordinate values ​​of each seating target in the group and determining in sequence the initial row to which each seating target belongs in the group include: obtaining the difference between each two adjacent coordinate values ​​according to the sorting of the coordinate values ​​of each seating target in the group; obtaining a difference reference value according to the difference between each two adjacent coordinate values; taking the seating target corresponding to the first coordinate value in the seating direction as the first seating target, and determining the first row as the initial row to which the first seating target belongs; and determining in sequence the initial row to which each seating target after the first seating target belongs in the group according to the sorting of the coordinate values ​​of the first row and each seating target in the group.

[0112] In one embodiment, the computer program implemented when executed by the processor sorts the coordinate values ​​of the first row and each seat target in the group, and sequentially determines the initial row to which each seat target after the first seat target belongs in the group, including: taking the first row as the current row, taking the first seat target as the current seat target, and sorting the coordinate values ​​of each seat target in the group to determine the next seat target of the current seat target; when the vertical coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is greater than the difference reference value, determining the next row of the current row as the next seat target; The initial row to which the next seating target belongs is determined, and the current seating target is updated to the next seating target, and the current row is updated to the next row of the current row; when the vertical coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is not greater than the difference reference value, the current row is determined as the initial row to which the next seating target belongs, and the current seating target is updated to the next seating target; return to the step of sorting the coordinate values ​​of the seating targets in the group, determining the next seating target of the current seating target, and continue executing until the current seating target is the last seating target.

[0113] In one embodiment, the computer program implemented when executed by the processor adjusts the row to which the seating targets in each initial row belong in turn according to the row order of the initial rows in the group and the number of seating targets contained in each initial row to obtain the final row to which each seating target belongs in the corresponding group, including: obtaining a quantity reference value of the number of row seating targets, taking the first initial row as the current initial row, and taking the first row as the current row; comparing the number of seating targets contained in the current initial row with the quantity reference value, and selecting seating targets from the current initial row when the number of seating targets contained in the current initial row is greater than the quantity reference value, so that the number of unselected seating targets in the current initial row is not greater than the quantity reference value. The number reference value is used to determine the current row as the final row for the unselected seating targets in the current initial row, and the initial row for the selected seating targets in the current initial row is modified to the next initial row of the current initial row; when the number of seating targets contained in the current initial row is not greater than the number reference value, the current row is determined as the final row for the seating targets in the current initial row; the current row is updated to the row next to the first row, the current initial row is updated to the next initial row, and the step of comparing the number of seating targets contained in the current initial row with the number reference value is returned and continued until the current initial row is the last initial row and the number of seating targets contained is not greater than the number reference value.

[0114] In one embodiment, the method of obtaining a quantitative reference value of a target number of seating rows implemented when a computer program is executed by a processor includes: determining the total number of initial rows in the group; and calculating an average value of the target number of seating rows based on the total number of rows and the number of seating targets contained in each initial row as a quantitative reference value of the target number of seating rows.

[0115] In one embodiment, the method implemented when the computer program is executed by the processor also includes: performing simulated seating display on the seating targets in the simulated seating space according to the final row to which each seating target in each group belongs.

[0116] In one embodiment, a computer program product is provided, comprising a computer program, which implements the following steps when executed by a processor: obtaining the total number of seats in each group obtained after parsing the surveillance video and the coordinate value of each seat target, the coordinate value being used to indicate the position of the seat target in the actual seating space; for each group, sorting the seat targets in the group according to their coordinate values, and determining in turn the initial row to which each seat target belongs in the group; adjusting in turn the row to which the seat targets belong in each initial row according to the row order of the initial rows in the group and the number of seat targets contained in each initial row, to obtain the final row to which each seat target belongs in the corresponding group.

[0117] In one embodiment, when the computer program is executed by the processor, the steps implemented by sorting the coordinate values ​​of each seating target in the group and determining in sequence the initial row to which each seating target belongs in the group include: obtaining the difference between each two adjacent coordinate values ​​according to the sorting of the coordinate values ​​of each seating target in the group; obtaining a difference reference value according to the difference between each two adjacent coordinate values; taking the seating target corresponding to the first coordinate value in the seating direction as the first seating target, and determining the first row as the initial row to which the first seating target belongs; and determining in sequence the initial row to which each seating target after the first seating target belongs in the group according to the sorting of the coordinate values ​​of the first row and each seating target in the group.

[0118] In one embodiment, the computer program implemented when executed by the processor sorts the coordinate values ​​of the first row and each seat target in the group, and sequentially determines the initial row to which each seat target after the first seat target belongs in the group, including: taking the first row as the current row, taking the first seat target as the current seat target, and sorting the coordinate values ​​of each seat target in the group to determine the next seat target of the current seat target; when the vertical coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is greater than the difference reference value, determining the next row of the current row as the next seat target; The initial row to which the next seating target belongs is determined, and the current seating target is updated to the next seating target, and the current row is updated to the next row of the current row; when the vertical coordinate difference between the coordinate value of the current seating target and the coordinate value of the next seating target is not greater than the difference reference value, the current row is determined as the initial row to which the next seating target belongs, and the current seating target is updated to the next seating target; return to the step of sorting the coordinate values ​​of the seating targets in the group, determining the next seating target of the current seating target, and continue executing until the current seating target is the last seating target.

[0119] In one embodiment, the computer program implemented when executed by the processor adjusts the row to which the seating targets in each initial row belong in turn according to the row order of the initial rows in the group and the number of seating targets contained in each initial row to obtain the final row to which each seating target belongs in the corresponding group, including: obtaining a quantity reference value of the number of row seating targets, taking the first initial row as the current initial row, and taking the first row as the current row; comparing the number of seating targets contained in the current initial row with the quantity reference value, and selecting seating targets from the current initial row when the number of seating targets contained in the current initial row is greater than the quantity reference value, so that the number of unselected seating targets in the current initial row is not greater than the quantity reference value. The number reference value is used to determine the current row as the final row for the unselected seating targets in the current initial row, and the initial row for the selected seating targets in the current initial row is modified to the next initial row of the current initial row; when the number of seating targets contained in the current initial row is not greater than the number reference value, the current row is determined as the final row for the seating targets in the current initial row; the current row is updated to the row next to the first row, the current initial row is updated to the next initial row, and the step of comparing the number of seating targets contained in the current initial row with the number reference value is returned and continued until the current initial row is the last initial row and the number of seating targets contained is not greater than the number reference value.

[0120] In one embodiment, the method of obtaining a quantitative reference value of a target number of seating rows implemented when a computer program is executed by a processor includes: determining the total number of initial rows in the group; and calculating an average value of the target number of seating rows based on the total number of rows and the number of seating targets contained in each initial row as a quantitative reference value of the target number of seating rows.

[0121] In one embodiment, the method implemented when the computer program is executed by the processor also includes: performing simulated seating display on the seating targets in the simulated seating space according to the final row to which each seating target in each group belongs.

[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

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

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

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

Claims

1. A method for correcting a seat position, characterized in that: The method comprises: Obtaining the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, wherein the coordinate value is used to indicate the position of the seat target in the actual seat space; For each group, sorting the coordinate values ​​of each seat target in the group, and determining the initial row to which each seat target belongs in the group in turn; According to the row order of the initial rows in the group and the number of seating targets contained in each initial row, the rows of the seating targets in each initial row are adjusted in turn to obtain the final row of each seating target in the corresponding group.

2. The method according to claim 1, characterized in that The step of sorting the coordinate values ​​of the seated targets in the group and sequentially determining the initial row to which the seated targets in the group belong includes: Sort the coordinate values ​​of each seated target in the group and obtain the difference between every two adjacent coordinate values; According to the difference between each two adjacent coordinate values, a difference reference value is obtained; The seat target corresponding to the first coordinate value in the seat direction is taken as the first seat target, and the first row is determined as the initial row to which the first seat target belongs; According to the sorting of the coordinate values ​​of the first row and each seated target in the group, the initial row to which each seated target after the first seated target belongs in the group is determined in sequence.

3. The method according to claim 2, characterized in that The step of sorting the coordinate values ​​of the first row and each seated target in the group and sequentially determining the initial row to which each seated target after the first seated target belongs in the group comprises: The first row is taken as the current row, the first seat target is taken as the current seat target, and the next seat target of the current seat target is determined according to the coordinate values ​​of the seat targets in the group; When the coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is greater than the difference reference value, the next row of the current row is determined as the initial row of the next seat target, and the current seat target is updated to the next seat target, and the current row is updated to the next row of the current row; When the coordinate difference between the coordinate value of the current seat target and the coordinate value of the next seat target is not greater than the difference reference value, the current row is determined as the initial row to which the next seat target belongs, and the current seat target is updated as the next seat target; Return to the step of sorting the coordinate values ​​of each seating target in the group, determining the next seating target of the current seating target, and continue executing until the current seating target is the last seating target.

4. The method according to claim 1, characterized in that: The step of adjusting the rows to which the seating targets belong in each initial row in turn according to the row sequence of the initial rows in the group and the number of seating targets contained in each initial row to obtain the final row to which each seating target belongs in the corresponding group includes: Get the reference value of the target number of rows, take the first initial row as the current initial row, and take the first row as the current row; Compare the number of seating targets included in the current initial row with the number reference value, and if the number of seating targets included in the current initial row is greater than the number reference value, select seating targets from the current initial row so that the number of unselected seating targets in the current initial row is not greater than the number reference value, determine the current row as the final row of the unselected seating targets in the current initial row, and modify the initial row of the selected seating targets in the current initial row to the next initial row of the current initial row; When the number of seating targets included in the current initial row is not greater than the reference value, determining the current row as the final row for each seating target in the current initial row; Update the current row to the row next to the first row, update the current initial row to the next initial row, return to the step of comparing the number of seated targets contained in the current initial row with the reference value and continue executing until the current initial row is the last initial row and the number of seated targets contained is not greater than the reference value.

5. The method according to claim 4, characterized in that The step of obtaining a reference value of a target number of row seats includes: Determine the total number of rows initially belonging to the group; According to the total number of rows and the number of seating targets contained in each initial row, the average number of seating targets is calculated as a reference value for the number of row seating targets.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: According to the final row to which each seating target in each group belongs, a simulated seating display is performed on the seating target in the simulated seating space.

7. A seating position correction device, characterized in that: The device comprises: An acquisition module, used to acquire the total number of seats in each group and the coordinate value of each seat target obtained after parsing the surveillance video, wherein the coordinate value is used to indicate the position of the seat target in the actual seat space; A determination module, configured to determine, for each group, the initial row to which each seated target belongs in the group according to the sorting of the coordinate values ​​of each seated target in the group; The adjustment module is used to adjust the rows to which the seating targets belong in each initial row according to the row order of the initial rows in the group and the number of seating targets contained in each initial row, so as to obtain the final row to which each seating target belongs in the corresponding group.

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

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

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