A scenic spot reservation data accurate pushing method and system
By constructing a push cursor database and a retransmission mechanism, the problem of lost and failed scenic spot reservation data during the upload process was solved, achieving accurate push and distribution of reservation data and improving the accuracy of reservation data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING TOURISM CLOUD INFORMATION TECH CO LTD
- Filing Date
- 2023-02-07
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, when multiple cultural and tourism scenic spots share a single reservation platform system, the server's interface has limitations on data volume and request frequency, which leads to the loss or failure of reservation data during the upload process. This results in low accuracy of the reservation data pushed to the server, failing to accurately reflect the actual reservation situation of the scenic spot, and thus failing to achieve effective traffic diversion.
By constructing a push cursor database, obtaining scenic spot reservation data, matching the push cursor set and start cursor, filtering out data that failed to upload, re-uploading it, and pushing the re-uploaded data and normal data packets to the server, a sound re-upload mechanism is established.
This system ensures that scenic area reservation data is accurately pushed to the server for aggregation, resolving issues of data loss and upload failures, improving the accuracy of reservation data, ensuring the true reflection of scenic area reservation data, and achieving effective traffic diversion.
Smart Images

Figure CN116167466B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a method and system for accurately pushing scenic spot reservation data. Background Technology
[0002] In recent years, with the improvement of the national economic level, the tourism industry has been booming. Especially during major holidays, the number of tourists increases significantly, often causing scenic spots to accept more tourists than they can handle, resulting in overcrowding. This not only greatly affects the tourist experience but can also lead to safety accidents. Therefore, to avoid this situation, major scenic spots have launched reservation services in recent years. By making reservations, people can choose their travel destinations based on the current availability of reservations, thus achieving a diversion effect.
[0003] However, in the current technology, multiple cultural and tourism scenic spots share a single reservation platform system. When pushing reservation data, issues such as server limitations on the amount of data and the frequency of interface requests cause data loss or partial upload failures during the upload process. This results in low accuracy of the reservation data pushed to the server, making it impossible for the server to accurately reflect the actual reservation situation of the scenic spots and thus failing to achieve the desired reservation distribution effect. Summary of the Invention
[0004] This application provides a method and system for accurately pushing scenic area reservation data. It solves the problem that existing technologies suffer from data loss or partial upload failures during the upload process due to server limitations on interface data volume and request frequency. This results in inaccurate reservation data pushed to the server, making it difficult for the server-aggregated reservation data to accurately reflect the actual number of reservations at the scenic area. By establishing a robust and reliable retransmission mechanism, the application achieves the technical goal of accurately pushing scenic area reservation data to the server for aggregation.
[0005] In view of the above problems, this application provides a method and system for accurately pushing scenic spot reservation data.
[0006] Firstly, this application provides a method for accurately pushing scenic spot reservation data, wherein the method includes: acquiring scenic spot reservation data; constructing a push cursor database, wherein each preset reservation data in the push cursor database carries a corresponding push cursor set and a start cursor; inputting the scenic spot reservation data into the push cursor database to query whether there is a previously recorded push cursor; if there is no previously recorded push cursor, it is determined as an initial upload, and the start cursor that should be uploaded this time is set to 0; if the data of the push cursor has a previously recorded push cursor set, the maximum value of multiple cursors is obtained, one scenic spot resource corresponds to one push cursor, and the cursor records... The key is the scenic area resource code. The maximum value of the cursor is considered as the starting cursor that should have been uploaded this time. The scenic area reservation data is input into the push cursor database for matching to obtain the corresponding push cursor set and the starting cursor. Based on the push cursor set and the corresponding starting cursor, scenic area cursor information that has failed to upload and needs to be re-uploaded is filtered out. The set of records that should be uploaded normally is obtained, and the set of records is traversed and encapsulated to obtain the data packet to be uploaded. The scenic area cursor information and the starting cursor are encapsulated to obtain the re-uploaded data set information. The data to be re-uploaded is re-uploaded to the server according to the re-uploaded data set information, and then the data packet to be uploaded is pushed to the server.
[0007] Secondly, this application provides a scenic area reservation data accurate push system, wherein the system includes: a scenic area reservation data acquisition unit for acquiring scenic area reservation data; a push cursor database construction unit for constructing a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor; a scenic area reservation data input unit for inputting the scenic area reservation data into the push cursor database for matching, and obtaining the corresponding push cursor set and the start cursor; a scenic area cursor information filtering unit for filtering out scenic area cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor; a data packet to be uploaded acquisition unit for acquiring a set of records that should normally be uploaded, and traversing and encapsulating the set of records to obtain a data packet to be uploaded; a data packet to be re-uploaded data set information acquisition unit for encapsulating the scenic area cursor information with the start cursor to obtain data packet to be re-uploaded data set information; and a data upload unit for re-uploading the data that should be re-uploaded based on the data packet to be re-uploaded data set information, and then pushing the data packet to be uploaded to the server.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0009] The process involves: acquiring scenic area reservation data; constructing a push cursor database, where each preset reservation data in the push cursor database carries a corresponding push cursor set and a start cursor; inputting the scenic area reservation data into the push cursor database for matching to obtain the corresponding push cursor set and start cursor; filtering out scenic area cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor; obtaining the set of records that should be uploaded normally, and traversing and encapsulating the set of records to obtain the data packet to be uploaded; encapsulating the scenic area cursor information with the start cursor to obtain the re-upload data set information; re-uploading the data according to the re-upload data set information, and then pushing the data packet to be uploaded to the server. This invention addresses the technical problem of data loss or partial upload failure during the upload process of existing technologies for pushing reservation data. This is caused by server limitations on the amount of data pushed to the interface and restrictions on the frequency of interface requests. As a result, the reservation data pushed to the server is not accurate, and the aggregated reservation data of the scenic spot cannot accurately reflect the current reservation situation of the scenic spot, thus failing to achieve the effect of reservation diversion. By establishing a sound and reliable retransmission mechanism, the technical effect of accurately pushing the reservation data of the scenic spot to the server for aggregation is achieved.
[0010] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a method for accurately pushing reservation data to scenic spots, as described in this application.
[0013] Figure 2 This is a schematic diagram illustrating the process of updating the push cursor database in the method for accurately pushing scenic spot reservation data according to this application;
[0014] Figure 3 This is a flowchart illustrating the process of determining the first tourist route in the method for accurately pushing scenic spot reservation data according to this application.
[0015] Figure 4 This is a flowchart illustrating the process of determining the corresponding first tourist route based on the basic feature information in the method for accurately pushing scenic spot reservation data according to this application.
[0016] Figure 5 This is a flowchart illustrating the construction of a decision tree model for a method of accurately pushing scenic spot reservation data according to this application.
[0017] Figure 6 This is a schematic diagram of the structure of a scenic spot reservation data accurate push system according to this application.
[0018] Explanation of reference numerals in the attached diagram: 11-Scenic area reservation data acquisition unit, 12-Push cursor database construction unit, 13-Scenic area reservation data input unit, 14-Scenic area cursor information filtering unit, 15-Data packet to be uploaded acquisition unit, 16-Supplementary data set information acquisition unit, 17-Data upload unit. Detailed Implementation
[0019] This application provides a method and system for accurately pushing scenic area reservation data. It solves the problem that existing technologies suffer from data loss or partial upload failures during the reservation data push process due to server limitations on interface data volume and request frequency. This results in low accuracy of the pushed reservation data to the server, making the server-aggregated scenic area reservation data inaccurate and failing to reflect the actual reservation situation, thus failing to achieve the desired reservation distribution effect. By establishing a robust and reliable retransmission mechanism, the application achieves the technical goal of accurately pushing scenic area reservation data to the server for aggregation.
[0020] Application Overview
[0021] In recent years, with the improvement of the national economic level, the tourism industry has been booming. Especially during major holidays, the number of tourists increases significantly, often causing scenic spots to accept more tourists than they can handle, resulting in overcrowding. This not only greatly affects the tourist experience but can also lead to safety accidents. Therefore, to avoid this situation, major scenic spots have launched reservation services in recent years. By making reservations, people can choose their travel destinations based on the current availability of reservations, thus achieving a diversion effect.
[0022] However, in the current technology, multiple cultural and tourism scenic spots share a single reservation platform system. When pushing reservation data, issues such as server limitations on the amount of data and the frequency of interface requests cause data loss or partial upload failures during the upload process. This results in low accuracy of the reservation data pushed to the server, making it impossible for the server to accurately reflect the actual reservation situation of the scenic spots and thus failing to achieve the desired reservation distribution effect.
[0023] To address the aforementioned technical problems, the overall approach of the technical solution provided in this application is as follows:
[0024] This application provides a method and system for accurately pushing scenic spot reservation data. The method includes: acquiring scenic spot reservation data; constructing a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor; inputting the scenic spot reservation data into the push cursor database for matching to obtain the corresponding push cursor set and the start cursor; filtering out scenic spot cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor; acquiring a set of records that should be uploaded normally, and traversing and encapsulating the set of records to obtain the data packet to be uploaded; encapsulating the scenic spot cursor information with the start cursor to obtain the re-uploaded data set information; re-uploading the data that should be re-uploaded based on the re-uploaded data set information, and then pushing the data packet to be uploaded to the server.
[0025] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0026] Example 1
[0027] As shown in Figure 1, this application provides a method for accurately pushing scenic spot reservation data, wherein the method includes:
[0028] S100: Obtain scenic area reservation data;
[0029] Specifically, there are several ways to obtain scenic spot reservation data. It can be done by scanning a QR code image containing scenic spot reservation information, and the first user obtains the scenic spot reservation data by filling in the scenic spot reservation information. Alternatively, it can be done by receiving scenic spot reservation data sent by the first user through communication. It should be noted that scenic spot reservation data is data used to represent the tourism reservation status of the scenic spot. It can include famous attractions of the scenic spot, the number of people currently making reservations, the identity information of each person making reservations, and / or the reservation time, etc. This is a refinement for the purpose of understanding the steps and does not specifically limit the scenic spot reservation data.
[0030] S200: Construct a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor;
[0031] Specifically, each of the pre-set reservation data sets has a corresponding push cursor set scenicLastIdCursor and a start cursor maxLastId, which correspond to each other, further improving the feasibility and accuracy of the method. At the same time, the settings of the push cursor set scenicLastIdCursor and the start cursor maxLastId can be set according to the actual situation, and are not specifically limited here.
[0032] S300: Input the scenic spot reservation data into the push cursor database for matching, and obtain the corresponding push cursor set and the start cursor;
[0033] Specifically, this method uses xxljob timed task scheduling. When the task starts, the scenic spot reservation data is input into the push cursor database to query whether there is a previously recorded push cursor. If there is no previously recorded push cursor, it is determined to be an initial upload. Let the start cursor maxLastId of this upload be 0. If the push cursor data has a set of previously recorded push cursors scenicLastIdCursor, the maximum value of multiple cursors is obtained. It should be noted that one scenic spot resource corresponds to one cursor, and the key of the cursor record is the scenic spot resource code. The maximum value is regarded as the start cursor maxLastId of this upload.
[0034] S400: Based on the set of push cursors and the corresponding start cursor, filter out the scenic area cursor information that has failed to upload and needs to be re-uploaded;
[0035] Specifically, based on the previously recorded set of push cursors, scenicLastIdCursor, and the starting cursor, maxLastId, which has the largest cursor value from the previous record, the scenic area cursor information lastFailCursor that has failed to upload and needs to be re-uploaded is filtered out. It should be noted that scenicLastIdCursor is a set whose values are not equal to maxLastId.
[0036] S500: Obtain the set of records that should be uploaded normally, and iterate through and encapsulate the set of records to obtain the data packet that should be uploaded;
[0037] Specifically, the process involves obtaining the record set `recordList` that should have been uploaded for this task. It should be noted that the reserved records with an ID greater than the starting cursor `maxLastId` are excluded from the upload. The number of records can be limited according to the requirements of the collection interface, and no specific limit is set here. At the same time, the process involves iterating through and encapsulating the record set `recordList->needUploadRecordList` that should have been uploaded, thereby obtaining the data packet that should be uploaded.
[0038] S600: Encapsulate the scenic area cursor information with the start cursor to obtain the supplementary data set information;
[0039] Specifically, the lastFailCursor information of the scenic area cursor that needs to be re-transmitted and the maxLastId information of the starting cursor that should have been uploaded this time are encapsulated into a re-transmitted data set information -> retryList of data to be re-transmitted. The re-transmitted data set information is used to represent the data to be re-transmitted. The server can re-transmit the data to be re-transmitted according to the re-transmitted data set information. Through the re-transmission mechanism, it is ensured that the reservation data of scenic area resources can be correctly pushed to the server, thus improving the feasibility of the method.
[0040] S700: Based on the supplementary data set information, supplement the data to be supplemented to the server, and then push the data packet to be uploaded to the server.
[0041] Specifically, the retryList of data to be retransmitted needs to be retransmitted in segments according to the data volume limit of the collection interface. Of course, other methods can also be used for retransmission. It should be noted that this is a detailed breakdown of the steps and is not a specific limitation.
[0042] Specifically, in this embodiment, the method uses xxljob timed task scheduling. When the task starts, the program queries the push cursor database to see if there is a push cursor corresponding to the last recorded reservation data of the scenic area resource. The push cursor database is preferably a Redis database. If there is no record of the last push cursor, it is determined to be an initial upload. Let the start cursor maxLastId of this upload be 0. If the Redis database has the push cursor set scenicLastIdCursor of the last record, the maximum value of multiple cursors (i.e., one cursor for each scenic area resource, and the key of the cursor record is the scenic area resource code) is obtained and regarded as the start cursor maxLastId of this upload. Then, based on the obtained push cursor set scenicLastIdCursor of the last record and the start cursor maxLastId of the last maximum cursor value, the scenic area cursor information lastFailCursor that has failed to upload and needs to be re-uploaded is filtered out. It should be noted that the values in the push cursor set scenicLastIdCursor are not equal. The process begins by retrieving the set of records whose starting cursor value is `maxLastId`. Next, it retrieves the `recordList` set of records that should have been uploaded in this task. Note that records with an ID greater than `maxLastId` are considered (ignoring previously failed uploads). The record quantity limit can be freely set according to the requirements of the data collection interface. Then, iterates through and encapsulates the `recordList->needUploadRecordList` set of records that should have been uploaded, obtaining the `needUploadRecordList` data package to be uploaded. Before pushing the `recordList` set of records that should have been uploaded, it encapsulates the required supplementary data set information (`lastFailCursor`) and the `maxLastId` set of records that should have been uploaded in this task (`retryList`). The `retryList` data package is then supplemented, requiring segmented supplementation based on the data volume limit of the data collection interface. Finally, the `needUploadRecordList` data package is pushed. This invention addresses the technical problem of data loss or partial upload failure during the upload process of existing technologies for pushing reservation data. This is caused by server limitations on the amount of data pushed to the interface and restrictions on the frequency of interface requests. As a result, the reservation data pushed to the server is not accurate, and the aggregated reservation data of the scenic spot cannot accurately reflect the current reservation situation of the scenic spot, thus failing to achieve the effect of reservation diversion. By establishing a sound and reliable retransmission mechanism, the technical effect of accurately pushing the reservation data of the scenic spot to the server for aggregation is achieved.
[0043] Furthermore, the push cursor database is specifically a Redis database, which further enhances the feasibility of the solution.
[0044] Furthermore, the method also includes updating the push cursor database based on the data packet to be uploaded and the data to be supplemented. That is, after each successful data push, the starting cursor in the Redis database is written back, including during each supplementary transmission, the starting cursor of the scenic spot reservation data for the corresponding cultural and tourism resources is also written back, so as to serve as a basis for judgment in the next push.
[0045] Furthermore, such as Figure 2 As shown, the step of updating the push cursor database based on the data packet to be uploaded and the data to be supplemented includes:
[0046] S810: After the push is completed, record the push index set index[] for each scenic spot resource;
[0047] S820: Get the maximum index value in the push index set, maxIndex = max(index[]);
[0048] S830: Push the set that should be pushed this time (index>maxIndex)->data[] based on the maximum index value maxIndex;
[0049] S840: Calculate the retry_data[] that should be retransmitted this time based on the push index set index[] and the maximum index value maxIndex (maxIndex>index>index[]);
[0050] S850: Push the retry_data[] data that should be retransmitted in segments, and then push the data[] set that should be pushed;
[0051] S860: Update the push index set index[].
[0052] Specifically, in this example, the following steps are taken: after each push, record the push index set index[] for each scenic resource; obtain the maximum index value maxIndex=max(index[]) in the previous push index set; push the set to be pushed this time (index>maxIndex)->data[] based on maxIndex; calculate the data to be re-transmitted this time retry_data[] based on index[] and maxIndex (maxIndex>index>index[]); push the retry_data[] data in segments, and then push data[]; update index[], and repeat the above steps for the next push. This approach further improves the feasibility of the method, enables timely updates to the push cursor database, further improves the calculation speed, and ensures that the reservation data of scenic resources can be correctly pushed to the server.
[0053] Furthermore, as shown in Figure 3, the method also includes:
[0054] S910: The server extracts basic characteristic information of the user from the data to be supplemented and the data to be uploaded, wherein the basic characteristic information includes at least one of the user's occupation information, age information and preference information;
[0055] Specifically, the basic characteristic information can be one or more of the user's occupation information, age information, and preference information. Of course, the basic characteristic information can also include the user's gender, number of companions, etc. The more types of characteristic information there are, the more comprehensively and diversely the user's characteristics can be reflected from multiple dimensions, providing a basis for determining the subsequent travel route.
[0056] S920: Input the basic feature information into the pre-trained feature classification model, and determine the corresponding first tourist route based on the basic feature information.
[0057] Specifically, although some scenic spots have limited the number of reservations, achieving a diversion effect, overcrowding still exists. This is mainly because neither the scenic spots nor the tourists plan their routes, instead simply following the crowds, leading to overcrowding at some attractions. Therefore, to address this issue, this embodiment categorizes tourists into multiple groups. This is achieved by using historical data on tourist routes favored by different types of tourists as training data, and classifying tourists based on one or more of their occupation, age, and preferences. The basic feature information is then input into a feature classification model, and the two are matched to determine the optimal tourist route, which becomes the first tourist route. This not only solves the problem of overcrowding caused by many tourists choosing the same route but also allows tourists to select the best route based on their individual needs, improving their overall tourist experience.
[0058] Furthermore, as shown in Figure 4, step 920 includes:
[0059] S921: Based on preset sample reservation features, extract sample feature values corresponding to the preset sample reservation features from the preset sample reservation data;
[0060] Specifically, the preset sample reservation data can be historical data of the user, which can be the user's own data or data from other similar users. For example, taking the user's age information as an example, users can be divided into teenagers, young adults, and middle-aged and elderly people. It should be noted that this is a refinement of the steps and is not specifically limited here. Therefore, if the person making the reservation is a teenager, when obtaining sample data, if the person making the reservation is a new tourist to the scenic spot, then sample reservation data can be obtained from the historical data of other teenagers of the same type. If the teenager has visited the scenic spot before, then sample reservation data can be obtained from the historical data of that teenager. At the same time, in this embodiment, the preset sample reservation features correspond to the basic feature information, including at least one of the user's occupation information, age information, and preference information. These preset sample reservation features can be determined based on experience values or trained based on historical data, and this specification does not specifically limit them. There are many types of preset sample reservation features, which can extract sample feature values from sample reservation data from multiple dimensions, and more comprehensively and diversely reflect the sample data.
[0061] S922: Construct a decision tree model. Based on the sample labels determined for the preset sample reservation data and the sample feature values, construct multiple decision trees using a sampling method with replacement. In the multiple decision trees, any branch path represents a tourist route.
[0062] Specifically, when determining sample labels for the preset sample reservation data, this can be achieved by using labels carried by the training data provided by the scenic area. Specifically, the scenic area provides tagged training data; when acquiring sample reservation data, the labels carried by the sample reservation data can be acquired simultaneously, and the label carried by each sample reservation data can be determined as the sample label for that sample reservation data. Therefore, the sample reservation data and sample labels provided by the scenic area can be used directly, which is closer to the tourism needs of tourists.
[0063] S923: Input the basic feature information into the decision tree model, select the tourist route corresponding to the branch path that satisfies the basic feature information from the multiple branch paths of the multiple decision trees as the first tourist route, and recommend it to the user.
[0064] Specifically, among the multiple branch paths of multiple decision trees obtained by constructing decision trees, positive labels represent user expectations. Therefore, a travel route corresponding to at least one score path that satisfies the user can be selected from the branch paths corresponding to multiple positive labels as the first travel route. Optionally, when selecting the travel route corresponding to the branch path that satisfies the user from the multiple branch paths of the multiple decision trees as the first travel route of the scenic area, it can be specifically executed as follows: selecting the empowerment strategy corresponding to the branch path whose classification result reaches the accuracy threshold and / or coverage threshold from the multiple branch paths of the multiple decision trees as the marketing empowerment strategy for the target merchant.
[0065] Furthermore, such as Figure 5 As shown, step 922 includes:
[0066] S924: Based on the sample labels and sample feature values determined for the sample reservation data, and the standard critical conditions corresponding to the sample feature values in the current decision tree model, construct an original decision tree;
[0067] S925: According to a preset sampling strategy, sample the sample feature values contained in the original decision tree, and construct multiple sampling decision trees based on the sample feature values obtained from the sampling, the sample labels, and the standard critical conditions corresponding to the sample feature values obtained from the sampling in the current decision tree model.
[0068] Specifically, in each decision tree, each branch will eventually hit a label, which is labeled according to the sample reservation data.
[0069] Furthermore, the method for determining the sample labels for the preset sample reservation data specifically involves: determining sample labels for the preset sample reservation data based on the labels carried by the training data provided by the scenic area. Specifically, the scenic area provides training data with labels; when acquiring sample reservation data, the labels carried by the sample reservation data can be acquired simultaneously, and the label carried by each sample reservation data can be determined as the sample label for that sample reservation data. Thus, the sample reservation data and sample labels provided by the scenic area can be used directly, better meeting tourists' travel needs.
[0070] In summary, the method for accurately pushing scenic spot reservation data provided in this application has the following technical effects:
[0071] 1. The process involves acquiring scenic area reservation data; constructing a push cursor database, where each preset reservation data in the push cursor database carries a corresponding push cursor set and a start cursor; inputting the scenic area reservation data into the push cursor database for matching to obtain the corresponding push cursor set and start cursor; filtering out scenic area cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor; obtaining the set of records that should be uploaded normally, and traversing and encapsulating the record set to obtain the data packet to be uploaded; encapsulating the scenic area cursor information with the start cursor to obtain the re-uploaded data set information; re-uploading the data according to the re-uploaded data set information, and then pushing the data packet to be uploaded to the server. This invention addresses the technical problem of data loss or partial upload failure during the upload process of existing technologies for pushing reservation data. This is caused by server limitations on the amount of data pushed to the interface and restrictions on the frequency of interface requests. As a result, the reservation data pushed to the server is not accurate, and the aggregated reservation data of the scenic spot cannot accurately reflect the current reservation situation of the scenic spot, thus failing to achieve the effect of reservation diversion. By establishing a sound and reliable retransmission mechanism, the technical effect of accurately pushing the reservation data of the scenic spot to the server for aggregation is achieved.
[0072] 2. By adopting the method of recording the push index set index[] for each scenic resource after push; obtaining the maximum index value maxIndex=max(index[]) in the push index set; pushing out the set (index>maxIndex)->data[] that should be pushed this time based on the maximum index value maxIndex; calculating (maxIndex>index>index[]) the data retry_data[] that should be retransmitted this time based on the push index set index[] and the maximum index value maxIndex; pushing the data retry_data[] that should be retransmitted in segments, and then pushing the set data[] that should be pushed; updating the push index set index[], the feasibility of the method is further improved, and the push cursor database can be updated in a timely manner, which further improves the speed of operation, and also ensures that the reservation data of scenic resources can be pushed to the server correctly.
[0073] 3. The system employs a server to extract basic user characteristic information from the data to be supplemented and the data to be uploaded. This basic characteristic information includes at least one of the user's occupation, age, and preferences. The basic characteristic information is then input into a pre-trained feature classification model to determine the corresponding first tourist route. This addresses the problem that while some scenic spots have limited the number of reservations, achieving a diversion effect, some attractions still experience overcrowding due to a lack of planned routes by both the scenic spot and the tourists, resulting in crowds at certain attractions. The system allows tourists to choose the optimal route based on their individual needs, thus improving their overall tourist experience.
[0074] 4. The method employs several steps: first, extracting sample feature values corresponding to preset sample reservation features from preset sample reservation data; constructing a decision tree model based on sample labels determined for the preset sample reservation data and the sample feature values; building multiple decision trees using sampling with replacement, where any branch path in the multiple decision trees represents a tourist route; inputting the basic feature information into the decision tree model; and selecting the tourist route corresponding to the branch path satisfying the basic feature information from the multiple branch paths of the multiple decision trees as the first tourist route, which is then recommended to the user. This further enhances the feasibility of the method.
[0075] Example 2
[0076] Based on the same inventive concept as the method for accurately pushing scenic spot reservation data in the foregoing embodiments, as shown in Figure 6, this application provides a system for accurately pushing scenic spot reservation data, wherein the system includes:
[0077] Scenic spot reservation data acquisition unit 11 is used to acquire scenic spot reservation data;
[0078] Push cursor database construction unit 12 is used to construct a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor;
[0079] The scenic area reservation data input unit 13 is used to input the scenic area reservation data into the push cursor database for matching, and obtain the corresponding push cursor set and the start cursor.
[0080] The scenic area cursor information filtering unit 14 is used to filter out scenic area cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor;
[0081] The upload data packet acquisition unit 15 is used to acquire the set of records that should be uploaded normally, and to traverse and encapsulate the set of records to obtain the upload data packet.
[0082] The supplementary data set information acquisition unit 16 is used to encapsulate the scenic area cursor information with the start cursor to obtain the supplementary data set information;
[0083] The data upload unit 17 is used to upload the data to be uploaded according to the data upload data set information, and then push the data packet to be uploaded to the server.
[0084] Furthermore, the system also includes:
[0085] The data update unit is used to update the push cursor database according to the data packet to be uploaded and the data to be supplemented.
[0086] Furthermore, the data update unit includes:
[0087] The index set push unit is used to record the push index set index[] for each scenic resource after it is pushed;
[0088] The maximum index value acquisition unit is used to acquire the maximum index value maxIndex=max(index[]) in the push index set;
[0089] The maximum index value push unit is used to push the set (index>maxIndex)->data[] that should be pushed this time based on the maximum index value maxIndex;
[0090] The calculation unit is used to calculate (maxIndex>index>index[]) the data retry_data[] that should be retransmitted this time based on the push index set index[] and the maximum index value maxIndex;
[0091] The segmented push unit is used to push the retry_data[] data that should be retransmitted in segments, and then push the set data[] that should be pushed.
[0092] The push index set update unit is used to update the push index set index[].
[0093] Furthermore, the system also includes:
[0094] The basic feature information extraction unit is used by the server to extract the user's basic feature information from the data to be supplemented and the data to be uploaded. The basic feature information includes at least one of the user's occupation information, age information, and preference information.
[0095] The first tourist route determination unit is used to input the basic feature information into a pre-trained feature classification model and determine the corresponding first tourist route based on the basic feature information.
[0096] Furthermore, the first tourist route determination unit includes:
[0097] The sample reservation data extraction unit is used to extract sample feature values corresponding to the preset sample reservation features from the preset sample reservation data according to the preset sample reservation features;
[0098] The decision tree model building unit is used to build a decision tree model. Based on the sample labels determined for the preset sample reservation data and the sample feature values, multiple decision trees are built using a sampling method with replacement. In the multiple decision trees, any branch path represents a tourist route.
[0099] The first travel route output unit is used to input the basic feature information into the decision tree model, select the travel route corresponding to the branch path that satisfies the basic feature information from the multiple branch paths of the multiple decision trees as the first travel route, and recommend it to the user.
[0100] Furthermore, the decision tree model construction unit includes:
[0101] The original decision tree construction unit is used to construct an original decision tree based on the sample labels and sample feature values determined for the sample reservation data, as well as the standard critical conditions corresponding to the sample feature values in the current decision tree model.
[0102] The sampling decision tree construction unit is used to sample from the sample feature values contained in the original decision tree according to a preset sampling strategy, and construct multiple sampling decision trees based on the sample feature values and the sample labels, as well as the standard critical conditions corresponding to the sample feature values in the current decision tree model.
[0103] Those skilled in the art will understand that the various numerical designations, such as "first," "second," etc., used in this application are merely for descriptive convenience and are not intended to limit the scope of this application, nor do they indicate a chronological order. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one" refers to one or more. "At least two" refers to two or more. "At least one," "any one," or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0104] The various illustrative logic units and circuits described in this application may be implemented or operate the described functions using a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor may be a microprocessor, and optionally, it may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented using a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0105] The steps of the methods or algorithms described in this application can be directly embedded in hardware, a software unit executed by a processor, or a combination of both. The software unit can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium in the art.
[0106] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Thus, if such modifications and modifications fall within the scope of the claims and their equivalents, this application intends to include such modifications and modifications.
Claims
1. A method for accurately pushing scenic spot reservation data, characterized in that, include: Obtain scenic area reservation data; Construct a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor; The scenic spot reservation data is input into the push cursor database for matching, and the corresponding push cursor set and the start cursor are obtained. The scenic area reservation data is input into the push cursor database to query whether there is a push cursor that was previously recorded. If there is no record of the push cursor that was previously recorded, it is determined to be an initial upload. Let the starting cursor that should be uploaded this time be 0. If the data of the push cursor has a set of push cursors that were previously recorded, the maximum value of multiple cursors is obtained. One scenic area resource corresponds to one push cursor. The key of the cursor record is the scenic area resource code. The maximum value of the cursor is regarded as the starting cursor that should be uploaded this time. Based on the set of push cursors and the corresponding start cursor, filter out the scenic area cursor information that has failed to upload and needs to be re-uploaded; Obtain the set of records that should be uploaded normally, and iterate through and encapsulate the set of records to obtain the data packet that should be uploaded; The scenic area cursor information and the starting cursor are encapsulated to obtain the supplementary data set information; Based on the supplementary data set information, supplementary data to be supplemented is sent to the server, and then the data packet to be uploaded is pushed to the server.
2. The method for accurately pushing scenic spot reservation data according to claim 1, characterized in that, The push cursor database is specifically a Redis database.
3. The method for accurately pushing scenic spot reservation data according to claim 1, characterized in that, The method further includes updating the push cursor database based on the data packet to be uploaded and the data to be supplemented.
4. The method for accurately pushing scenic spot reservation data according to claim 3, characterized in that, The step of updating the push cursor database according to the data packet to be uploaded and the data to be supplemented includes: After the push is made, a set of push indexes for each scenic spot resource is recorded (index[]). Get the maximum index value in the push index set: maxIndex = max(index[]); Based on the maximum index value maxIndex, push the set that should be pushed this time (index>maxIndex)->data[]; The retry_data[] that should be retransmitted this time is calculated based on the push index set index[] and the maximum index value maxIndex (maxIndex>index>index[]); The data to be retransmitted is pushed in segments: retry_data[] data, and then the set of data[] data to be pushed is pushed. Update the push index set index[].
5. The method for accurately pushing scenic spot reservation data according to claim 1, characterized in that, Also includes: The server extracts basic user characteristic information from the data to be supplemented and the data to be uploaded. The basic characteristic information includes at least one of the user's occupation information, age information, and preference information. The basic feature information is input into a pre-trained feature classification model, and the corresponding first tourist route is determined based on the basic feature information.
6. The method for accurately pushing scenic spot reservation data according to claim 5, characterized in that, The step of inputting the basic feature information into a pre-trained feature classification model and determining the corresponding first tourist route based on the basic feature information includes: Based on preset sample reservation features, extract sample feature values corresponding to the preset sample reservation features from the preset sample reservation data; A decision tree model is constructed based on the sample labels determined for the preset sample reservation data and the sample feature values. Multiple decision trees are constructed using a sampling method with replacement, wherein any branch path in the multiple decision trees represents a tourist route. The basic feature information is input into the decision tree model. From the multiple branch paths of the multiple decision trees, the tourist route corresponding to the branch path that satisfies the basic feature information is selected as the first tourist route and recommended to the user.
7. The method for accurately pushing scenic spot reservation data according to claim 6, characterized in that, The steps for constructing the decision tree model include: Based on the sample labels and sample feature values determined for the sample reservation data, and the standard critical conditions corresponding to the sample feature values in the current decision tree model, an original decision tree is constructed. According to a preset sampling strategy, samples are drawn from the sample feature values contained in the original decision tree. Based on the sample feature values and the sample labels, as well as the standard critical conditions corresponding to the sample feature values in the current decision tree model, multiple sampling decision trees are constructed.
8. The method for accurately pushing scenic spot reservation data according to claim 6, characterized in that, The method for determining the sample labels for the preset sample reservation data is specifically as follows: Based on the tags carried by the training data provided by the scenic area, sample tags are determined for the preset sample reservation data.
9. A system for accurately pushing scenic area reservation data, characterized in that, The system includes: The scenic area reservation data acquisition unit is used to acquire scenic area reservation data. A push cursor database construction unit is used to construct a push cursor database, wherein each preset reservation data in the push cursor database has a corresponding push cursor set and a start cursor; The scenic area reservation data input unit is used to input the scenic area reservation data into the push cursor database for matching, and obtain the corresponding push cursor set and the start cursor; the scenic area reservation data is input into the push cursor database to query whether there is a push cursor that was previously recorded. If there is no record of the push cursor that was previously recorded, it is determined to be an initial upload. The start cursor that should have been uploaded this time is set to 0. If the data of the push cursor has a set of push cursors that were previously recorded, the maximum value of multiple cursors is obtained. One scenic area resource corresponds to one push cursor. The key of the cursor record is the scenic area resource code. The maximum value of the cursor is regarded as the start cursor that should have been uploaded this time. The scenic area cursor information filtering unit is used to filter out scenic area cursor information that has failed to upload and needs to be re-uploaded based on the push cursor set and the corresponding start cursor; The data packet acquisition unit is used to acquire the set of records that should be uploaded normally, and to traverse and encapsulate the set of records to obtain the data packet to be uploaded; The supplementary data set information acquisition unit is used to encapsulate the scenic area cursor information with the start cursor to obtain the supplementary data set information; The data upload unit is used to upload the data to be uploaded to the server according to the data upload data set information, and then push the data packet to be uploaded to the server.