Method, device and equipment for measuring real social activity of urban public space and medium

CN122906645APending Publication Date: 2026-10-13SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611398296.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

然而,这些方法侧重于反映整体人气,在微观公共空间尺度下难以准确表征真实的社交活力

Benefits of technology

通过从微观公共空间视频中提取人员轨迹,并基于个体运动状态特征和人际交互特征进行社交行为分类,有效解决了现有技术仅能评价人群集聚强度而无法区分真实社交互动与普通通行的问题,提升了社交行为识别的准确性。通过将社交行为分类为结伴通行、结伴停留、陪伴照护及结伴运动等异构类型,弥补了现有方法无法揭示社交活动行为结构的技术缺陷,为公共空间功能优化提供了细粒度的行为数据支撑。通过在指定空间单元和时间窗口内对各类社交行为进行社交活力空间异质性计算,得到包含强度、稳定度、活跃度变化率等指标的社交活力空间异质性指标,克服了传统评价仅关注整体活力强度指标的局限,实现了对社交活力时间稳定性及动态变化特征的综合表征。通过基于社交活力空间异质性指标进行多尺度空间评估,进一步获得空间设施对特定社交行为承载匹配程度的量化结果,为城市微观空间的精细化诊断与优化决策提供了完整的技术依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122906645A_ABST
    Figure CN122906645A_ABST
Patent Text Reader

Abstract

The present application relates to a city public space real social activity measurement method, device, equipment and medium, the method comprises, acquiring micro public space video and carrying out target tracking detection, generating personnel short-time track data; individual motion state features and interpersonal interaction features are extracted from the personnel short-time track data, social behavior classification is carried out according to the individual motion state features and the interpersonal interaction features, and real social behavior type is obtained; the real social behavior type is carried out social activity space heterogeneity calculation in the specified space unit and time window, and the social activity space heterogeneity index is obtained; the social activity relationship decoupling evaluation of multi-scale hierarchical space is carried out based on the social activity space heterogeneity index, and the multi-scale measurement result is obtained. Real social association can be identified and heterogeneous social behavior can be classified by extracting behavior features from short-time video track, and the fine evaluation of the matching degree of specific social behavior bearing of space facilities can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of a method, apparatus, equipment and medium for measuring the real social vitality of urban public spaces. Background Technology

[0002] The measurement of urban public space vitality mainly relies on methods such as heat maps, mobile phone signaling, point-of-interest data, or social media check-in data, evaluating space usage intensity and crowd concentration levels through indicators such as population density and merchant app usage rates. However, these methods focus on reflecting overall popularity and are difficult to accurately represent true social vitality at the micro-scale of public spaces. Evaluations based on density or check-in data cannot identify whether genuine social interactions occur between people, and it is difficult to distinguish between companionship behavior and a lack of social interaction. Existing methods often treat various activities as homogeneous expressions of vitality, lacking methods for identifying and classifying heterogeneous real social behavior types such as companionship, companionship, caregiving, and exercise, and failing to reveal the behavioral structure of real social activities within spatial facilities. Furthermore, existing evaluation dimensions are insufficient to comprehensively reflect the actual development and changes in the social vitality of public spaces. Summary of the Invention

[0003] The main objective of this invention is to provide a method, device, equipment, and medium for measuring the real social vitality of urban public spaces. This method can identify real social connections by extracting behavioral features from video trajectories, classify heterogeneous social behaviors, and achieve a refined assessment of the degree of matching between spatial facilities and specific social behaviors based on multi-dimensional index calculations.

[0004] To achieve the above objectives, the present invention provides a method for measuring the real social vitality of urban public spaces, comprising: Acquire video footage of micro-public spaces and perform target tracking and detection to generate short-term trajectory data of people; Individual motion state features and interpersonal interaction features are extracted from the short-term trajectory data of the personnel. Based on the individual motion state features and interpersonal interaction features, social behavior is classified to identify the real social behavior type. Within the specified spatial unit and time window, the spatial heterogeneity of social vitality is calculated for the real social behavior types to obtain the spatial heterogeneity index of social vitality. Based on the aforementioned social vitality space heterogeneity index, a multi-scale hierarchical spatial decoupling assessment of social vitality relationships is conducted to obtain multi-scale measurement results.

[0005] The present invention also provides a device for measuring the social vitality of urban public spaces, applied to any of the above-described methods for measuring the real social vitality of urban public spaces, comprising: A trajectory generation module is used to acquire microscopic public space videos and perform target tracking and detection to generate short-term trajectory data of people. The social behavior recognition module is used to extract individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel, and to classify social behaviors based on the individual motion state features and interpersonal interaction features to obtain the real social behavior type. The vitality calculation module is used to perform social vitality spatial heterogeneity calculation on the real social behavior type within a specified spatial unit and time window to obtain a social vitality spatial heterogeneity index. A multi-scale spatial assessment module is used to perform decoupling assessment of social vitality relationships in a multi-scale hierarchical space based on the social vitality spatial heterogeneity index, and to obtain multi-scale measurement results.

[0006] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for measuring the real social vitality of urban public spaces as described in any of the preceding claims.

[0007] The present invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for measuring the real social vitality of urban public spaces as described in any of the preceding claims.

[0008] The present invention provides a method, apparatus, equipment, and medium for measuring the real social vitality of urban public spaces, which has the following beneficial effects: By extracting pedestrian trajectories from videos of micro-level public spaces and classifying social behaviors based on individual movement characteristics and interpersonal interaction features, this approach effectively addresses the limitation of existing technologies, which can only evaluate the intensity of crowd gatherings but cannot distinguish between genuine social interactions and ordinary passage, thus improving the accuracy of social behavior identification. By classifying social behaviors into heterogeneous types such as group travel, group stays, companionship and care, and group exercise, it overcomes the technical deficiency of existing methods in revealing the structure of social activity behaviors, providing fine-grained behavioral data support for optimizing public space functions. Through calculating the spatial heterogeneity of social vitality within specified spatial units and time windows, a spatial heterogeneity index of social vitality, including indicators such as intensity, stability, and activity change rate, is obtained. This overcomes the limitation of traditional evaluations that only focus on overall vitality intensity indicators, achieving a comprehensive representation of the temporal stability and dynamic changes of social vitality. Furthermore, by conducting multi-scale spatial assessments based on the spatial heterogeneity index of social vitality, quantitative results are obtained regarding the matching degree of spatial facilities with specific social behaviors, providing a complete technical basis for the refined diagnosis and optimization decisions of urban micro-spaces. Attached Figure Description

[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a schematic diagram of a system for measuring the real social vitality of urban public spaces according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for measuring the real social vitality of urban public spaces according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a method for measuring the real social vitality of urban public spaces according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating a method for measuring the real social vitality of urban public spaces according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating a method for measuring the real social vitality of urban public spaces according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a process for measuring the real social vitality of urban public spaces in one embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.

[0011] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0014] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0015] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0016] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0017] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0018] The measurement of urban public space vitality mainly relies on methods such as heat maps, mobile phone signaling, point-of-interest data, or social media check-in data, evaluating space usage intensity and population concentration levels through indicators such as population density and hourly pedestrian flow. However, these methods focus on reflecting overall "popularity" and are difficult to accurately characterize social vitality at the micro-scale of public spaces. First, evaluations based on density or check-in data cannot identify whether genuine social interactions occur between people, making it difficult to distinguish between group behavior and passing by. Second, existing methods often treat various activities as homogeneous vitality manifestations, lacking the identification and classification of heterogeneous real social behavior types such as group walking, group staying, companionship, and group exercise, and failing to reveal the behavioral structure of social activities. Furthermore, existing evaluation dimensions are mainly based on static intensity indicators, lacking a comprehensive analysis of the temporal stability of social vitality, the dynamic changes in the activity level of different types, and the spatial distribution characteristics of behaviors, making it difficult to fully reflect the actual development status of social vitality in public spaces.

[0019] To address the aforementioned issues, this application proposes a method, apparatus, device, and medium for measuring the real social vitality of urban public spaces. By extracting personnel trajectories from microscopic public space videos and classifying social behaviors based on individual movement state characteristics and interpersonal interaction characteristics, it effectively solves the problem that existing technologies can only evaluate the intensity of crowd gathering but cannot distinguish between real social interaction and ordinary passage, thus improving the accuracy of social behavior recognition. By classifying social behaviors into heterogeneous types such as walking together, staying together, companionship and care, and exercising together, it overcomes the technical deficiency of existing methods in revealing the structure of social activity behaviors, providing fine-grained behavioral data support for optimizing public space functions. By calculating the spatial heterogeneity of social vitality for various social behaviors within specified spatial units and time windows, it obtains a spatial heterogeneity index of social vitality that includes indicators such as intensity, stability, and rate of change of activity, overcoming the limitation of traditional evaluations that only focus on static intensity indicators, and achieving a comprehensive characterization of the temporal stability and dynamic change characteristics of social vitality. By conducting multi-scale spatial assessments based on the heterogeneity index of social vitality spaces, we can further obtain quantitative results on the degree of matching between spatial facilities and specific social behaviors, providing a complete technical basis for the refined diagnosis and optimization decision-making of urban micro-spaces.

[0020] The method for measuring the real social vitality of urban public spaces provided in this invention can be applied to, for example... Figure 1 The urban public space social vitality measurement system shown includes a client and an urban public space social vitality measurement device, wherein the terminal device communicates with the server through a network or bus.

[0021] Among these, the device for measuring the social vitality of urban public spaces can be a terminal device, which refers to a device that corresponds to a server and provides local services to customers. This terminal device includes, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0022] Among them, the social vitality measurement device for urban public spaces can also be a server, which can be implemented by a standalone server or a server cluster composed of multiple servers.

[0023] like Figure 2 As shown, the present invention also provides a method for measuring the real social vitality of urban public spaces, including: Step S100: Acquire video of the micro-public space and perform target tracking and detection to generate short-term trajectory data of personnel; Specifically, camera equipment is deployed at entrances, corners, node centers, and high-frequency passageways in the micro-public space to collect continuous video data within the target space. The collected continuous video data undergoes time synchronization, distortion correction, and spatial coordinate calibration preprocessing to establish a mapping relationship between the pixel coordinates of video frame images and the physical spatial plane coordinates, resulting in preprocessed video frames.

[0024] Preprocessed video frames are input into a target detection model for pedestrian target recognition, outputting the bounding box, confidence score, and category label for each person in each video frame. The identified bounding boxes are then input into a multi-target tracking algorithm, which performs feature matching and number association on the bounding boxes in consecutive video frames. Each detected pedestrian is assigned a unique identifier, and their position coordinates in consecutive video frames are associated with this identifier. Combining this identifier with the established mapping relationship between pixel coordinates and physical space plane coordinates, the image coordinates are converted into physical space plane coordinates, forming short-term trajectory data of the person that includes the identifier, a sequence of plane coordinate points, and the duration of the trajectory.

