CN112307338A - Flow control method, device, equipment and storage medium of freight rate search system - Google Patents

Flow control method, device, equipment and storage medium of freight rate search system Download PDF

Info

Publication number
CN112307338A
CN112307338A CN202011195289.9A CN202011195289A CN112307338A CN 112307338 A CN112307338 A CN 112307338A CN 202011195289 A CN202011195289 A CN 202011195289A CN 112307338 A CN112307338 A CN 112307338A
Authority
CN
China
Prior art keywords
flow
freight rate
key value
preset
traffic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011195289.9A
Other languages
Chinese (zh)
Inventor
王可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Technology Co Ltd
China Travelsky Holding Co
Original Assignee
China Travelsky Holding Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Travelsky Holding Co filed Critical China Travelsky Holding Co
Priority to CN202011195289.9A priority Critical patent/CN112307338A/en
Publication of CN112307338A publication Critical patent/CN112307338A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a flow control method, a flow control device, flow control equipment and a storage medium of a freight rate search system, wherein a freight rate search request is obtained, and a flow key value of the freight rate search request is constructed according to an analysis result; and searching a preset flow threshold value and the current actual flow corresponding to the flow key value, and controlling the flow of the freight rate search request according to the preset flow threshold value and the current actual flow. The invention can realize that different service scenes are matched by constructing the flow key value, and provides specific accurate flow control for different service scenes. Meanwhile, the flow can be controlled from the dual dimensions of the user identity and the request type. In a word, the method can convert the actual demand of the freight rate search in terms of flow into multiple self-definable dimensions, thereby providing accurate flow control for different service scenes, and avoiding the problems that the response time of the system is delayed and even the system is unavailable due to the fact that part of the service scenes excessively occupy the resources of the freight rate search system.

Description

