Multi-demand library navigation system and method based on database
Technical Field
The invention relates to the field of library navigation, in particular to a multi-demand library navigation system and method based on a database.
Background
The library is a mechanism for collecting, arranging and collecting book data for people to read and reference, can provide the most complete learning conditions for the society and readers, and can improve the utilization rate of public resources, enrich the knowledge plane of people, widen the visual field of people and perfect the knowledge structure of people when people frequently read books in the library. With the rapid development of economy and the public library attached importance of the country, more and more libraries are built in various places. Although books inside the library are many, books inside some libraries are not complete, and not all libraries all have books that the borrower wants to read, when the borrower wants to borrow many books simultaneously in certain library and the urgent need borrow one of them, but this library lacks this book that this borrower urgent wants, has struck the confidence that the borrower borrowed books easily, and the borrower still need go to other libraries to borrow this book, reduces the efficiency of the book that borrows of borrower.
Disclosure of Invention
The invention aims to provide a multi-demand library navigation system and method based on a database, so as to solve the problems in the prior art.
In order to achieve the purpose, the invention provides the following technical scheme:
a multi-demand library navigation system based on a database comprises a library searching module, a library selecting module and a route generating module, wherein the library searching module is used for searching all libraries meeting position conditions and distance conditions, the library selecting module is used for determining an optimal library from all libraries searched by the library searching module, and the route generating module is used for generating a route to the optimal library on an electronic map.
In the technical scheme, the desideratum that the borrower needs to borrow books, the transportation selected by the borrower and the distance between the place where the library and the library are set out and the library are comprehensively considered, the best library is selected for the borrower, the route to the best library is generated, and the borrower can borrow the books which are desiderately wanted conveniently.
The library searching module comprises a position input module, a distance input module and a library searching module, the position input module is used for inputting the position of a starting place going to the best library, the distance input module is used for inputting the limit distance between the selected best library and the starting place, the library searching module is used for searching all libraries in the limit distance around the starting place, the library selecting module comprises a candidate library selecting module and a best library selecting module, the candidate library selecting module is used for screening out candidate libraries from the libraries searched by the library searching module, and the best library selecting module is used for taking out the best libraries from the candidate libraries.
The candidate library selection module comprises a library counting module, a book checking input module, a book checking search module, a book checking counting module, a first library sequencing module and a candidate library identification module, wherein the library counting module is used for counting the number of all libraries searched by the library searching module, the book checking input module is used for inputting the names of all books needing to be borrowed by a borrower, the book checking search module is used for searching all libraries searched by the library searching module for books needing to be borrowed, the book checking counting module is used for counting the number of books needing to be borrowed in each library searched by the library searching module, the first library sequencing module is used for sequencing all libraries searched by the library searching module according to the counting result of the book checking counting module, and the candidate library identification module is used for screening out candidate libraries according to the library counting module or the library sorting module.
The optimal library selection module comprises a book judgment module, a vehicle input module, a book urgency weight input module, a book collection evaluation value calculation module, a library second sequencing module, a distance acquisition module, a comprehensive evaluation value calculation module, a library third sequencing module and an optimal library identification module, wherein the book judgment module is used for judging whether a candidate library has all books to be checked, the vehicle input module is used for inputting a traffic group predicted by a borrower from a starting location to the optimal library, the book urgency weight input module is used for inputting the importance degree of the books to be borrowed, the book collection evaluation value calculation module is used for calculating the book collection evaluation value of the candidate library according to the input result of the book urgency weight input module, the library second sequencing module is used for sequencing the candidate library according to the calculation result of the book collection evaluation value calculation module, the distance acquisition module is used for acquiring the distance between the candidate library and the starting place, the comprehensive evaluation value calculation module is used for calculating the comprehensive evaluation value of the candidate library according to the distance acquired by the distance acquisition module and the book collection evaluation value calculated by the book collection evaluation value calculation module, the library third sequencing module is used for sequencing the candidate libraries according to the calculation result of the comprehensive evaluation value calculation module, and the optimal library identification module is used for selecting the optimal library according to the result of the book judgment module or the library second sequencing module or the library third sequencing module.
A multi-demand library navigation method based on a database comprises the following steps:
s1: searching a library;
s2: screening out candidate libraries;
s3: determining an optimal library;
s4: and generating a route map from the departure location to the best library on the electronic map.
The library navigation method further comprises the following steps:
s1: finding a library: inputting a starting place on an electronic map, searching all libraries with the starting place as a center and a distance less than or equal to a fixed value R (0< R < =30, the unit is kilometer) from the starting place by the electronic map, and recording the number of all searched libraries as M, wherein M is a natural number;
s2: screening out candidate libraries:
if the number M =0 of all searched libraries, returning to step S11;
if M < =3, all libraries searched out by default are candidate libraries;
if M is greater than 3, inputting books A1, A2, … and Am to be borrowed, wherein M is the number of books to be borrowed by a borrower, searching all searched libraries for books to be borrowed, counting the number n of books to be borrowed in each library, sequencing the numbers of books to be borrowed in each library from large to small, taking the three libraries in the first sequence as candidate libraries,
s3: determining an optimal library;
s4: and generating a route map from the departure location to the best library on the electronic map.
The determining the best library in the step S3 further includes:
searching books needing to be borrowed in all searched libraries, acquiring the number n of books having the books needing to be borrowed in each candidate library, if only n = m of one candidate library exists, the candidate library is the best library, and if n = m of a plurality of candidate libraries exists, the library closest to the place where the library is located is the best library
If n = m of the candidate library does not exist, the borrower selects the type of the vehicle and inputs the urgency weights B1, B2, … and Bm of the books A1, A2, … and Am needing to be borrowed, and B1+ B2+ … + Bm = 1.
The urgency weights corresponding to the books needing to be borrowed owned by each candidate library are respectively [ D11, D12, … and D1i ], [ D21, D22, … and D2g ], [ D21, D22, … and D2h ], i, g and h are respectively the number of books stored in each candidate library,
if the vehicle selected by the borrower is a fast travel vehicle, the book collection assessment values of each candidate library, E1= D11+ D12+ … + D1i, E2= D21+ D22+ … + D2g, E3= D31+ D32+ … + D3h,
sequencing the book collection evaluation values E1, E2 and E3 in a descending order, and taking the candidate library corresponding to the first sequenced library as the best library; when the borrower selects the fast travel vehicle, the borrower has more convenient traffic, so that the best library is directly selected according to the urgency of books borrowed by the borrower without considering the distance between the candidate library and the departure place.
If the transportation selected by the borrower is a slow-speed travel transportation, the distance L1, L2 and L3 between each candidate library and the departure place is respectively obtained, the comprehensive assessment value F1= a L1 =/100+ b (D11+ D12+ … + D1i), F2= a L2/100 + b (D21 + D22+ … + D2g), F3= a L1/100 + b (D31 + D32+ … + D3i) and a + b =1 are respectively calculated for each candidate library, when the borrower selects the slow-speed travel transportation, the transportation of the borrower is relatively inconvenient, and the distance between the candidate library and the departure place should be taken as a consideration factor for selecting the best library, so as to facilitate the book borrowing.
And sequencing the book collection evaluation values Fi, Fg and Fh in a descending order, and taking the candidate library corresponding to the first sequenced library as the best library.
The fast travel vehicle comprises a car, a bus and a motorcycle, the slow travel vehicle comprises an electric bicycle, a bicycle and a walking device, when the slow travel vehicle is the electric bicycle, the value of a is 0.08, and the value of b is 0.92; when the slow travel vehicle is a bicycle, the value of a is 0.11, and the value of b is 0.89; when the slow travel vehicle is an electric bicycle, the value of a is 0.17 and the value of b is 0.83.
Compared with the prior art, the invention has the beneficial effects that: according to the method and the system, the best library is selected for the borrower according to the urgency of the borrower needing to borrow the books, the transportation means selected by the borrower and the distance between the place where the library is placed and the library, so that the borrower can borrow the books urgently needed, the efficiency of the borrower for borrowing the books is improved, the confidence of the borrower for borrowing the books is improved, and the book reading of the whole people is promoted.
Drawings
FIG. 1 is a block diagram of a database-based multi-demand library navigation system according to the present invention;
FIG. 2 is a flow chart of a database-based multi-demand library navigation method according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, in an embodiment of the present invention, a database-based multi-demand library navigation system includes a library search module, a library selection module, and a route generation module, where the library search module is configured to search out all libraries that meet a location condition and a distance condition, the library selection module is configured to determine an optimal library from all libraries searched out by the library search module, and the route generation module is configured to generate a route to the optimal library on an electronic map.
The library searching module comprises a position input module, a distance input module and a library searching module, the position input module is used for inputting the position of a starting place going to the best library, the distance input module is used for inputting the limit distance between the selected best library and the starting place, the library searching module is used for searching all libraries in the limit distance around the starting place, the library selecting module comprises a candidate library selecting module and a best library selecting module, the candidate library selecting module is used for screening out candidate libraries from the libraries searched by the library searching module, and the best library selecting module is used for taking out the best libraries from the candidate libraries.
The candidate library selection module comprises a library counting module, a book checking input module, a book checking search module, a book checking counting module, a first library sequencing module and a candidate library identification module, wherein the library counting module is used for counting the number of all libraries searched by the library searching module, the book checking input module is used for inputting the names of all books needing to be borrowed by a borrower, the book checking search module is used for searching all libraries searched by the library searching module for books needing to be borrowed, the book checking counting module is used for counting the number of books needing to be borrowed in each library searched by the library searching module, the first library sequencing module is used for sequencing all libraries searched by the library searching module according to the counting result of the book checking counting module, and the candidate library identification module is used for screening out candidate libraries according to the library counting module or the library sorting module.
The optimal library selection module comprises a book judgment module, a vehicle input module, a book urgency weight input module, a book collection evaluation value calculation module, a library second sequencing module, a distance acquisition module, a comprehensive evaluation value calculation module, a library third sequencing module and an optimal library identification module, wherein the book judgment module is used for judging whether a candidate library has all books to be checked, the vehicle input module is used for inputting a traffic group predicted by a borrower from a starting location to the optimal library, the book urgency weight input module is used for inputting the importance degree of the books to be borrowed, the book collection evaluation value calculation module is used for calculating the book collection evaluation value of the candidate library according to the input result of the book urgency weight input module, the library second sequencing module is used for sequencing the candidate library according to the calculation result of the book collection evaluation value calculation module, the distance acquisition module is used for acquiring the distance between the candidate library and the starting place, the comprehensive evaluation value calculation module is used for calculating the comprehensive evaluation value of the candidate library according to the distance acquired by the distance acquisition module and the book collection evaluation value calculated by the book collection evaluation value calculation module, the library third sequencing module is used for sequencing the candidate libraries according to the calculation result of the comprehensive evaluation value calculation module, and the optimal library identification module is used for selecting the optimal library according to the result of the book judgment module or the library second sequencing module or the library third sequencing module.
A multi-demand library navigation method based on a database comprises the following steps:
s1: finding a library: inputting a starting place on an electronic map, searching all libraries with the starting place as a center and a distance less than or equal to a fixed value R (0< R < =30, the unit is kilometer) from the starting place by the electronic map, and recording the number of all searched libraries as M, wherein M is a natural number;
s2: screening out candidate libraries:
if the number M =0 of all searched libraries, returning to step S11;
if M < =3, all libraries searched out by default are candidate libraries;
if M >3, inputting books A1, A2, … and Am to be borrowed, wherein M is the number of books to be borrowed by the borrower,
searching books needing to be borrowed in all searched libraries, counting the number n of books needing to be borrowed in each library, sequencing the numbers of books needing to be borrowed in each library from large to small, and taking the three libraries before sequencing as candidate libraries
S3: determining the best library:
searching books needing to be borrowed in all searched libraries, acquiring the number n of books having the books needing to be borrowed in each candidate library, if only n = m of one candidate library exists, the candidate library is the best library, if n = m of a plurality of candidate libraries exists, the library closest to the place where the book leaves is the best library,
if n = m of the candidate library does not exist, the borrower selects the type of the vehicle and inputs the urgency weights B1, B2, …, Bm of the books a1, a2, …, Am to be borrowed, B1+ B2+ … + Bm =1, the vehicle includes fast-travel vehicles and slow-travel vehicles, the fast-travel vehicles include cars, buses and motorcycles, the slow-travel vehicles include electric bicycles, bicycles and walking,
the urgency weights corresponding to the books needing to be borrowed owned by each candidate library are respectively [ D11, D12, … and D1i ], [ D21, D22, … and D2g ], [ D21, D22, … and D2h ], i, g and h are respectively the number of books stored in each candidate library,
if the vehicle selected by the borrower is a fast travel vehicle, the book collection assessment values of each candidate library, E1= D11+ D12+ … + D1i, E2= D21+ D22+ … + D2g, E3= D31+ D32+ … + D3h,
sequencing the book collection evaluation values E1, E2 and E3 in a descending order, and taking the candidate library corresponding to the first sequenced library as the best library;
if the transportation selected by the borrower is slow-speed travel transportation, L1, L2 and L3 are respectively obtained for the distance between each candidate library and the departure location, F1= a L1 =/100+ b (D11+ D12+ … + D1i), F2= a L2/100 + b (D21 + D22+ … + D2g), F3= a L1/100 + b (D31 + D32+ … + D3i), a + b =1, when the slow-speed transportation is electric bicycle, a is 0.08, b is 0.92, when the slow-speed travel transportation is bicycle, a is 0.11, b is 0.89, when the slow-speed transportation is electric bicycle, a is 0.83, b is 0.17,
sequencing the book collection evaluation values Fi, Fg and Fh in a descending order, and taking the candidate library corresponding to the first sequenced library as the best library
S4: and generating a route map from the departure location to the best library on the electronic map.
Example (b):
s1: finding a library: inputting the departure location on the electronic map: the electronic map searches all libraries which take the Nanjing Changfu street subway station as the center and have a distance less than or equal to a fixed value of 2km from the starting place: the number of searched libraries is 3, and M is a natural number, wherein each library is a Nanjing library (1 km from a Nanjing Changfu street subway station), a Qinhuan library (1.8 km from the Nanjing Changfu street subway station), and a Nanjing medical university library (2 km from the Nanjing Changfu street subway station);
s2: screening out candidate libraries:
the number of all searched libraries is 3, so all the libraries searched by default are candidate libraries;
s3: determining the best library:
the names of the books needing to be borrowed are respectively 'Huanshan Zhuang' and 'David Kebofil' in 'fog City orph', the number of types of the books searched out from the library of Nanjing library, Qinhuai library and Nanjing medical university is equal to the number of types of the books needing to be borrowed, and the Nanjing library is the best library because the distance between the Nanjing library and the subway station in the usual house is nearest,
s4: and generating a route map from the Changfu street subway station to the Nanjing library on the electronic map.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.