Night market vitality assessment method and system based on grid division and partial least square regression, and storage medium

Through grid division and partial least squares regression model, combining multi-dimensional factors to evaluate the vitality of night markets, the problem that traditional evaluation methods cannot capture spatial and temporal changes is solved, and the accurate assessment of night market vitality and data support for urban management is achieved.

CN120494269APending Publication Date: 2025-08-15HENAN UNIVERSITY OF TECHNOLOGY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510570478.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The traditional night market vitality assessment method cannot accurately capture the temporal and spatial changes of night activities, ignores the real-time dynamics of the region, and is difficult to meet the complex needs of modern cities.

Method used

The method of grid division and partial least squares regression is adopted to divide the night market area through fine grids, combining multi-dimensional factors such as noise, lighting intensity and functional diversity index, a partial least squares regression model is constructed, the model weight is dynamically adjusted, and the night market vitality is evaluated.

Benefits of technology

It realizes an accurate assessment of the vitality of the night market, can dynamically adjust the evaluation model at different times and scenarios, provide accurate data support, and help urban managers optimize resource allocation and spatial planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120494269A_ABST
    Figure CN120494269A_ABST
Patent Text Reader

Abstract

The invention discloses a night city vitality assessment method based on grid division and partial least squares regression. The method comprises the following steps: S1, acquiring a night city area and a grid thereof; obtaining P types of influence factors in the historical night city grid, and performing activity scoring on the night city grid; s2, dividing into a training set and a test set; s3, establishing a partial least square regression model, performing iterative training on the regression model, and evaluating the model by calculating a mean square error and a decision coefficient R; s4, presetting an importance threshold, calculating the VIP score of each independent variable to evaluate the importance of each independent variable, and if the VIP score of each independent variable does not meet the requirement of the preset importance threshold, deleting the independent variable and returning to the step S2; and S5, performing grid division on the to-be-evaluated night market area, obtaining to-be-evaluated new independent variable data, inputting the to-be-evaluated new independent variable data into the partial least squares regression model, and completing evaluation of the night market activity score by the partial least squares regression model. According to the method, the night city space can be refined by dividing into fine grids, and meanwhile, the vitality of each night city area is accurately evaluated through various independent variable factors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of night market vitality assessment, and in particular to a night market vitality assessment method, system and storage medium based on grid division and partial least squares regression. Background Art

[0002] With the acceleration of urbanization and the vigorous development of the night economy, night market vitality, as an important indicator reflecting urban functions and residents' activities, has gradually become one of the important research topics in many fields such as urban management, public safety, and commercial development. By evaluating the vitality of night markets at night, it can provide accurate decision-making basis for urban planning, environmental protection, public policy formulation, etc., especially in the context of smart city construction and big data applications gradually penetrating into various industries, the demand for night market vitality evaluation is becoming more and more obvious.

[0003] In recent years, with the rapid development of technologies such as mobile communications, satellite positioning, and smart sensors, the means of collecting and analyzing urban night activity data have been significantly improved. These data not only include real-time distribution information of pedestrian flows, but also cover complex information in multiple dimensions such as time, space, and environment. Through in-depth mining and precise analysis of these massive data, researchers can more comprehensively grasp the vitality characteristics and changing patterns of urban night markets, providing a reliable basis for various decision-making.

[0004] The challenge of evaluating night market vitality lies in its high dynamism and the influence of multiple factors. Traditional analysis methods based on static data often cannot accurately capture these temporal and spatial changes; existing evaluation models mostly rely on the description of macro data, ignoring the real-time changes in the region, and are unable to meet the complex needs of modern cities. Summary of the Invention

[0005] In order to overcome the problems in the prior art, the purpose of the present invention is to provide a night market vitality assessment method based on grid division and partial least squares regression, which can refine the night market space by dividing it into fine grids, and accurately assess the vitality of each night market area through multiple independent variable factors.

[0006] To achieve the above object, the present invention provides a night market vitality assessment method based on grid division and partial least squares regression, comprising the following steps:

[0007] S1: Select multiple night market areas, divide each night market area into grids, obtain historical values of factors affecting the vitality of the night market grids, and assign vitality scores to the night market grids;