Flow control method, device, equipment and storage medium of freight rate search system
Technical Field
The invention relates to the technical field of data transmission, in particular to a flow control method, a flow control device, flow control equipment and a storage medium of a freight rate search system.
Background
The freight rate search system is a high-performance freight rate calculation system, and each time the system receives a user request, a large amount of calculation is carried out so as to return low, fast, accurate and full freight rate results meeting the requirements of the user. The system has a large number of airline and agent users who are searching for the freight rate almost every moment, but in some cases, a certain user or a certain type of request can search for the freight rate in a large amount within a certain time range to cause the shortage of system resources, increase the response time of the system and even cause the whole system to be unavailable.
Disclosure of Invention
The embodiment of the invention aims to provide a flow control method, a flow control device, flow control equipment and a storage medium of a freight rate search system, so that different service scenes are matched by constructing a flow key value, and specific accurate flow control is provided for the different service scenes. Meanwhile, the flow can be controlled from the dual dimensions of the user identity and the request type. In a word, the method can convert the actual demand of the freight rate search in terms of flow into multiple self-definable dimensions, thereby providing accurate flow control for different service scenes, and avoiding the problems that the response time of the system is delayed and even the system is unavailable due to the fact that part of the service scenes excessively occupy the resources of the freight rate search system. The specific technical scheme is as follows:
in a first aspect, a flow control method for a freight rate search system includes:
obtaining a freight rate search request;
analyzing the freight rate search request to obtain the request type of the freight rate search request and the identity information of the user sending the freight rate search request;
constructing a traffic key value of the freight rate search request according to the request type and the identity information;
searching a preset flow threshold corresponding to the flow key value, responding to the freight rate search request to search the freight rate if the preset flow threshold is not searched, requesting to acquire the current actual flow of the flow key value if the preset flow threshold is searched, and responding to the freight rate search request to search the freight rate if the request to acquire the current actual flow fails;
if the current actual flow is successfully acquired, judging whether the current actual flow is not greater than the preset flow threshold, and if the current actual flow is not greater than the preset flow threshold, responding to the freight rate search request and performing freight rate search;
and if the current actual flow is larger than the preset flow threshold, not carrying out freight rate search and returning error report information to the user.
With reference to the first aspect, in some optional implementations, the searching for the preset traffic threshold corresponding to the traffic key value includes:
inquiring whether the configuration information of the flow key value exists in a configuration information library, if so, obtaining a preset time length of the flow key value and a preset flow threshold value of the flow key value from the configuration information, wherein the preset flow threshold value is a preset flow threshold value of the flow key value within the preset time length, and the preset flow threshold value is matched with the preset time length.
With reference to the previous embodiment, in some optional embodiments, if the current actual flow is successfully acquired, determining whether the current actual flow is not greater than the preset flow threshold includes:
if the current actual flow of the flow key value within a first time length is successfully acquired from the caching device and the first time length is equal to the preset time length, judging whether the current actual flow is not greater than the preset flow threshold value;
if the current actual flow of the flow key value within the first time length is successfully obtained from the caching device and the first time length is not equal to the preset time length, whether the current actual flow is not greater than the product of the preset flow threshold and a first scaling factor or not is judged, wherein the ratio of the first time length to the preset time length is equal to the first scaling factor.
With reference to the first aspect, in some optional implementations, the current actual traffic is a current request number of the freight rate search request corresponding to the traffic key value;
increasing the current actual flow of the flow key value corresponding to the freight rate search request by 1 after carrying out one-time freight rate search;
or, the current actual flow of the flow key value is increased by 1 after the current actual flow of the flow key value is obtained once.
With reference to the first aspect, in certain optional embodiments, the method further comprises:
if the preset flow threshold is not found, judging whether the flow key value exists in a monitoring table or not, if so, increasing the current searching times of the flow key value in the monitoring table by 1, and if not, establishing the flow key value in the monitoring table.
In combination with the previous embodiment, in certain alternative embodiments, the method further comprises:
if the flow key value exists in the monitoring table, whether the current searching times of the flow key value is larger than a preset threshold value or not is judged, and if the current searching times of the flow key value is larger than the preset threshold value, the preset flow threshold value of the flow key value is configured.
In a second aspect, a flow control device of a freight rate search system includes: the system comprises a request obtaining unit, an analysis unit, a key value construction unit, a threshold value searching unit, a freight rate searching unit, a flow request unit, a flow judgment unit and an error reporting unit;
the request obtaining unit is configured to execute a obtain freight rate search request;
the analysis unit is configured to analyze the freight rate search request to obtain a request type of the freight rate search request and identity information of a user sending the freight rate search request;
the key value construction unit is configured to execute construction of a traffic key value of the freight rate search request according to the request type and the identity information;
the threshold searching unit is configured to search a preset traffic threshold corresponding to the traffic key value, trigger the freight rate searching unit if the preset traffic threshold is not found, and trigger the traffic requesting unit if the preset traffic threshold is found;
the freight rate searching unit is configured to execute freight rate searching in response to the freight rate searching request;
the traffic request unit is configured to execute a request for acquiring the current actual traffic of the traffic key value, trigger the freight rate search unit if the request for acquiring the current actual traffic fails, and trigger the traffic judgment unit if the current actual traffic is successfully acquired;
the flow judging unit is configured to execute judgment on whether the current actual flow is not greater than the preset flow threshold, trigger the freight rate searching unit if the current actual flow is not greater than the preset flow threshold, and trigger the error reporting unit if the current actual flow is greater than the preset flow threshold;
and the error reporting unit is configured to execute non-freight rate search and return error reporting information to the user.
In combination with the second aspect, in certain alternative embodiments, the apparatus further comprises: the device comprises a monitoring table unit, a frequency increasing unit and a key value establishing unit;
the monitoring table unit is configured to execute the steps of judging whether the flow key value exists in the monitoring table or not if the preset flow threshold is not found by the threshold searching unit, if so, triggering the frequency increasing unit, and if not, triggering the key value establishing unit;
the number increasing unit is configured to increase the current lookup number of the traffic key values in the monitoring table by 1;
the key value establishing unit is configured to execute establishing the traffic key value in the monitoring table.
A storage medium storing a program that when executed by a processor implements a flow control method of any one of the rate search systems.
In a fourth aspect, an apparatus comprises at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke a program in the memory, the program at least being configured to implement the flow control method of any of the rate search systems.
The flow control method, the flow control device, the flow control equipment and the storage medium of the freight rate search system provided by the embodiment of the invention can match different service scenes by constructing the flow key value, and provide specific accurate flow control for different service scenes. Meanwhile, the flow can be controlled from the dual dimensions of the user identity and the request type. In a word, the method can convert the actual demand of the freight rate search in terms of flow into multiple self-definable dimensions, thereby providing accurate flow control for different service scenes, and avoiding the problems that the response time of the system is delayed and even the system is unavailable due to the fact that part of the service scenes excessively occupy the resources of the freight rate search system. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a flow control method of a freight rate search system according to the present invention;
fig. 2 is a schematic structural diagram of a flow control device of a freight rate search system according to the present invention;
fig. 3 is a schematic structural diagram of an apparatus provided in the present invention.
Detailed Description
The freight rate search system is a high-performance freight rate calculation system, and when receiving a freight rate search request, the freight rate search system needs to perform a large amount of calculation so as to return low, fast, accurate and complete freight rate search results meeting the requirements of users. The system has a large number of airline users and agent users, who are requesting a fare search almost every moment. In order to avoid the problem that a certain type of freight rate search request searches freight rates in a large amount in a certain time range to cause the shortage of system resources, the response time of the system is increased, and even the whole system is unavailable. It is necessary to flow control the rate search request before performing the rate search in response to each rate search request. For example, if the number of times of performing the corresponding freight rate search in response to a certain type of freight rate search request exceeds a preset value within a certain time range, the corresponding freight rate search may not be performed when the type of freight rate search request is subsequently received, so as to ensure the availability and stability of the freight rate search system.
The inventor researches and discovers that the conventional freight rate searching system generally controls flow by a front-end system, but because the processing capacity of the front-end system is limited, the requests are generally not analyzed and classified in detail, and all freight rate searching requests are simply controlled from a time dimension. For example, different users have different needs for the fare search of tickets to different countries in different time periods, and if the needs for the fare search of tickets to country a are large, corresponding flow control information can be configured to perform special flow control on the fare search request of tickets to country a. For example, if the request type of a specific search request is a multi-stage request (the number of destinations input by the user is 3 or more, for example, from a to B, from B to C, from C to D, and from D back to a), the resource consumption of the freight rate search system is large when calculating the multi-stage request, and the response time is also long, so that it is necessary to control the flow rate of the multi-stage request. For another example, for an operation rate search request whose request type is calendar search, the request may search all operation rates within 7 days, or all operation rates within a larger time range, instead of a single operation rate of a certain day, that is, the operation rate search request whose request type is calendar search also consumes system resources and increases response time, so that the operation rate search request whose request type is calendar search may be subjected to flow control.
In order to solve the above problems, the present invention provides a flow control method, an apparatus, a device and a storage medium for an operational price search system, which implement that a backend system of the operational price search system performs detailed analysis on an operational price search request through a backend flow control method based on a distributed cache system, obtains a service scene corresponding to the operational price search request, searches for pre-configured flow control index information of the service scene in configuration information, and implements accurate flow control on the operational price search request of the service scene according to the flow control index information. For example, flow control can be performed separately for different user identities, different sales channels, and different fare search types. Different flow key values are constructed by combining multi-dimensional information such as different user identities, different sales channels, different search types and the like, namely different flow key values can correspond to different service scenes, and the user identities, the sales channels and the search types which can correspond to different service scenes can be different.
The invention can configure the flow control index information of different flow key values in the configuration information base in advance, after the back-end system obtains the freight rate search request and analyzes the freight rate search request to obtain the flow key value corresponding to the freight rate search request, the back-end system searches the configuration information base to obtain the flow control index information of the flow key value, and then the flow control is carried out on the freight rate search request according to the flow control index information.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
As shown in fig. 1, the present invention provides a flow control method of a freight rate search system, including:
s100, obtaining a freight rate search request;
optionally, the execution main body of the method may be a back-end system of the freight rate search system, and the back-end system may obtain the freight rate search request sent by the user, and then may perform flow control on the freight rate search request according to the method provided by the invention.
Optionally, the method provided by the present invention may be based on a distributed cache (for example, a memcache), and operates at a back end, and the back end has a strong computing capability, so that the execution efficiency of the present invention may be improved to a certain extent.
Optionally, the freight rate search request may be a multi-segment request or a single-segment request; it may be a date search request, a calendar search request, etc. That is, one freight rate search request may include a plurality of request types and may also include one request type. For a rate search request, the more types of requests it includes, the more detailed the rate it requests the search, i.e., the smaller the scope of the search.
S200, analyzing the freight rate search request to obtain the request type of the freight rate search request and the identity information of a user sending the freight rate search request;
optionally, when the user sends the freight rate search request, the user may input a parameter of the request type, the request type of the freight rate search request may be represented by the parameter, and different parameters may correspond to different request types and the number of request types, which is not limited in the present invention. After obtaining the freight rate search request, the back-end system may parse the freight rate search request to obtain all request types and the identity information of the user included in the freight rate search request, which is not limited in the present invention.
Optionally, the request types may be divided from different dimensions, for example, the request types may be divided into a date search request and a calendar search request from a time range, and may be divided into a lowest price mode and a full bay mode from a query mode, and various other dividing manners are also available, which is not limited in the present invention.
Optionally, the user may not input the parameter of the request type when sending the freight rate search request. I.e., the price search request may not include the request type. In this case, if the demand of the user's freight rate search request is large, the flow control index information for the user as a whole may be configured, and the flow control index information for the user's specific freight rate search request may not be configured separately, and the flow control index information may include a preset flow threshold value as described below.
S300, constructing a traffic key value of the freight rate search request according to the request type and the identity information;
optionally, the traffic key value of the freight rate search request may be constructed by combining the request type and the identity information obtained by analyzing the specific one or one category of freight rate search requests, and the traffic key value may be understood as an identifier of the specific one or one category of freight rate search requests.
Optionally, if the request type of the freight rate search request is not obtained through analysis, a traffic key value for the user sending the freight rate search request may be constructed, which is not limited in the present invention.
Optionally, the corresponding preset traffic threshold is subsequently searched for by using the traffic key value, so that the traffic control of the freight rate search request is performed according to the preset traffic threshold.
S400, searching a preset flow threshold corresponding to the flow key value;
optionally, for a specific traffic key, a preset traffic threshold of the traffic key may be configured in advance in the configuration information base, so that after the traffic key is obtained, the preset traffic threshold corresponding to the traffic key is searched according to the traffic key, which is not limited in the present invention.
S500, responding to the freight rate search request to search for the freight rate if the preset flow threshold is not found;
optionally, if the preset flow threshold is not found, it is indicated that the preset flow threshold of the flow key value is not configured, that is, it is not necessary to perform flow control on the freight rate search request corresponding to the flow key value. Therefore, the method and the device can respond to the freight rate search request, perform corresponding freight rate search, and send the search result to the corresponding user, which is not limited by the invention.
Optionally, the freight rate search requirements of some service scenarios are not very large, and in an ideal range that the freight rate search system can bear, the freight rate search requests of the service scenarios do not need to be subjected to flow control, that is, preset flow thresholds of the freight rate search requests may not be configured.
In some alternative embodiments, in combination with the embodiment shown in fig. 1, the method further comprises:
if the preset flow threshold is not found, judging whether the flow key value exists in a monitoring table or not, if so, increasing the current searching times of the flow key value in the monitoring table by 1, and if not, establishing the flow key value in the monitoring table.
Optionally, if the preset flow threshold is not found, it indicates that the request times of the freight rate search request corresponding to the preset flow threshold to the freight rate search system are not many, and the request is not controlled within a range that the freight rate search system can bear, that is, the freight rate search request does not need to be controlled.
However, the traffic control of the freight rate search request is not required at present, and the traffic control of the freight rate search request may not be performed at all times, which is not representative. Therefore, for the freight rate search request which does not need to perform flow control at present, the current request times of the freight rate search request to the freight rate search system can be recorded. Since the preset traffic threshold of the traffic key value is searched once according to the traffic key value corresponding to the operational price search request every time an operational price search request is received, the current search times of the traffic key value or the current search times of the traffic threshold of the traffic key value can be recorded, which is not limited in the present invention.
In combination with the previous embodiment, in certain alternative embodiments, the method further comprises:
if the flow key value exists in the monitoring table, whether the current searching times of the flow key value is larger than a preset threshold value or not is judged, and if the current searching times of the flow key value is larger than the preset threshold value, the preset flow threshold value of the flow key value is configured.
Optionally, if the current search times of the traffic key value are greater than the preset threshold, it is indicated that it is necessary to perform flow control on the freight rate search request corresponding to the traffic key value subsequently, so that the preset traffic threshold of the traffic key value may be configured, which is not limited in the present invention.
Optionally, if the current search times of the traffic key value are not greater than the preset threshold, it indicates that it is still not necessary to perform flow control on the freight rate search request corresponding to the traffic key value, so the current search times of the traffic key value may be continuously recorded in the monitoring table, which is not limited in the present invention.
S600, if the preset flow threshold is found, requesting to acquire the current actual flow of the flow key value;
optionally, if the preset flow threshold is found, it indicates that the flow control needs to be performed on the freight rate search request corresponding to the flow key value, so that the current actual flow of the flow key value can be requested to be obtained.
Optionally, the present invention may count the current actual traffic of each traffic key value in real time, and update and store the counted result in the storage device in real time, for example, store the counted result in the distributed cache system of the present invention, so as to obtain the current actual traffic corresponding to the traffic key value by executing step S600 when necessary.
Optionally, the current actual flow of a specific flow key value may be understood as the number of times that the back-end system obtains the freight rate search request corresponding to the flow key value within a certain time range, and the certain time range may be set according to actual needs, which is not limited by the present invention. In this way, each time the backend system obtains a freight search request, the current actual traffic corresponding to the traffic key value is increased by 1.
Optionally, in some optional embodiments, the current actual traffic is a current request number of the freight rate search request corresponding to the traffic key value;
increasing the current actual flow of the flow key value corresponding to the freight rate search request by 1 after carrying out one-time freight rate search; or, the current actual flow of the flow key value is increased by 1 after the current actual flow of the flow key value is obtained once.
S700, responding to the freight rate search request and searching for the freight rate if the request for acquiring the current actual flow fails;
optionally, if the request for obtaining the current actual flow fails, it indicates that the current actual flow cannot be provided due to communication interruption between the back-end system and a storage device storing the current actual flow or a failure of the storage device. No matter what reason causes failure in obtaining the current actual flow, if the flow control is performed on the freight rate search request corresponding to the current actual flow under the condition that the current actual flow is not obtained, the normal freight rate search request may be limited, and the capacity of the freight rate search system for providing the freight rate search service is reduced. It is possible in this case to perform a freight rate search in response to the freight rate search request and transmit the search result to the user.
S800, if the current actual flow is successfully acquired, judging whether the current actual flow is not greater than the preset flow threshold value;
optionally, if the current actual flow is successfully obtained, it may be determined whether flow control needs to be performed on the freight rate search request corresponding to the current actual flow according to the current actual flow, and it is an implementation manner by determining whether the current actual flow is not greater than the preset flow threshold, and any feasible manner belongs to the protection scope of the present invention, which is not limited by the present invention.
S810, responding to the freight rate search request and searching for the freight rate if the current actual flow is not larger than the preset flow threshold;
optionally, if the current actual flow is not greater than the preset flow threshold, it is indicated that the processing capability of the freight rate search system for the freight rate search request corresponding to the current actual flow does not reach the preset upper limit, and the freight rate search request may be continuously processed, so that the freight rate search may be performed in response to the freight rate search request, and the search result is sent to the user.
And S820, if the current actual flow is larger than the preset flow threshold, not performing freight rate search, and returning error report information to the user.
Optionally, if the current actual flow is greater than the preset flow threshold, it is indicated that the processing capacity of the freight rate search system for the freight rate search request corresponding to the current actual flow has reached a preset upper limit. If the rate search request is processed again, the capacity of the rate search system for processing other rate search requests may be reduced, and even the entire rate search system may not be available. So that the corresponding freight rate search can be avoided and the error information can be returned to the user. In this way, specialized flow control for different rate search requests can be implemented.
Optionally, the freight rate search request may correspond to traffic key values one to one, the traffic key values may correspond to preset traffic thresholds one to one, the traffic key values may also correspond to current actual traffic one to one, the preset traffic thresholds corresponding to the traffic key values may be searched in the configuration information base according to the traffic key values, or the current actual traffic corresponding to the traffic key values may be searched in the storage device according to the traffic key values, which is not limited in the present invention.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In some embodiments, the user's client and the rate search system may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
In some optional embodiments, in combination with the embodiment shown in fig. 1, the step S400 includes:
inquiring whether the configuration information of the flow key value exists in a configuration information library, if so, obtaining a preset time length of the flow key value and a preset flow threshold value of the flow key value from the configuration information, wherein the preset flow threshold value is a preset flow threshold value of the flow key value within the preset time length, and the preset flow threshold value is matched with the preset time length.
In combination with the previous embodiment, in some optional embodiments, the step S800 includes:
if the current actual flow of the flow key value within a first time length is successfully acquired from the caching device and the first time length is equal to the preset time length, judging whether the current actual flow is not greater than the preset flow threshold value;
if the current actual flow of the flow key value within the first time length is successfully obtained from the caching device and the first time length is not equal to the preset time length, whether the current actual flow is not greater than the product of the preset flow threshold and a first scaling factor or not is judged, wherein the ratio of the first time length to the preset time length is equal to the first scaling factor.
Optionally, for a traffic key value, only one preset time length may be configured. That is, only configuration information within a preset time length range for the traffic key value is configured, including a preset traffic threshold. For example, if the preset time length of a specific traffic key is 24 hours, it indicates that the preset traffic threshold of the traffic key is a traffic threshold in the recent 24-hour range, and if the current actual traffic (the actual cumulative traffic in the recent 24 hours) of the traffic key is greater than the preset traffic threshold (the maximum traffic threshold allowed by the freight rate search system and within 24 hours of the traffic key), it indicates that the current access volume of the traffic key is large, and it is necessary to perform traffic control.
Optionally, if the preset time length is not consistent with the first time length, it is indicated that the current actual flow of the specific one of the flow key values is not consistent with the preset flow threshold value in the time range, and there is no comparability, and the preset flow threshold value may be multiplied by the first scaling factor to obtain a product, and the product is compared with the current actual flow. For example, if the preset time duration is 24 hours and the current actual flow rate is 1 hour, the preset flow rate threshold may be multiplied by twenty-fourth to obtain a product, and the product is compared with the current actual flow rate.
In combination with the previous embodiment, in some optional embodiments, the step S700 includes:
if the current actual flow of the flow key value within the first time length is successfully obtained from the caching device, whether the current actual flow is not larger than the preset flow threshold value or not is judged, wherein the ratio of the time length carried by the flow key value to the first time length is equal to the first scaling factor.
Optionally, for a traffic key, only a preset traffic threshold for a time length may be configured in the configuration information base, but the current actual traffic of the traffic key is stored in the storage device, and the time spans of the preset traffic threshold and the current actual traffic may be different. That is, the time length of the current actual traffic stored in the storage device is not necessarily matched with the time length of the traffic key configured in the configuration information base, so that the current actual traffic of the traffic key within a first time length can be obtained, and the first time length is matched with the time length of the traffic key configured in the configuration information base. For example, if the time length of the preset traffic threshold of the traffic key 1 configured in the configuration library is 1 hour for the traffic key 1, and the current actual traffic of the traffic key 1 stored in the storage device is the current actual traffic within the latest 24 hours, the current actual traffic of the traffic key 1 within the latest 1 hour or the current actual traffic of the traffic key 1 per hour averaged within the latest 24 hours may be obtained from the storage device. In this way, the number of configuration information and traffic key values in the configuration information base can be reduced.
Although the operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 2, the present invention provides a flow control device of a freight rate search system, including: the system comprises a request obtaining unit 100, an analysis unit 200, a key value construction unit 300, a threshold value searching unit 400, a flow request unit 500, a flow judgment unit 600, an error reporting unit 700 and a freight rate searching unit 800;
the request obtaining unit 100 is configured to execute a obtain rate search request;
the analyzing unit 200 is configured to perform analyzing the freight rate search request to obtain a request type of the freight rate search request and identity information of a user sending the freight rate search request;
the key value construction unit 300 is configured to execute construction of a traffic key value of the freight rate search request according to the request type and the identity information;
the threshold search unit 400 is configured to perform search for a preset traffic threshold corresponding to the traffic key, trigger the freight rate search unit 800 if the preset traffic threshold is not found, and trigger the traffic request unit 500 if the preset traffic threshold is found;
the freight rate search unit 800 configured to perform a freight rate search in response to the freight rate search request;
the traffic request unit 500 is configured to execute a request for obtaining the current actual traffic of the traffic key, trigger the freight rate search unit 800 if the request for obtaining the current actual traffic fails, and trigger the traffic determination unit 600 if the request for obtaining the current actual traffic succeeds;
the flow determining unit 600 is configured to perform a determination on whether the current actual flow is not greater than the preset flow threshold, trigger the freight rate searching unit 800 if the current actual flow is not greater than the preset flow threshold, and trigger the error reporting unit 700 if the current actual flow is greater than the preset flow threshold;
the error reporting unit 700 is configured to perform no freight rate search and return error reporting information to the user.
In some optional embodiments, in combination with the embodiment shown in fig. 2, the threshold value searching unit 400 includes: configuring an information inquiry subunit and a threshold value searching subunit;
the configuration information query subunit is configured to execute query on whether the configuration information of the traffic key value exists in a configuration information library, and if so, trigger the threshold value search subunit;
the threshold lookup subunit is configured to execute obtaining, from the configuration information, a preset time length of the traffic key and a preset traffic threshold of the traffic key, where the preset traffic threshold is a traffic threshold of the preset traffic key within the preset time length, and the preset traffic threshold is matched with the preset time length.
In combination with the previous embodiment, in some optional embodiments, the traffic request unit 500 includes: a first traffic request subunit and a second traffic request subunit;
the flow rate determination unit 600 includes: a first flow rate judging subunit and a second flow rate judging subunit;
the first traffic request subunit is configured to trigger the first traffic determination subunit if the current actual traffic of the traffic key value within a first time length is successfully acquired from the cache device and the first time length is equal to the preset time length;
the first flow rate judging subunit is configured to perform judgment on whether the current actual flow rate is not greater than the preset flow rate threshold;
the second traffic request subunit is configured to trigger the second traffic determination subunit if the current actual traffic of the traffic key value within the first time length is successfully acquired from the cache device and the first time length is not equal to the preset time length;
the second flow rate judging subunit is configured to perform judgment on whether the current actual flow rate is not greater than a product of the preset flow rate threshold and a first scaling factor, where a ratio of the first time length to the preset time length is equal to the first scaling factor.
In some alternative embodiments, in combination with the embodiment shown in fig. 1, the apparatus further comprises: the device comprises a monitoring table unit, a frequency increasing unit and a key value establishing unit;
the monitoring table unit is configured to execute, if the threshold value searching unit 400 does not search the preset traffic threshold value, determining whether the traffic key value exists in the monitoring table, if so, triggering the frequency increasing unit, and if not, triggering the key value establishing unit;
the number increasing unit is configured to increase the current lookup number of the traffic key values in the monitoring table by 1;
the key value establishing unit is configured to execute establishing the traffic key value in the monitoring table.
With reference to the previous embodiment, in some optional embodiments, the flow control device of the freight rate search system further includes: the device comprises a frequency judging unit and a configuration threshold unit;
the frequency judging unit is configured to execute the steps of judging whether the current searching frequency of the flow key value is greater than a preset threshold value or not if the flow key value exists in a monitoring table, and triggering the configuration threshold value unit if the current searching frequency of the flow key value is greater than the preset threshold value;
the configuration threshold unit is configured to execute configuration of a preset traffic threshold of the traffic key value.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of an element does not in some cases constitute a limitation on the element itself,
the present invention provides a storage medium characterized by storing a program that realizes any one of the flow control methods of the rate search system when executed by a processor.
The flow control device of the freight rate search system comprises a processor and a memory, wherein the request obtaining unit 100, the analysis unit 200, the key value construction unit 300, the threshold value search unit 400, the flow request unit 500, the flow judgment unit 600, the error report unit 700, the freight rate search unit 800 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and different service scenes are matched by constructing a flow key value by adjusting kernel parameters, so that specific accurate flow control is provided for different service scenes. Meanwhile, the flow can be controlled from the dual dimensions of the user identity and the request type. In a word, the method can convert the actual demand of the freight rate search in terms of flow into multiple self-definable dimensions, thereby providing accurate flow control for different service scenes, and avoiding the problems that the response time of the system is delayed and even the system is unavailable due to the fact that part of the service scenes excessively occupy the resources of the freight rate search system.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the flow control method of the freight rate search system when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes a flow control method of the freight rate search system when running.
As shown in fig. 3, the present invention provides a device 70, said device 70 comprising at least one processor 701, and at least one memory 702, a bus 703 connected to said processor 701; the processor 701 and the memory 702 complete communication with each other through the bus 703; the processor 701 is configured to invoke a program in the memory 702, the program at least being configured to implement the flow control method of any one of the rate search systems. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application also provides a computer program product adapted to execute a program of initializing the steps comprised by the flow control method of the rate search system as described above, when executed on a data processing device.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A flow control method of a freight rate search system is characterized by comprising the following steps:
obtaining a freight rate search request;
analyzing the freight rate search request to obtain the request type of the freight rate search request and the identity information of the user sending the freight rate search request;
constructing a traffic key value of the freight rate search request according to the request type and the identity information;
searching a preset flow threshold corresponding to the flow key value, responding to the freight rate search request to search the freight rate if the preset flow threshold is not searched, requesting to acquire the current actual flow of the flow key value if the preset flow threshold is searched, and responding to the freight rate search request to search the freight rate if the request to acquire the current actual flow fails;
if the current actual flow is successfully acquired, judging whether the current actual flow is not greater than the preset flow threshold, and if the current actual flow is not greater than the preset flow threshold, responding to the freight rate search request and performing freight rate search;
and if the current actual flow is larger than the preset flow threshold, not carrying out freight rate search and returning error report information to the user.
2. The traffic control method of the freight rate search system according to claim 1, wherein the searching for the preset traffic threshold corresponding to the traffic key value includes:
inquiring whether the configuration information of the flow key value exists in a configuration information library, if so, obtaining a preset time length of the flow key value and a preset flow threshold value of the flow key value from the configuration information, wherein the preset flow threshold value is a preset flow threshold value of the flow key value within the preset time length, and the preset flow threshold value is matched with the preset time length.
3. The traffic control method of the freight rate search system according to claim 2, wherein the determining whether the current actual traffic is not greater than the preset traffic threshold if the current actual traffic is successfully acquired comprises:
if the current actual flow of the flow key value within a first time length is successfully acquired from the caching device and the first time length is equal to the preset time length, judging whether the current actual flow is not greater than the preset flow threshold value;
if the current actual flow of the flow key value within the first time length is successfully obtained from the caching device and the first time length is not equal to the preset time length, whether the current actual flow is not greater than the product of the preset flow threshold and a first scaling factor or not is judged, wherein the ratio of the first time length to the preset time length is equal to the first scaling factor.
4. The flow control method of the freight rate search system according to claim 1, wherein the current actual flow is a current request number of the freight rate search request corresponding to the flow key value;
increasing the current actual flow of the flow key value corresponding to the freight rate search request by 1 after carrying out one-time freight rate search;
or, the current actual flow of the flow key value is increased by 1 after the current actual flow of the flow key value is obtained once.
5. The flow control method of the rate search system according to claim 1, wherein the method further comprises:
if the preset flow threshold is not found, judging whether the flow key value exists in a monitoring table or not, if so, increasing the current searching times of the flow key value in the monitoring table by 1, and if not, establishing the flow key value in the monitoring table.
6. The flow control method of the rate search system according to claim 5, wherein the method further comprises:
if the flow key value exists in the monitoring table, whether the current searching times of the flow key value is larger than a preset threshold value or not is judged, and if the current searching times of the flow key value is larger than the preset threshold value, the preset flow threshold value of the flow key value is configured.
7. A flow control apparatus of a freight rate search system, characterized by comprising: the system comprises a request obtaining unit, an analysis unit, a key value construction unit, a threshold value searching unit, a freight rate searching unit, a flow request unit, a flow judgment unit and an error reporting unit;
the request obtaining unit is configured to execute a obtain freight rate search request;
the analysis unit is configured to analyze the freight rate search request to obtain a request type of the freight rate search request and identity information of a user sending the freight rate search request;
the key value construction unit is configured to execute construction of a traffic key value of the freight rate search request according to the request type and the identity information;
the threshold searching unit is configured to search a preset traffic threshold corresponding to the traffic key value, trigger the freight rate searching unit if the preset traffic threshold is not found, and trigger the traffic requesting unit if the preset traffic threshold is found;
the freight rate searching unit is configured to execute freight rate searching in response to the freight rate searching request;
the traffic request unit is configured to execute a request for acquiring the current actual traffic of the traffic key value, trigger the freight rate search unit if the request for acquiring the current actual traffic fails, and trigger the traffic judgment unit if the current actual traffic is successfully acquired;
the flow judging unit is configured to execute judgment on whether the current actual flow is not greater than the preset flow threshold, trigger the freight rate searching unit if the current actual flow is not greater than the preset flow threshold, and trigger the error reporting unit if the current actual flow is greater than the preset flow threshold;
and the error reporting unit is configured to execute non-freight rate search and return error reporting information to the user.
8. A flow control device of a rate search system according to claim 7, wherein the device further comprises: the device comprises a monitoring table unit, a frequency increasing unit and a key value establishing unit;
the monitoring table unit is configured to execute the steps of judging whether the flow key value exists in the monitoring table or not if the preset flow threshold is not found by the threshold searching unit, if so, triggering the frequency increasing unit, and if not, triggering the key value establishing unit;
the number increasing unit is configured to increase the current lookup number of the traffic key values in the monitoring table by 1;
the key value establishing unit is configured to execute establishing the traffic key value in the monitoring table.
9. A storage medium for storing a program which when executed by a processor implements a flow control method of the rate search system of any one of claims 1 to 6.
10. An apparatus comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke a program in the memory, the program at least being configured to implement the flow control method of the rate search system of any of claims 1 to 6.
CN202011195289.9A 2020-10-30 2020-10-30 Flow control method, device, equipment and storage medium of freight rate search system Pending CN112307338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011195289.9A CN112307338A (en) 2020-10-30 2020-10-30 Flow control method, device, equipment and storage medium of freight rate search system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011195289.9A CN112307338A (en) 2020-10-30 2020-10-30 Flow control method, device, equipment and storage medium of freight rate search system

