A model training method and device, computer equipment and storage medium
By clustering parking lots based on their service capacity and distance information, a parking lot set is generated and a parking prediction model is trained. This solves the problem of low prediction accuracy caused by inaccurate parking lot map division in existing technologies, and achieves higher accuracy parking data prediction.
Patent Information
- Application Number
- CN202311176675.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-09-12
AI Technical Summary
Existing technologies do not effectively consider the relationships between parking lots when partitioning parking lot networks, resulting in low accuracy in parking lot partitioning, which in turn affects the prediction accuracy of the trained parking prediction model.
By acquiring service capacity and distance information of multiple parking lots within the target area, initial service weights and distance information of each parking lot are generated. Based on this information, the parking lots are clustered to obtain a parking lot set, and a parking prediction model is trained.
It improves the accuracy of parking lot clustering, ensures the accuracy of parking prediction model in predicting parking data in the corresponding area, and improves model training speed and prediction efficiency.
Smart Images

Figure CN117171572B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of model training, in particular to a model training method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the rapid development of cities, the problem of parking difficulty is increasingly serious. City-level parking data prediction has become a technical problem that needs to be solved for urban parking systems.
[0003] Currently, existing technologies can use graph convolutional neural networks to perform city-level parking data prediction. Specifically, existing technologies can perform graph partitioning on a city-level parking lot network to obtain multiple parking lot partitions, and then train a base model based on one or more parking lot partitions and corresponding graph data to obtain a parking prediction model, and use the parking prediction model to predict parking data within the corresponding partitions.
[0004] However, the existing technology does not effectively consider the correlation between parking lots when performing graph partitioning on the parking lot network, resulting in low accuracy of parking lot partitioning, and thus low prediction accuracy of the parking prediction model obtained by training. SUMMARY
[0005] Therefore, the present application provides a model training method and device, computer equipment and a storage medium to solve the problem that the correlation between parking lots is not effectively considered when performing graph partitioning on the parking lot network, resulting in low accuracy of parking lot partitioning, and thus low prediction accuracy of the parking prediction model obtained by training.
[0006] In a first aspect, the present application provides a model training method, which comprises:
[0007] Obtaining service capability information and distance information of multiple parking lots in a target area, the distance information including the distance between each two parking lots;
[0008] Generating service weight initial values of each parking lot in the multiple parking lots using the service capability information of the multiple parking lots;
[0009] Clustering the multiple parking lots based on the service weight initial values of each parking lot and the distance information to obtain at least one parking lot set;
[0010] Obtaining at least one parking prediction model to be trained;
[0011] Training the parking prediction model according to at least one parking lot set for any parking prediction model.
[0012] In an optional implementation, the clustering of the plurality of parking lots based on the service weight initial values of the parking lots and the distance information comprises:
[0013] The service weight transfer information of each of the parking lots is generated based on the service weight initial values of the parking lots and the distance information.
[0014] The plurality of parking lots are clustered based on the service weight transfer information of each of the parking lots to obtain the at least one parking lot set.
[0015] In an optional implementation, the generation of the service weight transfer information of each of the parking lots based on the service weight initial values of the parking lots and the distance information comprises:
[0016] The service weight transfer-out information of each of the parking lots is generated based on the service weight initial values of the parking lots and the distance information.
[0017] The service weight transfer-in information of each of the parking lots is generated based on the service weight transfer-out information of each of the parking lots.
[0018] The service weight transfer-in information and the service weight transfer-out information of each of the parking lots are determined as the service weight transfer information of each of the parking lots, respectively.
[0019] In an optional implementation, the generation of the service weight transfer-out information of each of the parking lots based on the service weight initial values of the parking lots and the distance information comprises:
[0020] The transfer preference information of each of the parking lots is determined based on the service weight initial values of the parking lots and the distance information, wherein the transfer preference information of each of the parking lots comprises a transfer preference value of the parking lot to each of the other parking lots.
[0021] The parking transfer probability corresponding to each of the parking lots is obtained, wherein the parking transfer probability is a probability that a cruising vehicle transfers from the parking lot to another parking lot for parking when parking spaces in the parking lot are full.
[0022] The service weight transfer-out information of each of the parking lots is generated based on the transfer preference information of each of the parking lots and the parking transfer probability corresponding to each of the parking lots.
[0023] In an optional implementation, the clustering of the plurality of parking lots based on the service weight transfer information of each of the parking lots comprises:
[0024] Among the multiple parking lots, at least one central node parking lot and at least one non-central node parking lot are determined based on the service weight transfer-out information and service weight transfer-in information of each parking lot.
[0025] Based on the service weight transfer information of each non-central node parking lot, the sub-node parking lots under each central node parking lot are determined.
[0026] For any of the central node parking lots, the central node parking lot and the corresponding child node parking lots are determined as a parking lot set, thus obtaining the at least one parking lot set.
[0027] In one optional implementation, the service weight transfer information of each parking lot includes the amount of service weight transferred out by the parking lot to each of the other parking lots, and the service weight transfer information of each parking lot includes the amount of service weight transferred in by the parking lot to each of the other parking lots.
[0028] The step of determining at least one central node parking lot and at least one non-central node parking lot based on the service weight transfer-out information and service weight transfer-in information of each parking lot includes:
[0029] Based on the service weight transfer-out information and service weight transfer-in information of each parking lot, determine the total service weight transfer-out amount and the total service weight transfer-in amount of each parking lot;
[0030] Each parking lot whose total service weight transfer-out amount is greater than the total service weight transfer-in amount is identified as a central node parking lot.
[0031] Each parking lot whose total service weight transfer-out amount is not greater than the total service weight transfer-in amount is identified as a non-central node parking lot.
[0032] In one optional implementation, determining the sub-node parking lots under each of the central node parking lots based on the service weight transfer information of each of the non-central node parking lots includes:
[0033] For any of the service weight transfer information of the non-central node parking lot: Based on the service weight transfer information of the non-central node parking lot, determine the maximum service weight transfer amount of the non-central node parking lot, and determine the parking lot corresponding to the maximum service weight transfer amount as the parent node parking lot of the non-central node parking lot.
[0034] Based on the parent parking lot of each non-central node parking lot, determine the child parking lots under each central node parking lot.
[0035] In one optional implementation, the service capacity information includes: service area area, number of parking spaces, and / or parking price;
[0036] The step of generating an initial service weight value for each parking lot among the multiple parking lots using the service capacity information of the multiple parking lots includes:
[0037] Using the service area, number of parking spaces, and / or parking price of the multiple parking lots, an initial service weight value for each parking lot among the multiple parking lots is generated.
[0038] In one optional implementation, obtaining at least one parking prediction model to be trained includes:
[0039] Determine the number of sets in the at least one parking lot set;
[0040] Obtain the parking prediction models whose number of models is equal to the number of models in the set;
[0041] The step of training the parking prediction model based on at least one set of parking lots for any of the aforementioned parking prediction models includes:
[0042] Each of the parking prediction models is mapped one-to-one with each of the parking sets in the at least one parking set;
[0043] The corresponding parking prediction model is trained based on each of the at least one set of parking lots.
[0044] In a second aspect, the present invention also provides a model training apparatus, comprising: a first acquisition unit, a first generation unit, a first clustering unit, a second acquisition unit, and a first training unit;
[0045] The first acquisition unit is used to acquire service capacity information and distance information of multiple parking lots within the target area, wherein the distance information includes the distance between each pair of parking lots;
[0046] The first generation unit is used to generate an initial service weight value for each parking lot in the plurality of parking lots using the service capacity information of the plurality of parking lots;
[0047] The first clustering unit is used to cluster the multiple parking lots based on the initial service weight of each parking lot and the distance information to obtain at least one parking lot set.
[0048] The second acquisition unit is used to acquire at least one parking prediction model to be trained;
[0049] The first training unit is used to train the parking prediction model for any of the parking prediction models based on at least one of the parking lot sets.
[0050] Thirdly, the present invention also provides a computer device, comprising:
[0051] The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform any of the aforementioned model training methods.
[0052] Fourthly, the present invention also provides a computer-readable storage medium storing computer instructions, the computer instructions being used to cause a computer to execute any of the above-described model training methods.
[0053] The model training method, apparatus, computer equipment, and storage medium proposed in this invention can cluster parking lots within a target area based on the initial service weights and distance information of each parking lot, obtaining at least one parking lot set. This parking lot set is then used to train the parking prediction model to be trained. This invention can effectively consider the correlation between parking service capabilities and distances among parking lots within the target area, clustering parking lots to obtain at least one parking lot set. This improves the accuracy of parking lot clustering, ensuring the accuracy of parking prediction model prediction within the corresponding area when subsequently training the parking prediction model based on the parking lot set. Attached Figure Description
[0054] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0055] Figure 1 This is one of the flowcharts illustrating the model training method proposed in this embodiment of the invention;
[0056] Figure 2 This is the second flowchart illustrating the model training method proposed in this embodiment of the invention;
[0057] Figure 3 This is the third flowchart illustrating the model training method proposed in this embodiment of the invention;
[0058] Figure 4 This is one of the schematic diagrams illustrating the process of determining the parent-child parking relationship proposed in an embodiment of the present invention;
[0059] Figure 5 This is the second schematic diagram of the process for determining the parent-child parking relationship proposed in the embodiments of the present invention;
[0060] Figure 6 This is the third schematic diagram of the process for determining the parent-child parking relationship proposed in the embodiments of the present invention;
[0061] Figure 7 This is a schematic diagram of the structure of the model training device proposed in an embodiment of the present invention;
[0062] Figure 8 This is a schematic diagram of the hardware structure of the computer device proposed in an embodiment of the present invention. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, not all embodiments. 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.
[0064] like Figure 1 As shown, this invention proposes a first model training method, which includes the following steps:
[0065] S101. Obtain service capacity information and distance information of multiple parking lots within the target area, including the distance between each pair of parking lots;
[0066] The target area can be the entire area within a city or the entire area within a province.
[0067] Among them, service capacity information can be indicator data that reflects the parking service capacity of a parking lot.
[0068] Optionally, service capacity information may include the service area area, number of parking spaces, free parking duration, parking lot area, and / or parking price.
[0069] It should be noted that this invention can obtain the service capacity and distance information of each parking lot in all parking lots within the target area.
[0070] S102. Using the service capacity information of multiple parking lots, generate the initial value of the service weight of each parking lot among the multiple parking lots;
[0071] The initial value of the service weight can be a quantitative mapping value of the parking service capacity of the parking lot.
[0072] Understandably, the initial service weight can be obtained by weighting the parking service capacity of a parking lot among all parking lots. Specifically, the higher a parking lot's parking service capacity compared to all parking lots, the larger its initial service weight, and vice versa.
[0073] Specifically, this invention can quantitatively calculate the initial service weight of each parking lot in all parking lots based on the service capacity information of each parking lot in the target area, thereby obtaining the initial service weight of each parking lot in the target area.
[0074] Optionally, in other model training methods proposed in this embodiment of the invention, the service capability information includes: service area area, number of parking spaces and / or parking price; step S102 may include:
[0075] Using service capacity information from multiple parking lots, generate initial service weights for each parking lot among the multiple parking lots, including:
[0076] By utilizing the service area, number of parking spaces, and / or parking price of multiple parking lots, an initial service weight value for each parking lot among the multiple parking lots is generated.
[0077] Specifically, the present invention can use the following formula (1) to quantitatively calculate the initial value of the service weight of the parking lot.
[0078]
[0079] Where i is the parking lot number. Let be the initial service weight of parking lot i; x is the value used to characterize the service range of parking lot. The smaller x is, the lower the willingness of parking lot to open to the public, and vice versa; y is the number of parking spaces in parking lot, and z is the parking price; ‖y‖ and ‖z‖ represent the first normal form of column vectors y and z, respectively.
[0080] S103. Based on the initial service weights and distance information of each parking lot, cluster multiple parking lots to obtain at least one parking lot set.
[0081] Specifically, this invention can cluster all parking lots within a target area based on the initial service weight and distance information of each parking lot within the target area, thereby obtaining one or more parking lot sets.
[0082] It should be noted that the definition of the parking lot set is consistent with the parking lot partitioning obtained through graph partitioning. Each parking lot set may include at least one parking lot.
[0083] It is understandable that the smaller the distance between two parking lots, the greater the correlation between them, meaning a higher probability of vehicle diversion between them; conversely, the greater the distance, the smaller the correlation. This invention clusters parking lots based on their initial service weights and distance information, aligning with actual driver parking selection strategies and preferences.
[0084] S104. Obtain at least one parking prediction model to be trained;
[0085] Specifically, the parking prediction model can be a pre-trained model or a base model used to predict parking data.
[0086] Understandably, the parking prediction model can be a graph convolutional neural network model.
[0087] S105. For any parking prediction model, train the parking prediction model based on at least one set of parking lots.
[0088] Specifically, this invention can train each parking prediction model based on at least one set of parking lots. For example, for a first parking prediction model and a second parking prediction model, this invention can train the first parking prediction model based on a first set of parking lots, and the invention can train the second parking prediction model based on a second set of parking lots and a third set of parking lots.
[0089] Specifically, when training a parking prediction model based on a set of parking lots, the present invention can first obtain the graph data of the parking lot set, such as the time series data of parking prices, number of parking spaces, and number of parking lots, and use the graph data of the parking lot set as the model training data to train the parking prediction model.
[0090] It is understood that when training a parking prediction model based on multiple parking lot sets, the present invention can first obtain graph data of the multiple parking lot sets, such as the distance between parking lot nodes, parking prices, number of parking spaces, and time series data of parking volume, and use the graph data of the multiple parking lot sets as model training data to train the parking prediction model.
[0091] It should be noted that, through steps S101 to S105, this invention can cluster all parking lots based on the initial service weights and distance information of each parking lot within the target area, dividing all parking lots into at least one parking lot set. Then, a parking prediction model to be trained is performed based on these parking lot sets to obtain a trained parking prediction model. This trained model can then be used to predict parking data within the areas corresponding to the parking lot sets. For example, this invention can use the parking prediction model trained based on a first parking lot set and a second parking lot set to predict parking data in the areas corresponding to these two sets.
[0092] The model training method proposed in this invention can cluster parking lots within a target area based on their initial service weights and distance information, resulting in at least one parking lot set. This parking lot set is then used to train the parking prediction model. This invention effectively considers the correlation between parking service capabilities and distances among parking lots within the target area, clustering them to obtain at least one parking lot set. This improves the accuracy of parking lot clustering, ensuring the parking prediction model's accuracy in predicting parking data within the corresponding area when subsequently trained based on the parking lot set.
[0093] based on Figure 1 ,like Figure 2 As shown, this invention proposes a second model training method. In this method, step S104 may include steps S201 and S202, and step S105 may include steps S203 and S204.
[0094] in:
[0095] S201. Determine the number of sets for at least one parking lot set;
[0096] Specifically, after determining at least one set of parking lots through clustering, the present invention can count the number of parking lots sets contained in the at least one set of parking lots.
[0097] S202. Obtain parking prediction models whose model count is the number of sets;
[0098] Specifically, after determining the aforementioned set size, this invention can obtain the same number of parking prediction models to be trained. For example, when the aforementioned set size is 10, this invention can obtain 10 parking prediction models to be trained.
[0099] S203. Assign a one-to-one correspondence between each parking prediction model and each parking lot set in at least one parking lot set;
[0100] Specifically, this invention can assign a one-to-one correspondence between each parking prediction model obtained and each parking lot in at least one of the aforementioned parking lot sets. For example, after clustering to obtain 10 parking lot sets and acquiring 10 parking prediction models, this invention can assign a one-to-one correspondence between the 10 parking prediction models and the 10 parking lot sets.
[0101] S204. Train the corresponding parking prediction model based on each parking lot set in at least one parking lot set.
[0102] Specifically, this invention can train corresponding parking prediction models based on each set of parking lots. For example, this invention can train a parking prediction model corresponding to a first set of parking lots.
[0103] Specifically, such as Figure 3 As shown, this invention can cluster city-level parking lot networks, obtain corresponding graph data based on the clustered parking lot sets, and train corresponding parking prediction models in parallel. For example, for a first parking lot set and a second parking lot set obtained through clustering, this invention can obtain corresponding first graph data based on the first parking lot set and train a first parking prediction model based on the first graph data. Simultaneously, this invention can obtain corresponding second graph data based on the second parking lot set in parallel and train a corresponding second parking prediction model based on the second graph data.
[0104] Of course, this invention can also train the same parking lot set based on multiple parking lot sets. For example, this invention can train a third parking prediction model based on a third parking lot set and a fourth parking lot set.
[0105] Specifically, such as Figure 3 As shown, after obtaining the trained parking prediction models based on the sets of parking lots, the present invention can also use the parking prediction models to perform parallel prediction of parking data in the corresponding area. For example, the present invention can use the trained first parking prediction model to predict parking data in the corresponding area, and at the same time use the trained second parking prediction model to predict parking data in the corresponding area.
[0106] It should be noted that community partitioning is an effective way to simplify very large graphs. Its core idea is to divide a huge, complex network into several medium- and small-scale sub-network communities. Since each community is a group of nodes with dense internal connections and relatively sparse connections to external nodes, it has a node distribution similar to the original complex network. Therefore, the inventors of this invention, through studying this method, clearly understand the relationships and characteristics between individuals and improve the analysis process, proposing the parking lot network partitioning method of this invention. This method effectively considers the correlations between parking lots to partition the parking lot network, allowing closely related parking lots to be grouped into the same parking lot set, thereby effectively ensuring the accuracy of subsequent model training and prediction.
[0107] The model training method proposed in this invention can perform parallel training on multiple parking prediction models based on the clustered sets of parking lots, effectively improving the training speed and efficiency of the models. Furthermore, multiple trained parking prediction models can be used for parallel prediction, effectively improving the prediction speed and efficiency of parking data.
[0108] based on Figure 1 This invention proposes a third model training method. In this method, step S103 may include steps S301 and S302. Wherein:
[0109] S301. Based on the initial service weight of each parking lot and the distance information, generate service weight transfer information for each parking lot;
[0110] It's important to note that when a cruising vehicle is searching for a parking space in a parking lot, if there are few or no spaces available, it will move to a nearby parking lot to find a spot. At this point, the service priority between parking lots shifts. Cruising vehicles typically tend to choose parking lots with higher service capacity and closer proximity.
[0111] Specifically, service weight transfer information can record relevant information about the transfer of service weight between parking lots, such as the service weight transfer time and the amount of service weight transfer.
[0112] Specifically, the inventors of this invention combine the transfer strategy of cruise vehicles with the initial value of the service weight of parking lots to generate service weight transfer information for each parking lot.
[0113] Optionally, the service weight transfer information for each parking lot may include service weight transfer-in information and service weight transfer-out information. Step S301 may include steps S3011, S3012, and S3013, wherein:
[0114] S3011. Based on the initial service weight of each parking lot and the distance information, generate service weight transfer information for each parking lot;
[0115] Among them, the service weight transfer information of a certain parking lot may include relevant information about the service weight transferred from other parking lots to that parking lot;
[0116] The service weight transfer information for a particular parking lot may include information related to the transfer of service weight from that parking lot to other parking lots.
[0117] Specifically, this invention can generate service weight transfer information for each parking lot based on the initial service weight of each parking lot and the distance information.
[0118] Optionally, step S3011 above may include:
[0119] Based on the initial service weight and distance information of each parking lot, the transfer preference information of each parking lot is determined; wherein, the transfer preference information of each parking lot includes the transfer preference values of each parking lot to other parking lots.
[0120] Obtain the parking transfer probability for each parking lot; where the parking transfer probability is the probability that a cruise vehicle will move from one parking lot to another when the parking lot is full.
[0121] Based on the transfer preference information and the corresponding parking transfer probability of each parking lot, service weight transfer information for each parking lot is generated.
[0122] It should be noted that the present invention can determine the service weight value after the service weight transfer between each parking lot is balanced by the following formula (2).
[0123]
[0124] Where k is the number of iterations. q represents the service weight value obtained after the k-th iteration, where j, i, and m are parking lot numbers; q represents the probability that a cruising vehicle will choose to park in a parking lot if there are available spaces; n represents the number of neighboring parking lots of parking lot j; and L represents the distance between a parking lot and another parking lot.
[0125] It should be noted that when all parking lots meet the requirements... When the iteration stops, the final service weight of each parking lot can be determined. Here, ε can be a relatively small value set by technical personnel based on the actual situation.
[0126] Specifically, the present invention can use the following formulas (2) to (5) to record the service weight transfer amount of each parking lot during the iteration period, i.e., during the service weight transfer period.
[0127] Specifically, the present invention can record the transfer preference value between two parking lots according to formula (2), as shown in formula (3) below.
[0128]
[0129] Among them, F ji Let be the transfer preference value from parking lot j to parking lot i.
[0130] Specifically, the present invention can determine the amount of service weight transferred from one parking lot to another parking lot according to the following formula (4).
[0131]
[0132] Among them, (a ji ) n′ This represents the amount of service weight transferred from parking lot j to parking lot i.
[0133] Specifically, the present invention can determine the sum of service weights currently transferred from parking lot j to parking lot i using the following formula (5).
[0134] (a ji ) k =(a ji ) k-1 +(a ji ) n′ ;----------Formula (5)
[0135] Among them, (a ji ) k This represents the cumulative sum of the service weight transfers from parking lot j to parking lot i; (a ji ) k-1 This represents the cumulative sum of the service weight transferred from parking lot j to parking lot i after the last transfer of service weight from parking lot j to parking lot i.
[0136] It should be noted that, after meeting the above requirements... At this point, the present invention can end the iterative calculation of the service weight transfer amount between parking lots and determine the final service weight transfer information, that is, the sum of the service weight transfer amounts between each parking lot.
[0137] Specifically, this invention can use a service weight transfer matrix to record the cumulative sum of service weight transfers between parking lots. Then, after the iteration ends, this invention can determine the service weight transfer information for each parking lot based on the service weight transfer matrix.
[0138] S3012. Generate service weight transfer information for each parking lot based on the service weight transfer-out information of each parking lot;
[0139] It is understood that the service weight transfer-out information and service weight transfer-in information between two parking lots are corresponding. This invention can determine the service weight transfer-in information between parking lots based on the service weight transfer-out information between them.
[0140] It should be noted that, after the iterative calculation of service weight transfer between parking lots is completed, the present invention can determine the service weight transfer-out information and the service weight transfer-in information of each parking lot based on the service weight transfer matrix.
[0141] S3013. The service weight transfer information of each parking lot is determined as the service weight transfer information of each parking lot.
[0142] Specifically, for any parking lot, the present invention can determine the service weight transfer information of the parking lot as the service weight transfer information.
[0143] It should be noted that the present invention can determine the service weight transfer information of each parking lot through the above method, thereby effectively ensuring the subsequent clustering of the parking lot set.
[0144] S302. Based on the service weight transfer information of each parking lot, cluster multiple parking lots to obtain at least one parking lot set.
[0145] It is understandable that the service weight transfer information of each parking lot can effectively reflect the correlation between them. For example, if parking lot j transfers a large amount of service weight to parking lot i, it indicates a strong correlation between parking lot j and parking lot i. Therefore, this invention can cluster multiple parking lots based on their service weight transfer information.
[0146] It should be noted that, compared with existing graph partitioning methods such as spatial distance clustering (k-means) and heterogeneous clustering based on genetic algorithms (GAP), this invention takes into account factors that are highly relevant to urban parking, such as differences in parking service capacity and people's general preferences when cruising for parking. Therefore, this invention is more suitable for parking network partitioning, and the partitioned parking sets can better reflect the local parking characteristics of the city, thus achieving better parking prediction results.
[0147] The model training method proposed in this invention can effectively generate service weight transfer information for each parking lot, and can cluster parking lots within the target area based on the service weight transfer information. This clustering method effectively considers the relationships between parking lots and improves the accuracy of parking lot clustering.
[0148] Based on the third model training method described above, this invention proposes a fourth model training method. In this fourth model training method, step S302 may include steps S3021, S3022, and S3023, wherein:
[0149] S3021. In multiple parking lots, at least one central node parking lot and at least one non-central node parking lot are determined based on the service weight transfer-out information and service weight transfer-in information of each parking lot.
[0150] Among them, the central node parking lot can be the cluster center of a set of parking lots.
[0151] Specifically, this invention can identify parking lots that have a strong correlation with multiple neighboring parking lots based on the service weight transfer-out information and service weight transfer-in information of each parking lot, and use them as central node parking lots.
[0152] Optionally, the service weight transfer information for each parking lot includes the amount of service weight transferred out by each parking lot to other parking lots, and the service weight transfer information for each parking lot includes the amount of service weight transferred in by each parking lot to other parking lots; in this case, step S3021 may include:
[0153] Based on the service weight transfer information and service weight transfer information of each parking lot, at least one central node parking lot and at least one non-central node parking lot are identified, including:
[0154] Based on the service weight transfer-out information and service weight transfer-in information of each parking lot, determine the total service weight transfer-out amount and the total service weight transfer-in amount of each parking lot.
[0155] Each parking lot whose total service weight transfer-out amount is greater than the total service weight transfer-in amount is designated as a central node parking lot.
[0156] Each parking lot whose total service weight transfer-out amount is no greater than the total service weight transfer-in amount is designated as a non-central node parking lot.
[0157] The total service weight transfer is the sum of the service weight transfers from one parking lot to all other parking lots.
[0158] The total service weight transfer amount is the sum of the service weight transfer amounts received by a parking lot from other parking lots.
[0159] It is understandable that if the total service weight transferred out of a parking lot is greater than the total service weight transferred in, it indicates that the parking lot is frequently experiencing high parking volume and needs to divert traffic to neighboring parking lots. Therefore, this parking lot has a strong correlation with its neighboring parking lots, and this invention can designate it as a central node parking lot. Conversely, it can be designated as a non-central node parking lot.
[0160] S3022. Based on the service weight transfer information of each non-central node parking lot, determine the sub-node parking lots under each central node parking lot.
[0161] In this invention, a child node parking lot is an associated node parking lot of a central node parking lot. The invention can define a central node parking lot and all its child node parking lots as a single parking lot set.
[0162] It is understood that all non-central node parking lots are child node parking lots under central node parking lots. This invention can determine the parking lot with which the service weight transfer is most closely related based on the service weight transfer information of the non-central node parking lot, and designate the non-central node parking lot as a child node parking lot of the most closely related parking lot. After determining the most closely related parking lots of each non-central node parking lot, the child node parking lots under each central node parking lot can be determined.
[0163] Optionally, step S3022 may include:
[0164] For any non-central node parking lot's service weight transfer information: Based on the non-central node parking lot's service weight transfer information, determine the maximum service weight transfer amount of the non-central node parking lot, and determine the parking lot corresponding to the maximum service weight transfer amount as the parent node parking lot of the non-central node parking lot.
[0165] Based on the parent parking lots of each non-central node parking lot, determine the child parking lots under each central node parking lot.
[0166] like Figure 4 , Figure 5 and Figure 6 As shown, to better illustrate the attribution of child parking lots, this invention treats each parking lot as a node, identifying the central node parking lot and non-central node parking lots. Then, nodes with subordinate relationships (i.e., parent-child relationships) are connected by line segments. After all nodes are connected, the child parking lots under each central node parking lot can be determined.
[0167] in, Figure 4There are 7 parking lots, all marked with circles and numbers inside the circles, specifically P1, P2, P3, P4, P5, P6 and P7.
[0168] like Figure 5 As shown, this invention can identify P1 and P3 as the central node parking lots among the seven parking lots and mark them with rectangular boxes, while the other parking lots are non-central node parking lots and are marked with circular boxes; as shown Figure 6 As shown, this invention can determine the parent parking lot of each non-central node parking lot. Specifically, Figure 6 Two parking lots connected by line segments have a parent-child relationship. The parent parking lot of P7 and P2 is P1, the parent parking lot of P6 and P4 is P3, and the parent parking lot of P5 is P4. At this point, the child parking lots under P1 and P3 can be determined. Specifically, the child parking lots under P1 include P7 and P2, and the child parking lots under P3 include P4, P5, and P6.
[0169] S3023. For any central node parking lot, determine the central node parking lot and the corresponding child node parking lot as a parking lot set to obtain at least one parking lot set.
[0170] The model training method proposed in this invention can effectively identify the parking lots at each central node and the sub-node parking lots under each central node parking lot, and treat each central node parking lot and its subordinate sub-node parking lots as a parking lot set, thereby achieving clustering of all parking lots in the target area.
[0171] and Figure 1 The method shown corresponds to, for example Figure 7 As shown, the present invention proposes a model training device, which may include: a first acquisition unit 701, a first generation unit 702, a first clustering unit 703, a second acquisition unit 704, and a first training unit 705;
[0172] The first acquisition unit 701 is used to acquire service capacity information and distance information of multiple parking lots within a target area, wherein the distance information includes the distance between each pair of parking lots;
[0173] The first generation unit 702 is used to generate an initial service weight value for each parking lot in the plurality of parking lots using the service capacity information of the plurality of parking lots;
[0174] The first clustering unit 703 is used to cluster the multiple parking lots based on the initial service weight of each parking lot and the distance information to obtain at least one parking lot set.
[0175] The second acquisition unit 704 is used to acquire at least one parking prediction model to be trained;
[0176] The first training unit 705 is used to train the parking prediction model for any of the parking prediction models based on at least one of the parking lot sets.
[0177] Optionally, the first generation unit 702 includes: a second generation unit and a second clustering unit;
[0178] The second generation unit is used to generate service weight transfer information for each parking lot based on the initial service weight value of each parking lot and the distance information;
[0179] The second clustering unit is used to cluster the multiple parking lots according to the service weight transfer information of each parking lot to obtain the at least one parking lot set.
[0180] Optionally, the second generation unit includes: a third generation unit, a fourth generation unit, and a first determination unit;
[0181] The third generation unit is used to generate service weight transfer information for each parking lot based on the initial service weight of each parking lot and the distance information.
[0182] The fourth generation unit is used to generate service weight transfer-in information for each parking lot based on the service weight transfer-out information of each parking lot.
[0183] The first determining unit is used to determine the service weight transfer information and service weight transfer information of each parking lot as the service weight transfer information of each parking lot.
[0184] Optionally, the third generation unit includes: a second determining unit, a third acquiring unit, and a fifth generation unit;
[0185] The second determining unit is used to determine the transfer preference information of each parking lot based on the initial service weight of each parking lot and the distance information; wherein, the transfer preference information of each parking lot includes the transfer preference value of the parking lot to each of the other parking lots respectively;
[0186] The third acquisition unit is used to acquire the parking transfer probability corresponding to each parking lot; wherein, the parking transfer probability is the probability that the cruise vehicle will be transferred from the parking lot to another parking lot when the parking spaces of the parking lot are full.
[0187] The fifth generation unit is used to generate service weight transfer information for each parking lot based on the transfer preference information of each parking lot and the parking transfer probability corresponding to each parking lot.
[0188] Optionally, the second clustering unit includes: a third determining unit, a fourth determining unit, and a fifth determining unit; the third determining unit is used to determine at least one central node parking lot and at least one non-central node parking lot in the plurality of parking lots based on the service weight transfer-out information and service weight transfer-in information of each parking lot.
[0189] The fourth determining unit is used to determine the sub-node parking lots under each of the central node parking lots based on the service weight transfer information of each of the non-central node parking lots.
[0190] The fifth determining unit is used to determine, for any one of the central node parking lots, the central node parking lot and the corresponding sub-node parking lots as a parking lot set, thereby obtaining the at least one parking lot set.
[0191] Optionally, the service weight transfer information of each parking lot includes the amount of service weight transferred out by the parking lot to each of the other parking lots, and the service weight transfer information of each parking lot includes the amount of service weight transferred in by the parking lot to each of the other parking lots.
[0192] The third determining unit includes: a sixth determining unit, a seventh determining unit, and an eighth determining unit;
[0193] The sixth determining unit is used to determine the total amount of service weight transferred out and the total amount of service weight transferred in for each parking lot based on the service weight transfer out information and service weight transfer in information for each parking lot.
[0194] The seventh determining unit is used to determine each parking lot whose total service weight transfer-out amount is greater than the total service weight transfer-in amount as a central node parking lot.
[0195] The eighth determining unit is used to determine each parking lot whose total service weight transfer-out amount is not greater than the total service weight transfer-in amount as a non-central node parking lot.
[0196] Optionally, the fourth determining unit includes: a ninth determining unit and a sub-node determining unit;
[0197] The ninth determining unit is used for the service weight transfer information of any of the non-central node parking lots: based on the service weight transfer information of the non-central node parking lots, determining the maximum service weight transfer amount of the non-central node parking lot, and determining the parking lot corresponding to the maximum service weight transfer amount as the parent node parking lot of the non-central node parking lot.
[0198] The child node determination unit is used to determine the child node parking lots under each of the central node parking lots based on the parent node parking lots of each of the non-central node parking lots.
[0199] Optionally, the service capability information includes: service area area, number of parking spaces and / or parking price; the first generation unit 702 is used to generate an initial service weight value for each parking lot in the multiple parking lots using the service area area, number of parking spaces and / or parking price of the multiple parking lots.
[0200] Optionally, the second acquisition unit 704 includes: a quantity determination unit and a fourth acquisition unit;
[0201] The quantity determination unit is used to determine the quantity of the at least one parking lot set;
[0202] The fourth acquisition unit is used to acquire the parking prediction model whose number of models is the number of the set; the first training unit 705 includes: a corresponding unit and a second training unit.
[0203] The corresponding unit is used to correspond each of the parking prediction models to each of the parking sets in the at least one parking set;
[0204] The second training unit is used to train the corresponding parking prediction model based on each of the at least one parking lot set.
[0205] The model training device proposed in this invention can cluster parking lots within a target area based on their initial service weights and distance information, obtaining at least one parking lot set. This parking lot set is then used to train the parking prediction model. This invention effectively considers the correlation between parking service capabilities and distances among parking lots within the target area, clustering them to obtain at least one parking lot set. This improves the accuracy of parking lot clustering, ensuring the parking prediction model's accuracy in predicting parking data within the corresponding area during subsequent training based on the parking lot set.
[0206] This invention also provides a computer device having the above-described features. Figure 7 The model training device shown.
[0207] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 8 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.
[0208] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0209] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0210] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0211] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0212] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0213] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0214] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A model training method, characterized in that, The method includes: Obtain service capacity information and distance information of multiple parking lots within a target area, wherein the distance information includes the distance between each pair of parking lots; Using the service capacity information of the multiple parking lots, an initial service weight value for each parking lot among the multiple parking lots is generated; Based on the initial service weight of each parking lot and the distance information, the multiple parking lots are clustered to obtain at least one parking lot set. Obtain at least one parking prediction model to be trained; For any of the parking prediction models, the parking prediction model is trained based on at least one of the parking lot sets; The method involves clustering the multiple parking lots based on the initial service weights of each parking lot and the distance information to obtain at least one parking lot set, including: Based on the initial service weight of each parking lot and the distance information, service weight transfer information for each parking lot is generated. Based on the service weight transfer information of each parking lot, the multiple parking lots are clustered to obtain the at least one set of parking lots; The step of generating service weight transfer information for each parking lot based on the initial service weight value of each parking lot and the distance information includes: Based on the initial service weight of each parking lot and the distance information, service weight transfer information for each parking lot is generated. Based on the service weight transfer-out information of each parking lot, service weight transfer-in information of each parking lot is generated; The service weight transfer information and service weight transfer information of each parking lot are respectively determined as the service weight transfer information of each parking lot. The step of clustering the multiple parking lots according to the service weight transfer information of each parking lot to obtain the at least one set of parking lots includes: Among the multiple parking lots, at least one central node parking lot and at least one non-central node parking lot are determined based on the service weight transfer-out information and service weight transfer-in information of each parking lot. Based on the service weight transfer information of each non-central node parking lot, the sub-node parking lots under each central node parking lot are determined. For any of the central node parking lots, the central node parking lot and the corresponding child node parking lots are determined as a parking lot set, thus obtaining the at least one parking lot set.
2. The method according to claim 1, characterized in that, The step of generating service weight transfer information for each parking lot based on the initial service weight value of each parking lot and the distance information includes: Based on the initial service weight of each parking lot and the distance information, the transfer preference information of each parking lot is determined; wherein, the transfer preference information of each parking lot includes the transfer preference value of each parking lot to each of the other parking lots; Obtain the parking transfer probability corresponding to each parking lot; wherein, the parking transfer probability is the probability that the cruise vehicle will be transferred from the parking lot to another parking lot when the parking spaces of the parking lot are full; Based on the transfer preference information of each parking lot and the corresponding parking transfer probability of each parking lot, service weight transfer information of each parking lot is generated.
3. The method according to claim 1, characterized in that, The service weight transfer information for each parking lot includes the amount of service weight transferred out by the parking lot to each of the other parking lots, and the service weight transfer information for each parking lot includes the amount of service weight transferred in by the parking lot to each of the other parking lots. The step of determining at least one central node parking lot and at least one non-central node parking lot based on the service weight transfer-out information and service weight transfer-in information of each parking lot includes: Based on the service weight transfer-out information and service weight transfer-in information of each parking lot, determine the total service weight transfer-out amount and the total service weight transfer-in amount of each parking lot; Each parking lot whose total service weight transfer-out amount is greater than the total service weight transfer-in amount is identified as a central node parking lot. Each parking lot whose total service weight transfer-out amount is not greater than the total service weight transfer-in amount is identified as a non-central node parking lot.
4. The method according to claim 3, characterized in that, The process of determining the sub-node parking lots under each of the central node parking lots based on the service weight transfer information of each of the non-central node parking lots includes: For any of the service weight transfer information of the non-central node parking lot: Based on the service weight transfer information of the non-central node parking lot, determine the maximum service weight transfer amount of the non-central node parking lot, and determine the parking lot corresponding to the maximum service weight transfer amount as the parent node parking lot of the non-central node parking lot. Based on the parent parking lot of each non-central node parking lot, determine the child parking lots under each central node parking lot.
5. The method according to claim 1, characterized in that, The service capacity information includes: service area area, number of parking spaces and / or parking price; The step of generating an initial service weight value for each parking lot among the multiple parking lots using the service capacity information of the multiple parking lots includes: Using the service area, number of parking spaces, and / or parking price of the multiple parking lots, an initial service weight value for each parking lot among the multiple parking lots is generated.
6. The method according to claim 1, characterized in that, The process of obtaining at least one parking prediction model to be trained includes: Determine the number of sets in the at least one parking lot set; Obtain the parking prediction models whose number of models is equal to the number of models in the set; The step of training the parking prediction model based on at least one set of parking lots for any of the aforementioned parking prediction models includes: Each of the parking prediction models is mapped one-to-one with each of the parking sets in the at least one parking set; The corresponding parking prediction model is trained based on each of the at least one set of parking lots.
7. A model training device, characterized in that, include: The system comprises a first acquisition unit, a first generation unit, a first clustering unit, a second acquisition unit, and a first training unit; The first acquisition unit is used to acquire service capacity information and distance information of multiple parking lots within the target area, wherein the distance information includes the distance between each pair of parking lots; The first generation unit is used to generate an initial service weight value for each parking lot in the plurality of parking lots using the service capacity information of the plurality of parking lots; The first clustering unit is used to cluster the multiple parking lots based on the initial service weight of each parking lot and the distance information to obtain at least one parking lot set. The second acquisition unit is used to acquire at least one parking prediction model to be trained; The first training unit is used to train any of the parking prediction models based on at least one of the parking lot sets. The first generation unit includes: a second generation unit and a second clustering unit; The second generation unit is used to generate service weight transfer information for each parking lot based on the initial service weight value of each parking lot and the distance information; The second clustering unit is used to cluster the multiple parking lots according to the service weight transfer information of each parking lot to obtain the at least one parking lot set; The second generation unit includes: a third generation unit, a fourth generation unit, and a first determination unit; The third generation unit is used to generate service weight transfer information for each parking lot based on the initial service weight of each parking lot and the distance information. The fourth generation unit is used to generate service weight transfer-in information for each parking lot based on the service weight transfer-out information of each parking lot. The first determining unit is used to determine the service weight transfer information and service weight transfer information of each parking lot as the service weight transfer information of each parking lot. The second clustering unit includes: a third determining unit, a fourth determining unit, and a fifth determining unit; the third determining unit is used to determine at least one central node parking lot and at least one non-central node parking lot in the plurality of parking lots based on the service weight transfer-out information and service weight transfer-in information of each parking lot. The fourth determining unit is used to determine the sub-node parking lots under each of the central node parking lots based on the service weight transfer information of each of the non-central node parking lots. The fifth determining unit is used to determine, for any one of the central node parking lots, the central node parking lot and the corresponding sub-node parking lots as a parking lot set, thereby obtaining the at least one parking lot set.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the model training method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the model training method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Parking lot service area determination method, device and equipment and storage medium
CN111445075A
Communication network load prediction method and device and server
CN112308345A