[0008] S2: Take the night market grid vitality score as the dependent variable, and the values of the influencing factors that affect the night market grid vitality score as the independent variables. The data of the independent variables and the dependent variables form a data set, and the data set is divided into a training set and a test set;

[0009] S3: Build a partial least squares regression model, iteratively train the model, and calculate the mean square error and coefficient of determination to evaluate whether the model meets the expected standards. If the model does not meet the expected standards, adjust the model hyperparameters and re-execute step S3;

[0010] S4: Preset the importance threshold and calculate the VIP score of each independent variable to evaluate the importance of each independent variable. If the VIP score of an independent variable does not meet the preset importance threshold, the independent variable is deleted and the process returns to step S2 again. If all independent variables meet the importance threshold, the optimized partial least squares regression model is output.

[0011] S5: Divide the night market area to be evaluated into grids, obtain the independent variable data of the night market grid to be evaluated, and input the data into the partial least squares regression model. The partial least squares regression model outputs the vitality score of the night market grid.

[0012] Furthermore, in step S1, the method of dividing the night market area into grids includes the following steps:

[0013] S11: Get the center point o of the night market area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows:

[0014]

[0015] in, is the dimension of the center point, τ o is the longitude of the center point;

[0016] S12: Based on the coordinates (x, y, z) of the center point and the radius r of the night market area, calculate the coverage angle θ. The formula is:

[0017]

[0018] Where R is the average radius of the Earth, and r is the radius of the night market area;

[0019] S13: Determine the grid level range according to the angle θ [L min , L max ], set the maximum number of grids I max , generate a grid set C covering the night market area;

[0020] Among them, the minimum level L min The chord angle of the largest diagonal of the grid must be ≤θ;

[0021] The maximum level L maxThe chord angle that satisfies the minimum grid width is ≥θ;

[0022] Grid set C = {C i |i=1,2,…,I};

[0023] Among them, C i Represented as a grid ID;