Publications (1)

Publication Number Publication Date
CN112307338A true CN112307338A (en) 2021-02-02

Family

ID=74333214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011195289.9A Pending CN112307338A (en) 2020-10-30 2020-10-30 Flow control method, device, equipment and storage medium of freight rate search system

Country Status (1)

Country Link
CN (1) CN112307338A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024148817A1 (en) * 2023-01-10 2024-07-18 中国民航信息网络股份有限公司 Data processing system and method, and electronic device and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912852B1 (en) * 2008-05-02 2011-03-22 Amazon Technologies, Inc. Search-caching and threshold alerting for commerce sites
CN102780603A (en) * 2011-05-11 2012-11-14 阿里巴巴集团控股有限公司 Web traffic control method and device
CN106569893A (en) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 Traffic control method and equipment
CN109784065A (en) * 2018-12-04 2019-05-21 北京达佳互联信息技术有限公司 Access control method, device, server and storage medium
CN110417671A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 The current-limiting method and server of data transmission
CN110768912A (en) * 2019-10-21 2020-02-07 中国民航信息网络股份有限公司 API gateway current limiting method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912852B1 (en) * 2008-05-02 2011-03-22 Amazon Technologies, Inc. Search-caching and threshold alerting for commerce sites
CN102780603A (en) * 2011-05-11 2012-11-14 阿里巴巴集团控股有限公司 Web traffic control method and device
CN106569893A (en) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 Traffic control method and equipment
CN109784065A (en) * 2018-12-04 2019-05-21 北京达佳互联信息技术有限公司 Access control method, device, server and storage medium
CN110417671A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 The current-limiting method and server of data transmission
CN110768912A (en) * 2019-10-21 2020-02-07 中国民航信息网络股份有限公司 API gateway current limiting method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024148817A1 (en) * 2023-01-10 2024-07-18 中国民航信息网络股份有限公司 Data processing system and method, and electronic device and computer storage medium

