Appertaining parking lots of public buildings provide a large proportion of parking supply in cities. However, these parking lots mainly serve the parking demands of public buildings, leading to a low utilization ratio of parking spaces. It is therefore required to implement a shared parking strategy for these parking lots. In this study, a parking space allocation method (PSAM) at the network level is proposed to allocate the parking demand to a parking lot and then the parking space. The users are divided into M-users (users of the buildings) and P-users (public users). The shared parking strategy is analyzed from the aspects of open window, parking fee, and ratio of reservation spaces. The users are allocated to a parking lot by a multinomial logit(MNL) model. Specifically, it is determined whether they can enter parking lot and which space they are allocated according to the specific rules. After all the users are allocated with a parking space, the rejection number of M-users, occupancy rate, and profits of each parking lot are collected and a NSGA-II (non-dominated sorting genetic algorithm II) algorithm is designed to determine the optimal strategy for each parking lot according to the above. Compared with the results of all-time all-space shared parking strategy, our method shows better performance in balancing the interests of all appertaining parking lots and protecting the interests of M-users while obtaining considerable profits for the parking lots.