[0024] S14: According to each grid C i The spherical coordinates of the four vertices (x i,v ,y i,v ,z i,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is:

[0025]

[0026] τ i,v =arctan2(x i,v ,y i,v )

[0027] Among them, i is the i-th grid in the night market area, and v=1, 2, 3, 4 are the four vertices of the grid.

[0028] Furthermore, the types of independent variables are P=3, which are noise level, lighting intensity and functional diversity index; the functional diversity index is calculated according to the entropy method, and the method is:

[0029] The number of stall types in the ith night market grid is q, namely Q1, Q2, ..., Q q , k∈{1,2,...,q},Q k is the kth stall type, and the number of the kth stall type is d k ;

[0030] Calculate the total number of stalls D, the formula is:

[0031] Calculate the proportion of each type of stalls λ k , the formula is:

[0032] Calculate the entropy value γ, the formula is expressed as:

[0033] The functional diversity index ξ of the i-th night market grid is calculated.

[0034] Further, the step S3 specifically includes the following steps:

[0035] S31: Construct and train a partial least squares regression model, the mathematical expression of which is:

[0036] Y=XW+E

[0037] Among them, Y is the dependent variable matrix, X is the independent variable matrix, W is the weight matrix of the principal components, and E is the error term;

[0038] S32: Preset mean square error MSE threshold μ1 and determination coefficient R 2 Threshold μ2, the test set is input into the partial least squares regression model;

[0039] S33: Calculate the mean square error (MSE) and coefficient of determination (R) of the partial least squares regression model 2 , if the mean square error MSE is greater than the mean square error MSE threshold μ1 or the determination coefficient R 2 Less than the coefficient of determination R 2 If the threshold μ2 is less than 2, the model does not meet the expected standard. The hyperparameters of the partial least squares regression model are modified and step S3 is executed again.

[0040] Furthermore, the formula for calculating the mean square error MSE is:

[0041]

[0042] Among them, m is the sample size of the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. The predicted value of the night market grid vitality score;

[0043] Calculate the absolute coefficient R 2 The formula is:

[0044]

[0045] Among them, m is the number of samples in the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. is the predicted value of the night market grid vitality score, The average value of the vitality score of the real night market grid.

[0046] Furthermore, the formula for calculating the VIP score of each independent variable is:

[0047]

[0048] Among them, p is the total number of independent variables, n comp is the total number of principal components, ω jh is the weight of the j-th independent variable on the h-th principal component, ρ h is the loading of the hth principal component, and s is the scale factor.

[0049] Furthermore, the main component is obtained as follows:

[0050] S41: Centralize the independent variable data and the dependent variable data. The formula is:

[0051]

[0052] where x j 、y j is the value of the independent variable and the dependent variable after centering, x j * 、y j * are the data of the independent and dependent variables, is the mean of the independent variable data and the dependent variable data, and x j 、y j Form the independent variable matrix X and the dependent variable matrix Y;

[0053] S42: Calculate the weight vector of the independent variable for the hth principal component. The mathematical expression is:

[0054]

[0055] where ω h is the weight vector of the independent variable for the hth principal component, X is the independent variable matrix, u h is the initial setting value of the hth principal component;

[0056] S43: Calculate the score vector t of the hth principal component h , the formula is:

[0057] t h =Xω h ;

[0058] S44: Update the residuals of the X independent variable matrix and the Y dependent variable matrix, repeat the above steps S42 and S43 to calculate the weight vector and score vector, and iterate continuously to obtain n comp The principal components are expressed as follows:

[0059]

[0060] in, is the load vector, is the regression coefficient.

[0061] Furthermore, the method includes step S6: presetting k vitality thresholds, dividing the vitality scores of the night market grids into k+1 vitality levels, classifying and rating the night market grids according to the vitality scores of the night market grids in step S5, and outputting the vitality levels of the night market grids.

[0062] The present invention further provides a night market vitality assessment system based on grid division and partial least squares regression, which is used to implement any of the above-mentioned night market vitality assessment methods based on grid division and partial least squares regression, and is characterized by comprising:

[0063] The grid division module is used to divide the night market area into multiple grids, extract the longitude and latitude coordinates of the vertices of each night market grid, and establish a spatial topological structure;

[0064] The data acquisition module connects the database and sensors to obtain the independent variable data of the night market grid in real time;

[0065] The model evaluation module is used to generate a night market grid vitality score based on the acquired independent variable data and the partial least squares regression algorithm;

[0066] Vitality level assessment module: Based on the vitality score output by the model, the vitality level of the night market grid is divided by vitality threshold;

[0067] Storage module: used to store the vitality score and vitality level of each night market grid.

[0068] The present invention also provides a computer-readable storage medium, characterized in that it is used to store a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned night market vitality assessment methods based on grid division and partial least squares regression.

[0069] The present invention is based on the grid division of night market areas, combined with multidimensional factors such as noise, lighting, and function, which can comprehensively reflect the vitality status within each night market grid, avoiding the limitation of traditional evaluation methods that only rely on a single factor; through partial least squares algorithm modeling, it can process the interactive relationship of multidimensional data and dynamically adjust the weight of the vitality evaluation model at different times or scenarios; the present invention can accurately evaluate the vitality of night markets, provide strong data support for city managers, help optimize resource allocation and spatial planning, and improve urban management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 This is a flow chart of a night market vitality assessment method based on grid division and partial least squares regression provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0071] The present invention provides a night market vitality assessment method based on grid division and partial least squares regression, such as Figure 1 As shown, the following steps are included:

[0072] S1: Select multiple night market areas, divide each night market area into grids, obtain historical values of factors affecting the vitality of the night market grids, and assign vitality scores to the night market grids. Specifically, the method for dividing the night market areas into grids includes the following steps:

[0073] S11: Get the center point o of the night market area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows:

[0074]

[0075] in, is the dimension of the center point, τ o is the longitude of the center point.

[0076] S12: Based on the coordinates (x, y, z) of the center point and the radius r of the night market area, calculate the coverage angle θ. The formula is:

[0077]

[0078] Where R is the average radius of the Earth and r is the radius of the night market area.