Similar Documents

Publication Publication Date Title
US10560465B2 (en) Real time anomaly detection for data streams
US8346758B2 (en) Method and system for transmitting a query in a wireless network
CN112822298B (en) Business service capacity expansion and reduction method, device, medium and electronic equipment
CN103686591A (en) Method and system for acquiring position information
US20130117423A1 (en) Methods for managing data synchronization and devices thereof
CN105992338A (en) Positioning method and apparatus
CN111782692B (en) Frequency control method and device
CN108228322B (en) Distributed link tracking and analyzing method, server and global scheduler
CN113242297B (en) Service system and service state adjusting method
CN114189885A (en) Network element information processing method, equipment and storage medium
CN113596078A (en) Service problem positioning method and device
CN108228432A (en) A kind of distributed link tracking, analysis method and server, global scheduler
CN114466031B (en) CDN system node configuration method, device, equipment and storage medium
CN112307338A (en) Flow control method, device, equipment and storage medium of freight rate search system
US8180857B2 (en) Method for downloading file in parallel
CN114745275B (en) Node updating method and device in cloud service environment and computer equipment
CN117499403A (en) Computing task scheduling method and device for computing power network
CN117081996A (en) Flow control method based on real-time feedback and soft value of server and related equipment
CN109286532B (en) Management method and device for alarm information in cloud computing system
US20210250243A1 (en) Node Switching Method, Network Node, Network System and Storage Medium
US10505944B2 (en) Automated granting of access to networks and services for pre-paid devices
CN112910988A (en) Resource acquisition method and resource scheduling device
CN112596974A (en) Full link monitoring method, device, equipment and storage medium
CN113055419B (en) Information sending method and device
CN114546979B (en) Distributed storage system, and management method, device and equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination