Data pushing control method, device and system and storage medium

By using multiple servers in the data push system, each server is responsible for a unique service interval, it solves the problem of excessive load when a single server processes large amounts of data, and achieves faster data push speed and higher system stability.

CN119728764APending Publication Date: 2025-03-28SHENZHEN DIDATRAVEL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656903.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, a single server is overloaded when processing large amounts of hotel data, resulting in increased response time and slow data push speed, which seriously affects user experience and business operations.

Method used

Multiple servers are used, each server has a unique service interval, and the hotel number is allocated to their respective service intervals through modular operations to realize batch processing of data push tasks.

Benefits of technology

By assigning tasks to multiple servers, data push speed is improved, the problem of excessive load on a single server is avoided, and the risk of a single point of failure is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728764A_ABST
    Figure CN119728764A_ABST
Patent Text Reader

Abstract

The invention relates to a data pushing control method, device and system and a storage medium. The method comprises the following steps: respectively acquiring hotel lists to be processed by utilizing a plurality of servers; each server is utilized to judge the number of a target hotel belonging to the service interval in the hotel list; and controlling each server to push related data to the hotels with the target hotel numbers in the service interval. According to the invention, the data pushing speed can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a control method, device, system and storage medium for data push. Background Art

[0002] Data push refers to the process of transferring data from one system to another. In the hotel business, data push usually involves transferring relevant hotel information (such as room prices, availability, booking status, etc.). The timely update and synchronization of this information is crucial to ensure smooth user experience and business operations.

[0003] The existing data push system uses a single server to process data push. However, as the business scale continues to expand, the number of hotels that need to be pushed increases dramatically. When the number of hotels that need to be pushed is very large, the load on a single server is also relatively large. Excessive load will increase the response time of the server, which in turn leads to slow data push speed, seriously affecting user experience and business operations. Summary of the invention

[0004] The embodiments of the present application provide a data push control method, device, system and storage medium, which aim to solve the problem of slow data push speed caused by using a single server.

[0005] In a first aspect, an embodiment of the present application provides a control method for data push, wherein a data push system includes multiple servers, each server is provided with a corresponding service interval, the values ​​of each service interval do not overlap, and the values ​​of all service intervals cover a preset value range, and the method includes:

[0006] Use multiple servers to obtain the hotel lists to be processed respectively;

[0007] Using each server to determine the target hotel number in the hotel list that is within the service range;

[0008] Control each server to push relevant data to the hotels with target hotel numbers within this service range.

[0009] A further technical solution is to use each server to determine the target hotel number in the hotel list that belongs to the service range, including:

[0010] Use the server to perform modular operations on the hotel numbers in the hotel list in sequence to obtain the corresponding modular remainders;

[0011] It is determined whether the modulo remainder is within the service range of the server. If the modulo remainder is within the service range of the server, the hotel number is used as the target hotel number within the service range.

[0012] A further technical solution is to use the server to perform modular operations on the hotel numbers in the hotel list in sequence to obtain corresponding modular remainders, including:

[0013] Get the preset configuration value;

[0014] The server performs modular operations on the hotel numbers in the hotel list based on preset configuration values ​​to obtain corresponding modular remainders.

[0015] A further technical solution is to obtain a preset configuration value, including:

[0016] Get the total number of servers in the data push system and the preset allocation granularity of the servers;

[0017] Multiply the total number of servers by the preset allocation granularity to obtain the product value;

[0018] Get the first prime number greater than the product value;

[0019] The first prime number greater than the product value is used as the preset configuration value.

[0020] A further technical solution is that before using multiple servers to respectively obtain the list of hotels to be processed, the method further includes:

[0021] Get the current service range set of all servers;

[0022] Dynamically adjust the current service interval set according to the operation status of each server to obtain an adjusted service interval set;

[0023] Based on the adjusted service interval set, updating the preset public database;

[0024] Each server is used to determine the target hotel number in the hotel list that is within the service range, including:

[0025] Each server is used to obtain an adjusted service interval set from a preset public database, and based on the adjusted service interval set, the target hotel numbers in the hotel list that belong to the service interval are respectively determined.

[0026] A further technical solution is to dynamically adjust the current service interval set according to the operation status of each server to obtain an adjusted service interval set, including:

[0027] If a start busy instruction is received from the target server, the service interval of the target server is reduced, and the service intervals of all servers except the target server are increased.

[0028] A further technical solution is to reduce the service range of the target server and increase the service range of all servers except the target server, including:

[0029] Reduce the service range of the target server;

[0030] Obtaining a reduction difference in the service interval of the target server;

[0031] Calculate the average of the reduced difference and the number of remaining servers;

[0032] Based on the average value, the service intervals of the remaining servers are increased respectively.

[0033] In a second aspect, an embodiment of the present application further provides a control device for data push, comprising a unit for executing the above method.

[0034] In a third aspect, an embodiment of the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.

[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.

[0036] The embodiment of the present application provides a control method, device, system and storage medium for data push. The method includes: using multiple servers to obtain a list of hotels to be processed respectively; using each server to determine the target hotel number in the hotel list that belongs to the service interval; controlling each server to push relevant data to the hotel with the target hotel number in the service interval. In the embodiment of the present application, since multiple servers are set up, each server is provided with a corresponding service interval, the values ​​of each service interval do not overlap, and the values ​​of all service intervals cover the preset value range, therefore, the data push task can be assigned to multiple servers for batch processing, and each server only processes the data within its own service interval, thereby improving the data push speed, avoiding the problem of slow data push speed caused by the increase of server response time due to excessive load when a single server processes a large amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0040] Figure 1 A flowchart of a method for controlling data push provided in an embodiment of the present application.

[0041] Figure 2 A flowchart of another embodiment of the data push control method provided in an embodiment of the present application.

[0042] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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 making creative work are within the scope of protection of this application.

[0044] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0045] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0046] It should also be understood that the terms used in the specification of this application are merely for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0047] It should be further understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0048] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.

[0049] To solve the problem of slow data push speed caused by using a single server in the prior art, this application provides a control method for data push, which can improve the data push speed.

[0050] The data push system includes multiple servers, each server is provided with a corresponding service interval, the values of each service interval do not overlap, and the values of all service intervals cover a preset value range.

[0051] For example, [a, b] is the service interval of a server, which can also be understood as the weight of the number of hotels that the server needs to process. If the preset value range is [0, Y], then the value range of a is 0 <= a < Y, and the value range of b is a <= b < Y.

[0052] Specifically, the data push system includes four servers (A, B, C, D), and the preset value range is [0, 100]. Then the interval range responsible for each server is: Server A: [0, 25], Server B: [26, 50], Server C: [51, 75], Server D: [76, 100].

[0053] Refer to Figure 1 , Figure 1 which is a schematic flow diagram of the control method for data push provided by the embodiment of this application. The method includes:

[0054] Step 110: Use multiple servers to respectively obtain the list of hotels to be processed.

[0055] For example, the hotel list is x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, x7=450.

[0056] Step 120: Utilize each server to determine the target hotel number in the hotel list that is within the service range.

[0057] For example, the hotel list is x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, x7=450, and the multiple servers are respectively server A: [0,25], server B: [26,50], server C: [51,75], server D: [76,100] mentioned above.

[0058] Server A then determines in turn whether x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, and x7=450 belong to the target hotel numbers within the service interval [0,25].

[0059] Server B determines in sequence whether x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, and x7=450 belong to the target hotel numbers within the service interval [26,50].

[0060] Server C determines in sequence whether x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, and x7=450 belong to the target hotel numbers within the service interval [51,75].

[0061] Server D determines in sequence whether x1=15, x2=60, x3=90, x4=123, x5=200, x6=300, and x7=450 belong to the target hotel numbers within the service interval [76,100].

[0062] Step 130: Control each server to push relevant data to the hotel with the target hotel number within the service range.

[0063] For example, hotel numbers 15 and 123 belong to the service interval [0,25] of server A, then hotel numbers 15 and 123 are the target hotel numbers of server A, and server A pushes relevant data to hotels numbered 15 and 123.

[0064] The hotel number 450 belongs to the service interval [0,25] of server B, and the hotel number 450 is the target hotel number of server B. Therefore, server B collects the hotel number 450 and pushes relevant data to the hotel number 450.

[0065] Similarly, server C and server D push relevant data for their respective target hotel numbers.

[0066] In this way, since multiple servers are set up in this embodiment, each server has a corresponding service interval, the values ​​of each service interval do not overlap, and the values ​​of all service intervals cover the preset value range. Therefore, the data push task can be assigned to multiple servers for batch processing. Each server only processes the data within its own service interval, thereby improving the data push speed and avoiding the problem of slow data push speed caused by increased server response time due to excessive load when a single server processes a large amount of data.

[0067] In addition, a single server may not be able to bear such a load, resulting in a service crash. Therefore, by assigning the data push task to multiple servers, each server is only responsible for processing the hotel data within its service range, thereby effectively sharing the load. In addition, the multi-server architecture reduces the risk of single point failure. Even if a server has a problem, other servers can continue to work, ensuring the stability of the system.

[0068] Referring to the second embodiment of the data push control method provided in the embodiments of the present application, the second embodiment includes:

[0069] Step 210: Utilize multiple servers to obtain hotel lists to be processed respectively.

[0070] Step 220: Use the server to perform modular operations on the hotel numbers in the hotel list in sequence to obtain corresponding modular remainders.

[0071] For example, there are 4 servers, and each server is responsible for the service interval: Server A: [0,25], Server B: [26,50], Server C: [51,75], Server D: [76,100]. Y = 101, because the interval is from 0 to 100. Suppose there are the following unevenly distributed hotel numbers: x1 = 15, x2 = 60, x3 = 90, x4 = 123, x5 = 200, x6 = 300, x7 = 450.

[0072] Server A takes the modulus of Y for each hotel number in turn according to formula 1: xmodY to obtain the corresponding modulus remainder, and then checks whether the corresponding modulus remainder falls within the service range.

[0073] Specifically: x1modY=15mod101=15, and the modulo remainder 15 is within the service interval [0,25].

[0074] x2modY=60mod101=60, the modulus remainder 60 is not within the service interval [0,25].

[0075] X3modY=90mod101=90, the modulus remainder 90 is not within the service interval [0,25].

[0076] X4modY=123mod101=22, the modulus remainder 22 is within the service interval [0,25].

[0077] X5modY=200mod101=99, the modulus remainder 99 is not within the service interval [0,25].

[0078] X6modY=300mod101=98, the modulus remainder 98 is not within the service interval [0,25].

[0079] X7modY=450mod101=47, the modulo remainder 47 is not in the service interval [0,25].

[0080] That is, 15 and 22 are within the service interval [0,25], so 15 and 123 belong to the target hotel numbers of server A. Therefore, server A collects hotel numbers 15 and 123 and starts pushing quotations to hotels with hotel numbers 15 and 123.

[0081] Similarly, server B takes each hotel number modulo Y in turn according to formula 1: xmodY to obtain the corresponding modulo remainder, and then checks whether the corresponding modulo remainder falls within the service range.

[0082] Specifically: x1modY=15mod101=15, the modulus remainder 15 is not within the service interval [26,50].

[0083] x2modY=60mod101=60, the modulus remainder 60 is not within the service interval [26,50].

[0084] X3modY=90mod101=90, the modulus remainder 90 is not within the service interval [26,50].

[0085] X4modY=123mod101=22, the modulus remainder 22 is not within the service interval [26,50].

[0086] X5modY=200mod101=99, the modulus remainder 99 is not within the service interval [26,50].

[0087] X6modY=300mod101=98, the modulus remainder 98 is not within the service interval [26,50].

[0088] X7modY=450mod101=47, the modulus remainder 47 is within the service interval [26,50].

[0089] That is, 47 is within the service interval [26,50], so 450 belongs to the target hotel number of server B. Therefore, server B collects the hotel number 450 and starts pushing quotations to the hotel number 450.

[0090] In addition, when the hotel number is very long, the xmodY operation can be used to quickly determine which service interval the hotel number belongs to.

[0091] For example, server A: [0,25], server B: [26,50], server C: [51,75], server D: [76,100].

[0092] The hotel number is 566985, and the result of 566985Mod71 is 50. Based on the result 50, we can directly determine that the hotel number 566985 belongs to server B: [26,50].

[0093] Step 230: Determine whether the modular remainder is within the service interval of the server. If the modular remainder is within the service interval of the server, the hotel number is used as the target hotel number within the service interval.

[0094] Step 240: Control each server to push relevant data to the hotel with the target hotel number within the service range.

[0095] In this way, this embodiment can improve the speed of determining which service interval the hotel number belongs to by adopting the xmodY operation, thereby improving the data push speed.

[0096] Referring to the third embodiment of the data push control method provided in the embodiments of the present application, the third embodiment includes:

[0097] Step 310: Utilize multiple servers to obtain hotel lists to be processed respectively.

[0098] Step 320: Obtain preset configuration values.

[0099] Step 330: Using the server based on preset configuration values, perform modular operations on the hotel numbers in the hotel list in sequence to obtain corresponding modular remainders.

[0100] Step 340: Determine whether the modular remainder is within the service range of the server. If the modular remainder is within the service range of the server, use the hotel number as the target hotel number within the service range.

[0101] Step 350: Control each server to push relevant data to the hotel with the target hotel number within the service range.

[0102] Referring to the fourth embodiment of the data push control method provided in the embodiments of the present application, the fourth embodiment includes:

[0103] Step 410: Utilize multiple servers to obtain hotel lists to be processed respectively.

[0104] Step 420: Obtain the total number of servers in the data push system and the preset allocation granularity of the servers.

[0105] Among them, the preset allocation granularity of the server may include but is not limited to one tenth, one hundredth, and one thousandth, and can be set specifically according to actual conditions, and this application does not limit it here.

[0106] Step 430: Multiply the total number of servers by the preset allocation granularity to obtain a product value.

[0107] Step 440: Get the first prime number that is greater than the product value.

[0108] Step 450: Use the first prime number that is greater than the product value as a preset configuration value.

[0109] For step 430 to step 450, for example, the total number of servers in the data push system is 5, and the preset allocation granularity of the server is 100, then 5*100=500, and the first prime number greater than 500 is 503, so 503 is used as the preset configuration value Y.

[0110] For another example, the total number of servers in the data push system is 4, and the preset allocation granularity of the servers is 100, then 4*100=400, and the first prime number greater than 400 is 401, so 401 is used as the preset configuration value Y.

[0111] For another example, the total number of servers in the data push system is 5, and the preset allocation granularity of the servers is 10, then 5*10=50, and the first prime number greater than 50 is 53, so 53 is used as the preset configuration value Y.

[0112] Since a prime number is a natural number greater than 1, there are no other factors except 1 and itself. That is, there are no other factors that can decompose a prime number. Therefore, the result of the modular operation will not be biased towards certain specific values, making the result more evenly distributed.

[0113] And because the properties of prime numbers ensure that each result is unique and there is no duplication or bias, when performing a modular arithmetic with a prime number Y, all possible results (from 0 to Y-1) have equal probability of occurring.

[0114] It should be noted that, in order to facilitate observation and interval configuration, the preset configuration value Y is usually a prime number within one thousand.

[0115] Step 460: Using the server based on preset configuration values, perform modular operations on the hotel numbers in the hotel list in sequence to obtain corresponding modular remainders.