[0079] S13: Determine the grid level range according to the angle θ [L min , L max ], set the maximum number of grids I max , generate a grid set C covering the night market area.

[0080] Among them, the minimum level L min The chord angle of the largest diagonal of the grid must be ≤θ;

[0081] The maximum level L max The chord angle that satisfies the minimum grid width is ≥θ.

[0082] Grid set C = {C i |i=1,2,…,I};

[0083] Among them, C i Represented as a grid ID.

[0084] S14: According to each grid C i The spherical coordinates of the four vertices (x i,v ,y i,v ,z i,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is:

[0085]

[0086] τ i,v =arctan2(x i,v ,y i,v )

[0087] Among them, i is the i-th grid in the night market area, and v=1, 2, 3, 4 are the four vertices of the grid.

[0088] In this embodiment, the types of independent variables are P=3, which are noise level, lighting intensity and functional diversity index.

[0089] The functional diversity index is obtained by quantifying the number and types of stalls in the night market grid using the entropy method. The specific method is as follows:

[0090] The number of stall types in the ith night market grid is q, namely Q1, Q2, ..., Q q , k∈{1,2,...,q},Q k represents the kth stall type, d k represents the number of the kth stall type;

[0091] Calculate the total number of stalls D, the formula is:

[0092]

[0093] Calculate the proportion of each type of stalls λ k , the formula is:

[0094]

[0095] Calculate the entropy value γ, the formula is expressed as:

[0096]

[0097] The functional diversity index ξ of the i-th night market grid is calculated and expressed as:

[0098]

[0099] For example, a night market grid has three stall types, namely catering Q1, retail Q2, and entertainment Q3. The number of each type is catering (d k =5), retail (d k =3), entertainment (d k =2);

[0100] The total number of stalls is: D = 5 + 3 + 2 = 10, then the proportion of catering Retail share Entertainment share Calculate the entropy value γ = -(0.5ln0.5 + 0.3ln0.3 + 0.2ln0.2) ≈ 1.03;

[0101] The functional diversity index of the night market grid is

[0102] S2: Take the night market grid vitality score as the dependent variable, and the values of the influencing factors that affect the night market grid vitality score as independent variables. The data of the independent variables and dependent variables form a data set, and the data set is divided into a training set and a test set.

[0103] Specifically, the K-fold cross-validation method can be used to divide the data set, with K=3 preset, and the data set is randomly divided into three subsets, one of which is used as a test set and two subsets are used as training sets.

[0104] S3: Construct a partial least squares regression model and perform iterative training on it. By calculating the mean square error and the coefficient of determination R 2 To evaluate whether the model meets the expected standards, if the model does not meet the expected standards, adjust the model hyperparameters and re-execute step S3. Specifically, it includes the following steps:

[0105] S31: Construct and train a partial least squares regression model, the mathematical expression of which is:

[0106] Y=XW+E,

[0107] Among them, Y is the dependent variable matrix, X is the independent variable matrix, W is the weight matrix of the principal components, and E is the error term.

[0108] S32: Preset mean square error MSE threshold μ1 and determination coefficient R 2 The threshold μ2 is used to input the test set into the partial least squares regression model.

[0109] S33: Calculate the mean square error (MSE) and coefficient of determination (R) of the partial least squares regression model 2 , if the mean square error MSE is greater than the mean square error MSE threshold μ1 or the determination coefficient R 2 Less than the coefficient of determination R 2 If the threshold μ2 is less than 2, the model does not meet the expected standard. The hyperparameters of the partial least squares regression model are modified and step S3 is executed again.

[0110] The formula for calculating the mean square error (MSE) is:

[0111]

[0112] Among them, m is the sample size of the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. Predicted values for the night market grid vitality score.

[0113] Calculate the absolute coefficient R 2 The formula is:

[0114]

[0115] Among them, m is the number of samples in the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. is the predicted value of the night market grid vitality score, The average value of the vitality score of the real night market grid.

[0116] If the performance of the PLS model fails to meet expectations, you can optimize it by adjusting its hyperparameters, such as adjusting the loss function or changing the learning rate. Other optimization methods are also possible, such as increasing the amount of training data to provide more samples for the PLS model to learn from. Ultimately, through repeated iterative optimization, a PLS model with excellent performance can be obtained.

[0117] S4: Preset the importance threshold and calculate the VIP score of each independent variable to evaluate the importance of each independent variable. If the VIP score of the independent variable does not meet the preset importance threshold requirement, delete the independent variable and return to step S2. If all independent variables meet the threshold requirement, output the optimized partial least squares regression model.

[0118] The formula for calculating the VIP score of each independent variable is:

[0119]

[0120] Among them, p is the total number of independent variables, n comp is the total number of principal components, ω jh is the weight of the j-th independent variable on the h-th principal component, ρ h is the loading of the hth principal component, and s is the scale factor.

[0121] The main component is obtained as follows:

[0122] S41: Centralize the independent variable data and the dependent variable data. The formula is:

[0123]

[0124] where x j 、y j is the value of the independent variable and the dependent variable after centering, x j * 、y j * are the data of the independent and dependent variables, is the mean of the independent variable data and the dependent variable data, and x j 、y j Form the independent variable matrix X and the dependent variable matrix Y.

[0125] S42: Calculate the weight vector of the independent variable for the hth principal component. The mathematical expression is:

[0126]

[0127] where ω h is the weight vector of the independent variable for the hth principal component, X is the independent variable matrix, u h is the initial setting value of the hth principal component;

[0128] S43: Calculate the score vector t of the hth principal component h , the formula is:

[0129] t h =Xω h

[0130] S44: Update the residuals of the X independent variable matrix and the Y dependent variable matrix, repeat the above steps S42 and S43 to calculate the weight vector and score vector, and iterate continuously to obtain n comp The principal components are expressed as follows:

[0131]

[0132] in, is the load vector, is the regression coefficient.

[0133] The VIP score is used to quantify the importance of each independent variable in the partial least squares regression model. If a certain independent variable factor has a weak impact on the model, removing it in subsequent model optimization can simplify the calculation. You can also consider adding other independent variable factors to the model.

[0134] S5: Divide the night market area to be evaluated into grids, obtain the independent variable data of the night market grid to be evaluated, and input the data into the partial least squares regression model. The partial least squares regression model outputs the vitality score of the night market grid.

[0135] Step S6: Preset k vitality thresholds and divide the vitality scores of the night market grids into k+1 vitality levels. Based on the vitality scores of the night market grids in step S5, classify and rate the night market grids and output the vitality levels of the night market grids.

[0136] Specifically, in this embodiment, two night market grid activity thresholds are preset, namely σ1, σ2 and σ 1<σ2, the vitality score S calculated by the partial least squares regression model for each grid in the night market area can be obtained. Then, the vitality level of each night market grid can be divided into three levels: low vitality, medium vitality, and high vitality according to the score S. Specifically,

[0137] If the score satisfies S≤σ1, the night market grid is classified as low vitality (level 1);

[0138] If the night market grid with a score satisfying σ1<S≤σ2 is classified as medium vitality (level 2);

[0139] If the score satisfies S>σ2, the night market grid is classified as high vitality (level 3).

[0140] The present invention is based on the grid division of night market areas, combined with multidimensional factors such as noise, lighting, and function, which can comprehensively reflect the vitality status within each night market grid, avoiding the limitation of traditional evaluation methods that only rely on a single factor; through partial least squares algorithm modeling, it can process the interactive relationship of multidimensional data and dynamically adjust the weight of the vitality evaluation model at different times or scenarios; the present invention can accurately evaluate the vitality of night markets, provide strong data support for city managers, help optimize resource allocation and spatial planning, and improve urban management efficiency.

[0141] Example 2:

[0142] The present invention further provides a night market vitality assessment system based on grid division and partial least squares regression, which is used to implement the night market vitality assessment method based on grid division and partial least squares regression as described in the above embodiment 1, comprising:

[0143] The grid division module is used to divide the night market area into multiple grids, extract the longitude and latitude coordinates of the vertices of each night market grid, and establish a spatial topological structure.

[0144] The data acquisition module connects the database and sensors to obtain the independent variable data of the night market grid in real time.

[0145] The model evaluation module is used to generate a night market grid vitality score based on the acquired independent variable data and the partial least squares regression algorithm.

[0146] Vitality level assessment module: Based on the vitality score output by the model, the vitality level of the night market grid is divided by vitality threshold.

[0147] Storage module: used to store the vitality score and vitality level of each night market grid.

[0148] Example 3:

[0149] This application also discloses a computer-readable storage medium, which includes a stored computer program. When the computer program is executed, the computer-readable storage medium controls the device containing the computer-readable storage medium to execute the night market vitality assessment method based on grid division and partial least squares regression described in Example 1. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a ROM, an erasable programmable read-only memory, a hard disk, a CD-ROM, a magnetic storage device, any suitable combination of the foregoing, or any other form of computer-readable storage medium known in the art.

[0150] The three embodiments described above are only preferred specific implementation methods of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with this technical field, within the technical scope disclosed by the present invention, can make equivalent replacements or changes based on the technical solutions and inventive concepts of the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A night market vitality assessment method based on grid division and partial least squares regression, characterized by: The following steps are involved: S1: Select multiple night market areas, divide each night market area into grids, obtain historical values of factors affecting the vitality of the night market grids, and assign vitality scores to the night market grids; S2: Take the night market grid vitality score as the dependent variable, and the values of the factors that affect the night market grid vitality score as the independent variables. The data of the independent variables and the dependent variables form a data set, and the data set is divided into a training set and a test set. S3: Build a partial least squares regression model, iteratively train the model, and calculate the mean square error and coefficient of determination to evaluate whether the model meets the expected standards. If the model does not meet the expected standards, adjust the model hyperparameters and re-execute step S3; S4: Preset the importance threshold and calculate the VIP score of each independent variable to evaluate the importance of each independent variable. If the VIP score of an independent variable does not meet the preset importance threshold, the independent variable is deleted and the process returns to step S2 again. If all independent variables meet the importance threshold, the optimized partial least squares regression model is output. S5: Divide the night market area to be evaluated into grids, obtain the independent variable data of the night market grid to be evaluated, and input the data into the partial least squares regression model. The partial least squares regression model outputs the vitality score of the night market grid.

2. The night market vitality assessment method based on grid division and partial least squares regression according to claim 1 is characterized in that: In step S1, the method for gridding the night market area includes the following steps: S11: Get the center point o of the night market area The latitude and longitude of the center point are converted into three-dimensional coordinate points (x, y, z) on the earth's surface through the S2_LatLng object algorithm. The formula is expressed as follows: in, is the dimension of the center point, τ o is the longitude of the center point; S12: Based on the coordinates (x, y, z) of the center point and the radius r of the night market area, calculate the coverage angle θ. The formula is: Where R is the average radius of the Earth, and r is the radius of the night market area; S13: Determine the grid level range according to the angle θ [L min , L max ], set the maximum number of grids I max , generate a grid set C covering the night market area; Among them, the minimum level L min The chord angle of the largest diagonal of the grid must be ≤θ; The maximum level L max The chord angle that satisfies the minimum grid width is ≥θ; Grid set C = {C i |i=1,2,…,I}; Among them, C i Represented as a grid ID; S14: According to each grid C i The spherical coordinates of the four vertices (x i,v ,y i,v ,z i,v ), calculate the latitude and longitude coordinates of the four vertices of each grid The formula is: t i,v =arctan2(x i,v ,y i,v ) Among them, i is the i-th grid in the night market area, and v=1, 2, 3, 4 are the four vertices of the grid.

3. The night market vitality assessment method based on grid division and partial least squares regression according to claim 1 is characterized in that: The types of independent variables are P=3, which are noise level, lighting intensity and functional diversity index; the functional diversity index is calculated according to the entropy method, and the method is: The number of stall types in the ith night market grid is q, namely Q1, Q2, ..., Q q , k∈{1,2,...,q},Q k is the kth stall type, and the number of the kth stall type is d k ; Calculate the total number of stalls D, the formula is: Calculate the proportion of each type of stalls λ k , the formula is: k∈{1,2,...,q}, Calculate the entropy value γ, the formula is expressed as: The functional diversity index ξ of the i-th night market grid is calculated and expressed as:

4. The night market vitality assessment method based on grid division and partial least squares regression according to claim 1 is characterized in that: The step S3 specifically includes the following steps S31: Construct and train a partial least squares regression model, the mathematical expression of which is: Y=XW+E Among them, Y is the dependent variable matrix, X is the independent variable matrix, W is the weight matrix of the principal components, and E is the error term; S32: Preset mean square error MSE threshold μ1 and determination coefficient R 2 Threshold μ2, the test set is input into the partial least squares regression model; S33: Calculate the mean square error (MSE) and coefficient of determination (R) of the partial least squares regression model 2 , if the mean square error MSE is greater than the mean square error MSE threshold μ1 or the determination coefficient R 2 Less than the coefficient of determination R 2 If the threshold μ2 is less than 2, the model does not meet the expected standard. The hyperparameters of the partial least squares regression model are modified and step S3 is executed again.

5. The night market vitality assessment method based on grid division and partial least squares regression according to claim 4 is characterized in that: The formula for calculating the mean square error (MSE) is: Among them, m is the sample size of the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. The predicted value of the night market grid vitality score; Calculate the absolute coefficient R 2 The formula is: Among them, m is the number of samples in the test set, g is the g-th sample, and y is the true value of the night market grid vitality score. is the predicted value of the night market grid vitality score, The average value of the vitality score of the real night market grid.

6. The night market vitality assessment method based on grid division and partial least squares regression according to claim 1 is characterized in that: The formula for calculating the VIP score of each independent variable is: Among them, p is the total number of independent variables, n comp is the total number of principal components, ω jh is the weight of the j-th independent variable on the h-th principal component, ρ h is the loading of the hth principal component, and s is the scale factor.

7. The night market vitality assessment method based on grid division and partial least squares regression according to claim 6 is characterized in that: The main component is obtained as follows: S41: Centralize the independent variable data and the dependent variable data. The formula is: where x j 、y j is the value of the independent variable and the dependent variable after centering, x j * 、y j * are the data of the independent and dependent variables, is the mean of the independent variable data and the dependent variable data, and x j 、y j Form the independent variable matrix X and the dependent variable matrix Y; S42: Calculate the weight vector of the independent variable for the hth principal component. The mathematical expression is: where ω h is the weight vector of the independent variable for the hth principal component, X is the independent variable matrix, u h is the initial setting value of the hth principal component; S43: Calculate the score vector t of the hth principal component h , the formula is: t h =Xω h ; S44: Update the residuals of the X independent variable matrix and the Y dependent variable matrix, repeat the above steps S42 and S43 to calculate the weight vector and score vector, and iterate continuously to obtain n comp The principal components are expressed as follows: in, is the load vector, is the regression coefficient.

8. The night market vitality assessment method based on grid division and partial least squares regression according to claim 1 is characterized in that: The method also includes step S6: presetting k vitality thresholds, dividing the vitality scores of the night market grids into k+1 vitality levels, classifying and rating the night market grids according to the vitality scores of the night market grids in step S5, and outputting the vitality levels of the night market grids.

9. A night market vitality assessment system based on grid division and partial least squares regression, used to implement the night market vitality assessment method based on grid division and partial least squares regression as described in any one of claims 1 to 8, characterized in that: include: The grid division module is used to divide the night market area into multiple grids, extract the longitude and latitude coordinates of the vertices of each night market grid, and establish a spatial topological structure; The data acquisition module connects the database and sensors to obtain the independent variable data of the night market grid in real time; The model evaluation module is used to generate a night market grid vitality score based on the acquired independent variable data and the partial least squares regression algorithm; Vitality level assessment module: Based on the vitality score output by the model, the vitality level of the night market grid is divided by vitality threshold; Storage module: used to store the vitality score and vitality level of each night market grid.

10. A computer-readable storage medium for storing a computer program, characterized in that: When the program is executed by a processor, the steps of any one of the above-mentioned methods for evaluating night market vitality based on grid division and partial least squares regression are implemented.