[0025] Step S200: Extract individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel, classify social behaviors based on the individual motion state features and the interpersonal interaction features, and obtain the real social behavior type; Specifically, based on short-term trajectory data of personnel, for each person being monitored, their trajectory length, movement time, speed sequence, and spatial coordinates of trajectory points are extracted. The average speed is calculated using the trajectory length and movement time. The speed sequence is compared with a preset dwell speed threshold for each time slice, and the dwell time slices are accumulated to obtain the dwell time. The spatial movement range is calculated using the difference between the maximum and minimum coordinate values ​​of the trajectory point spatial coordinates within the observation time window. The periodicity of the trajectory is calculated using the number of repeated trajectories obtained from the spatial coordinate sequence analysis and the observation time. The above-mentioned average speed, dwell time, spatial movement range, and trajectory periodicity are used as the individual movement state characteristics of the person.

[0026] For any two individuals appearing in the same space-time range, the angle between their motion directions is calculated based on their respective spatial coordinate sequences. The relative distance between them is calculated based on their spatial coordinates in the same frame, forming a relative distance sequence. The continuous co-occurrence time of the two individuals is statistically analyzed from their short-term trajectory data. The motion synchronization degree is calculated using their velocity sequences and the angle between their motion directions. The distance stability is calculated using the ratio of the standard deviation to the mean of the relative distance sequence. The motion synchronization degree, distance stability, and continuous co-occurrence time are used as the interpersonal interaction characteristics of the two individuals.

[0027] The social association index is calculated using interpersonal interaction features and compared with a preset social judgment threshold to identify the strength of social associations with real social connections. The individual movement state features and interpersonal interaction features corresponding to the social association strength are normalized and input into a preset heterogeneous behavior discrimination function for classification to obtain the real social behavior types among companion travel, companion rest, companion care, and companion exercise.

[0028] Step S300: Calculate the spatial heterogeneity of social vitality for the real social behavior types within the specified spatial unit and time window to obtain the spatial heterogeneity index of social vitality. Specifically, based on real-world social behavior types, the number of various social behaviors and the total number of behaviors are counted within specified spatial units and time windows. The social activity intensity and total behavior intensity are calculated by combining the area of ​​the spatial unit and the length of the time window, and the proportion of social behaviors is also calculated. Social activity intensities from multiple consecutive time windows are collected to form an intensity sequence. The coefficient of variation of this sequence is calculated. The stability of social activity is calculated using the coefficient of variation, the proportion of social behaviors, and the ratio of the actual duration of social behaviors to the total duration of the time window.

[0029] For various social behaviors, activity levels are calculated based on the number of social behaviors in different time periods, and the rate of change in activity levels is calculated based on the changes in activity levels between adjacent time periods. Spatial hotspot centers are determined based on the set of spatial coordinates of various social behavior events within a spatial unit. The average diffusion distance from the event to the hotspot center is calculated, and the spatial heterogeneity index is obtained by dividing the average diffusion distance by the square root of the spatial unit area. Social vitality intensity, social vitality stability, the rate of change in activity levels for various social behaviors, and the spatial heterogeneity index are integrated as an indicator of spatial heterogeneity of social vitality.

[0030] Step S400: Based on the heterogeneity index of social vitality space, perform a multi-scale hierarchical spatial decoupling assessment of social vitality relationships to obtain multi-scale measurement results.

[0031] Specifically, based on the spatial heterogeneity index within the social vitality spatial heterogeneity index, a clustering matching weight function is constructed for static social behaviors, such that the smaller the spatial heterogeneity index, the greater the matching weight; a diffusion matching weight function is constructed for dynamic social behaviors, such that the larger the spatial heterogeneity index, the greater the matching weight. The activity level and social vitality stability of various social behaviors are integrated with their corresponding matching weights to obtain a scenario-behavior adaptability index for each type of social behavior, which is used to assess the degree to which the spatial facility layout matches the carrying capacity of specific social behaviors.

[0032] By combining social vitality intensity, social vitality stability, activity change rate, and scenario behavior adaptability index, a multi-scale measurement result is generated, including a radar chart of social vitality heat map distribution, the composition of real social behavior types, and the time-series change sequence of vitality stability. This provides a quantitative decision-making basis for urban micro-spatial renewal. Among them, the multi-scale measurement result is the measurement result at multiple scale levels, including single spatial units, spatial nodes of the same type of function, and the overall public space network of the region.

[0033] This method provides a real-world social vitality measurement approach for urban public spaces. By extracting pedestrian trajectories from micro-level public space videos and classifying social behaviors based on individual movement state characteristics and interpersonal interaction features, it effectively solves the problem that existing technologies can only evaluate the intensity of crowd gathering but cannot distinguish between genuine social interaction and ordinary passage, thus improving the accuracy of social behavior identification. By classifying social behaviors into heterogeneous types such as walking together, staying together, companionship and care, and exercising together, it overcomes the technical deficiency of existing methods in revealing the structure of social activity behaviors, providing fine-grained behavioral data support for the optimization of public space functions. By calculating the spatial heterogeneity of social vitality for various social behaviors within specified spatial units and time windows, it obtains a spatial heterogeneity index of social vitality that includes indicators such as intensity, stability, and rate of change of activity. This overcomes the limitation of traditional evaluations that only focus on static intensity indicators, achieving a comprehensive representation of the temporal stability and dynamic change characteristics of social vitality. Through multi-scale spatial assessment based on the spatial heterogeneity index of social vitality, it further obtains quantitative results on the matching degree of spatial facilities with specific social behaviors, providing a complete technical basis for the refined diagnosis and optimization decision-making of urban micro-spaces.

[0034] In one embodiment, step S100: acquiring microscopic public space video and performing target tracking and detection to generate short-term trajectory data of personnel includes: Step S110: Acquire continuous video data collected by the camera device, perform calibration preprocessing on the continuous video data to obtain preprocessed video frames, and establish the mapping relationship between the image pixels of the preprocessed video frames and the spatial plane coordinates. The continuous video data refers to a temporally continuous video stream collected synchronously by multiple camera devices deployed within a microscopic public space, used to completely record the activities of people within the target space. The calibration preprocessing involves performing a series of operations on the collected continuous video data, including time synchronization, lens distortion correction, and spatial coordinate calibration, to eliminate temporal deviations and image distortion between multiple video streams and to convert two-dimensional image coordinates into measurable physical space plane coordinates. The preprocessed video frame refers to a standard video frame sequence obtained after the above calibration preprocessing, which has had distortion eliminated and possesses a spatial coordinate mapping relationship. The mapping relationship between image pixels and spatial plane coordinates refers to a mathematical correspondence established through a spatial calibration algorithm, used to convert the two-dimensional image coordinates of any pixel in the video frame into corresponding actual plane coordinates in physical space.

[0035] Specifically, continuous video streams are acquired synchronously from multiple cameras deployed at entrances, corners, node centers, and both sides of high-frequency traffic paths in the micro-public space. Each camera uses a time synchronization device to ensure a consistent acquisition time reference. Frames from each continuous video stream are extracted at a preset frame rate, such as one or two frames per second, resulting in a sequence of video frames to be processed. Lens distortion correction is performed on each video frame. Using distortion coefficients obtained from camera intrinsic parameter calibration, radial and tangential distortion correction algorithms are employed to eliminate barrel or pincushion distortion, restoring the true spatial geometry.

[0036] For the distortion-corrected video frame, based on pre-deployed spatial coordinate control points in the field, a mapping relationship between image pixel coordinates and physical space plane coordinates is established using homography matrix solving or direct linear transformation methods, obtaining the transformation parameters from image coordinates to spatial plane coordinates at that camera viewpoint. The distortion-corrected video frame and this mapping relationship are then output together as the preprocessed video frame.

[0037] The camera equipment includes one or more of fixed high-definition cameras, wide-angle cameras, panoramic cameras, and depth cameras, used to acquire continuous video within the target space. The system also includes a network switching device, a data storage device, an edge computing box, and a time synchronization device; the network switching device connects the camera equipment to the edge computing box and the data storage device for data transmission; the edge computing box performs video frame extraction, target detection, and preliminary trajectory extraction; the data storage device stores raw video, keyframe images, and structured behavioral data; and the time synchronization device ensures that data from multiple cameras is matched under the same time reference.

[0038] Simultaneously, the collected data includes: raw video data, video frame images, timestamp data, spatial coordinate data, personnel detection box data, target number data, short-term trajectory data of personnel, personnel movement speed data, movement direction data, dwell time data, distance between personnel data, continuous co-occurrence time data, and behavior type data. For each detected person, the system records their target number, image coordinates, converted planar coordinates, speed, direction, dwell state, and spatial unit in consecutive video frames. For any two personnel, the system further records their distance changes, co-occurrence time, and movement synchronization relationship within the same spatial unit. The above data collectively constitute the basic data for social vitality measurement in this embodiment.

[0039] Step S120: Perform pedestrian target recognition on the preprocessed video frames and output the personnel bounding boxes; The pedestrian target recognition refers to the process of locating and classifying each human target in a pre-trained target detection model. The person bounding box refers to the rectangular box output by the target detection model used to label the location of each pedestrian in the video frame. It includes the pixel coordinates of the upper left and lower right corners of the rectangle in the image, the confidence score that the rectangle belongs to a pedestrian target, and the category label.

[0040] In practice, each preprocessed video frame is sequentially input into a pre-trained object detection model. This object detection model can employ a pedestrian detection architecture based on deep convolutional neural networks, such as YOLOv8, Faster R-CNN, or Mask R-CNN. The model has been trained on pedestrian sample datasets containing various public space scenes and possesses the ability to detect pedestrians in occluded, densely populated, and distant small target scenarios. The model performs forward inference calculations on each input video frame, generating candidate detection regions on the image feature map. Through region classification and bounding box regression branches, it outputs the detection box information for all pedestrian targets identified in that frame.

[0041] Each detection box contains a rectangular bounding box, whose spatial location is determined by the coordinates of its top-left and bottom-right corners in the image pixel coordinate system; it also contains a confidence score, representing the probability that the bounding box contains a pedestrian target; and a category label, fixed as pedestrian. For scenes with occlusion or small targets, reliable detection results are filtered out by setting a reasonable confidence threshold. Detection boxes below the threshold are discarded, and only valid person bounding boxes with confidence scores above the threshold are retained.

[0042] All valid person bounding boxes detected in each video frame are arranged in frame order to form the person bounding box set corresponding to that frame, which serves as the input data for subsequent person identity matching and multi-target association tracking.

[0043] Step S130: Perform identity matching and association on the personnel bounding boxes to obtain identity identifiers; The identity matching and association refers to the process of using a multi-target tracking algorithm to perform inter-frame matching of the bounding boxes of people detected in consecutive video frames, and to associate the bounding box sequences belonging to the same pedestrian with the same identity. The identity identifier refers to a unique numerical number assigned to each tracked pedestrian in this matching and association process, used to distinguish different pedestrians across frames and maintain the continuity of individual trajectories.