[0116] Step 470: Determine whether the modular remainder is within the service range of the server. If the modular remainder is within the service range of the server, use the hotel number as the target hotel number within the service range.

[0117] Step 480: Control each server to push relevant data to the hotel with the target hotel number within the service range.

[0118] Since the hotel numbers have been iterated for a long time or are distributed in different regions, they are very uneven. However, the xmodY operation can be used to obtain a more evenly distributed value.

[0119] For example, there are 4 servers, and each server is responsible for the service interval: Server A: [0,25], Server B: [26,50], Server C: [51,75], Server D: [76,100]. Y = 101, because the interval is from 0 to 100. Suppose there are the following unevenly distributed hotel numbers: x1 = 15, x2 = 60, x3 = 90, x4 = 123, x5 = 200, x6 = 300, x7 = 450.

[0120] Server A uses formula 1: xmodY to take the modulus of Y for each hotel number in turn, and finally determines that the modulo remainders 15 and 22 are within the service interval [0,25]. Therefore, 15 and 123 belong to the target hotel numbers of server A. Therefore, server A collects hotel numbers 15 and 123 and starts pushing quotations to hotels with hotel numbers 15 and 123.

[0121] Similarly, server B takes the modulus of Y for each hotel number in turn according to formula 1: xmodY, and finally determines that the modulus remainder 47 is within the service interval [26,50], so 450 belongs to the target hotel number of server B. Therefore, server B collects the hotel number 450 and starts pushing quotes to the hotel number 450.

[0122] Similarly, servers C and D make judgments in the same way. Ultimately, hotel numbers 15 and 123 are processed by server A, hotel number 450 is processed by server B, hotel number 60 is processed by server C, and hotel numbers 90, 200, and 300 are processed by server D.

[0123] In this way, even if the original data is unevenly distributed, the ModY operation can be used to convert the unevenly distributed hotel numbers into uniformly distributed values ​​in the range of [0,100]. In this way, each hotel number can be evenly distributed to one of the four servers, achieving load balancing.

[0124] Referring to the fifth embodiment of the data push control method provided in the embodiments of the present application, the fifth embodiment includes:

[0125] Step 510: Obtain the current service range set of all servers.

[0126] Step 520: Dynamically adjust the current service interval set according to the operation status of each server to obtain an adjusted service interval set.

[0127] Wherein, step 520 may be: if a start busy instruction of the target server is received, then the service interval of the target server is reduced, and the service intervals of all servers except the target server are increased, which may specifically include the following steps:

[0128] Step 521: Reduce the service range of the target server.

[0129] Step 522: Obtain the reduction difference of the service range of the target server.

[0130] Step 523: Calculate the average value of the reduced difference and the number of remaining servers.

[0131] Step 524: Based on the average value, the service intervals of the remaining servers are increased respectively.

[0132] For example, assume that there are currently four servers (A, B, C, D), and the interval range that each server is responsible for is as follows:

[0133] Server A: [0,25];

[0134] Server B: [26,50];

[0135] Server C: [51,75];

[0136] Server D: [76,100].

[0137] If you need to reduce the interval of server A by 3 ranges, the interval of server A is reduced by 3 ranges from [0,25] to [0,22].

[0138] Distribute the reduced 3 ranges evenly to the other 3 servers, and each server adds 1 range, which means the average value is 1, as follows:

[0139] Server B: [26,50] → [23,48];

[0140] Server C: [51,75] → [49,74];

[0141] Server D: [76,100] → [75,100].

[0142] Therefore, the adjusted service interval set is as follows:

[0143] Server A: [0,22];

[0144] Server B: [23,48];

[0145] Server C: [49,74];

[0146] Server D: [75,100].

[0147] In addition, step 520 may also be: if a busy end instruction is received from the target server, the service interval of the target server is increased, and the service intervals of all servers except the target server are decreased.

[0148] Assume that there are four servers (A, B, C, D) and each server is responsible for the following range:

[0149] Server A: [0,25];

[0150] Server B: [26,50];

[0151] Server C: [51,75];

[0152] Server D: [76,100].

[0153] If you need to increase the interval of server A by 3 ranges, the interval of server A will be reduced by 3 ranges from [0,25] to [0,28].

[0154] Distribute the three added ranges evenly to the other three servers, and reduce one range on each server. The details are as follows:

[0155] Server B: [26,50] → [29,52];

[0156] Server C: [51,75] → [53,76];

[0157] Server D: [76,100] → [77,100].

[0158] Therefore, the adjusted service interval set is as follows:

[0159] Server A: [0,28];

[0160] Server B: [29,52];

[0161] Server C: [53,76];

[0162] Server D: [77,100].

[0163] Step 530: Based on the adjusted service interval set, update the preset public database.

[0164] It should be noted that the server load is usually 0 at the beginning, so it can be configured directly according to the average. That is, the data push system includes four servers (A, B, C, D), and the preset value range is [0,100]. The initial interval range responsible for each server is: Server A: [0,25], Server B: [26,50], Server C: [51,75], Server D: [76,100].

[0165] When the servers have been running for a long time and load imbalance occurs, the initial interval range of each server can be dynamically adjusted to: Server A: [0,25], Server B: [26,50], Server C: [51,75], Server D: [76,100]. For example, adjust from Server A: [0,25], Server B: [26,50], Server C: [51,75], Server D: [76,100] to Server A: [0,28]; Server B: [29,52]; Server C: [53,76]; Server D: [77,100].

[0166] The adjusted service interval set: server A: [0,28]; server B: [29,52]; server C: [53,76]; server D: [77,100] is updated to the preset database, so that the server loads the current server interval, i.e. the adjusted service interval, from the preset database and performs subsequent judgment operations.

[0167] At the same time, you can use the server status monitoring module (such as Prometheus) to trigger the listening event, load the current interval set configuration of all servers from the preset database, that is, the public database (Red is) in real time, and adjust the interval set configuration according to the current operation status of each server. For example, load the current interval set configuration of all servers to server A:

[0168] [0,28]; Server B: [29,52]; Server C: [53,76]; Server D: [77,100]. At this time, Server B starts to be busy, so it is necessary to reduce the service interval of Server B by 3 ranges. At the same time, increase the service interval of Server A, Server C and Server D by 1 range respectively. The adjusted service interval set is: Server A: [0,29], Server B: [30,50], Server C: [51,75]; Server D: [76,100].

[0169] Step 540: Utilize each server to obtain the adjusted service interval set from a preset public database, and based on the adjusted service interval set, respectively determine the target hotel numbers in the hotel list that belong to the service interval.

[0170] Step 550: Control each server to push relevant data to the hotel with the target hotel number within the service range.

[0171] In addition, the multiple servers in the above embodiments may be operated simultaneously or at different times. For example, when the program is run for the first time, multiple servers may be operated simultaneously. However, after running for a long time, each server may have a different startup time due to performance and load issues. Therefore, the time for each server to run the program is also different.

[0172] Although the startup time of each server is inconsistent, resulting in the possibility that the retrieved interval versions may be out of sync, this situation does not occur frequently or for a long time in the hotel quotation push business, and the hotel quotation data itself has a certain fault tolerance (because price verification and confirmation will be carried out before booking a hotel), so within a push cycle (for example, 1 minute), if a batch of hotels is not pushed or pushed multiple times, it will not have much impact on the overall quotation accuracy.

[0173] Secondly, since each server can register a monitoring event with a public database (such as Redis), when the interval set changes, each server can be immediately updated to the latest version of the interval data.

[0174] Combining the above embodiments and Figure 2 The data push system of the present application includes multiple servers and a server status monitoring system, and each server executes Figure 2In step 101 to step 106, each server is provided with a corresponding service interval, the values ​​of each service interval do not overlap, and the values ​​of all service intervals cover the preset value range. Therefore, the data push task can be assigned to multiple servers for batch processing. Each server only processes the data within its own service interval, thereby improving the data push speed and avoiding the problem of slow data push speed caused by increased response time of the server due to excessive load when a single server processes a large amount of data.

[0175] And, through the server status monitoring system to perform Figure 2 Steps 201 to 204 in the above process are used to dynamically adjust the service interval of each server according to the actual load of the server, thereby ensuring the load balance of each server and improving the data push speed.

[0176] Corresponding to the above data push control method, the present application also provides a data push control device. The data push control device includes a unit for executing the above data push control method, and the data push control device can be configured in a desktop computer, tablet computer, laptop computer, etc.

[0177] like Figure 3 As shown, the embodiment of the present application provides a computer device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0178] Memory 113, used for storing computer programs;

[0179] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the data push control method provided by any of the above method embodiments, including:

[0180] Use multiple servers to obtain the hotel lists to be processed respectively;

[0181] Using each server to determine the target hotel number in the hotel list that is within the service range;

[0182] Control each server to push relevant data to the hotels with target hotel numbers within this service range.

[0183] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0184] Therefore, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data push control method provided in any of the aforementioned method embodiments are implemented.

[0185] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which can store program codes. Computer-readable storage media can be non-volatile or volatile.

[0186] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0187] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0188] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0191] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0192] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for controlling data push, characterized in that: The data push system includes multiple servers, each server is provided with a corresponding service interval, the values ​​of each service interval do not overlap, and the values ​​of all service intervals cover a preset value range, and the method includes: Use multiple servers to obtain the hotel lists to be processed respectively; Using each server to determine the target hotel number in the hotel list that is within the service range; Control each server to push relevant data to the hotels with target hotel numbers within this service range.

2. The method according to claim 1, characterized in that The method of using each server to respectively determine the target hotel number in the hotel list that is within the service interval includes: Using the server to perform modular operations on the hotel numbers in the hotel list in sequence to obtain corresponding modular remainders; It is determined whether the modular remainder is within the service interval of the server. If the modular remainder is within the service interval of the server, the hotel number is used as the target hotel number within the service interval.

3. The method according to claim 2, characterized in that The using server to sequentially perform modular operations on the hotel numbers in the hotel list to obtain corresponding modular remainders includes: Get the preset configuration value; The server is used to perform modular operations on the hotel numbers in the hotel list in sequence based on preset configuration values ​​to obtain corresponding modular remainders.

4. The method according to claim 3, characterized in that The obtaining of the preset configuration value includes: Obtaining the total number of servers in the data push system and the preset deployment granularity of the servers; Multiplying the total number of servers by the preset allocation granularity to obtain a product value; Get the first prime number greater than the product value; The first prime number greater than the product value is used as a preset configuration value.

5. The method according to claim 1, characterized in that: Before using multiple servers to respectively obtain the list of hotels to be processed, the method further includes: Get the current service range set of all servers; Dynamically adjusting the current service interval set according to the operation status of each server to obtain an adjusted service interval set; Based on the adjusted service interval set, updating a preset public database; The method of using each server to respectively determine the target hotel number in the hotel list that is within the service interval includes: Each server is used to obtain an adjusted service interval set from the preset public database, and based on the adjusted service interval set, the target hotel numbers in the hotel list that belong to the service interval are respectively determined.

6. The method according to claim 5, characterized in that The dynamically adjusting the current service interval set according to the operation status of each server to obtain an adjusted service interval set includes: If a start busy instruction of the target server is received, the service interval of the target server is reduced, and the service intervals of all servers except the target server are increased.

7. The method according to claim 6, characterized in that The reducing the service interval of the target server and increasing the service intervals of all servers except the target server includes: reducing the service range of the target server; Obtaining a reduction difference of the service range of the target server; Calculate the average value of the reduced difference and the number of remaining servers; The service intervals of the remaining servers are respectively increased based on the average value.

8. A data push control device, characterized in that: The method comprises a unit for executing the method according to any one of claims 1 to 7.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 can be implemented.