Freight rate data verification method and system, computer program product and electronic equipment
By dynamically selecting the target rule verification order of freight search requests, the problem of inefficient freight search caused by fixed rule sequence is solved, and more efficient freight checksum search is achieved.
Patent Information
- Application Number
- CN202411782591.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, freight rates are verified in order of fixed freight rates rules, resulting in low freight search efficiency.
By constructing the request feature value, obtain the matching candidate rules check order and their assigned weights in the configuration file, dynamically select the target rules check order, and verify the freight data based on this order.
It improves the efficiency of freight checksum search, reduces the service pressure of the system, and improves the response speed.
Smart Images

Figure CN119719458A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of freight rate search, and in particular to a method, system, computer program product and electronic device for verifying freight rate data. Background Art
[0002] The fare search system refers to a flight price search service that provides airlines, third-party agents and other users with flight price information. The system can regulate the air ticket market, improve users' flight search experience, and help users improve service levels, thereby improving service efficiency and reducing service costs.
[0003] In recent years, with the rapid development of the civil aviation industry and the maturity of e-commerce business, the business based on freight rate search has been improved day by day, the number of freight rate search requests has been increasing, personalized services have been increasing, and users have higher and higher requirements for the response speed of requests, which has made the service pressure of the background freight rate search increasingly greater, and is limited by the limited background hardware resources, which affects the working performance of the freight rate search system.
[0004] It should be noted that the freight rate search system works by filtering out available freight rates that meet user needs and satisfy various freight rate rule restrictions from a large amount of freight rate data through freight rate rules. Freight rate rules are restrictive conditions for checking whether the freight rate is available. In the related art, the freight rate is checked according to a fixed freight rate rule sequence, which affects the efficiency of freight rate search.
[0005] Currently, no effective solution has been proposed to address the problem that in related technologies, freight rates are verified according to a fixed freight rate rule sequence, which affects the efficiency of freight rate search. Summary of the invention
[0006] The present application provides a method, system, computer program product and electronic device for verifying freight rate data, so as to solve the problem in the related art that the freight rate is verified according to a fixed freight rate rule sequence, which affects the efficiency of freight rate search.
[0007] According to one aspect of the present application, a method for verifying freight rate data is provided. The method includes: in the case of receiving a target freight rate search request, constructing a request feature value according to the content of the target freight rate search request; obtaining a rule verification order matching the request feature value from a configuration file, obtaining N candidate rule verification orders, and obtaining the allocation weight of each candidate rule verification order, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and the allocation weight of each rule verification order, and the allocation weight in the configuration file is dynamically updated with the verification time-consuming data of the rule verification order recorded in the log; selecting a target rule verification order from the N candidate rule verification orders based on the allocation weight, wherein the probability of each candidate rule verification order being selected as the target rule verification order is positively correlated with the associated allocation weight; verifying the candidate freight rate data based on the target rule verification order, and obtaining the target freight rate data that meets the target rule verification order, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request.
[0008] Optionally, the data in the configuration file is updated in the following manner: at every preset time period, request feature data of the incremental freight rate search request, the rule verification sequence used by the incremental freight rate search request, and the verification time data of the rule verification sequence are obtained from the log; based on the verification time data of the incremental freight rate search request, the verification time data of the rule verification sequence of the request feature values existing in the configuration file are updated to obtain a set of rule verification sequences associated with multiple request feature values and the updated verification time data of each rule verification sequence; for each request feature, the allocation weights of the associated rule verification sequences are updated according to the updated verification time data.
[0009] Optionally, based on the verification time data of the incremental freight rate search request, updating the verification time data of the rule verification sequence of the existing request feature values in the configuration file includes: for each rule verification sequence of each request feature, calculating the mean of the verification time data of the incremental rule verification sequence to obtain the first verification time data, and obtaining the second verification time data of the historical rule verification sequence, taking the weighted sum of the first verification time data and the second verification time data to obtain the updated verification time data of the rule verification sequence.
[0010] Optionally, in the initial configuration of the configuration file, the allocation weights of each rule verification order in a set of rule verification orders associated with each request feature are the same. For each request feature, the allocation weights of each associated rule verification order are updated according to the updated verification time consumption data, including: determining the allocation weights of each rule verification order according to the updated verification time consumption data and the anti-correlation relationship, and obtaining the updated allocation weights of each rule verification order.
[0011] Optionally, the probability of each candidate rule verification order being selected as the target rule verification order is determined by: calculating the sum of the assigned weights of N candidate rule verification orders to obtain a total weight value; calculating the ratio of the assigned weight of each candidate rule verification order to the total weight value to obtain the probability.
[0012] Optionally, verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence includes: dividing the verification rule into multiple independent verification items, putting the corresponding verification items into a rule verification queue according to the target rule verification sequence to obtain the target rule verification queue; verifying the candidate freight rate data through the target rule verification queue to obtain the target freight rate data that meets the target rule verification sequence.
[0013] Optionally, after verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, the method further includes: recording the request feature value of the search request, the rule verification sequence used, and the time-consuming data of the rule verification sequence in a log.
[0014] According to another aspect of the present application, a verification system for freight rate data is provided. The system includes: a log recording module, which is used to record the request feature value corresponding to the freight rate search request, the rule verification sequence used by the freight rate search request, and the verification time-consuming data; a data processing module, which is used to obtain the request feature data of the incremental freight rate search request, the rule verification sequence used by the incremental freight rate search request, and the verification time-consuming data of the rule verification sequence from the log, and update the allocation weight of the rule verification sequence of the existing request feature value in the configuration file according to the obtained data; a rule verification module, which is used to construct a request feature value according to the received target freight rate search request, obtain the candidate rule verification sequence matching the request feature value from the configuration file, and select the target rule verification sequence from the candidate rule verification sequence, verify the candidate freight rate data through the target rule verification sequence, and obtain the target freight rate data that meets the target rule verification sequence, wherein the probability of each candidate rule verification sequence being selected is positively correlated with the associated allocation weight, and the candidate freight rate data is the freight rate data that meets the target freight rate search request.
[0015] According to another aspect of the present application, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for verifying freight rate data is implemented.
[0016] According to another aspect of the present application, an electronic device is provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein a method for verifying freight rate data is executed when the computer-readable instructions are executed.
[0017] Through the present application, the following steps are adopted: when a target freight rate search request is received, a request feature value is constructed according to the content of the target freight rate search request; a rule verification order matching the request feature value is obtained from a configuration file to obtain N candidate rule verification orders, and an allocation weight of each candidate rule verification order is obtained, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and an allocation weight of each rule verification order, and the allocation weight in the configuration file is dynamically updated with the verification time-consuming data of the rule verification order recorded in the log; a target rule verification order is selected from the N candidate rule verification orders based on the allocation weight, wherein the probability of each candidate rule verification order being selected as the target rule verification order is positively correlated with the associated allocation weight; candidate freight rate data is verified based on the target rule verification order to obtain target freight rate data that meets the target rule verification order, wherein the candidate freight rate data is freight rate data that meets the target freight rate search request, and the problem of verifying the freight rate according to a fixed freight rate rule order in the related art, which affects the efficiency of the freight rate search, is solved. The allocation weight of the rule verification sequence in the configuration file is dynamically updated through the verification time data of the rule verification sequence recorded in the log, and the target rule verification sequence is selected from the candidate rule verification sequences matching the request feature value based on the allocation weight, and the freight rate data is regulated and verified based on the target rule verification sequence, thereby achieving the effect of improving the efficiency of the first-level freight rate search of the freight rate verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of a method for verifying freight rate data according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a system for verifying freight rate data according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a device for verifying freight rate data according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0027] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse to use it.
[0028] Since different rule verification orders have different screening efficiencies for freight rates, it is necessary to consider which rule verification order to use in order to efficiently screen freight rates. This embodiment dynamically adjusts the rule verification order in the freight rate search to quickly verify a large number of freight rates using freight rate rules, thereby improving computing resources and improving system efficiency.
[0029] According to an embodiment of the present application, a method for verifying freight rate data is provided.
[0030] Figure 1 1 is a flow chart of a method for verifying freight rate data according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0031] Step S102: when a target freight rate search request is received, a request characteristic value is constructed according to the content of the target freight rate search request.
[0032] It should be noted that the fare data released by different airlines have different data characteristics, and the fare search requests of different users also have different data characteristics. For different fare search requests, the same rule verification item may have different screening efficiencies for fare data.
[0033] In order to select a rule verification order with higher screening efficiency for fare search requests with different characteristics, it is necessary to construct a request feature value according to the content of the target fare search request, and then determine the rule verification order according to the request feature value. Specifically, first extract the feature data of the target fare search request, such as airline, origin, destination, request date, departure date, passenger type, etc., and then construct a request feature value according to all the extracted feature data. The feature value can be a string. All the feature data of a target fare search request construct a request feature value, and the construction method is not limited.
[0034] Step S104, obtain the rule verification order for request feature value matching from the configuration file, obtain N candidate rule verification orders, and obtain the assigned weight of each candidate rule verification order, where N is a positive integer. The configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and the assigned weight of each rule verification order. The assigned weight in the configuration file is dynamically updated with the verification time data of the rule verification order recorded in the log.
[0035] It should be noted that the configuration file is a configuration file for rule verification. The data in the configuration file for rule verification is generated based on the data recorded in the log of the freight rate search system. In order to occupy as little memory space as possible, the log records the request feature values of the freight rate search request rather than the request itself. The request feature values are recorded together with the rule verification sequence and verification time data used by the freight rate search request. The verification time data refers to the time-consuming data of verifying the freight rate data using the rule verification sequence.
[0036] According to the request feature values and rule verification order recorded in the log, the request feature values in the configuration file and a set of rule verification orders associated with the request feature values are continuously updated. According to the verification time data recorded in the log, the allocation weight of the verification time data is updated. The size of the allocation weight determines the probability that the rule verification order is used. The shorter the verification time data, the greater the allocation weight. After obtaining the configuration file for rule verification, read the configuration file, obtain a set of rule verification orders associated with the request feature values, use this set of rule verification orders as candidate rule verification orders, and obtain the allocation weight of each candidate rule verification order.
[0037] Step S106 : selecting a target rule verification sequence from the N candidate rule verification sequences based on the allocation weights, wherein the probability of each candidate rule verification sequence being selected as the target rule verification sequence is positively correlated with the associated allocation weight.
[0038] Exemplarily, the target rule verification sequence, i.e., the rule verification sequence used by the target freight rate search request, can be selected from N candidate rule verification sequences by random selection, and the selection probability of each rule verification sequence is positively correlated with the allocation weight of the rule verification sequence. That is, the higher the allocation weight of the candidate rule verification sequence, the higher the probability that the freight rate search request is allocated to the rule verification sequence, and the lower the allocation weight of the candidate rule verification sequence, the lower the probability that the freight rate search request is allocated to the rule verification sequence.
[0039] Step S108, verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request.
[0040] Exemplarily, multiple verification rules are divided into independent verification items, which may include verification items for take-off time, verification items for sales time, verification items for user accounts, verification items for usage permissions, etc. Corresponding verification items are arranged based on the target rule verification sequence to obtain a target rule verification sequence, and then the candidate fare data that meets the target fare search request is verified according to the target rule verification sequence, and the candidate fare data that meets the target rule verification sequence is determined as the target fare data. If there is no candidate fare data that meets the target rule verification sequence, it means that there is no available fare data.
[0041] The method for verifying freight rate data provided by the embodiment of the present application comprises the following steps: constructing a request feature value according to the content of the target freight rate search request when a target freight rate search request is received; obtaining a rule verification sequence matching the request feature value from a configuration file, obtaining N candidate rule verification sequences, and obtaining an allocation weight of each candidate rule verification sequence, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification sequences associated with each request feature value, and an allocation weight of each rule verification sequence, and the allocation weight in the configuration file is dynamically updated with the verification time-consuming data of the rule verification sequence recorded in a log; selecting a target rule verification sequence from the N candidate rule verification sequences based on the allocation weight, wherein the probability of each candidate rule verification sequence being selected as the target rule verification sequence is positively correlated with the associated allocation weight; verifying the candidate freight rate data based on the target rule verification sequence, and obtaining the target freight rate data that meets the target rule verification sequence, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request, and the problem that the freight rate is verified according to a fixed freight rate rule sequence in the related art affects the freight rate search efficiency. The allocation weight of the rule verification sequence in the configuration file is dynamically updated through the verification time data of the rule verification sequence recorded in the log, and the target rule verification sequence is selected from the candidate rule verification sequences matching the request feature value based on the allocation weight, and the freight rate data is regulated and verified based on the target rule verification sequence, thereby achieving the effect of improving the efficiency of the first-level freight rate search of the freight rate verification.
[0042] The data in the configuration file is dynamically updated according to the data recorded in the log. Optionally, in the method for verifying the freight rate data provided in the embodiment of the present application, the data in the configuration file is updated in the following manner: at every preset time period, the request feature data of the incremental freight rate search request, the rule verification sequence used by the incremental freight rate search request, and the verification time data of the rule verification sequence are obtained from the log; based on the verification time data of the incremental freight rate search request, the verification time data of the rule verification sequence of the existing request feature values in the configuration file is updated to obtain a set of rule verification sequences associated with multiple request feature values and the updated verification time data of each rule verification sequence; for each request feature, the allocation weights of the associated rule verification sequences are updated according to the updated verification time data.
[0043] Exemplarily, the log data is processed once every preset time period, and the processed data is the incremental data generated between the last processing and the current processing. For example, the incremental request feature data, rule verification sequence, and verification time data of the freight rate search request can be obtained from the log every hour. The request feature value in the configuration file and a set of rule verification sequences associated with the request feature value are updated according to the request feature value and rule verification sequence recorded in the log, and the allocation weight of the verification time data is updated according to the verification time data recorded in the log, wherein the allocation weight is anti-correlated with the verification time data.
[0044] This embodiment takes into account that the correspondence data between the request characteristics of the freight rate search request and the high-efficiency rule verification order requires long-term data statistical analysis to obtain, and such a correspondence may also change over time. By analyzing the data of historical requests in the log, the allocation weight of the rule verification order in the configuration file is dynamically adjusted, so that the data in the configuration file can accurately reflect the correspondence between the request characteristics and the high-efficiency rule verification order.
[0045] The verification time consumption data reflects the efficiency of using the rule verification sequence to verify the freight rate search request. The verification time consumption data of the rule verification sequence in the configuration file needs to be determined based on the new and old data. Optionally, in the verification method for freight rate data provided in the embodiment of the present application, based on the verification time consumption data of the incremental freight rate search request, updating the verification time consumption data of the rule verification sequence of the existing request feature value in the configuration file includes: for each rule verification sequence of each request feature, calculating the mean of the verification time consumption data of the incremental rule verification sequence to obtain the first verification time consumption data, and obtaining the second verification time consumption data of the historical rule verification sequence, weighted summing the first verification time consumption data and the second verification time consumption data to obtain the updated verification time consumption data of the rule verification sequence.
[0046] It should be noted that the same freight rate search request may be verified multiple times through the same rule verification sequence in different scenarios. For incremental data, the average rule verification time of each rule verification sequence for each request feature is statistically calculated according to the request feature value and the rule verification sequence. The average rule verification time represents the time consumption of verifying the same type of freight rate search requests in the rule verification sequence.
[0047] Since the correspondence data between the request features of the freight rate search request and the high-efficiency rule verification sequence requires long-term data statistical analysis to obtain, after calculating the most recent logs to obtain the average rule verification time for each rule verification sequence for each request feature, this embodiment reads the old data in the rule verification configuration file, and performs a weighted summation on the average rule verification time for each rule verification sequence for each request feature of the incremental data and the verification time for the same type of rule verification sequence for the same type of request feature in the old data. The initial weight used for the weighted summation may be 50%, and the weight may be dynamically adjusted according to the effect of verifying the freight rate data using the data in the configuration file.
[0048] This embodiment combines the verification time consumption data of each rule verification sequence of each request feature in the new and old data according to the weight, so that the verification time consumption data can accurately characterize the efficiency of the rule verification sequence in verifying the same type of freight rate search requests, laying a foundation for accurately determining the allocation weight of the rule verification sequence.
[0049] Optionally, in the freight rate data verification method provided in the embodiment of the present application, in the initial configuration of the configuration file, the allocation weights of each rule verification sequence in a set of rule verification sequences associated with each request feature are the same, and for each request feature, the allocation weights of each associated rule verification sequence are updated according to the updated verification time consumption data, including: determining the allocation weights of each rule verification sequence according to the updated verification time consumption data and the anti-correlation relationship, and obtaining the updated allocation weights of each rule verification sequence.
[0050] It should be noted that the initial configuration of the configuration file is that all rule verification sequences have equal weights, that is, when the freight rate search system is applied for the first time, the rule verification will use each rule verification sequence evenly. After obtaining the relationship data of the request feature value, the rule verification sequence, and the updated average time consumption of the rule verification, it is necessary to ensure that the freight rate data corresponding to the freight rate search request is verified using the rule verification sequence with the short average time consumption. This embodiment determines the distribution weight of each rule verification sequence according to the updated verification time consumption data, and writes the request feature value, rule verification sequence, average rule verification time consumption and weight data into the rule verification configuration file for subsequent use in verifying the freight rate.
[0051] Specifically, the allocation weight of each rule verification order can be determined according to the updated verification time data and the anti-correlation relationship, that is, the weight of the verification order is set from short to long according to the verification time, the verification order with the shortest verification time has the highest weight, and the verification order with the longest verification time has the highest weight. The higher the weight of the rule verification order, the greater the proportion used in the rule verification.
[0052] Through this embodiment, the allocation weights of each rule verification order are determined according to the updated verification time consumption data and the anti-correlation relationship, which lays a foundation for reasonably determining the usage ratio of the rule verification order, so that the rule verification order with a short average verification time consumption is used with a higher probability, and the rule verification order with a long average verification time consumption can also be used. By comparing the time consumption data of different rule verification orders, the allocation weights of each rule verification order are updated to achieve dynamic improvement of verification efficiency.
[0053] The assigned weights of the candidate rule verification order determine the probability that the candidate rule verification order is used, that is, the probability that the candidate rule verification order is selected as the target rule verification order. Optionally, in the verification method for freight rate data provided in the embodiment of the present application, the probability of each candidate rule verification order being selected as the target rule verification order is determined by: calculating the sum of the assigned weights of N candidate rule verification orders to obtain a total weight value; calculating the ratio of the assigned weight of each candidate rule verification order to the total weight value to obtain a probability.
[0054] It should be noted that in order to improve the efficiency of freight rate verification, the freight rate data corresponding to the freight rate search request should be verified as much as possible using the rule verification sequence with the shortest average time consumption. However, the time consumption data of the rule verification sequence is constantly changing. If a certain feature value only uses one rule verification sequence, it is impossible to compare the time consumption data of other rule verification sequences, and the verification efficiency cannot be dynamically improved. Although the current average time consumption of other rule verification sequences is not as good as the shortest time consumption, they also need to be used to a certain extent.
[0055] Therefore, this embodiment determines the selection probability of each rule verification sequence according to the assigned weight, and the selection probability of the rule verification sequence can be the ratio of the total weight of the rule verification sequence to the sum of the assigned weights of all candidate rule verification sequences corresponding to the current feature value. In this way, when verifying the freight rate, different rule verification sequences can be used, which lays a data foundation for updating the assigned weights of each rule verification sequence according to the time-consuming data of rule verification, and further improving the verification efficiency.
[0056] After obtaining the target rule verification sequence, corresponding verification items are required to implement freight rate verification. Optionally, in the verification method for freight rate data provided in the embodiment of the present application, the candidate freight rate data is verified based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, including: dividing the verification rules into multiple independent verification items, placing the corresponding verification items into a rule verification queue according to the target rule verification sequence to obtain a target rule verification queue; verifying the candidate freight rate data through the target rule verification queue to obtain the target freight rate data that meets the target rule verification sequence.
[0057] Divide multiple verification rules into independent verification items, provide a unified input and output interface, so that these verification items can be verified in any order. After determining the target rule verification order, obtain the verification items from the input and output interface according to the order, put the obtained verification items into a rule verification queue, obtain the target rule verification queue, and then perform rule verification on the freight rate according to the target rule verification queue.
[0058] Performing rule verification on the freight rate according to the target rule verification queue means that each feature data of the freight rate data is verified in turn according to each verification item of the target rule verification queue until the last verification item is completed. If each verification item is verified, it means that the freight rate data is usable target freight rate data. If there is a verification item that fails to be verified, it means that the freight rate data is unusable freight rate data. This embodiment realizes the verification of freight rate data according to the target rule verification sequence and the corresponding verification items.
[0059] The log data is continuously updated. Optionally, in the method for verifying the freight rate data provided in the embodiment of the present application, after verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that satisfies the target rule verification sequence, the method further includes: recording the request feature value of the search request, the rule verification sequence used, and the time-consuming data of the rule verification sequence in the log.
[0060] After verifying the freight rate data according to the target rule verification sequence, the request feature value of the current target freight rate search request, the target rule verification sequence used, and the verification time data are recorded in the log, laying the foundation for dynamically updating the data in the configuration file based on the log data.
[0061] According to another aspect of the present application, a system for verifying freight rate data is provided. Figure 2 is a schematic diagram of a verification system for freight rate data according to an embodiment of the present application, such as Figure 2 As shown, the system includes:
[0062] The log recording module 202 is used to record the request feature value corresponding to the freight rate search request, the rule verification sequence used by the freight rate search request, and the verification time consumption data. Specifically, after the freight rate search request is processed, the request feature is extracted, and the request feature data, the rule verification sequence, and the rule verification time consumption data are written into the log file according to a certain data structure.
[0063] Table 1 shows the format of the log data recorded by the log recording module 202:
[0064] Table 1
[0065]
[0066]
[0067] The data processing module 204 is used to obtain the request feature data of the incremental freight rate search request, the rule verification sequence used by the incremental freight rate search request, and the verification time consumption data of the rule verification sequence from the log, and update the allocation weight of the rule verification sequence of the request feature value existing in the configuration file according to the obtained data.
[0068] Specifically, when updating the allocation weights of the rule verification order of the existing request feature values in the configuration file based on the acquired data, first calculate the average verification time of each rule verification order of each request feature value according to the request feature value and the rule verification order, then read the old data in the rule verification configuration file, and merge the verification time of each rule verification order of each request feature value according to the weights of the new and old data, and then calculate the allocation weights of different rule verification orders according to the merged time consumption data, and finally rewrite the rule verification configuration file.
[0069] Among them, Table 2 is the format of the configuration file:
[0070] Table 2
[0071]
[0072] The rule verification module 206 is used to construct a request feature value according to the received target freight rate search request, obtain a candidate rule verification sequence matching the request feature value from the configuration file, select a target rule verification sequence from the candidate rule verification sequence, verify the candidate freight rate data through the target rule verification sequence, and obtain the target freight rate data that meets the target rule verification sequence, wherein the probability of each candidate rule verification sequence being selected is positively correlated with the associated allocation weight, and the candidate freight rate data is the freight rate data that meets the target freight rate search request.
[0073] Exemplarily, after constructing the request feature value, the corresponding candidate rule verification order is obtained according to the feature value, and then the target rule verification order used in the current request is determined according to the distribution weights of the obtained candidate rule verification orders of multiple data. Specifically, the selection probability of the rule verification order can be the ratio of the total weight of each rule verification order to the sum of the distribution weights of all candidate rule verification orders corresponding to the current feature value. Further, the freight rate verification is performed according to the determined target rule verification order, and the time consumed during the freight rate verification is recorded and provided to the log recording module 202.
[0074] The verification system of the freight rate data of this embodiment records the data corresponding to the freight rate search request through the log recording module 202, and analyzes the historical data through the data processing module 204.
[0075] A method for dynamically adjusting the rule verification sequence. The time-consuming data of the freight rate search request, the characteristic data of the request, and the rule verification sequence used by the freight rate search request are statistically analyzed to obtain the verification efficiency of different types of requests using different rule verification sequences, and the rule verification module 206 is used to divide the rule verification into multiple verification items, and multiple factors of the current freight rate search request are selected to form the request characteristic value, and a high-efficiency verification sequence is selected based on the request characteristics, and the request rule verification is performed according to the rule verification sequence with higher verification efficiency, so that the average efficiency of the rule verification of the freight rate search request is improved, thereby improving the search efficiency of the freight rate search system, improving the request response speed, and reducing service pressure.
[0076] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0077] The embodiment of the present application also provides a verification device for freight rate data. It should be noted that the verification device for freight rate data in the embodiment of the present application can be used to execute the verification method for freight rate data provided in the embodiment of the present application. The verification device for freight rate data provided in the embodiment of the present application is introduced below.
[0078] Figure 3 Schematic diagram of a device for verifying freight rate data according to an embodiment of the present application. Figure 3 As shown, the device includes: a construction unit 302 , an acquisition unit 304 , a selection unit 306 and a verification unit 308 .
[0079] Specifically, the construction unit 302 is used to construct a request feature value according to the content of the target freight rate search request when receiving the target freight rate search request;
[0080] The acquisition unit 304 is used to obtain the rule verification order of the request feature value matching from the configuration file, obtain N candidate rule verification orders, and obtain the allocation weight of each candidate rule verification order, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and the allocation weight of each rule verification order. The allocation weight in the configuration file is dynamically updated with the verification time consumption data of the rule verification order recorded in the log;
[0081] A selection unit 306, configured to select a target rule verification sequence from the N candidate rule verification sequences based on the allocation weights, wherein the probability of each candidate rule verification sequence being selected as the target rule verification sequence is positively correlated with the associated allocation weight;
[0082] The verification unit 308 is used to verify the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request.
[0083] The verification device for freight rate data provided in the embodiment of the present application, through the construction unit 302, constructs a request feature value according to the content of the target freight rate search request when receiving the target freight rate search request; the acquisition unit 304 obtains the rule verification order matched by the request feature value from the configuration file, obtains N candidate rule verification orders, and obtains the distribution weight of each candidate rule verification order, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and the distribution weight of each rule verification order. The distribution weight in the configuration file is dynamically updated with the verification time-consuming data of the rule verification order recorded in the log; the selection unit 306 selects the target rule verification order from the N candidate rule verification orders based on the distribution weight, wherein each candidate rule The probability that the verification sequence is selected as the target rule verification sequence is positively correlated with the associated allocation weight; the verification unit 308 verifies the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request, which solves the problem in the related art that the freight rate is verified according to the fixed freight rate rule sequence, affecting the freight rate search efficiency, and dynamically updates the allocation weight of the rule verification sequence in the configuration file through the verification time-consuming data of the rule verification sequence recorded in the log, selects the target rule verification sequence from the candidate rule verification sequence that matches the request feature value based on the allocation weight, and performs regulatory verification on the freight rate data based on the target rule verification sequence, thereby achieving the effect of improving the efficiency of the first-level freight rate search of the freight rate verification.
[0084] Optionally, in the verification device for freight rate data provided in the embodiment of the present application, the acquisition unit 304 is also used to update the data in the configuration file, and the acquisition unit 304 includes: an acquisition module, which is used to obtain the request feature data of the incremental freight rate search request, the rule verification sequence used by the incremental freight rate search request, and the verification time consumption data of the rule verification sequence from the log every preset time period; a first updating module, which is used to update the verification time consumption data of the rule verification sequence of the existing request feature value in the configuration file based on the verification time consumption data of the incremental freight rate search request, and obtain a set of rule verification sequences associated with multiple request feature values and the updated verification time consumption data of each rule verification sequence; a second updating module, which is used to update the allocation weights of the associated rule verification sequences for each request feature according to the updated verification time consumption data.
[0085] Optionally, in the verification device for freight rate data provided in the embodiment of the present application, the first update module includes: a weighted summation sub-module, which is used to calculate the mean of the verification time consumption data of the incremental rule verification sequence for each rule verification sequence of each request feature, to obtain the first verification time consumption data, and obtain the second verification time consumption data of the historical rule verification sequence, and perform weighted summation of the first verification time consumption data and the second verification time consumption data to obtain the updated verification time consumption data of the rule verification sequence.
[0086] Optionally, in the verification device for freight rate data provided in the embodiment of the present application, in the initial configuration of the configuration file, the allocation weights of each rule verification sequence in a set of rule verification sequences associated with each request feature are the same, and the second update module includes: a determination submodule, used to determine the allocation weights of each rule verification sequence according to the updated verification time consumption data and the anti-correlation relationship, and obtain the updated allocation weights of each rule verification sequence.
[0087] Optionally, in the verification device for freight rate data provided in the embodiment of the present application, the selection unit 306 is also used to determine the probability of each candidate rule verification order being selected as the target rule verification order, and the selection module allocates: a first calculation submodule, used to calculate the sum of the assigned weights of N candidate rule verification orders to obtain a total weight value; a second calculation submodule, used to calculate the ratio of the assigned weight of each candidate rule verification order to the total weight value to obtain the probability.
[0088] Optionally, in the verification device for freight rate data provided in the embodiment of the present application, the verification unit 308 includes: a division module, used to divide the verification rules into multiple independent verification items, and put the corresponding verification items into a rule verification queue according to the target rule verification order to obtain a target rule verification queue; a verification module, used to verify the candidate freight rate data through the target rule verification queue to obtain the target freight rate data that meets the target rule verification order.
[0089] Optionally, in the freight rate data verification device provided in the embodiment of the present application, the device also includes: a recording unit, which is used to verify the candidate freight rate data based on the target rule verification order, and after obtaining the target freight rate data that meets the target rule verification order, record the request feature value of the search request, the rule verification order used, and the time-consuming data of the rule verification order in a log.
[0090] The above-mentioned freight rate data verification device includes a processor and a memory. The above-mentioned construction unit 302, acquisition unit 304, selection unit 306 and verification unit 308 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0091] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem in the related art that the freight rate is checked according to the fixed freight rate rule sequence, which affects the efficiency of freight rate search.
[0092] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0093] The embodiment of the present application further provides a computer storage medium, which is used to store a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute a method for verifying freight rate data.
[0094] The embodiment of the present application also provides an electronic device, Figure 4 4 is a schematic diagram of an electronic device according to an embodiment of the present application, wherein the electronic device 40 comprises a processor and a memory; the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions, wherein a method for verifying freight rate data is executed when the computer-readable instructions are run. The electronic device in this article may be a server, a PC, a PAD, a mobile phone, etc.
[0095] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, a method for verifying freight rate data is implemented.
[0096] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0097] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0098] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0100] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0101] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0102] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media 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 memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0103] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0104] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for verifying freight rate data, characterized in that: include: When receiving a target freight rate search request, constructing a request characteristic value according to the content of the target freight rate search request; Obtaining the rule verification order for matching the request feature value from the configuration file, obtaining N candidate rule verification orders, and obtaining the allocation weight of each candidate rule verification order, wherein N is a positive integer, and the configuration file records different request feature values, a set of rule verification orders associated with each request feature value, and the allocation weight of each rule verification order, and the allocation weight in the configuration file is dynamically updated with the verification time consumption data of the rule verification order recorded in the log; Selecting a target rule verification sequence from the N candidate rule verification sequences based on the allocation weights, wherein the probability of each candidate rule verification sequence being selected as the target rule verification sequence is positively correlated with the associated allocation weight; The candidate freight rate data is verified based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence, wherein the candidate freight rate data is the freight rate data that meets the target freight rate search request.
2. The method according to claim 1, characterized in that The data in the configuration file is updated in the following way: At every preset time period, obtaining from the log request characteristic data of the incremental freight rate search request, a rule verification sequence used by the incremental freight rate search request, and verification time consumption data of the rule verification sequence; Based on the verification time consumption data of the incremental freight rate search request, the verification time consumption data of the rule verification sequence of the request feature value already in the configuration file is updated to obtain a set of rule verification sequences associated with multiple request feature values and the updated verification time consumption data of each rule verification sequence; For each request feature, the allocation weights of the associated rule verification orders are updated according to the updated verification time consumption data.
3. The method according to claim 2, characterized in that Based on the verification time consumption data of the incremental freight rate search request, updating the verification time consumption data of the rule verification sequence of the request feature value existing in the configuration file includes: For each rule verification sequence of each request feature, calculate the mean of the verification time consumption data of the incremental rule verification sequence to obtain the first verification time consumption data, and obtain the second verification time consumption data of the historical rule verification sequence, take the weighted sum of the first verification time consumption data and the second verification time consumption data, and obtain the updated verification time consumption data of the rule verification sequence.
4. The method according to claim 2, characterized in that: In the initial configuration of the configuration file, the allocation weights of the respective rule verification sequences in a set of rule verification sequences associated with each request feature are the same. For each request feature, the allocation weights of the respective rule verification sequences associated with the updated verification time consumption data are updated, including: The allocation weights of the verification sequences of the various rules are determined according to the updated verification time consumption data and the anti-correlation relationship, and the updated allocation weights of the verification sequences of the various rules are obtained.
5. The method according to claim 1, characterized in that The probability of each candidate rule verification order being selected as the target rule verification order is determined in the following manner: Calculate the sum of the assigned weights of the N candidate rule verification orders to obtain a total weight value; The probability is obtained by calculating the ratio of the assigned weight of each candidate rule verification order to the total weight value.
6. The method according to claim 1, characterized in that Verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that meets the target rule verification sequence includes: Divide the verification rules into multiple independent verification items, and put the corresponding verification items into the rule verification queue according to the target rule verification order to obtain the target rule verification queue; The candidate freight rate data is verified through the target rule verification queue to obtain the target freight rate data that meets the target rule verification sequence.
7. The method according to claim 1, characterized in that After verifying the candidate freight rate data based on the target rule verification sequence to obtain the target freight rate data that satisfies the target rule verification sequence, the method further includes: The request feature value of the search request, the rule verification sequence used, and the time-consuming data of the rule verification sequence are recorded in the log.
8. A freight rate data verification system, characterized in that: include: The log recording module is used to record the request feature value corresponding to the freight rate search request, the rule verification sequence used by the freight rate search request, and the verification time consumption data; A data processing module, used to obtain request feature data of the incremental freight rate search request, a rule verification sequence used by the incremental freight rate search request, and verification time consumption data of the rule verification sequence from the log, and update the allocation weight of the rule verification sequence of the request feature value existing in the configuration file according to the obtained data; A rule verification module is used to construct a request feature value according to the received target freight rate search request, obtain a candidate rule verification sequence matching the request feature value from the configuration file, select a target rule verification sequence from the candidate rule verification sequence, verify the candidate freight rate data through the target rule verification sequence, and obtain the target freight rate data that meets the target rule verification sequence, wherein the probability of each candidate rule verification sequence being selected is positively correlated with the associated allocation weight, and the candidate freight rate data is the freight rate data that meets the target freight rate search request.
9. A computer program product, characterized in that The invention comprises a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for verifying the freight rate data according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the method for verifying freight rate data according to any one of claims 1 to 7 through the computer program.