[0044] In practice, a multi-object tracking algorithm is used to process the set of bounding boxes of people in each video frame. Bounding boxes between adjacent frames are matched based on factors such as proximity of position and similarity of bounding box size. For each bounding box identified in a frame, it is determined whether it can establish a correspondence with the bounding box corresponding to a certain identity identifier in the previous frame. The multi-object tracking algorithm used includes DeepSORT, ByteTrack, OC-SORT, or any other multi-object tracking algorithm.

[0045] When a bounding box in the current frame highly overlaps or is adjacent to a bounding box in the previous frame in terms of spatial location, they are identified as belonging to the same pedestrian, and the identity identifier from the previous frame is assigned to the corresponding bounding box in the current frame. For bounding boxes that cannot be matched with any existing identity identifier in the current frame, they are considered as newly emerging person targets, a new unique identity identifier is created for them, and they are continuously tracked in subsequent frames.

[0046] For an identity that exists in the previous frame but cannot be detected in the current frame, its identity information is temporarily retained. When a match occurs again in several subsequent frames, the same identity is re-associated. If no match can be found in several consecutive frames, the tracking of that identity is terminated.

[0047] Through recursive matching between adjacent frames, each person's bounding box in each frame is assigned a corresponding identity identifier, resulting in a sequence of identity-identified bounding boxes arranged according to video frames, providing a basis for subsequent personnel trajectory construction.

[0048] Step S140: Construct a trajectory based on the identity identifier and the mapping relationship to obtain the short-term trajectory data of the person.

[0049] The trajectory construction refers to the process of converting the bounding box positions corresponding to the same identity identifier in consecutive frames into physical space plane coordinates based on the mapping relationship between image pixels and spatial plane coordinates of the preprocessed video frames, and organizing them into the pedestrian's movement trajectory in a time sequence. The short-term trajectory data of the person is the final generated structured data containing the unique identity identifier of each detected pedestrian, the sequence of physical space plane coordinate points recorded in chronological order, and the start and end times of the trajectory.

[0050] In practice, for each bounding box with an identification identifier, the pixel coordinates of the bottom center point of the bounding box in the image are extracted as the pedestrian's projected position on the ground. Using the mapping relationship between image pixels and spatial plane coordinates, these pixel coordinates are converted into corresponding physical spatial plane coordinates through pre-calibrated transformation parameters. For bounding boxes belonging to the same identification identifier, the spatial plane coordinates obtained from the conversion in each frame are arranged sequentially according to the time order of the video frames, forming a continuous sequence of spatial coordinate points for the pedestrian throughout the entire observation period. Simultaneously, the timestamp corresponding to the video frame where the identification identifier first appears is recorded as the trajectory start time, and the timestamp corresponding to the video frame where it last appears is recorded as the trajectory end time, and the duration of the trajectory is calculated accordingly.

[0051] The identity identifier, spatial coordinate sequence, trajectory start time, trajectory end time, and trajectory duration are combined to form a complete personnel trajectory record. All detected pedestrians are processed in the same way, and the resulting personnel trajectory records constitute a short-term personnel trajectory dataset. Each trajectory in this dataset is uniquely distinguishable by its identity identifier, and each spatial coordinate point in the trajectory is associated with a corresponding timestamp, reflecting the pedestrian's movement path and dwell time in physical space. This provides a complete spatiotemporal behavioral data foundation for subsequent extraction of individual movement state features and interpersonal interaction features.

[0052] This embodiment, by deploying camera equipment and performing spatiotemporal synchronization calibration preprocessing, can acquire high-precision continuous video data within a microscopic public space and establish a mapping relationship between pixel coordinates and physical spatial plane coordinates, providing a unified spatial benchmark and reliable data source for the accurate construction of personnel trajectories. Through target detection and identity matching, it achieves automatic differentiation and continuous cross-frame tracking of each pedestrian, thereby transforming traditional group indicators based on population density or check-in data into continuous behavioral data oriented towards individuals, overcoming the shortcomings of existing technologies that cannot distinguish individuals and are difficult to capture real behavioral processes. By combining identity identifiers with spatial mapping relationships for trajectory construction, it generates structured short-term personnel trajectory data containing identity identifiers, spatial coordinate sequences, and temporal information, providing spatiotemporally continuous and positionally accurate data support for subsequent individual motion state feature extraction and inter-personal interaction behavior recognition.

[0053] like Figure 3 As shown, in one embodiment, step S210, extracting individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel, includes: Step S211: Based on the short-term trajectory data of the personnel, obtain the trajectory length, movement time, velocity sequence and spatial coordinate sequence of each person, and calculate the motion state according to the trajectory length, movement time, velocity sequence and spatial coordinate sequence to obtain the individual motion state characteristics; The trajectory length refers to the total length of the spatial path traversed by a person with the same identity during the observation period, which is obtained by successively summing the distances between adjacent coordinate points in the spatial coordinate sequence corresponding to that identity. The motion time refers to the total time that the person is in motion during the observation period, which is obtained by summing the durations of time slices with velocity values ​​greater than zero in the velocity sequence.

[0054] The velocity sequence refers to the sequence of instantaneous velocities of the person within each adjacent video frame time interval, arranged chronologically. Each instantaneous velocity is calculated by dividing the Euclidean distance between the spatial coordinates of two adjacent frames by the inter-frame time interval. The spatial coordinate sequence refers to the sequence of physical space plane coordinates of the person with the same identity in each video frame, arranged chronologically. The individual motion state characteristics are a set of quantitative parameters used to characterize the motion behavior of a single person, including average velocity, dwell time, spatial movement range, and trajectory periodicity.

[0055] In practice, the trajectory length, movement time, velocity sequence, and spatial coordinate sequence of each person within a specific time period are obtained from short-term trajectory data. The specific time period can be customized or a preset range can be selected, including 5 minutes, 10 minutes, 20 minutes, etc. For each person's trajectory record corresponding to an identity identifier, their spatial coordinate sequence is extracted. The instantaneous velocity within each time slice is obtained by calculating the straight-line distance between two adjacent frames and dividing it by the time interval between the two frames. All instantaneous velocities are arranged in frame time sequence to form the person's velocity sequence. The movement time of the person is obtained by summing the durations corresponding to the time slices where the instantaneous velocity is greater than zero in the velocity sequence. The distances between adjacent coordinate points in the spatial coordinate sequence are summed one by one to obtain the trajectory length Li of the person.

[0056] The average velocity is calculated using the formula based on the trajectory length and motion time: ; in, This represents the average speed of person i within the observation time window. Indicates the length of its trajectory. Indicates the duration of the movement. (Specific criteria are lacking.) The instantaneous velocity vk of each time slice in the velocity sequence is compared with a preset dwell speed threshold v0. When the instantaneous velocity is less than the dwell speed threshold, the time slice is determined to be in a dwell state, and the indicator function I is set to 1; otherwise, it is set to 0, according to the formula: ; The duration Δ of each time segment that meets the stay conditions The total duration of stay is obtained by summing the cumulative totals.

[0057] Where Ts represents the duration of stay, Δ This represents the duration of the k-th time slice. Let v0 represent the instantaneous speed of the person in the k-th time slice, v0 represent the stationary speed threshold, and I be the indicator function. Less than If the time slice is in a stationary state, the value is 1; otherwise, the value is 0.

[0058] Extract the maximum x-coordinate of all trajectory points of the person within the observation time window from the spatial coordinate sequence. and minimum value Maximum value of the ordinate and minimum value According to the formula: ; Calculate the spatial movement range Mi.

[0059] Trajectory repetition pattern analysis was performed on the spatial coordinate sequence to count the number of times the person repeated the trajectory along a similar path during the observation period. According to the formula: ; in, This indicates the periodicity of the trajectory of person i. Indicates the number of times the trajectory is repeated. This indicates the observation timescale. The higher the periodicity of the trajectory, the stronger the repetition of the trajectory, and the more likely it corresponds to behaviors such as running, exercising, or cyclical walking.

[0060] The average speed, dwell time, spatial movement range, and trajectory periodicity calculated above are combined as the individual's motion state characteristics, providing a quantitative description of individual behavior for subsequent identification of movement patterns and judgment of real social behavior types.

[0061] Step S212: Obtain the spatial coordinate sequence of any two persons within the same spatiotemporal range, and calculate the angle between the motion directions and distance stability based on the spatial coordinate sequence of the two persons; The same spatiotemporal range refers to the area where two people are close in spatial location and overlap in time, that is, the spatial coordinate sequences of the two people have corresponding spatial coordinate records in the same video frame.

[0062] The motion direction angle refers to the angle between the motion direction vectors of two people in the same frame or adjacent frames, used to measure the degree of consistency in their motion directions. express.

[0063] The distance stability refers to the degree of fluctuation in the relative spatial distance between two people in each frame in which they appear together. It is obtained by calculating the ratio of the standard deviation to the mean of the relative distance sequence between the two people. The smaller the value, the more stable the relative distance between the two people is.

[0064] In practice, based on the short-term trajectory data of each person, the system iterates through any two people with different identities, determining whether their trajectories overlap in time. When both individuals have spatial coordinate records in multiple consecutive video frames and the straight-line distance between them in the corresponding frames is within a preset distance range, they are considered to be in the same spatiotemporal region. For two individuals in the same spatiotemporal region, the spatial coordinates in the commonly occurring frames are extracted from their respective spatial coordinate sequences. The motion direction vector of each person in each frame is calculated using the spatial coordinates of adjacent frames. The motion direction vector is obtained by subtracting the coordinates of the previous frame from the coordinates of the next frame, and its direction angle is obtained using the arctangent function.

[0065] For the motion direction vectors of two objects in the same frame, calculate the angle between their motion direction vectors. The angle between the two people's movement directions in that frame is expressed in radians and ranges from zero to π.

[0066] The angle between the motion directions of the two individuals is calculated across all co-occurring frames, and the average of these angles is taken as the overall motion direction angle for the pair. Simultaneously, the actual distance between the two individuals is calculated using their spatial coordinates in each co-occurring frame. The relative distances between the individuals are then arranged in frame-time order to form a sequence. The standard deviation σ of this relative distance sequence is calculated. ) and arithmetic mean The arithmetic mean ij is also the average distance between the two people, according to the formula: ; Let ε represent the distance stability between personnel i and personnel j, and let ε be a minimal constant to prevent the denominator from being zero.

[0067] The greater the distance stability, the more stable the relative distance between the two people during movement or rest, and the more likely they are to have a relationship of traveling together, accompanying and caring for each other, or engaging in joint activities.

[0068] The smaller the distance stability value, the more constant the relative spatial distance between the two individuals during their joint activities, and the greater the likelihood of them traveling together or being companions. This motion direction angle and distance stability, as important components of interpersonal interaction characteristics, provide fundamental measurement parameters for subsequent motion synchronization calculations and social relationship identification.

[0069] Step S213: Calculate the continuous co-occurrence time of two people from the short-term trajectory data of the two people, calculate the motion synchronization degree based on the velocity sequence and the angle between the motion directions of the two people, and use the motion synchronization degree, the distance stability and the continuous co-occurrence time as the interpersonal interaction features.

[0070] The continuous co-occurrence time refers to the cumulative duration of consecutive video frames in which two people appear simultaneously in the same spatial range and maintain trajectory correlation within the observation period. It is obtained by comparing the timestamp intervals in the trajectory data of the two people. This indicator is used to measure the degree of interaction between the two people in the time dimension.

[0071] The motion synchronization degree refers to the degree of consistency between the speed and direction of movement of two people during joint movement. It is calculated by weighted summation of the speed difference normalization term and the direction angle normalization term. The closer this value is to the upper limit, the more synchronized the two people's motion states are.

[0072] The interpersonal interaction features refer to a set of parameters used to quantitatively characterize the strength and pattern of the interaction relationship between two people, including motion synchronization, distance stability, and continuous co-occurrence time.

[0073] In specific implementation, step S212 obtains the angle between the motion directions of two people within the same spatiotemporal range. and distance stability Based on this, the temporal dimension information of the interaction between the two individuals is further extracted from the short-term trajectory data. The trajectory records of the two individuals are traversed, and the timestamps of the video frames in which both individuals have spatial coordinate records within the observation time window are extracted. The continuous frame segments in which the two individuals appear together are identified, and the time lengths spanned by each continuous co-occurrence segment are accumulated one by one to obtain the continuous co-occurrence time of the two individuals.

[0074] Dividing the continuous co-occurrence time by the total duration of the observation time window yields the normalized continuous co-occurrence time value Tij. Simultaneously, instantaneous velocity values ​​within the time slices corresponding to each co-occurrence frame are obtained from the velocity sequences of the two individuals. and Calculate the absolute value of the speed difference between the two. .

[0075] Normalization threshold based on preset speed difference Normalize the absolute value using the maximum value function: To ensure that the normalization result is non-negative, the velocity consistency component is obtained by multiplying it by the velocity weighting coefficient α.

[0076] Using the angle between the directions of motion Divide it by π for normalization, and then use the maximum value function. To ensure the normalization result is non-negative, multiply it by the direction weighting coefficient β to obtain the direction consistency component, where the sum of α and β is 1.

[0077] Calculation formula based on motion synchronization: ; Calculate the motion synchronization degree of the pair of people. Then, use the calculated motion synchronization degree... The combination of distance stability and continuous co-occurrence time serves as the interpersonal interaction characteristics corresponding to the strength of social association. This set of characteristics jointly characterizes the interaction behavior pattern between two individuals from three dimensions: motion consistency, spatial relationship stability, and temporal co-occurrence persistence, providing multi-dimensional and quantifiable data basis for subsequent calculation of social association index and determination of real social association.

[0078] This embodiment calculates average speed, dwell time, spatial movement range, and trajectory periodicity based on trajectory length, movement time, velocity sequence, and spatial coordinate sequence. This achieves a refined quantitative description of an individual's movement state, overcoming the limitation of traditional methods that can only obtain crowd density but cannot distinguish individual behavioral differences. It provides quantifiable evidence of individual behavior for subsequent identification of real social behavior types. By obtaining the spatial coordinate sequence of any two individuals within the same spatiotemporal range and calculating the angle between their movement directions and distance stability, the closeness of interpersonal interaction can be measured from two dimensions: consistency of movement direction and maintenance of spatial distance. This compensates for the inability of existing technologies to capture subtle spatiotemporal relationships between individuals. By combining statistically obtained continuous co-occurrence time and movement synchronization calculated based on velocity sequence and the angle between movement directions, interpersonal interaction characteristics are comprehensively constructed from three levels: temporal persistence, velocity consistency, and directional consistency. This provides an objective and multi-dimensional quantitative evaluation basis for subsequent identification of real social connections.

[0079] like Figure 4 As shown, in one embodiment, step S220, which involves classifying social behavior based on the individual's motion state characteristics and the interpersonal interaction characteristics to obtain the actual social behavior type, includes: Step S221: Determine the real-time distance between any two people based on the short-term trajectory data of the people, calculate the social association index in combination with the interpersonal interaction characteristics, and identify the social association by comparing the social association index with a preset social judgment threshold to obtain the social association strength; The real-time distance refers to the Euclidean straight-line distance between the physical space plane coordinates of any two people at the same moment in a video frame, which is obtained by calculating the distance between the two people's spatial coordinates in that frame.

[0080] The social association index refers to a quantitative value used to determine whether a genuine social association exists, obtained by weighting and summing three dimensions—spatial proximity, movement synchronization, and temporal co-occurrence duration—of two individuals according to preset weighting coefficients. express.

[0081] The preset social judgment threshold is a critical value used to distinguish between real social association and accidental co-occurrence, denoted by R0. When the social association index is greater than this threshold, it is determined that the two people have a valid social association. This threshold is determined by training with manually labeled samples or historical data.

[0082] The social association strength refers to the strength of a pair of people who have been identified as having genuine social interactions such as companionship, caregiving, or joint activities.

[0083] In practice, based on short-term trajectory data of personnel, the system iterates through any two individuals with different identities whose time segments overlap, extracts their spatial coordinates in each video frame in which they co-occur, and calculates the real-time distance between the two individuals in each frame using the Euclidean distance formula. Using the preset maximum social judgment distance dmax, according to the formula... ; The spatial proximity of each frame is calculated one by one, and the average spatial proximity of the frames that appear together is taken as the overall spatial proximity of the pair of people. When the real-time distance reaches or exceeds dmax, the spatial proximity approaches zero.

[0084] The motion synchronization Sij and the normalized value Tij of the continuous co-occurrence time of the pair of people are obtained from the interpersonal interaction features, combined with the spatial proximity mentioned above. According to the formula: Calculate the social connection index, where , , These are the weighting coefficients for spatial proximity, continuous co-occurrence time, and motion synchronization, respectively, and the sum of the three is 1.

[0085] The calculated social connection index Compared with the preset social judgment threshold R0, when When the R value is greater than 0, a valid social association is determined to exist between the individuals, and this association is marked as the strength of the social association and retained; when... If the strength of a relationship is less than or equal to R0, it is determined that the two do not constitute a valid social association and are excluded. The above identification process is performed on all social association strengths that overlap in time and space to obtain the set of all social association strengths that have real social associations in the current scene.

[0086] Step S222: Based on the preset heterogeneous behavior discrimination function, perform social recognition on the individual motion state features and interpersonal interaction features corresponding to the social association strength to obtain the corresponding real social behavior type; The types of real social behaviors include traveling together, resting together, providing companionship and care, and exercising together.

[0087] The heterogeneous behavior discrimination function refers to a set of classification and discrimination rules constructed based on the differentiated physical representations of various social behaviors in terms of behavioral characteristics such as speed, dwell time, motion synchronization, spatial movement range, trajectory periodicity and distance stability. It is used to further classify the social association strength that has been identified into specific real social behavior types.

[0088] In specific implementation, based on the social association strength identified in step S221, for each pair of people, the average speed, dwell time, spatial movement range, and trajectory periodicity of each person are obtained from their individual motion state characteristics, and the motion synchronization degree, distance stability, and continuous co-occurrence time are obtained from their interpersonal interaction characteristics. These behavioral feature values ​​are normalized and denoted as average speed V, dwell time T, motion synchronization degree S, spatial movement range M, trajectory periodicity P, distance stability H, and normalized continuous co-occurrence time Tij, respectively. The normalized feature values ​​are then input into a preset heterogeneous behavior discrimination function for class-by-class discrimination.

[0089] The discriminant functions for the four types of social behaviors are as follows:

[0090] when This was determined to be a social behavior involving traveling in groups.

[0091]

[0092] when At that time, it was determined to be a social behavior of staying and resting together.

[0093]

[0094] when At that time, it was determined to be a companion and care-providing social behavior. Among them, This represents the normalized consecutive co-occurrence time.

[0095]

[0096] when At that time, it was determined to be a social behavior of exercising and working out together.

[0097] in, Weighting coefficients Thresholds for different types of behavior are defined, and the weighting coefficients and thresholds can be determined through manually labeled samples, training with historical data, or correction based on recognition accuracy. Using the aforementioned discriminant function, identified socially related behaviors can be further decoupled into different social types, realizing the transformation of social vitality from overall intensity statistics to type-structure representation.

[0098] Meanwhile, during the decoupling of social types, spatial trajectory entropy can be used as an auxiliary correction indicator in type discrimination. Specifically, when the calculated spatial trajectory entropy is high, it indicates that there are multiple trajectory patterns and activity states within the current spatial unit, improving the sensitivity to the coexistence of multiple types of social behaviors; when the spatial trajectory entropy is low, it indicates that the spatial behavior pattern is relatively simple, and type discrimination should be based primarily on core features such as speed, dwell time, motion synchronization, and distance stability.

[0099] This embodiment calculates a social association index by comprehensively considering spatial proximity, motion synchronization, and continuous co-occurrence time, and compares it with a preset judgment threshold. This achieves automated identification of genuine social associations, overcoming the shortcomings of existing technologies that cannot distinguish between genuine social interactions and accidental co-occurrences based on population density or check-in data, thus improving the accuracy of social behavior identification. By inputting the individual motion state characteristics and interpersonal interaction characteristics identified as social association strength into a preset heterogeneous behavior discriminant function for classification, it achieves automatic discrimination of different genuine social behavior types such as traveling together, staying together, providing companionship and care, and exercising together. This compensates for the shortcomings of existing technologies that treat various activities as homogeneous vitality and fail to reveal the behavioral structure of social activities. By differentially setting thresholds for speed, dwell time, motion synchronization, spatial movement range, trajectory periodicity, and distance stability for each type in the discriminant function, the classification process can fit the physical representation characteristics of various social behaviors, providing a more granular behavioral data foundation for subsequent calculation of social vitality spatial heterogeneity indicators.

[0100] like Figure 5 As shown, in one embodiment, step S300, which involves calculating the spatial heterogeneity of social vitality for the real social behavior types within the specified spatial unit and time window to obtain a social vitality spatial heterogeneity index, includes: Step S310: Within the specified spatial unit and time window, perform a statistical analysis of the actual social behavior types, and combine the obtained number of each type of social behavior and the total number of behaviors with the spatial unit to calculate the social vitality intensity sequence and the proportion of social behaviors; The spatial unit refers to a basic spatial unit for vitality statistics that is pre-divided according to the actual boundaries, road interfaces, or functional nodes of urban public spaces, and its area is represented by A.

[0101] The time window, denoted by T, refers to the preset observation period length used for a single social activity statistics. The social activity intensity refers to the intensity of actual social behavior occurring per unit area and per unit time, used to characterize the density of social activities within the spatial unit.

[0102] The total behavioral intensity refers to the intensity of all human behaviors per unit area and unit time. These behaviors include ordinary passage, solitary stays, and various social behaviors. The proportion of social behaviors refers to the ratio of the number of social behaviors to the total number of behaviors, reflecting the importance of social behaviors within the overall behavior in this spatial unit.

[0103] In practice, based on the classification results of real social behavior types, within the specified spatial unit and preset time window, all personnel behavior events recorded within the time window are traversed, and counted and statistically analyzed according to the real social behavior type label to which each behavior event belongs.

[0104] For any behavioral event that falls under any of the following categories: traveling together, resting together, providing companionship and care, or exercising together, count it in the corresponding type of social behavior count. At the same time, count all social behaviors to obtain the total number of social behaviors.

[0105] The total number of human behavior events is obtained by summing up all human behavior events, including ordinary passage, solitary stay, and the four types of social behavior mentioned above. Based on the area value A and time window length T of the spatial unit as measured or extracted in advance; The formula for calculating social vitality intensity is: ; The formula for calculating total behavioral intensity is as follows: ; The formula for calculating the percentage of social behavior within this time window is: .

[0106] in, It is the total number of social behaviors identified within the observation timescale, that is, the total number of behavioral events determined to have real social connections within the spatial unit and time window.

[0107] The social vitality intensity calculated from multiple consecutive time windows is arranged chronologically to form a social vitality intensity sequence for the spatial unit during the observation period. This calculated social vitality intensity sequence and the proportion of social behaviors will serve as input data for subsequent calculations of social vitality stability.

[0108] Step S320: Obtain a social vitality intensity sequence for multiple consecutive time windows, and calculate the social vitality stability based on the social vitality intensity sequence and the proportion of social behaviors; The social activity intensity sequence refers to the social activity intensity corresponding to each of multiple adjacent time windows. A numerical sequence arranged in chronological order.

[0109] The coefficient of variation is a statistical indicator used to measure the degree of fluctuation of the social vitality intensity sequence over time. The value is expressed as the ratio of the series standard deviation to the series mean. The social vitality stability refers to a comprehensive index, derived from three factors—the proportion of social behavior, the degree of time-series volatility, and the proportion of actual duration of social behavior—used to characterize the ability of a spatial unit to maintain stable social vitality over time. This indicates that the larger the value, the more stable the social vitality is over time.

[0110] In practice, a social activity intensity sequence is obtained, which consists of social activity intensity values ​​corresponding to K consecutive time windows. The arithmetic mean μ of all social activity intensity values ​​in the sequence and the standard deviation σ of the sequence are then calculated.

[0111] The formula for calculating the coefficient of variation of this social vitality intensity sequence is: ,in A very small constant is preset to prevent the denominator from being zero. The proportion of social behavior Ps of this spatial unit within the entire time window is obtained from the statistical results. Simultaneously, the cumulative duration ts of various social behaviors actually occurring throughout the entire observation period is calculated from the short-term trajectory data of personnel and the social behavior classification results; that is, the sum of the durations of all social associations identified as social behaviors under the joint activity state, and the total duration T of the entire observation period is obtained.

[0112] The formula for calculating social vitality stability is: = × ; Among them (1) The CV factor reflects the stationarity of the intensity sequence. The smaller the CV, the closer the factor is to 1, indicating that the fluctuation is smaller and the stability is higher. This reflects the actual proportion of time occupied by social behavior; the higher the proportion, the more sustained the social behavior is throughout the observation period. The resulting stability of social vitality comprehensively reflects the proportion of social behavior, its temporal fluctuations, and its actual duration, providing a quantitative basis for the dynamic assessment of spatial social vitality in the time dimension.

[0113] Step S330: Calculate the activity change rate of various social behaviors based on the number of various social behaviors in different time periods; The aforementioned type of activity refers to the number of occurrences of a specific type of social behavior within a designated spatial unit, per unit area, and per unit time period. It is used to measure the activity level of this type of social behavior within a specific time period. (t) represents.

[0114] The activity change rate refers to the relative change in activity level between two adjacent time periods, used to describe the growth or decline trend of this type of social behavior. express.

[0115] In practice, based on the number of various social behaviors, the entire observation period is divided into multiple adjacent time periods of equal length, with the duration of each time period denoted as Δt. For any time period t, the number Ni of the i-th type of social behavior within that time period is obtained. Combined with the preset area A of the spatial unit and the time period duration Δt, the number of behaviors of the i-th type is calculated using the formula... Calculate the activity level of each type of social behavior during that period.

[0116] Type activity for each of two adjacent time periods t and t-Δt (t) and (t-Δt), According to the formula Calculate the rate of change of activity of the i-th type of social behavior at time t. When the value is positive, it indicates that the activity level of this type of social behavior is on the rise during that period; when... A negative value indicates a declining trend in activity. By repeating the above calculation over consecutive time periods, this formula can generate a sequence of social activity changes at hourly, daily, monthly, quarterly, and annual scales, which can be used to identify the growth, decline, and cyclical characteristics of different social types.

[0117] The activity change rates of various social behaviors calculated above will be used as a component reflecting the dynamic trend of behavior in the heterogeneity index of social vitality space.

[0118] Step S340: Calculate the spatial heterogeneity index based on the spatial coordinate distribution of various social behaviors within the spatial unit and the area of ​​the spatial unit; The spatial coordinate distribution refers to the set of location coordinates of various behavioral events belonging to the same real social behavior type in physical space.

[0119] The spatial hotspot center refers to the geometric center of this type of social behavior event in space, obtained by calculating the arithmetic mean of the spatial coordinates of all events. express.

[0120] The average diffusion distance refers to the average distance from each behavioral event to the center of the spatial hotspot. It is used to measure the degree of spatial aggregation or diffusion of this type of social behavior and is denoted by D.

[0121] The spatial heterogeneity index refers to the average diffusion distance after area scale correction, which is used to eliminate the influence of different spatial unit area sizes on the comparison of diffusion distance. It is denoted by SHI. The smaller the value, the more spatially clustered the social behavior is, and the larger the value, the more diffuse the spatial distribution is.

[0122] In practice, based on the classification results of real social behavior types, for each type of social behavior, the spatial coordinates of all events of that type of social behavior occurring within a specified spatial unit and time window are extracted. This constitutes a set of spatial coordinates. .

[0123] in, This represents the spatial coordinates corresponding to the i-th social behavior event.

[0124] The spatial hotspot center coordinates of this type of social behavior were calculated using spatial hotspot center coordinates. ; The coordinates of the center of the spatial hotspot are as follows: , ; Where n is the total number of such behavioral events, Let and yi be the spatial plane coordinates of the i-th event, respectively.

[0125] For each event in the set, through Calculate the distance from each behavioral event to the center of the spatial hotspot. ; Distance corresponding to all events The formula for calculating the average diffusion distance is: after summing and dividing by the total number of events n. , which is the distance from the i-th behavioral event to the hotspot center.

[0126] Based on the area A pre-measured or extracted from this spatial unit, according to the formula... Calculate the spatial heterogeneity index of this type of social behavior, where This is an area-scale correction factor used to eliminate the influence of the absolute area size of spatial units on the diffusion distance, making spatial units of different sizes comparable. The above calculation is performed on each type of social behavior to obtain the spatial heterogeneity index for each type of social behavior, providing a quantitative basis for the spatial dimension of subsequent assessment of the matching degree of spatial facilities.

[0127] Step S350: Integrate the social vitality intensity, the social vitality stability, the activity change rate, and the spatial heterogeneity index into the social vitality spatial heterogeneity index.

[0128] The social vitality spatial heterogeneity index refers to a comprehensive evaluation dataset consisting of multiple dimensions of social vitality measurement parameters, oriented towards a specified spatial unit and time window. It is used to comprehensively characterize the total level, temporal stability, dynamic change trend of type, and spatial distribution characteristics of social vitality in the spatial unit.

[0129] In specific implementation, the intensity of social vitality will be considered. Social vitality stability Activity change rate of various social behaviors And the spatial heterogeneity index of various social behaviors calculated in step S340. The data is collected and encapsulated according to spatial unit identifiers and time window identifiers. During the collection process, various indicators of the same spatial unit under the same time window are correlated to form a structured data record containing fields such as spatial unit number, start and end time of time window, social vitality intensity, social vitality stability, change rate sequence of various behavioral activities, and spatial heterogeneity index of various behaviors. This structured social vitality spatial heterogeneity index dataset serves as input for subsequent multi-scale spatial evaluation steps, providing complete data support for the calculation of scene behavior adaptability index and the generation of multi-scale measurement results.

[0130] Based on the above, and according to different application scenarios, the indicators of various dimensions are combined to form a differentiated spatial vitality assessment view. When assessing the vitality of the transition area at the entrance of the elevated floor, the intensity and stability of social vitality are jointly compared based on the video data collected by the camera equipment deployed at the entrance of the micro public space. As a transition node connecting the external passage space and the internal dwelling space, the entrance of the elevated floor needs to satisfy the smooth flow of pedestrians and also have the function of inducing the conversion between dwelling and social interaction. If the intensity and stability of social vitality in the entrance area are both high, it indicates that the transition space continuously and stably supports the overlapping social behaviors of group passage and short-term dwelling per unit area and unit time, and the spatial scale, paving materials, and boundary treatment of the entrance provide good support for the conversion between the two types of behaviors. If the intensity of social activity is high but the stability of social activity is low, that is, the coefficient of variation calculated in step S320 is large and the proportion of social behavior or the proportion of actual occurrence time is low, it indicates that social gatherings only occur in the area during specific peak periods, and the activity rapidly declines during other periods. It belongs to an intermittent transitional space and is suitable for identifying nodes that need to add temporary rest facilities or optimize the scale of entrance opening and closing to enhance the temporal continuity of social activity.

[0131] When monitoring behavioral trends at corners and node centers, the focus is on the activity change rate of various social behaviors. Based on the video data collected by cameras deployed at spatial corners and node centers in step S100, the activity change rates of companion rest, companion care, and companion travel at different time periods are extracted. If the activity change rate of companion rest in the corner area is positive for several consecutive time periods, it indicates that the sheltered space formed by the boundary wall or seating facilities at the corner has a continuously increasing attraction for social interaction. If the activity change rate of companion travel in the node center area is consistently positive, it indicates that the area, as a hub of traffic flow, is gradually enhancing its integration and connection effect on pedestrian flows from different directions. If the activity change rate of a certain type of behavior is consistently negative, the spatial heterogeneity index of that type of behavior obtained in step S340 is used to further determine whether the behavior activity has decreased due to changes in facility layout, visual obstruction, or physical barriers in the spatial distribution of that behavior type at the corner or node center.

[0132] When comparing the spatial heterogeneity of high-frequency traffic paths and rest nodes, the spatial heterogeneity indices of various social behaviors are compared horizontally. Based on the video data collected by the camera equipment deployed on both sides of the high-frequency traffic path and at the center of the node in step S100, for dynamic social behaviors such as walking in groups and exercising in groups along the high-frequency traffic path, if the spatial heterogeneity index is large, it indicates that such behaviors are evenly spread along the traffic path, and the continuity, width, and paving smoothness of the path have a good linear bearing capacity for traffic behaviors; if the spatial heterogeneity index is small, it indicates that such behaviors are concentrated in local sections of the path, and there may be traffic bottlenecks caused by excessively small turning radii, paving damage, or temporary obstacles. For static social behaviors in the node center area, such as resting in groups and providing companionship or care, a low spatial heterogeneity index indicates that these behaviors are highly concentrated around specific facility nodes such as seats, flower bed edges, or steps, and the facility layout has a clear anchoring effect on these behaviors. A high spatial heterogeneity index indicates that these behaviors are randomly and disorderly distributed in the node center area, lacking a focal point for concentrated stays, and exhibiting poor facility adaptability. By comparing the spatial heterogeneity indices of high-frequency traffic path areas within the same spatial unit with those of similar behaviors in the node center area, we can identify spatial sub-regions that have advantages or disadvantages in terms of both traffic flow capacity and facility anchoring.

[0133] By integrating the heterogeneity indicators of social vitality spaces, data support is provided for subsequent multi-scale spatial assessments. This enables comparative assessments between different spatial units and between typical functional sub-areas such as entrance transition areas, corner nodes, and high-frequency passageways within the same spatial unit. It allows for both horizontal comparisons of vitality intensity at the overall level and differentiated analyses from dimensions such as temporal stability, type trends, and spatial distribution patterns. This meets the needs for refined operation and maintenance decisions for different functional nodes in micro-public spaces with complex boundaries and shading conditions, such as elevated floors, connecting corridors, and sunken plazas.

[0134] This embodiment calculates the intensity and proportion of social activity by statistically analyzing the number of various social behaviors and the total number of behaviors within a specified spatial unit and time window, combined with the area of ​​the spatial unit and the length of the time window. This achieves a refined quantification of social activity, overcoming the limitation of existing technologies that can only obtain crowd density but cannot distinguish between social behavior and ordinary traffic behavior, thus providing basic data for the structural analysis of social activity. By calculating the coefficient of variation based on the social activity intensity sequence of multiple consecutive time windows, and combining the proportion of social behavior with the proportion of actual occurrence time of social behavior, the stability of social activity is calculated. This comprehensively evaluates the stability of social activity from two dimensions: temporal volatility and persistence, overcoming the deficiency of existing technologies that only focus on static intensity and lack dynamic change analysis. By calculating the activity change rate and spatial heterogeneity index of various social behaviors, the temporal change trend of different types of social behaviors and their spatial aggregation or diffusion characteristics can be captured, providing a multi-dimensional quantitative basis for assessing the matching degree of spatial facility layout with the carrying capacity of specific social behaviors.

[0135] In one embodiment, step S340: the calculation of the spatial heterogeneity index based on the spatial coordinate distribution of various social behaviors within the spatial unit and the area of ​​the spatial unit further includes social vitality decoupling calculation, which includes: Step S341: Based on the various social behavior types that coexist after decoupling and classification within the same spatial unit and the same time window, the coordinates of the spatial hotspot center of each social behavior type are obtained, and the spatial distance between the decoupled types of the spatial hotspot centers of different social behavior types is calculated. The spatial distance between the decoupled types refers to the Euclidean straight-line distance between the core locations of the spatial distribution of two different social behavior types within the same spatial unit after decoupling and classification in step S200. It is used to quantify the degree of mutual deviation of each behavior type on the centroid of spatial distribution after decoupling.

[0136] In specific implementation, based on the social behavior type classification results obtained in step S200, within a specified spatial unit and the same time window, all social behavior types coexisting in that spatial unit after decoupling classification are obtained. For each social behavior type with behavioral events within that time window, the spatial coordinate set of all events of that behavior type is extracted, and the geometric center of the spatial point set formed by all event points of that behavior type is calculated, using each event point as an independent two-dimensional coordinate point.

[0137] The geometric center is determined by the median coordinate of all points in the point set. That is, the median value is taken after sorting the values ​​of the horizontal and vertical coordinates in order of magnitude as the spatial hotspot center coordinate of this type of behavior. This replaces the arithmetic mean algorithm to reduce the disturbance effect of individual extreme deviation event points on the hotspot center position.

[0138] When two or more social behavior types coexist within the same time window, all pairwise combinations of types are iterated. For each pair of different social behavior types, the Euclidean distance between their respective median centers is calculated as the decoupled spatial distance between the types. The magnitude of this distance reflects the degree of separation in the spatial distribution of the two social behavior types after decoupling, providing a basis for the subsequent calculation of heterogeneous spatial organization indices.

[0139] Step S342: Based on the spatial distance between the decoupling types and the spatial coordinate distribution of each type of social behavior, calculate the spatial overlap or spatial separation degree between different social behavior types within the spatial unit, and obtain the heterogeneous spatial organization degree index of multiple social behavior types within the spatial unit; The spatial overlap refers to the degree to which the spatial distribution ranges of different social behavior types overlap or intersect in space.

[0140] The spatial separation degree refers to the degree to which the spatial distribution ranges of different social behavior types are spatially independent or separated from each other.

[0141] The heterogeneous spatial organization index refers to a comprehensive measurement parameter that is quantified based on the spatial distance between decoupled social behavior types and the spatial coordinate distribution of their respective events after decoupling and classification. It is used to characterize the degree to which multiple social behavior types in a spatial unit are spatially clustered, intersected, or separated.

[0142] In specific implementation, based on the decoupled type spatial distance between each type pair obtained in step S341, and combined with the extracted event spatial coordinate distribution of each type of social behavior, the spatial distribution density characteristics of each type of social behavior in the spatial unit are obtained respectively.

[0143] For each type of social behavior, kernel density estimation is performed on the spatial coordinates of all event points of that behavior. A Gaussian kernel function with a preset bandwidth is applied centered on each event point. The kernel functions of all event points are then superimposed to generate a continuous density distribution surface for that type of behavior within a spatial cell. The region in this density distribution surface with a density value higher than a preset density threshold is extracted as the core activity range boundary for that type of behavior.

[0144] For any two social behavior types coexisting within a spatial unit, a spatial overlay analysis is performed on the boundaries of their core activity areas. When there is a spatial overlap between the boundaries of the core activity areas of the two behavior types, the ratio of the area of ​​the overlapping area to the total area of ​​the boundaries of the core activity areas of the two types is used as the degree of spatial overlap; a higher ratio indicates a greater degree of spatial coexistence. When there is no spatial overlap between the boundaries of the core activity areas of the two behavior types, the ratio of the spatial distance between the two decoupled types to the sum of the radii of the circumcircles of the boundaries of their core activity areas is used as the degree of spatial separation; a higher ratio indicates a greater degree of spatial independence.

[0145] By combining the calculation results of the overlap or separation between all coexisting social behavior types within the spatial unit, a heterogeneous spatial organization index for that spatial unit is constructed. This index reflects the spatial organization of various decoupled social behavior types within the spatial unit. Due to differences in physical form, facility layout, and functional positioning, different spatial units yield different heterogeneous spatial organization index values ​​after decoupling and classification. This provides a parameter basis for subsequent correlation calculations with social vitality intensity and for quantitative comparisons of differences in the combination of social behavior types between different spatial units.

[0146] Step S343: Decouple and correlate the heterogeneous spatial organization index with the social vitality intensity of various social behaviors to obtain the decoupled vitality organization characteristics of various decoupled social behavior types within the spatial unit; The decoupling correlation calculation refers to the calculation process of establishing a quantitative correspondence between the spatial overlap or spatial separation degree between different types of social behaviors obtained in step S342 and the social vitality intensity of various types of social behaviors calculated in step S310 at the type granularity.

[0147] The decoupled vitality organization feature refers to a high-dimensional feature description that integrates the quantity intensity, spatial distribution organization mode, and spatial interaction relationship between various social behaviors, and is used to characterize how multiple decoupled social behavior types are spatially organized and coexist within a spatial unit.

[0148] In specific implementation, obtain all social behavior types coexisting in the same time window within the spatial unit calculated in step S342, assuming there are K types in total. Extract the quantified values ​​of the spatial relationships between all pairs of types, and construct a symmetric matrix to record the degree of spatial overlap between types. The value in the i-th row and j-th column of the matrix represents the degree of spatial overlap between the i-th type of behavior and the j-th type of behavior.

[0149] When the boundaries of the core activity ranges of the two types of behaviors overlap spatially, the value is taken as the proportion of the overlapping area to the total area of ​​the core activity ranges of the two types of behaviors; when the boundaries of the core activity ranges of the two types of behaviors do not overlap, the separation degree calculated by the ratio of the spatial distance between the decoupling types to the sum of the radii of the outer circles of the core activity ranges of the two types of behaviors is converted into an overlap metric and used as the value at the corresponding position; if i and j are the same, the value at the corresponding position is taken as the maximum value, indicating that the same type completely overlaps.

[0150] From the statistical results of step S310, obtain the social vitality intensity values ​​corresponding to each type of social behavior within the same time window for that spatial unit. For each type of social behavior, calculate the spatial correlation vitality component of that type by weighting and summing the social vitality intensities of that type with all other types according to their corresponding spatial overlap.

[0151] The specific calculation method is as follows: For the current type, traverse all other types, calculate the product of the spatial overlap degree between the current type and another type and the social vitality intensity of another type, and sum the products to obtain the spatial correlation vitality component of the current type.

[0152] If only a single type of social behavior exists within a spatial unit, then the spatial correlation vitality component of that type is zero. The original social vitality intensity value of each type of behavior is combined with its spatial correlation vitality component to form the decoupled vitality organization feature vector corresponding to that type.

[0153] By aggregating feature vectors of various types, the decoupled vitality organization characteristics of multiple decoupled social behavior types within the spatial unit are obtained. When the vitality intensity of multiple social behavior types is high and the spatial overlap between type pairs is generally large, the spatial correlation vitality components of each type show high values, and the decoupled vitality organization characteristics of this spatial unit exhibit a high-intensity mixed organizational pattern. When the vitality intensity of various behaviors is high but the spatial overlap between type pairs is generally small and the separation is large, the spatial correlation vitality components of each type show low values, and the decoupled vitality organization characteristics of this spatial unit exhibit a high-intensity partitioned organizational pattern.

[0154] This feature quantitatively integrates the quantitative dimension indicators and spatial organization dimension indicators of each social behavior type after decoupling and classification at the type granularity, providing calculable feature components for quantitative comparison of the differences in the combination of social behavior types between different spatial units.

[0155] Step S344: Use the decoupled vitality organizational features as the component in the multidimensional social vitality index that represents the difference in the combination of social behavior types among different spatial units.

[0156] The difference in the combination of social behavior types refers to the difference in the overall social vitality structure between different spatial units due to the different types and quantities of social behavior types that coexist within them, the ratio of vitality intensity of each type of behavior, and the different ways in which various types of behaviors are mixed or partitioned in space.

[0157] In specific implementation, the decoupled vitality organization characteristics of various decoupled social behavior types within the spatial unit obtained in step S343 are integrated with the social vitality intensity, social vitality stability, activity change rate of various social behaviors, and spatial heterogeneity index calculated in steps S310 to S340. A decoupled vitality organization characteristic field is added to the multidimensional social vitality index data structure of this spatial unit, and this characteristic is used as a sub-item of the multidimensional social vitality index, alongside social vitality intensity, social vitality stability, activity change rate, and spatial heterogeneity index.

