Vehicle recommendation method, device, equipment and storage medium based on collaborative filtering
Through a collaborative filtering method, the parking characteristics of vehicles and the cargo characteristic weights, combined with the similarity matrix and the frequency of enterprise vehicle use, the problem of poor vehicle recommendation results in the logistics information platform is solved, and more efficient vehicle recommendations are achieved.
Patent Information
- Application Number
- CN202111589891.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In the vehicle recommendation of existing logistics information platform, the driver's real-time location does not represent his or her intention to carry, resulting in poor recommendation results.
Using a vehicle recommendation method based on collaborative filtering, the docking feature weight and cargo feature weight are calculated through the vehicle's enterprise docking data and historical vehicle use data. Combined with the similarity matrix and enterprise vehicle use frequency, the weighted average weight of the vehicle is calculated, and the high-to-high weight is carried out. Low sort recommended vehicles.
The success rate of vehicle recommendations is improved, the spatial correlation and cargo correlation between vehicles and enterprises are taken into account, and the accuracy and success rate of recommendations are enhanced.
Smart Images

Figure CN114564655B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent recommendation technology, and in particular to a vehicle recommendation method, device, equipment and storage medium based on collaborative filtering. Background Art
[0002] In recent years, with the rapid development of the logistics industry, the overall freight volume has been increasing year by year. In reality, the road transport industry still faces the problem of low efficiency. The transportation department continues to promote the construction of logistics information platform, providing an Internet channel for publishing freight demand and selecting potential carrier vehicles from a large number of logistics vehicles according to demand and recommending them to the demand side.
[0003] Logistics vehicle recommendation is a core issue faced by logistics information platforms. Currently, logistics information platforms recommend potential transport vehicles to enterprises through relatively traditional methods. In the existing technology, real-time positioning and dispatching are generally used, but the real-time location of the driver does not represent his or her transport intention. Therefore, the recommendation effect of the existing method is not good. Summary of the invention
[0004] The embodiments of the present application provide a vehicle recommendation method, apparatus, device and storage medium based on collaborative filtering. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0005] In a first aspect, an embodiment of the present application provides a vehicle recommendation method based on collaborative filtering, comprising:
[0006] According to the company parking data of the vehicle and the historical vehicle usage data of the company to be recommended, the parking feature weight of the vehicle is obtained;
[0007] The cargo feature weight of the vehicle is obtained based on the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended;
[0008] Calculate the weighted average weight of the vehicle based on the docking feature weight and the cargo feature weight;
[0009] The vehicles are sorted from high to low according to their weighted average weights, and a preset number of vehicles at the top are recommended to the enterprise.
[0010] In an optional embodiment, the parking feature weight of the vehicle is obtained according to the parking data of the vehicle and the historical vehicle usage data of the enterprise to be recommended, including:
[0011] Constructing a vehicle's parking feature vector based on the frequency of the vehicle's parking at an enterprise within a preset time period;
[0012] Calculate the similarity between vehicles according to the parking feature vectors of the vehicles to obtain a first similarity matrix;
[0013] The historical vehicle usage vector of the enterprise to be recommended is obtained according to the ratio of the vehicle usage frequency of the enterprise to be recommended to the total usage frequency of the historical vehicles of the enterprise to be recommended;
[0014] The parking feature weight of the vehicle is calculated according to the first similarity matrix and the historical vehicle usage vector of the enterprise to be recommended.
[0015] In an optional embodiment, similarities between vehicles are calculated based on the parking feature vectors of the vehicles to obtain a first similarity matrix, including:
[0016] Obtain location information and vehicle use time information of the enterprise to be recommended;
[0017] Filter out the vehicles to be recommended based on location information and vehicle usage time information;
[0018] The similarity between the vehicle to be recommended and any vehicle is calculated according to the parking feature vector of the vehicle to obtain a first similarity matrix.
[0019] In an optional embodiment, the cargo feature weight of the vehicle is obtained according to the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended, including:
[0020] The cargo label weight of the vehicle is obtained according to the frequency of the vehicle's stops at enterprises within a preset time period and the cargo labels corresponding to the stopped enterprises, and the cargo feature vector of the vehicle is constructed according to the cargo label weight;
[0021] Calculate the similarity between vehicles according to the cargo feature vectors of the vehicles to obtain a second similarity matrix;
[0022] The historical cargo vector of the enterprise to be recommended is obtained according to the ratio of the cargo label weight of the vehicle to be recommended to the total cargo label weight of the historical vehicles used by the enterprise to be recommended;
[0023] The cargo feature weight of the vehicle is calculated according to the second similarity matrix and the historical cargo vector of the enterprise to be recommended.
[0024] In an optional embodiment, the cargo label weight of the vehicle is obtained according to the frequency of the vehicle stopping at enterprises within a preset time period and the cargo labels corresponding to the stopped enterprises, and the cargo feature vector of the vehicle is constructed according to the cargo label weight, including:
[0025] The cargo label weight of the vehicle is calculated according to the following formula:
[0026]
[0027] Among them, t j represents the weight of the cargo label j, m i represents the number of cargo label categories corresponding to enterprise i, p i represents the frequency of vehicle stops at enterprise i, w ij represents the weight of the goods label j in enterprise i, and n represents the number of enterprises;
[0028] Construct the vehicle's cargo feature vector based on the weight of each cargo label:
[0029]
[0030] Among them, v i =[t1……t z ]; z represents the number of cargo label categories.
[0031] In an optional embodiment, the similarity between vehicles is calculated based on the cargo feature vectors of the vehicles to obtain a second similarity matrix, including:
[0032] Obtain location information and vehicle use time information of the enterprise to be recommended;
[0033] Filter out the vehicles to be recommended based on location information and vehicle usage time information;
[0034] The similarity between the vehicle to be recommended and any vehicle is calculated according to the cargo feature vector of the vehicle to obtain a second similarity matrix.
[0035] In an optional embodiment, the weighted average weight of the vehicle is calculated according to the parking feature weight and the cargo feature weight, including:
[0036] The weighted average weight of the vehicle is calculated according to the following formula:
[0037] w=a·w e ′+b·W′ c
[0038] Among them, w represents the weighted average weight of the vehicle, w e ′ represents the normalized docking feature weight, w c ′ represents the normalized cargo feature weight, and a and b represent the preset weight coefficients respectively.
[0039] In a second aspect, an embodiment of the present application provides a vehicle recommendation device based on collaborative filtering, comprising:
[0040] The parking weight calculation module is used to obtain the parking feature weight of the vehicle according to the enterprise parking data of the vehicle and the historical vehicle usage data of the enterprise to be recommended;
[0041] The cargo weight calculation module is used to obtain the cargo feature weight of the vehicle based on the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended;
[0042] The weighted average module is used to calculate the weighted average weight of the vehicle according to the stop feature weight and the cargo feature weight;
[0043] The combined recommendation module is used to sort the vehicles from high to low according to their weighted average weights, and recommend a preset number of vehicles at the top to the enterprise.
[0044] In a third aspect, an embodiment of the present application provides a vehicle recommendation device based on collaborative filtering, including a processor and a memory storing program instructions, wherein the processor is configured to execute the vehicle recommendation method based on collaborative filtering provided in the above embodiment when executing the program instructions.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having computer-readable instructions stored thereon, and the computer-readable instructions are executed by a processor to implement a vehicle recommendation method based on collaborative filtering provided in the above embodiment.
[0046] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0047] According to the collaborative filtering-based vehicle recommendation method provided in the embodiment of the present application, the enterprise vehicle search problem is converted into a vehicle recommendation problem. The enterprise parking feature weight of the vehicle is obtained based on the spatial association between the vehicle's historical trajectory data and the enterprise's fence data, and the vehicle's cargo feature weight is obtained based on the cargo features corresponding to the parked enterprise. Combined recommendations are made based on the vehicle's parking feature weight and cargo feature weight. At the same time, the spatial association between the vehicle to be recommended and the enterprise and the cargo association are taken into account, which greatly improves the success rate of the recommendation.
[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0050] Figure 1 is a flowchart of a vehicle recommendation method based on collaborative filtering according to an exemplary embodiment;
[0051] Figure 2 is a flowchart of a vehicle recommendation method based on collaborative filtering according to an exemplary embodiment;
[0052] Figure 3 is a schematic diagram showing the stop frequency of a vehicle enterprise according to an exemplary embodiment;
[0053] Figure 4 is a schematic diagram showing a vehicle and enterprise cargo label according to an exemplary embodiment;
[0054] Figure 5 is a structural schematic diagram of a vehicle recommendation device based on collaborative filtering according to an exemplary embodiment;
[0055] Figure 6 is a structural schematic diagram of a vehicle recommendation device based on collaborative filtering according to an exemplary embodiment;
[0056] Figure 7 It is a schematic diagram of a computer storage medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
[0058] It should be clear that 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are only examples of systems and methods consistent with some aspects of the present invention as detailed in the attached claims.
[0060] The following will describe in detail the vehicle recommendation method based on collaborative filtering provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 1 , the method specifically includes the following steps.
[0061] S101 obtains the parking feature weight of the vehicle according to the company parking data of the vehicle and the historical vehicle usage data of the company to be recommended.
[0062] In a possible implementation, before executing step S101, the electronic fence of the enterprise is constructed. First, the electronic fences of enterprises related to cargo transportation such as logistics enterprises, factories, and mining areas are obtained, and then the vector space is constructed to obtain the fence ID, cargo type, fence shape, and administrative district of each enterprise.
[0063] Furthermore, the trajectory data of the vehicle in a preset time period is obtained, and the stop frequency of each vehicle at each enterprise fence in the preset time period is counted according to the trajectory data of the vehicle. The stop feature vector of the vehicle is constructed according to the stop frequency of the vehicle in the enterprise in the preset time period.
[0064] Figure 3 is a schematic diagram showing the stop frequency of a vehicle enterprise according to an exemplary embodiment. Figure 3 As shown, the stop frequency of a certain vehicle in Enterprise A is 3, the stop frequency in Enterprise B is 7, the stop frequency in Enterprise C is 6, the stop frequency in Enterprise D is 2, the stop frequency in Enterprise E is 5, and the stop frequency in Enterprise F is 0.
[0065] Therefore, the total number of vehicles can be represented as a sparse matrix V E :
[0066] v i =[f i1 … … f ik ]
[0067] In which, each row vector v i is the parking feature vector of vehicle i, f ij represents the stop frequency of vehicle i in enterprise j, and k is the total number of enterprises.
[0068] Furthermore, the similarity between vehicles is calculated based on the parking feature vectors of the vehicles, and the similarity of the enterprises where the vehicles park is determined to obtain a first similarity matrix.
[0069] First, calculate the enterprise vector similarity matrix of all vehicles:
[0070]
[0071] Among them, any element s ij Indicates vehicle v i With vehicle v j The cosine similarity of .
[0072] Furthermore, the location information and vehicle usage time information of the enterprise to be recommended are obtained, the vehicles to be recommended are screened out according to the location information and vehicle usage time information, and the similarity between the vehicle to be recommended and any vehicle is calculated according to the parking feature vector of the vehicle to obtain a first similarity matrix.
[0073] The vehicles that meet the constraints are selected according to the time and space conditions as the vehicles to be recommended, that is, the vehicles that appear in a certain geographical range within a given time interval, forming the first similarity matrix:
[0074]
[0075] Among them, S e is an m*n dimensional matrix, where m is the number of vehicles to be recommended and n is the total number of vehicles. Therefore, any element s ij The meaning is the vehicle to be recommended v i With any vehicle v j The similarity.
[0076] Furthermore, the historical vehicle usage vector of the enterprise to be recommended is obtained according to the ratio of the vehicle usage frequency of the enterprise to be recommended to the total vehicle usage frequency of the enterprise to be recommended. The vehicle usage frequency of the enterprise is the parking frequency of the vehicle at the enterprise.
[0077] r e =[r1 … … r n ]
[0078] Among them, the element r j Indicates the enterprise's vehicle v j Frequency of use f j The ratio of the total usage frequency N of all vehicles ever used by the enterprise.
[0079] Furthermore, the parking feature weight of the vehicle is calculated based on the first similarity matrix and the historical vehicle usage vector of the enterprise to be recommended.
[0080] In a possible implementation, the parking feature weight of the vehicle may be calculated according to the following formula:
[0081] w e =S e ·r e T
[0082] Among them, w e represents the parking feature weight of the vehicle, S e represents the first similarity matrix, r e Represents the historical vehicle vector of the enterprise to be recommended.
[0083] The final calculation result w e It can be represented as a vector:
[0084] w e =[w1 … … w m ] T ;
[0085] Among them, w i is the parking feature weight of any vehicle to be recommended, m is the number of vehicles to be recommended, and the parking feature weight calculation method of the vehicle can be derived as follows:
[0086]
[0087] Where, N is the total frequency of use of the vehicles of the enterprise to be recommended, f j For the recommended enterprise used vehicles v j Frequency of use, s ij The vehicle to be recommended is v i With the previous vehicle v j The similarity.
[0088] By analyzing the stop frequency between the vehicle and all enterprises, we can get the enterprises where the vehicle frequently stops, and then get the vehicle's transportation route. Then we calculate the similarity between the stop enterprise vectors of all vehicles, and get the vehicle's stop feature weight based on the similarity matrix and the historical vehicle usage information of the enterprise to be recommended.
[0089] S102 obtains the cargo feature weight of the vehicle based on the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended.
[0090] Due to the asymmetry of vehicle source information and cargo source information, vehicles in a region may have a small circle phenomenon, that is, some vehicles only go to limited enterprises to load cargo, resulting in the inability to reuse vehicles between circles. In order to solve this problem, this application proposes a similarity calculation method based on cargo adaptability.
[0091] Firstly, the cargo label weight of the vehicle is obtained according to the frequency of the vehicle's stops at enterprises within a preset time period and the cargo labels corresponding to the stopped enterprises, and the cargo feature vector of the vehicle is constructed according to the cargo label weight.
[0092] Figure 4 is a schematic diagram showing a vehicle and a corporate cargo label according to an exemplary embodiment. Figure 4 As shown, the vehicle stops at enterprise A 3 times, and the cargo label in enterprise A is X; the vehicle stops at enterprise B 7 times, and the cargo label in enterprise B is Y; the vehicle stops at enterprise C 6 times, and the cargo labels in enterprise C are X and Y.
[0093] Then, the target vehicle’s enterprise stop frequency is aggregated by cargo label. Figure 3 As shown in the figure, the label weight of Goods X is 6 after aggregation, because the stop frequency in Enterprise A is 3, plus half of the stop frequency 6 in Enterprise C, the final weight is 6. The label weight of Goods Y is 12.5, and the label weight corresponding to Goods Z is 4.5.
[0094] In one possible implementation, the cargo label weight of the vehicle is calculated according to the following formula:
[0095]
[0096] Among them, t j represents the weight of the cargo label j, mi represents the number of cargo label categories corresponding to enterprise i, p i represents the frequency of vehicle stops at enterprise i, w ij represents the weight of the goods label j in enterprise i, and n represents the number of enterprises.
[0097] Furthermore, the cargo feature vector of the vehicle is constructed according to the weight of each cargo label:
[0098]
[0099] Among them, v i =[t1……t z ]; z represents the number of cargo label categories.
[0100] Furthermore, the similarity between vehicles is calculated based on the cargo feature vectors of the vehicles to obtain a second similarity matrix. Specifically, the location information and vehicle use time information of the enterprise to be recommended are obtained, the vehicle to be recommended is screened out based on the location information and vehicle use time information, and the similarity between the vehicle to be recommended and any vehicle is calculated based on the cargo feature vectors of the vehicles to obtain a second similarity matrix.
[0101]
[0102] Among them, S e is an m*n dimensional matrix, where m is the number of vehicles to be recommended and n is the total number of vehicles. Therefore, any element s ij The meaning is the vehicle to be recommended v i With any vehicle v j The similarity.
[0103] Furthermore, the historical cargo vector of the enterprise to be recommended is obtained according to the ratio of the cargo label weight of the vehicle of the enterprise to be recommended to the total cargo label weight of the historical vehicles used by the enterprise to be recommended.
[0104] r c =[r1 … … r n ]
[0105] Among them, the element r j Indicates vehicle v j The cargo label weight t j The ratio of the weight of the cargo labels to the sum of the weights of all vehicles ever used by the enterprise.
[0106] Furthermore, the cargo feature weight of the vehicle is calculated based on the second similarity matrix and the historical cargo vector of the enterprise to be recommended.
[0107] In a possible implementation, the cargo feature weight of a vehicle may be calculated according to the following formula:
[0108] w c=S c ·r c T
[0109] Among them, w c represents the cargo feature weight of the vehicle, S c represents the second similarity matrix, r c Represents the historical goods vector of the enterprise to be recommended.
[0110] The final calculation result w c It can be represented as a vector:
[0111] w c =[w1 … … w m ] T ;
[0112] According to this step, the cargo feature weight of the vehicle can be further analyzed based on the cargo label corresponding to the enterprise where the vehicle stops.
[0113] S103 calculates the weighted average weight of the vehicle according to the parking feature weight and the cargo feature weight.
[0114] In a possible implementation, the weights of the two vehicles to be recommended are normalized and weighted summed to generate the final weight calculation result:
[0115] w=a·w e ′+b·W′ c
[0116] Among them, w represents the weighted average weight of the vehicle, w e ′ represents the normalized docking feature weight, w c ' represents the normalized cargo feature weight, and a and b represent the preset weight coefficients respectively. The embodiment of the present application does not specifically limit the values of the weight coefficients a and b, which can be set according to actual conditions. For example, if a recommended enterprise wants to find a vehicle that transports the same cargo, it can set the coefficient of the cargo feature weight higher, or if it wants to find a vehicle with the same transportation route, it can set the coefficient of the stop feature weight higher.
[0117] By taking a weighted average of the two weights, a more accurate vehicle weight can be obtained, thereby improving the accuracy of recommendations.
[0118] S104 sorts the vehicles from high to low according to their weighted average weights, and recommends a preset number of vehicles at the top to the enterprise.
[0119] In a possible implementation, after obtaining the weighted average weight of the vehicles, the vehicles are sorted from high to low according to the weighted average weight of the vehicles, and a preset number of vehicles in the front are recommended to the enterprise. For example, the front 20% of the vehicles are recommended to the enterprise, or the front 50% of the vehicles are recommended to the enterprise. This embodiment of the application does not make specific limitations and can be set according to actual needs.
[0120] In order to facilitate understanding of the vehicle recommendation method based on collaborative filtering provided in the embodiment of the present application, Figure 2 For explanation. Figure 2 As shown, the method includes the following steps.
[0121] First, construct the electronic fence of the enterprise. First, obtain the electronic fences of enterprises related to cargo transportation such as logistics enterprises, factories, and mining areas, then construct the vector space and obtain the fence ID, cargo type, fence shape, and administrative district of each enterprise.
[0122] Furthermore, the parking frequency of the vehicle in all enterprises is counted, and the parking feature vector of the vehicle is constructed according to the parking frequency of the enterprise in the preset time period of the vehicle. The similarity between the vehicles is calculated according to the parking feature vector of the vehicle to obtain the first similarity matrix. The historical vehicle vector of the recommended enterprise is obtained according to the ratio of the frequency of use of the vehicle by the recommended enterprise to the total frequency of use of the historical vehicle of the recommended enterprise; the parking feature weight of the vehicle is calculated according to the first similarity matrix and the historical vehicle vector of the recommended enterprise.
[0123] Furthermore, the cargo label weight of the vehicle is obtained according to the frequency of the vehicle's stops at enterprises within a preset time period and the cargo labels corresponding to the stopped enterprises, and the cargo feature vector of the vehicle is constructed according to the cargo label weight; the similarity between vehicles is calculated according to the cargo feature vectors of the vehicles to obtain a second similarity matrix; the historical cargo vector of the enterprise to be recommended is obtained according to the ratio of the cargo label weight of the vehicle by the enterprise to be recommended to the total cargo label weight of the historical vehicles used by the enterprise to be recommended; the cargo feature weight of the vehicle is calculated according to the second similarity matrix and the historical cargo vector of the enterprise to be recommended.
[0124] The weighted average weight of the vehicles is calculated based on the parking feature weight and the cargo feature weight, and the vehicles are combined and recommended based on the weighted average weight. A preset number of vehicles with higher weighted average weights are recommended to the enterprise.
[0125] According to the collaborative filtering-based vehicle recommendation method provided in the embodiment of the present application, the enterprise vehicle search problem is converted into a vehicle recommendation problem. The enterprise parking feature weight of the vehicle is obtained based on the spatial association between the vehicle's historical trajectory data and the enterprise's fence data, and the vehicle's cargo feature weight is obtained based on the cargo features corresponding to the parked enterprise. Combined recommendations are made based on the vehicle's parking feature weight and cargo feature weight. At the same time, the spatial association between the vehicle to be recommended and the enterprise and the cargo association are taken into account, which greatly improves the success rate of the recommendation.
[0126] The embodiment of the present application also provides a vehicle recommendation device based on collaborative filtering, which is used to execute the vehicle recommendation method based on collaborative filtering in the above embodiment, such as Figure 5 As shown, the device comprises:
[0127] The parking weight calculation module 501 is used to obtain the parking feature weight of the vehicle according to the enterprise parking data of the vehicle and the historical vehicle usage data of the enterprise to be recommended;
[0128] The cargo weight calculation module 502 is used to obtain the cargo feature weight of the vehicle according to the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended;
[0129] The weighted average module 503 is used to calculate the weighted average weight of the vehicle according to the parking feature weight and the cargo feature weight;
[0130] The combination recommendation module 504 is used to sort the vehicles from high to low according to the weighted average weights of the vehicles, and recommend a preset number of vehicles at the top to the enterprise.
[0131] It should be noted that the collaborative filtering-based vehicle recommendation device provided in the above embodiment only uses the division of the above functional modules as an example when executing the collaborative filtering-based vehicle recommendation method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the collaborative filtering-based vehicle recommendation device provided in the above embodiment and the collaborative filtering-based vehicle recommendation method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0132] An embodiment of the present application also provides an electronic device corresponding to the vehicle recommendation method based on collaborative filtering provided in the aforementioned embodiment, so as to execute the aforementioned vehicle recommendation method based on collaborative filtering.
[0133] Please refer to Figure 6 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 6As shown, the electronic device includes: a processor 600, a memory 601, a bus 602 and a communication interface 603, and the processor 600, the communication interface 603 and the memory 601 are connected via the bus 602; the memory 601 stores a computer program that can be run on the processor 600, and when the processor 600 runs the computer program, it executes the vehicle recommendation method based on collaborative filtering provided in any of the aforementioned embodiments of the present application.
[0134] The memory 601 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 603 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0135] The bus 602 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 601 is used to store programs, and the processor 600 executes the programs after receiving the execution instructions. The vehicle recommendation method based on collaborative filtering disclosed in any of the embodiments of the present application may be applied to the processor 600, or implemented by the processor 600.
[0136] The processor 600 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 600. The above processor 600 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 601, and the processor 600 reads the information in the memory 601 and completes the steps of the above method in combination with its hardware.
[0137] The electronic device provided in the embodiment of the present application and the vehicle recommendation method based on collaborative filtering provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0138] The present application also provides a computer-readable storage medium corresponding to the vehicle recommendation method based on collaborative filtering provided in the above embodiment. Figure 7 The computer-readable storage medium shown is a CD 700 on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the vehicle recommendation method based on collaborative filtering provided in any of the aforementioned embodiments will be executed.
[0139] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0140] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the vehicle recommendation method based on collaborative filtering provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application program stored therein.
[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0142] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A vehicle recommendation method based on collaborative filtering, characterized in that: include: The parking feature weight of the vehicle is obtained according to the company parking data of the vehicle and the historical vehicle usage data of the company to be recommended; including: constructing a parking feature vector of the vehicle according to the company parking frequency of the vehicle within a preset time period; calculating the similarity between vehicles according to the parking feature vector of the vehicle to obtain a first similarity matrix; obtaining a historical vehicle usage vector of the company to be recommended according to the ratio of the frequency of use of the vehicle by the company to be recommended to the total frequency of use of the historical vehicles of the company to be recommended; calculating the parking feature weight of the vehicle according to the first similarity matrix and the historical vehicle usage vector of the company to be recommended; Obtaining the cargo feature weight of the vehicle according to the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle usage data of the enterprise to be recommended; including: obtaining the cargo label weight of the vehicle according to the frequency of the vehicle stopping at the enterprise within a preset time period and the cargo label corresponding to the stopped enterprise, and constructing the cargo feature vector of the vehicle according to the cargo label weight; calculating the similarity between vehicles according to the cargo feature vectors of the vehicles to obtain a second similarity matrix; obtaining the historical cargo vector of the enterprise to be recommended according to the ratio of the cargo label weight of the vehicle by the enterprise to be recommended and the total cargo label weight of the historical vehicles used by the enterprise to be recommended; calculating the cargo feature weight of the vehicle according to the second similarity matrix and the historical cargo vector of the enterprise to be recommended; Calculating a weighted average weight of the vehicle according to the parking feature weight and the cargo feature weight; The vehicles are sorted from high to low according to their weighted average weights, and a preset number of vehicles at the top are recommended to the enterprise.
2. The method according to claim 1, characterized in that: The similarity between vehicles is calculated according to the parking feature vectors of the vehicles to obtain a first similarity matrix, including: Obtain location information and vehicle use time information of the enterprise to be recommended; Filter out the vehicle to be recommended according to the location information and the vehicle use time information; The similarity between the vehicle to be recommended and any vehicle is calculated according to the parking feature vector of the vehicle to obtain a first similarity matrix.
3. The method according to claim 1, characterized in that: The cargo label weight of the vehicle is obtained according to the frequency of the vehicle's stops at enterprises within a preset time period and the cargo labels corresponding to the stopped enterprises, and the cargo feature vector of the vehicle is constructed according to the cargo label weight, including: The cargo label weight of the vehicle is calculated according to the following formula: Among them, t j represents the weight of the cargo label j, m i represents the number of cargo label categories corresponding to enterprise i, p i represents the frequency of vehicle stops at enterprise i, w ij represents the weight of the goods label j in enterprise i, and n represents the number of enterprises; Construct the vehicle's cargo feature vector based on the weight of each cargo label: Among them, v i =[t1 … t z ]; z represents the number of cargo label categories.
4. The method according to claim 1, characterized in that: The similarity between vehicles is calculated based on the cargo feature vectors of the vehicles to obtain a second similarity matrix, including: Obtain location information and vehicle use time information of the enterprise to be recommended; Filter out the vehicle to be recommended according to the location information and the vehicle use time information; The similarity between the vehicle to be recommended and any vehicle is calculated according to the cargo feature vector of the vehicle to obtain a second similarity matrix.
5. The method according to claim 1, characterized in that The weighted average weight of the vehicle is calculated according to the parking feature weight and the cargo feature weight, including: The weighted average weight of the vehicle is calculated according to the following formula: W=a·w′ e +b·w′ c Where w represents the weighted average weight of the vehicle, w′ e represents the normalized docking feature weight, w′ c It represents the normalized cargo feature weight, and a and b represent the preset weight coefficients respectively.
6. A vehicle recommendation device based on collaborative filtering, characterized in that: include: The parking weight calculation module is used to obtain the parking feature weight of the vehicle according to the company parking data of the vehicle and the historical vehicle usage data of the company to be recommended; including: constructing the parking feature vector of the vehicle according to the company parking frequency of the vehicle within a preset time period; calculating the similarity between vehicles according to the parking feature vector of the vehicle to obtain a first similarity matrix; obtaining the historical vehicle usage vector of the company to be recommended according to the ratio of the frequency of use of the vehicle by the company to be recommended to the total frequency of use of the historical vehicles of the company to be recommended; calculating the parking feature weight of the vehicle according to the first similarity matrix and the historical vehicle usage vector of the company to be recommended; The cargo weight calculation module is used to obtain the cargo feature weight of the vehicle according to the cargo data corresponding to the enterprise where the vehicle stops and the historical vehicle use data of the enterprise to be recommended; including: obtaining the cargo label weight of the vehicle according to the frequency of the enterprise stops within a preset time period of the vehicle and the cargo label corresponding to the stopped enterprise, and constructing the cargo feature vector of the vehicle according to the cargo label weight; calculating the similarity between vehicles according to the cargo feature vectors of the vehicles to obtain a second similarity matrix; obtaining the historical cargo vector of the enterprise to be recommended according to the ratio of the cargo label weight of the vehicle by the enterprise to be recommended and the total cargo label weight of the historical vehicles used by the enterprise to be recommended; calculating the cargo feature weight of the vehicle according to the second similarity matrix and the historical cargo vector of the enterprise to be recommended; A weighted average module, used to calculate the weighted average weight of the vehicle according to the parking feature weight and the cargo feature weight; The combined recommendation module is used to sort the vehicles from high to low according to their weighted average weights, and recommend a preset number of vehicles at the top to the enterprise.
7. A vehicle recommendation device based on collaborative filtering, characterized in that: The invention comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the vehicle recommendation method based on collaborative filtering as claimed in any one of claims 1 to 5 when executing the program instructions.
8. A computer-readable medium, characterized in that Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by a processor to implement a vehicle recommendation method based on collaborative filtering as claimed in any one of claims 1 to 5.