[0158] When comparing multiple different spatial units horizontally, the decoupling vitality organization characteristics of each spatial unit are extracted for comparative analysis. If two spatial units have similar social vitality intensity, but one spatial unit shows a high degree of mixing and overlap of multiple social behavior types, while the other spatial unit shows that each type is independently partitioned, it indicates that although the total amount of social vitality of the two spatial units is similar, there are essential differences in the combination of social behavior types and spatial organization logic within them.

[0159] By incorporating this decoupled vitality organizational characteristic as a component in the multidimensional social vitality index to characterize the differences in the combination of social behavior types among different spatial units, the social vitality evaluation system is expanded from a simple total comparison to a differentiated analysis of spatial organizational structures at the type level. This provides a classification basis for the functional positioning, facility configuration optimization, and differentiated operation and maintenance strategies of different spatial units.

[0160] This embodiment calculates the spatial distance between different decoupled social behavior types based on the spatial hotspot centers of various social behavior types after decoupling and classification. This achieves precise quantification of the degree of deviation of multiple social behaviors in the spatial distribution centroid within the same spatial unit, overcoming the limitation of a single-type spatial heterogeneity index, which can only reflect the degree of aggregation or diffusion within a type but cannot characterize the spatial organizational relationship between types. By combining the spatial distance between decoupled types with the event spatial coordinate distribution of various social behaviors, spatial overlap or spatial separation degree is calculated, and a heterogeneous spatial organization degree index is constructed. This objectively reveals whether different social behavior types exhibit a mixed coexistence pattern or an independent partitioning pattern in space, overcoming the shortcomings of traditional vitality evaluation methods that lump together multiple behaviors and fail to distinguish the differences in spatial organizational logic. By decoupling and correlating the heterogeneous spatial organization degree index with the social vitality intensity of various social behaviors, type-level feature fusion is achieved from two dimensions: quantitative intensity and spatial organization mode. This allows for comparison not only of the total amount of social vitality between different spatial units but also for refined horizontal comparison from the dimension of differences in the spatial combination structure of various behaviors after decoupling. This provides a more comprehensive quantitative decision-making basis for facility layout optimization and differentiated operation and maintenance strategy formulation.

[0161] In one embodiment, step S400, which involves performing a multi-scale hierarchical spatial decoupling assessment of social vitality relationships based on the social vitality spatial heterogeneity index to obtain multi-scale measurement results, includes: Step S410: Select the corresponding spatial matching weight function according to the actual social behavior type, and calculate the weight of the social vitality spatial heterogeneity index according to the spatial matching weight function to obtain the matching weight coefficient; Step S420: Calculate the scene behavior adaptability index by combining the social vitality space heterogeneity index with the matching weight; The scenario behavior adaptability index is a comprehensive quantitative indicator used to evaluate the ability of micro-space physical form to bear and support specific social behaviors, obtained by combining the activity level of the comprehensive type, the stability of social vitality, and the spatial matching weight coefficient. express.

[0162] In practice, this involves obtaining the matching weight coefficients corresponding to various social behaviors. Based on this, the activity levels of various social behaviors are extracted from the heterogeneity index of social vitality space. and social vitality stability The formula for calculating the scene-based behavior adaptability index is as follows: The system calculates the scenario-behavioral suitability index for various types of social behaviors. This index comprehensively quantifies the suitability of spatial facilities for specific social behaviors from three dimensions: the intensity of the behavior, temporal stability, and spatial matching degree. A higher value indicates that the micro-space not only stably attracts this type of social behavior over time, but also that its physical environment and facility layout align with the spatial distribution characteristics of this behavior. Conversely, a lower value indicates a need for improvement in the spatial facility layout. By performing the above fusion calculation on each type of social behavior, a set of scene behavior adaptability indices for each type of social behavior within the spatial unit is obtained. This provides a quantitative diagnostic basis for different behavior types in the repair and renewal of urban micro-spaces. Step S430: Based on the scene behavior adaptability index and the social vitality space heterogeneity index, a comprehensive evaluation is performed to obtain the multi-scale measurement results.

[0163] The multi-scale measurement results refer to the comprehensive evaluation output that integrates the spatial unit social vitality spatial heterogeneity index and the scene behavior adaptability index, which is used to comprehensively characterize the social vitality status of urban micro public spaces from multiple dimensions such as quantity, time, space and facility adaptability.

[0164] In practice, the social vitality intensity, social vitality stability, activity change rate of various social behaviors, and spatial heterogeneity index from the social vitality spatial heterogeneity indicators are summarized and integrated with the scene behavior adaptability index of various social behaviors. Based on the preset spatial hierarchy, the indicators are summarized and compared at multiple scale levels, such as single spatial units, similar functional node spaces, and the overall regional public space network.

[0165] For each spatial unit, the output includes a radar chart showing the distribution of social activity intensity and the composition of actual social behavior types, as well as a unit-level evaluation result showing the temporal change sequence of social activity stability. For similar functional node spaces, the scene behavior adaptability index of each unit is summarized and compared horizontally to identify spatial nodes with outstanding facility carrying capacity or those requiring improvement.

[0166] For the overall public space network of the region, the spatial heterogeneity indicators of social vitality and the scene behavior adaptability index of each spatial unit are spatially mapped and visualized to generate spatialized assessment results that include a social vitality heat map, a behavior trajectory distribution map, annotations of the dominant real social behavior types in each spatial unit, and the scene behavior adaptability level of each unit. The above multi-scale calculation results provide hierarchical and quantitative decision support for urban micro-space operation and maintenance decisions, from single spatial nodes to the regional spatial network.

[0167] This embodiment categorizes real-world social behaviors into static and dynamic types, and selects matching weight functions associated with spatial heterogeneity indices for different types. This allows for differentiated quantification of the degree to which spatial physical forms support the distribution characteristics of specific social behaviors, overcoming the technical limitations of traditional methods that cannot couple spatial forms and behavioral characteristics. By fusing type activity, social vitality stability, and matching weight coefficients according to a formula, a scenario behavior adaptability index for various social behaviors is calculated. This comprehensively evaluates the suitability of spatial facilities for specific social behaviors from three dimensions: behavior quantity, temporal stability, and spatial matching degree, compensating for the lack of quantitative facility adaptability capabilities in existing technologies. Through multi-scale comprehensive evaluation based on scenario behavior adaptability indices and social vitality spatial heterogeneity indicators, multi-scale calculation results are generated, including social vitality heat distribution, the composition of real-world social behavior types, and spatial node adaptability levels. This provides a hierarchical and quantitative decision-making basis for urban micro-space operation and maintenance, from single nodes to regional networks.

[0168] In one embodiment, step S410: Select the corresponding spatial matching weight function according to the real social behavior type, and calculate the weight of the social vitality spatial heterogeneity index according to the spatial matching weight function to obtain the matching weight coefficient. Step S411: Divide the real social behavior types into static social behavior and dynamic social behavior; Among them, the static social behavior refers to the real social behavior type that is highly dependent on shelter facilities such as seats and boundary gray spaces, and ideally exhibits high aggregation characteristics in the space, including the companionship and rest type and the companionship and care type.

[0169] The dynamic social behavior refers to a type of real social behavior that depends on the continuity and permeability of movement routes and, under ideal conditions, exhibits high diffusion characteristics in space, including companion travel and companion exercise.

[0170] In practice, based on the classification results of real social behavior types, each identified real social behavior type is traversed and classified into static or dynamic social behaviors according to preset classification rules. For social behaviors marked as companionship and rest or companionship and care, because their behavioral characteristics are that people stay in specific spatial nodes for a long time, have a clear dependence on seating facilities or boundary spaces, and tend to form clusters around facility nodes, they are classified into the static social behavior category.

[0171] Social behaviors categorized as "group walking" and "group exercise" are classified as dynamic social behaviors because their characteristics include linear movement along paths or repeated movement along circular routes, high requirements for the continuity and permeability of the passage space, and a tendency to diffuse along the movement lines. This classification provides a basis for selecting differentiated matching weight functions for different behavior types.

[0172] Step S412: For the static social behavior, select the corresponding clustered matching weight function from the spatial matching weight function, and calculate the weight of the social vitality spatial heterogeneity index to obtain the matching weight coefficient; The clustering matching weight function refers to a mathematical mapping relationship where the spatial heterogeneity index is the independent variable, and the function value increases as the spatial heterogeneity index decreases. It is used to quantify the suitability of spatial clustering for static social behaviors. Specifically, in step S411, based on classifying real social behavior types into static and dynamic types, for the companionship and rest type and the companionship and care type classified as static social behaviors, a clustering matching weight function is selected from a preset set of spatial matching weight functions. The spatial heterogeneity index SHI corresponding to this type of social behavior is extracted from the social vitality spatial heterogeneity index.

[0173] According to the formula Calculate the matching weight coefficient for this static social behavior, (where...) (SHI is a constant calibration coefficient; the smaller the SHI, the more clustered the population and the higher the spatial matching degree; if the SHI is too high, it indicates that people are "randomly staying anywhere" and the facility is not well adapted).

[0174] The formula exhibits the following characteristics: when the spatial heterogeneity index SHI is small, indicating a high degree of spatial clustering of such social behaviors, the calculated matching weight coefficient increases accordingly. This suggests that the spatial facility layout strongly supports such static dwelling behaviors, and the spatial clustering characteristics are highly matched with the facility distribution. Conversely, when the spatial heterogeneity index SHI is large, indicating a more dispersed and disordered spatial distribution of such social behaviors, the calculated matching weight coefficient decreases accordingly. This suggests poor adaptability of spatial facilities and a need for improvement. The resulting matching weight coefficient serves as the spatial dimension weight parameter for subsequent calculations of the scene behavior adaptability index.

[0175] Step S413: For the dynamic social behavior, select the corresponding diffusion-type matching weight function from the spatial matching weight function, and calculate the weight of the social vitality spatial heterogeneity index to obtain the matching weight coefficient.

[0176] The diffusion-type matching weight function refers to a mathematical mapping relationship where the spatial heterogeneity index is the independent variable and the function value increases with the increase of the spatial heterogeneity index. It is used to quantify the suitability of spatial diffusion degree for dynamic social behavior. In specific implementation, based on the classification of real social behavior types into static and dynamic types in step S411, for the companion travel type and companion exercise and fitness type classified as dynamic social behaviors, a diffusion-type matching weight function is selected from the preset set of spatial matching weight functions.

[0177] The spatial heterogeneity index SHI corresponding to this type of social behavior is extracted from the spatial heterogeneity index of social vitality.

[0178] According to the formula Calculate the matching weight coefficient of this dynamic social behavior (the larger the SHI, the more diffused the social behavior and the higher the matching degree of the movement path; if the SHI is too low, it indicates that there is a physical blockage or crowd congestion bottleneck in the space).

[0179] The formula's functional characteristics are as follows: when the spatial heterogeneity index SHI is large, indicating that this type of social behavior is highly diffused in space and evenly distributed along the movement lines, the calculated matching weight coefficient increases accordingly, suggesting good continuity and permeability of the spatial movement lines and strong support for this type of passage or movement behavior in the spatial layout. When the spatial heterogeneity index SHI is small, indicating that this type of social behavior is relatively limited in space and may have physical barriers or crowd congestion bottlenecks, the calculated matching weight coefficient decreases accordingly, indicating that there is a need for improvement in the spatial movement line layout. The matching weight coefficient obtained in this way is used to adjust the evaluation results from the spatial diffusion suitability dimension in the subsequent calculation of the scene behavior adaptability index.

[0180] This embodiment categorizes real-world social behaviors into static and dynamic types and selects corresponding spatial matching weight functions for each type. This achieves differentiated processing of the spatial distribution characteristics of clustered and diffused behaviors, ensuring that weight calculations align with the inherent spatial distribution physical representation of various social behaviors. For static social behaviors, a clustered matching weight function is used, where a smaller spatial heterogeneity index (i.e., a more clustered behavior distribution) results in a larger matching weight coefficient. This accurately quantifies and assesses the suitability of spatial facility layouts for behaviors such as companionship and caregiving that rely on shelter facilities. For dynamic social behaviors, a diffuse matching weight function is used, where a larger spatial heterogeneity index (i.e., a more diffuse behavior distribution) results in a larger matching weight coefficient. This effectively reflects the degree to which the continuity and permeability of spatial circulation support behaviors such as companionship and exercise that rely on linear space. This provides quantifiable, differentiated weight parameters for assessing the spatial facility adaptability of different types of social behaviors.

[0181] like Figure 6As shown, the present invention also provides a device for measuring the social vitality of urban public spaces, applied to any of the above-described methods for measuring the real social vitality of urban public spaces, comprising: A trajectory generation module is used to acquire microscopic public space videos and perform target tracking and detection to generate short-term trajectory data of people. The social behavior recognition module is used to extract individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel, and to classify social behaviors based on the individual motion state features and interpersonal interaction features to obtain the real social behavior type. The vitality calculation module is used to perform social vitality spatial heterogeneity calculation on the real social behavior type within a specified spatial unit and time window to obtain a social vitality spatial heterogeneity index. A multi-scale spatial assessment module is used to perform decoupling assessment of social vitality relationships in a multi-scale hierarchical space based on the social vitality spatial heterogeneity index, and to obtain multi-scale measurement results.

[0182] This application also provides a computer device, such as... Figure 7 As shown, the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments, or when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiments.

[0183] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.

[0184] Those skilled in the art will understand that Figure 7 The computer device described is merely an example and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0185] The processor mentioned above can be a central processing unit, or it can be other general-purpose processors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0186] The memory can be an internal storage unit of the computer device, such as a hard drive or RAM. The memory can also be an external storage device of the computer device, such as a plug-in hard drive, smart memory card, secure digital card, flash memory card, etc. Furthermore, the memory can include both internal and external storage units of the computer device.

[0187] This application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0188] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0189] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographic device / terminal device, a recording medium, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0190] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0191] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0192] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0194] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for measuring the real social vitality of urban public spaces, characterized in that, include: Acquire video footage of micro-public spaces and perform target tracking and detection to generate short-term trajectory data of people; Individual motion state features and interpersonal interaction features are extracted from the short-term trajectory data of the personnel. Social behavior is classified according to the individual motion state features and the interpersonal interaction features to obtain the real social behavior type. Within the specified spatial unit and time window, the spatial heterogeneity of social vitality is calculated for the real social behavior types to obtain the spatial heterogeneity index of social vitality. Based on the aforementioned social vitality space heterogeneity index, a multi-scale hierarchical spatial decoupling assessment of social vitality relationships is performed to obtain multi-scale measurement results. The classification of social behaviors based on the individual's motion state characteristics and interpersonal interaction characteristics to obtain the actual social behavior types includes: The real-time distance between any two people is determined based on the short-term trajectory data of the people. The social association index is calculated by combining the interpersonal interaction characteristics. The social association index is then compared with a preset social judgment threshold to identify the social association strength. Based on a preset heterogeneous behavior discrimination function, social recognition is performed on the individual motion state features and interpersonal interaction features corresponding to the social association strength to obtain the corresponding real social behavior type; The types of real social behaviors include traveling together, resting together, providing companionship and care, and exercising together. The step of calculating the spatial heterogeneity of social vitality for the real social behavior types within the specified spatial unit and time window to obtain the social vitality spatial heterogeneity index includes: Within the specified spatial unit and time window, the number of real social behavior types is statistically analyzed, and the obtained number of various social behaviors and the total number of behaviors are combined with the spatial unit to calculate the social vitality intensity sequence and the proportion of social behaviors. Obtain a sequence of social activity intensity for multiple consecutive time windows, and calculate the social activity stability based on the social activity intensity sequence and the proportion of social behavior; The activity change rate of various social behaviors is calculated based on the number of various social behaviors in different time periods; The spatial heterogeneity index is calculated based on the spatial coordinate distribution of various social behaviors within the spatial unit and the area of ​​the spatial unit. The social vitality intensity, social vitality stability, activity change rate, and spatial heterogeneity index are integrated into the social vitality spatial heterogeneity index. The decoupling assessment of social vitality relationships across multiple hierarchical spaces based on the aforementioned social vitality spatial heterogeneity index yields multi-scale measurement results, including: Select the corresponding spatial matching weight function according to the actual social behavior type, and calculate the weight of the social vitality spatial heterogeneity index according to the spatial matching weight function to obtain the matching weight coefficient. The scene behavior fit index is obtained by calculating the scene behavior fit index by combining the social vitality space heterogeneity index with the matching weight. The multi-scale measurement results are obtained by comprehensively evaluating the scenario behavior adaptability index and the social vitality space heterogeneity index.

2. The method for measuring the real social vitality of urban public spaces according to claim 1, characterized in that, The process of acquiring microscopic public space video and performing target tracking and detection to generate short-term personnel trajectory data includes: Acquire continuous video data collected by a camera device, perform calibration preprocessing on the continuous video data to obtain preprocessed video frames, and establish a mapping relationship between the image pixels of the preprocessed video frames and the spatial plane coordinates. Perform pedestrian target recognition on the preprocessed video frames and output the person bounding boxes; The personnel bounding boxes are matched and associated with identities to obtain identity identifiers; Trajectory construction is performed on the identity identifier and the mapping relationship to obtain the short-term trajectory data of the person.

3. The method for measuring the real social vitality of urban public spaces according to claim 1, characterized in that, The extraction of individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel includes: Based on the short-term trajectory data of the personnel, the trajectory length, movement time, velocity sequence and spatial coordinate sequence of each person are obtained. The movement state is calculated according to the trajectory length, movement time, velocity sequence and spatial coordinate sequence to obtain the individual movement state characteristics. Obtain the spatial coordinate sequence of any two persons within the same spatiotemporal range, and calculate the angle between the motion directions and distance stability based on the spatial coordinate sequence of the two persons; The continuous co-occurrence time of two people is counted from the short-term trajectory data of the two people. The motion synchronization degree is calculated based on the velocity sequence and the angle between the motion directions of the two people. The motion synchronization degree, the distance stability and the continuous co-occurrence time are used as the interpersonal interaction features.

4. The method for measuring the real social vitality of urban public spaces according to claim 1, characterized in that, Select the corresponding spatial matching weight function according to the actual social behavior type, and calculate the weight of the social vitality spatial heterogeneity index according to the spatial matching weight function to obtain the matching weight coefficient. The aforementioned real social behaviors are categorized into static social behaviors and dynamic social behaviors; For the static social behavior, a corresponding clustered matching weight function is selected from the spatial matching weight function, and the weight of the social vitality spatial heterogeneity index is calculated to obtain the matching weight coefficient. For the dynamic social behavior, a corresponding diffusion-type matching weight function is selected from the spatial matching weight function, and the weight of the social vitality spatial heterogeneity index is calculated to obtain the matching weight coefficient.

5. A device for measuring the real social vitality of urban public spaces, characterized in that, The method for measuring the real social vitality of urban public spaces as described in any one of claims 1-4 includes: A trajectory generation module is used to acquire microscopic public space videos and perform target tracking and detection to generate short-term trajectory data of people. The social behavior recognition module is used to extract individual motion state features and interpersonal interaction features from the short-term trajectory data of the personnel, and to classify social behaviors based on the individual motion state features and interpersonal interaction features to obtain the real social behavior type. The vitality calculation module is used to perform social vitality spatial heterogeneity calculation on the real social behavior type within a specified spatial unit and time window to obtain a social vitality spatial heterogeneity index. A multi-scale spatial assessment module is used to perform a multi-scale hierarchical spatial decoupling assessment of social vitality relationships based on the social vitality spatial heterogeneity index, and obtain multi-scale measurement results. The classification of social behaviors based on the individual's motion state characteristics and interpersonal interaction characteristics to obtain the actual social behavior types includes: The real-time distance between any two people is determined based on the short-term trajectory data of the people. The social association index is calculated by combining the interpersonal interaction characteristics. The social association index is then compared with a preset social judgment threshold to identify the social association strength. Based on a preset heterogeneous behavior discrimination function, social recognition is performed on the individual motion state features and interpersonal interaction features corresponding to the social association strength to obtain the corresponding real social behavior type; The types of real social behaviors include traveling together, resting together, providing companionship and care, and exercising together. The step of calculating the spatial heterogeneity of social vitality for the real social behavior types within the specified spatial unit and time window to obtain the social vitality spatial heterogeneity index includes: Within the specified spatial unit and time window, the number of real social behavior types is statistically analyzed, and the obtained number of various social behaviors and the total number of behaviors are combined with the spatial unit to calculate the social vitality intensity sequence and the proportion of social behaviors. Obtain a sequence of social activity intensity for multiple consecutive time windows, and calculate the social activity stability based on the social activity intensity sequence and the proportion of social behavior; The activity change rate of various social behaviors is calculated based on the number of various social behaviors in different time periods; The spatial heterogeneity index is calculated based on the spatial coordinate distribution of various social behaviors within the spatial unit and the area of ​​the spatial unit. The social vitality intensity, social vitality stability, activity change rate, and spatial heterogeneity index are integrated into the social vitality spatial heterogeneity index. The decoupling assessment of social vitality relationships across multiple hierarchical spaces based on the aforementioned social vitality spatial heterogeneity index yields multi-scale measurement results, including: Select the corresponding spatial matching weight function according to the actual social behavior type, and calculate the weight of the social vitality spatial heterogeneity index according to the spatial matching weight function to obtain the matching weight coefficient. The scene behavior fit index is obtained by calculating the scene behavior fit index by combining the social vitality space heterogeneity index with the matching weight. The multi-scale measurement results are obtained by comprehensively evaluating the scenario behavior adaptability index and the social vitality space heterogeneity index.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for measuring the real social vitality of urban public spaces as described in any one of claims 1 to 4.

7. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for measuring the real social vitality of urban public spaces as described in any one of claims 1 to 4.