WO2016091085A1 - Data transmission method, device, and server - Google Patents

Data transmission method, device, and server Download PDF

Info

Publication number
WO2016091085A1
WO2016091085A1 PCT/CN2015/095803 CN2015095803W WO2016091085A1 WO 2016091085 A1 WO2016091085 A1 WO 2016091085A1 CN 2015095803 W CN2015095803 W CN 2015095803W WO 2016091085 A1 WO2016091085 A1 WO 2016091085A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
server
queue
sent
preset
Prior art date
Application number
PCT/CN2015/095803
Other languages
French (fr)
Chinese (zh)
Inventor
杨涛
侯金轩
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2016091085A1 publication Critical patent/WO2016091085A1/en

Links

Images

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a data transmission method, apparatus, and server.
  • a more common example is that the game manufacturer's server is set up in the Beijing computer room to run the game program; the data analyst's server is set up in the Shanghai computer room for analyzing the game data; therefore, the game data of the Beijing computer room server needs to be sent. Go to the Shanghai computer room server for data analysis. If there is a failure in the public network between Beijing and Shanghai, it will inevitably result in a large amount of data transmission loss. The quality of the public network in Beijing and Shanghai is not controlled by game makers or data analysts. This poses a problem of data loss.
  • the present invention has been made in order to provide a data transmission method, apparatus and server that overcomes the above problems or at least partially solves or alleviates the above problems.
  • a data transmission method comprising: receiving, at a geographic location where a first server is located, data to be sent from the first server to a second server, the second server And the first server is located in a different geographical location; storing the data in a preset queue; acquiring the data from the queue, and sending the data to the second server; determining the data Whether it is successfully sent to the second server; when the data transmission fails, the data is re-acquired from the queue and transmitted.
  • a data transmission apparatus comprising: a data receiving module, configured to receive, at a geographic location where the first server is located, from the first server to be sent to a second server Data, the second server and the first server are located in different geographic locations; a queue storage module is configured to store the data in a preset queue; and a data sending module is configured to obtain the Data, and the data is sent to the second server; the determining module is configured to determine whether the data is successfully sent to the second server; when the data transmission fails, the data sending module re-sends The data is obtained and sent in the queue.
  • a server comprising: the aforementioned data transmission device.
  • a computer program comprising computer readable code that, when executed on a computing device, causes the computing device to perform data transmission according to any of the above method.
  • a computer readable medium storing a computer program as described above is provided.
  • the data of the first server is received in the geographical location where the first server is located, and the data transmission may not pass through the public network because the geographical location is the same, so that the received data can be completely accurate;
  • the second server sends the data, the data is cached through the queue. Therefore, even if the data is not successfully sent to the second server, the data can be re-transmitted from the queue, and the transmission is successful, and the technical solution of the present invention can be effectively Prevent data loss.
  • FIG. 1 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention
  • FIG. 2 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention
  • FIG. 3 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention.
  • FIG. 4 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention.
  • FIG. 5 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention.
  • Figure 6 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention.
  • Figure 7 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention.
  • Figure 8 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention.
  • FIG. 9 is a schematic block diagram of a server in accordance with one embodiment of the present invention.
  • Figure 10 is a block diagram schematically showing a computing device for performing a data transmission method according to the present invention.
  • Fig. 11 schematically shows a storage unit for holding or carrying program code implementing the data transmission method according to the present invention.
  • an embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 110 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • the size of the geographical location is not limited, for example, whether it is the same geographical location; whether it is the same equipment room. Data transmission in the same equipment room can be carried out without going through the public network. Even if data is transmitted in real time, data loss is difficult.
  • step 120 the data is stored in a preset queue.
  • step 130 data is obtained from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • Step 140 Determine whether the data is successfully sent to the second server.
  • Step 150 When the data transmission fails, the data is re-acquired from the queue and sent. According to the technical solution of the present embodiment, even if the data is not successfully transmitted to the second server, the data can be re-transmitted from the queue until the transmission is successful. It can be seen that the technical solution of the present invention can effectively prevent the occurrence of data loss.
  • one or several game manufacturer log center machines can be applied in the machine room where the game manufacturer's server (first server) is located, and the software syslog-ng is configured on the manufacturer server and the log center machine at the same time, and the vendor server is used as the server.
  • the syslog-ng client, the log center machine is used as the syslog-ng server, through syslog-ng to collect the player's key behavior (recharge, consumption of ingots, etc.) as log data.
  • the log repeater and the log transmitter are implemented by the program on the log center machine, wherein the log repeater is used to store the log data in the queue, and the log transmitter is used to send the log data to the data analyst of another computer room through the public network. Server (second server). If the public network transmission fails, the corresponding log records will still be cached in the queue, and then the log transmitter will perform data transmission until the data transmission is successful.
  • An embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 110 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • step 120 the data is stored in a preset queue.
  • step 130 data is obtained from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • Step 140 Determine whether the data is successfully sent to the second server.
  • Step 150 When the data transmission fails, the data is re-acquired from the queue and sent.
  • step 160 data is deleted from the queue when the data is successfully transmitted.
  • the data in the queue is cleared in time, so that there is space in the queue to store new data.
  • an embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 210 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • step 220 the data is stored in a preset queue.
  • step 230 data is retrieved from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • Step 240 Determine whether a message sent by the second server for notifying that the data transmission is successful is received within a preset time period after the data is sent.
  • the content of the message is not limited, as long as it is preset to indicate that the content has been successfully sent.
  • Step 250 If no message is received within a preset time period after the data is sent, it is determined that the data transmission fails, and data is re-acquired from the queue and sent.
  • Step 260 If a message is received within a preset time period after the data is sent, it is determined that the data is successfully sent, and the data is deleted from the queue. According to the technical solution of the embodiment, whether the data is successfully transmitted can be accurately determined based on whether the message is received within a predetermined time period.
  • the player behavior log transmission between the game maker server (first server) and the data analyzer server (second server) is also taken as an example. After the log data is sent from the game manufacturer server, if it is in 1 minute (preset During the time period), no information received by the data analyzer server containing specific characters was received. It means that the transmission is not successful, you need to get the data from the queue and resend it.
  • an embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 310 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • Step 311 Identify a computing task of the data to be used according to the attribute of the data.
  • Step 320 Select a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and store the data in the selected queue.
  • the number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks.
  • the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
  • step 330 data is retrieved from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • step 340 it is determined whether the data is successfully sent to the second server.
  • step 350 when the data transmission fails, the data is re-acquired from the queue and sent.
  • step 360 data is deleted from the queue when the data is successfully transmitted.
  • multiple queues correspond to multiple computing tasks, and the data of the queue can be used for the calculation of the corresponding computing task in time when the data of the queue is sent to the second server.
  • An embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 310 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • Step 311 Identify a computing task of the data to be used according to the attribute of the data.
  • the attribute of the data is not limited, and it may be one or more types of data, a field, and a data amount.
  • Step 320 Select a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and store the data in the selected queue.
  • the number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks.
  • the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
  • step 330 data is retrieved from the queue and sent to the second server.
  • the first server and the second server may be located in different equipment rooms, so that data transmission between the two needs to be performed through the public network.
  • step 340 it is determined whether the data is successfully sent to the second server.
  • step 350 when the data transmission fails, the data is re-acquired from the queue and sent.
  • step 360 data is deleted from the queue when the data is successfully transmitted.
  • different computing tasks usually require data of different attributes, so the corresponding computing tasks are identified according to the attributes of the data, so that the data is stored in the corresponding queue.
  • the data acquired from the game maker server is a time type (attribute)
  • the data can be stored in a queue corresponding to the player's online time analysis task
  • the data obtained from the game manufacturer server includes "RMB" (field)
  • the data can be determined to be a user to purchase the item.
  • the amount of consumption which can be stored in a queue corresponding to the user consumption amount calculation task.
  • an embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 401 The first server receives data from a cluster that includes multiple third servers in the same geographical location as the first server.
  • the number of the third server clusters is not limited, and the number of the third server clusters may be arbitrarily increased or decreased, but the second server always obtains data from the first server, so the second server and the first server are The data transfer configuration does not need to be changed.
  • Step 410 Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
  • step 420 the data is stored in a preset queue.
  • step 430 data is retrieved from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • Step 440 Determine whether the data is successfully sent to the second server.
  • step 450 when the data transmission fails, the data is re-acquired from the queue and sent.
  • Step 460 Delete data from the queue when the data is successfully transmitted.
  • the game manufacturer configures a plurality of servers to run the game program (the third server), and all the servers running the game programs are connected to the same server (the first server) and transmit data, and the data of the server is pressed.
  • the preset configuration information is transmitted to the server (second server) that performs data analysis. Regardless of the increase or decrease in the number of third servers, since the second server is only connected to the first server, there is no need to change the configuration information, which is advantageous for adjusting the number of servers at any time.
  • an embodiment of the present invention provides a data transmission method, which at least includes:
  • Step 510 Receive data sent by the first server in real time and record it in a preset log file.
  • step 520 data is extracted from the log file and stored in a preset queue.
  • step 530 data is retrieved from the queue and sent to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • Step 540 Determine whether the data is successfully sent to the second server.
  • Step 550 When the data transmission fails, the data is re-acquired from the queue and sent.
  • step 560 the data is deleted from the queue when the data is successfully transmitted.
  • the method of recording the log file is advantageous for receiving and saving data in real time, and delaying the extraction of the data from the log file and storing it in the queue, thereby ensuring that the data can be received in time without affecting the data. send.
  • an embodiment of the present invention provides a data transmission apparatus, which at least includes:
  • the data receiving module 610 receives data from the first server to be sent to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the size of the geographic location is not limited. For example, whether the same geographical location is: whether it is the same equipment room, data transmission in the same equipment room may not pass through the public network, even if data is transmitted in real time. It is difficult to have data loss.
  • the queue storage module 620 stores the data in a preset queue.
  • the data sending module 630 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 640 determines whether the data is successfully sent to the second server.
  • the data sending module 630 re-acquires the data from the queue and transmits it. According to the technical solution of the present embodiment, even if the data is not successfully transmitted to the second server, the data can be re-transmitted from the queue until the transmission is successful. It can be seen that the technical solution of the present invention can effectively prevent the occurrence of data loss.
  • one or several game manufacturer log center machines can be applied in the machine room where the game manufacturer's server (first server) is located, and the software syslog-ng is configured on the vendor server and the log center machine at the same time, and the vendor server is used as the server.
  • the syslog-ng client, the log center machine is used as the syslog-ng server, through syslog-ng to collect the player's key behavior (recharge, consumption of ingots, etc.) as log data.
  • the log repeater and the log transmitter are implemented by the program on the log center machine, wherein the log repeater is used to store the log data in the queue, and the log transmitter is used to send the log data to the other computer room through the public network.
  • the analyst's server second server. If the public network transmission fails, the corresponding log records will still be cached in the queue, and then the log transmitter will perform data transmission until the data transmission is successful.
  • an embodiment of the present invention provides a data transmission apparatus, which at least includes:
  • the data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the queue storage module 720 stores the data in a preset queue.
  • the data sending module 730 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 740 determines whether the data is successfully sent to the second server.
  • the data transmission module 730 re-acquires the data from the queue and transmits it.
  • the data deletion module 750 deletes data from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, the data in the queue is cleared in time, so that there is space in the queue to store new data.
  • a data transmission apparatus which at least includes:
  • the data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the queue storage module 720 stores the data in a preset queue.
  • the data sending module 730 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 740 determines whether a message sent by the second server for notifying that the data transmission is successful is received within a preset time period after the data is sent.
  • the content of the message is not limited, as long as it is preset to indicate that the content has been successfully sent.
  • the determining module 740 determines that the data transmission has failed, and the data sending module 730 re-acquires the data from the queue and transmits the data.
  • the determining module 740 determines that the data transmission is successful, and the data deletion module 750 deletes the data from the queue. According to the technical solution of the embodiment, whether the data is successfully transmitted can be accurately determined based on whether the message is received within a predetermined time period.
  • the game maker server first server
  • the data analyst server second
  • the player behavior log transmission between the servers after the log data is sent from the game manufacturer server, if the information containing the specific character returned by the data analyzer server is not received within 1 minute (preset time period), it means that there is no transmission. To be successful, you need to get the data from the queue and resend it.
  • a data transmission apparatus which at least includes:
  • the data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the queue storage module 720 selects a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and stores the data in the selected queue.
  • the number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks.
  • the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
  • the data sending module 730 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 740 determines whether the data is successfully sent to the second server.
  • the data transmission module 730 re-acquires the data from the queue and transmits it.
  • the data deletion module 740 deletes the data from the queue.
  • multiple queues correspond to multiple computing tasks, and the data of the queue can be used for the calculation of the corresponding computing task in time when the data of the queue is sent to the second server.
  • an embodiment of the present invention provides a data transmission apparatus, which at least includes:
  • the data receiving module 810 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the computing task identification module 820 identifies a computing task of the data to be used based on the attributes of the data.
  • the attribute of the data is not limited, and it may be one or more types of data, a field, and a data amount.
  • the queue storage module 830 selects a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and stores the data in the selected queue.
  • the number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks.
  • the class for the computing task The type is not restricted and can be automatically recognized by the owner of the second server.
  • the data sending module 840 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 850 determines whether the data is successfully sent to the second server.
  • the data transmission module 840 retrieves the data from the queue and transmits it.
  • the data deletion module 860 deletes data from the queue when the data is successfully transmitted.
  • different computing tasks usually require data of different attributes, so the corresponding computing tasks are identified according to the attributes of the data, so that the data is stored in the corresponding queue.
  • the data acquired from the game maker server is a time type (attribute)
  • the data can be stored in a queue corresponding to the player's online time analysis task
  • the data obtained from the game manufacturer server includes "RMB" (field)
  • the data can be determined to be a user to purchase the item.
  • the amount of consumption which can be stored in a queue corresponding to the user consumption amount calculation task.
  • a data transmission apparatus which at least includes:
  • the first server receives data from a cluster containing a plurality of third servers located in the same geographic location as the first server.
  • the number of the third server clusters is not limited, and the number of the third server clusters may be arbitrarily increased or decreased, but the second server always obtains data from the first server, so the second server and the first server are The data transfer configuration does not need to be changed.
  • the data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
  • the queue storage module 720 stores the data in a preset queue.
  • the data sending module 730 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 740 determines whether the data is successfully sent to the second server.
  • the data transmission module 730 re-acquires the data from the queue and transmits it.
  • the data deletion module 750 deletes data from the queue when the data is successfully transmitted.
  • the game manufacturer configures a plurality of servers to run the game program (the third server), and all the servers running the game programs are connected to the same server (the first server) and transmit data, and the data of the server is pressed.
  • the preset configuration information is transmitted to the server for data analysis (second server) on. Regardless of the increase or decrease in the number of third servers, since the second server is only connected to the first server, there is no need to change the configuration information, which is advantageous for adjusting the number of servers at any time.
  • a data transmission apparatus which at least includes:
  • the data receiving module 710 receives the data sent by the first server in real time and records it in a preset log file.
  • the queue storage module 720 extracts data from the log file and stores it in a preset queue.
  • the data sending module 730 acquires data from the queue and transmits the data to the second server.
  • the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
  • the determining module 740 determines whether the data is successfully sent to the second server.
  • the data transmission module 730 re-acquires the data from the queue and transmits it.
  • the data deletion module 750 deletes data from the queue when the data is successfully transmitted.
  • the method of recording the log file is advantageous for receiving and saving data in real time, and delaying the extraction of the data from the log file and storing it in the queue, thereby ensuring that the data can be received in time without affecting the data. send.
  • an embodiment of the present invention provides a server, which includes at least the data transmission device in any of the embodiments corresponding to FIG. 6 to FIG.
  • the server of the embodiment receives the data of the first server in the geographic location where the first server is located. Because the geographical location is the same, the data transmission may not pass through the public network, so the received data can be completely accurate.
  • the data is sent to the second server, since the data is cached through the queue, even if the data is not successfully transmitted to the second server, the data can be retrieved from the queue and sent again until the transmission is successful, and the technology of the present invention is known. The solution can effectively prevent data loss.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of a data transmission device in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 10 illustrates a computing device in which the data transfer method in accordance with the present invention can be implemented.
  • the computing device conventionally includes a processor 1010 and a computer program product or computer readable medium in the form of a memory 1020.
  • the memory 1020 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • the memory 1020 has a memory space 1030 for executing program code 1031 of any of the above method steps.
  • storage space 1030 for program code may include various program code 1031 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products to the one or more computer programs. In the product.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 1020 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 1031', ie, code that can be read by, for example, a processor such as 1010, which when executed by a computing device causes the computing device to perform each of the methods described above step.

Abstract

The present invention mainly relates to the technical field of Internet. Disclosed are a data transmission method, device, and server, which mainly aim to prevent data loss in a data transmission process. The method comprises: receiving, at a geographical position at which a first server is located, data that is from the first server and is to be sent to a second server, the second server and the first server being located at different geographical positions; storing the data in a preset queue; acquiring the data from the queue, and sending the data to the second server; determining whether the data is successfully sent to the second server; and when the data fails to be sent, reacquiring the data from the queue and sending the data. According to the technical solution of the present invention, the occurrence of data loss can be effectively prevented.

Description

数据传输方法、装置和服务器Data transmission method, device and server 技术领域Technical field
本发明涉及互联网技术领域,尤其涉及一种数据传输方法、装置和服务器。The present invention relates to the field of Internet technologies, and in particular, to a data transmission method, apparatus, and server.
背景技术Background technique
通过互联网进行大量数据的传输,如何保证所传输数据的准确性是一个重要的课题。How to ensure the accuracy of the transmitted data is an important issue for the transmission of large amounts of data over the Internet.
比较常见的一个例子是:游戏厂商的服务器设置在北京机房,用于运行游戏程序;数据分析商的服务器设置在上海机房,用于对游戏数据进行分析;所以需要将北京机房服务器的游戏数据发送到上海机房服务器进行数据分析。北京与上海两地之间的公网网络如果出现了故障,就必然会造成大量数据传输丢失。而北京、上海两地的公网网络质量,并非游戏厂商或数据分析商可以进行掌控的,这就造成需要面临数据丢失的难题。A more common example is that the game manufacturer's server is set up in the Beijing computer room to run the game program; the data analyst's server is set up in the Shanghai computer room for analyzing the game data; therefore, the game data of the Beijing computer room server needs to be sent. Go to the Shanghai computer room server for data analysis. If there is a failure in the public network between Beijing and Shanghai, it will inevitably result in a large amount of data transmission loss. The quality of the public network in Beijing and Shanghai is not controlled by game makers or data analysts. This poses a problem of data loss.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的数据传输方法、装置和服务器。In view of the above problems, the present invention has been made in order to provide a data transmission method, apparatus and server that overcomes the above problems or at least partially solves or alleviates the above problems.
根据本发明的一个方面,提供了一种数据传输方法,其包括:在第一服务器所处的地理位置,接收来自所述第一服务器的待发送至第二服务器的数据,所述第二服务器和所述第一服务器位于不同地理位置;将所述数据存放到预设的队列中;从所述队列中获取所述数据,并将所述数据发送到所述第二服务器;判断所述数据是否成功发送到所述第二服务器;在所述数据发送失败时,重新从所述队列中获取所述数据并进行发送。According to an aspect of the present invention, a data transmission method is provided, comprising: receiving, at a geographic location where a first server is located, data to be sent from the first server to a second server, the second server And the first server is located in a different geographical location; storing the data in a preset queue; acquiring the data from the queue, and sending the data to the second server; determining the data Whether it is successfully sent to the second server; when the data transmission fails, the data is re-acquired from the queue and transmitted.
根据本发明的再一个方面,提供了一种数据传输装置,其包括:数据接收模块,用于在第一服务器所处的地理位置,接收来自所述第一服务器的待发送至第二服务器的数据,所述第二服务器和所述第一服务器位于不同地理位置;队列存放模块,用于将所述数据存放到预设的队列中;数据发送模块,用于从所述队列中获取所述数据,并将所述数据发送到所述第二服务器;判断模块,用于判断所述数据是否成功发送到所述第二服务器;在所述数据发送失败时,所述数据发送模块重新从所述队列中获取所述数据并进行发送。 According to still another aspect of the present invention, a data transmission apparatus is provided, comprising: a data receiving module, configured to receive, at a geographic location where the first server is located, from the first server to be sent to a second server Data, the second server and the first server are located in different geographic locations; a queue storage module is configured to store the data in a preset queue; and a data sending module is configured to obtain the Data, and the data is sent to the second server; the determining module is configured to determine whether the data is successfully sent to the second server; when the data transmission fails, the data sending module re-sends The data is obtained and sent in the queue.
依根据本发明的另一个方面,提供了一种服务器,其包括:前述的数据传输装置。According to another aspect of the present invention, a server is provided, comprising: the aforementioned data transmission device.
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据上述中的任一个数据传输方法。According to still another aspect of the present invention, a computer program is provided, comprising computer readable code that, when executed on a computing device, causes the computing device to perform data transmission according to any of the above method.
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了如上所述的计算机程序。According to still another aspect of the present invention, a computer readable medium storing a computer program as described above is provided.
本发明的有益效果为:The beneficial effects of the invention are:
根据本发明的技术方案中,在第一服务器所处的地理位置接收第一服务器的数据,由于地理位置相同所以数据传输可以不经过公网网络,所以可以保证接收的数据完全准确;将数据向第二服务器发送时,由于数据通过队列进行了缓存,所以即使数据没有成功发送到第二服务器,也可以从队列中获取数据重新进行发送,直至发送成功为止,可知本发明的技术方案可以有效地防止出现数据丢失的情况。According to the technical solution of the present invention, the data of the first server is received in the geographical location where the first server is located, and the data transmission may not pass through the public network because the geographical location is the same, so that the received data can be completely accurate; When the second server sends the data, the data is cached through the queue. Therefore, even if the data is not successfully sent to the second server, the data can be re-transmitted from the queue, and the transmission is successful, and the technical solution of the present invention can be effectively Prevent data loss.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1示意性示出了根据本发明的一个实施例的数据传输方法的流程图;FIG. 1 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention; FIG.
图2示意性示出了根据本发明的一个实施例的数据传输方法的流程图;FIG. 2 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention; FIG.
图3示意性示出了根据本发明的一个实施例的数据传输方法的流程图;FIG. 3 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention; FIG.
图4示意性示出了根据本发明的一个实施例的数据传输方法的流程图;4 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention;
图5示意性示出了根据本发明的一个实施例的数据传输方法的流程图;FIG. 5 is a flow chart schematically showing a data transmission method according to an embodiment of the present invention; FIG.
图6示意性示出了根据本发明的一个实施例的数据传输装置的框图;Figure 6 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention;
图7示意性示出了根据本发明的一个实施例的数据传输装置的框图;Figure 7 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention;
图8示意性示出了根据本发明的一个实施例的数据传输装置的框图;Figure 8 is a block diagram schematically showing a data transmission device in accordance with one embodiment of the present invention;
图9示意性示出了根据本发明的一个实施例的服务器的框图;Figure 9 is a schematic block diagram of a server in accordance with one embodiment of the present invention;
图10示意性示出了用于执行根据本发明的数据传输方法的计算设备的框图;以 及Figure 10 is a block diagram schematically showing a computing device for performing a data transmission method according to the present invention; and
图11示意性示出了用于保持或者携带实现根据本发明的数据传输方法的程序代码的存储单元。Fig. 11 schematically shows a storage unit for holding or carrying program code implementing the data transmission method according to the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
如图1所示,本发明的一个实施例中提供了一种数据传输方法,其至少包括:As shown in FIG. 1, an embodiment of the present invention provides a data transmission method, which at least includes:
步骤110,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。在本实施例中,对地理位置的范围大小不进行限制,例如,是否是相同地理位置;是否是相同机房。在同一机房内进行的数据传输可以不经过公网,即使实时传输数据也难以出现数据丢失的情况。Step 110: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations. In this embodiment, the size of the geographical location is not limited, for example, whether it is the same geographical location; whether it is the same equipment room. Data transmission in the same equipment room can be carried out without going through the public network. Even if data is transmitted in real time, data loss is difficult.
步骤120,将数据存放到预设的队列中。In step 120, the data is stored in a preset queue.
步骤130,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。In step 130, data is obtained from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤140,判断数据是否成功发送到第二服务器。Step 140: Determine whether the data is successfully sent to the second server.
步骤150,在数据发送失败时,重新从队列中获取数据并进行发送。根据本实施例的技术方案,即使数据没有成功发送到第二服务器,也可以从队列中获取数据重新进行发送,直至发送成功为止,可知本发明的技术方案可以有效地防止出现数据丢失的情况。Step 150: When the data transmission fails, the data is re-acquired from the queue and sent. According to the technical solution of the present embodiment, even if the data is not successfully transmitted to the second server, the data can be re-transmitted from the queue until the transmission is successful. It can be seen that the technical solution of the present invention can effectively prevent the occurrence of data loss.
根据图1,可以在游戏厂商的服务器(第一服务器)所在机房内,申请一台或几台游戏厂商日志中心机,并同时在厂商服务器和日志中心机上配置软件syslog-ng,厂商服务器用作syslog-ng的客户端,日志中心机用作syslog-ng的服务器,通过syslog-ng来采集玩家的关键行为(充值、消耗元宝等)作为日志数据。并在日志中心机上通过程序实现日志中继器和日志发射器,其中日志中继器用于将日志数据存储到队列中,日志发射器用于将日志数据经过公网发送到另一机房的数据分析商的服务器(第二服务器)。如果公网传输失败,相应的日志记录仍会在队列中缓存,稍后再由日志发射器进行数据传输,直到数据传输成功。 According to FIG. 1, one or several game manufacturer log center machines can be applied in the machine room where the game manufacturer's server (first server) is located, and the software syslog-ng is configured on the manufacturer server and the log center machine at the same time, and the vendor server is used as the server. The syslog-ng client, the log center machine is used as the syslog-ng server, through syslog-ng to collect the player's key behavior (recharge, consumption of ingots, etc.) as log data. The log repeater and the log transmitter are implemented by the program on the log center machine, wherein the log repeater is used to store the log data in the queue, and the log transmitter is used to send the log data to the data analyst of another computer room through the public network. Server (second server). If the public network transmission fails, the corresponding log records will still be cached in the queue, and then the log transmitter will perform data transmission until the data transmission is successful.
本发明的一个实施例中提供了一种数据传输方法,其至少包括:An embodiment of the present invention provides a data transmission method, which at least includes:
步骤110,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。Step 110: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
步骤120,将数据存放到预设的队列中。In step 120, the data is stored in a preset queue.
步骤130,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。In step 130, data is obtained from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤140,判断数据是否成功发送到第二服务器。Step 140: Determine whether the data is successfully sent to the second server.
步骤150,在数据发送失败时,重新从队列中获取数据并进行发送。Step 150: When the data transmission fails, the data is re-acquired from the queue and sent.
步骤160,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,及时对队列中的数据进行清除,使得队列中有空间来存放新的数据。In step 160, data is deleted from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, the data in the queue is cleared in time, so that there is space in the queue to store new data.
根据图1,结合前述内容,可知在日志数据成功发送到数据分析商的服务器(第二服务器)后,则在日志中心机(第一服务器)中,通过日志中继器来从队列中清除掉该数据。According to FIG. 1, combined with the foregoing, it can be seen that after the log data is successfully sent to the server (second server) of the data analyst, the log center machine (first server) is cleared from the queue by the log repeater. The data.
如图2所示,本发明的一个实施例中提供了一种数据传输方法,其至少包括:As shown in FIG. 2, an embodiment of the present invention provides a data transmission method, which at least includes:
步骤210,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。Step 210: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
步骤220,将数据存放到预设的队列中。In step 220, the data is stored in a preset queue.
步骤230,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。In step 230, data is retrieved from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤240,判断是否在自发送数据后的预设时间段内接收到第二服务器发送的用于通知数据发送成功的消息。在本实施例中,对消息的内容不进行限制,只要是预设的用于指示已发送成功的内容即可。Step 240: Determine whether a message sent by the second server for notifying that the data transmission is successful is received within a preset time period after the data is sent. In this embodiment, the content of the message is not limited, as long as it is preset to indicate that the content has been successfully sent.
步骤250,如果自发送数据后的预设时间段内没有接收到消息,判断数据发送失败,并重新从队列中获取数据并进行发送。Step 250: If no message is received within a preset time period after the data is sent, it is determined that the data transmission fails, and data is re-acquired from the queue and sent.
步骤260,如果自发送数据后的预设时间段内接收到消息,判断数据发送成功,并从队列中删除数据。根据本实施例的技术方案,基于在预定时间段内是否收到消息,可以准确地判断数据是否发送成功。Step 260: If a message is received within a preset time period after the data is sent, it is determined that the data is successfully sent, and the data is deleted from the queue. According to the technical solution of the embodiment, whether the data is successfully transmitted can be accurately determined based on whether the message is received within a predetermined time period.
根据图2,同样以游戏厂商服务器(第一服务器)和数据分析商服务器(第二服务器)之间的玩家行为日志传输为例,日志数据从游戏厂商服务器发出后,如果在1分钟(预设时间段)内没收到数据分析商服务器返回的包含特定字符的信息, 则表示发送没有成功,需要从队列中取得数据并重新发送。According to FIG. 2, the player behavior log transmission between the game maker server (first server) and the data analyzer server (second server) is also taken as an example. After the log data is sent from the game manufacturer server, if it is in 1 minute (preset During the time period), no information received by the data analyzer server containing specific characters was received. It means that the transmission is not successful, you need to get the data from the queue and resend it.
如图3所示,本发明的一个实施例中提供了一种数据传输方法,其至少包括:As shown in FIG. 3, an embodiment of the present invention provides a data transmission method, which at least includes:
步骤310,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。Step 310: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
步骤311,根据数据的属性,识别待使用数据的计算任务。Step 311: Identify a computing task of the data to be used according to the attribute of the data.
步骤320,根据待使用数据的计算任务,从多个队列中选择存放数据的队列,并将数据存放到选择出的队列中。队列的数量为多个,多个队列用于存放待发送至第二服务器上进行多种计算任务的数据。在本实施例中,对计算任务的类型不进行限制,其可以由第二服务器的所有者自动识别。Step 320: Select a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and store the data in the selected queue. The number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks. In the present embodiment, the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
步骤330,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。At step 330, data is retrieved from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤340,判断数据是否成功发送到第二服务器。In step 340, it is determined whether the data is successfully sent to the second server.
步骤350,在数据发送失败时,重新从队列中获取数据并进行发送。In step 350, when the data transmission fails, the data is re-acquired from the queue and sent.
步骤360,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,多个队列与多个计算任务相对应,可以使得队列的数据发送到第二服务器时可以及时用于相应计算任务的计算。In step 360, data is deleted from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, multiple queues correspond to multiple computing tasks, and the data of the queue can be used for the calculation of the corresponding computing task in time when the data of the queue is sent to the second server.
根据图3,以游戏厂商服务器(第一服务器)和数据分析商服务器(第二服务器)之间的玩家行为日志传输为例,假设存在对应于玩家消费金额计算任务的队列1、对应于玩家上线时间分析任务的队列2,则如果从游戏厂商服务器获取的数据为某玩家的上线时间,则存放到队列2中,如果从游戏厂商服务器获取的数据为某玩家购买了游戏道具的金额,则存放到队列1中。According to FIG. 3, taking the player behavior log transmission between the game maker server (first server) and the data analyst server (second server) as an example, it is assumed that there is a queue 1 corresponding to the player consumption amount calculation task, corresponding to the player going online. Queue 2 of the time analysis task, if the data obtained from the game manufacturer server is the online time of a player, it is stored in the queue 2, and if the data obtained from the game manufacturer server is the amount of the game item purchased by a player, the storage is performed. Go to queue 1.
本发明的一个实施例中提供了一种数据传输方法,其至少包括:An embodiment of the present invention provides a data transmission method, which at least includes:
步骤310,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。Step 310: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
步骤311,根据数据的属性,识别待使用数据的计算任务。在本实施例中,对于数据的属性不进行限制,其可以是数据的类型、字段、数据量的一种或多种。Step 311: Identify a computing task of the data to be used according to the attribute of the data. In this embodiment, the attribute of the data is not limited, and it may be one or more types of data, a field, and a data amount.
步骤320,根据待使用数据的计算任务,从多个队列中选择存放数据的队列,并将数据存放到选择出的队列中。队列的数量为多个,多个队列用于存放待发送至第二服务器上进行多种计算任务的数据。在本实施例中,对计算任务的类型不进行限制,其可以由第二服务器的所有者自动识别。Step 320: Select a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and store the data in the selected queue. The number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks. In the present embodiment, the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
步骤330,从队列中获取数据,并将数据发送到第二服务器。在本实施例中, 根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。At step 330, data is retrieved from the queue and sent to the second server. In this embodiment, According to the foregoing, the first server and the second server may be located in different equipment rooms, so that data transmission between the two needs to be performed through the public network.
步骤340,判断数据是否成功发送到第二服务器。In step 340, it is determined whether the data is successfully sent to the second server.
步骤350,在数据发送失败时,重新从队列中获取数据并进行发送。In step 350, when the data transmission fails, the data is re-acquired from the queue and sent.
步骤360,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,不同的计算任务通常需求不同属性的数据,所以根据数据的属性识别出对应的计算任务,以便于数据存放到相应的队列中。In step 360, data is deleted from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, different computing tasks usually require data of different attributes, so the corresponding computing tasks are identified according to the attributes of the data, so that the data is stored in the corresponding queue.
根据图3,以游戏厂商服务器(第一服务器)和数据分析商服务器(第二服务器)之间的玩家行为日志传输为例,如果从游戏厂商服务器获取的数据为时间类型(属性),则可判断该数据为用户的上线时间,该数据可存放到对应于玩家上线时间分析任务的队列中;如果从游戏厂商服务器获取的数据包含“人民币”(字段),则可判断该数据为用户购买道具消费的金额,该数据可存放到对应于用户消费金额计算任务的队列中。According to FIG. 3, taking the player behavior log transmission between the game maker server (first server) and the data analyzer server (second server) as an example, if the data acquired from the game maker server is a time type (attribute), Determining that the data is the user's online time, the data can be stored in a queue corresponding to the player's online time analysis task; if the data obtained from the game manufacturer server includes "RMB" (field), the data can be determined to be a user to purchase the item. The amount of consumption, which can be stored in a queue corresponding to the user consumption amount calculation task.
如图4所示,本发明的一个实施例中提供了一种数据传输方法,其至少包括:As shown in FIG. 4, an embodiment of the present invention provides a data transmission method, which at least includes:
步骤401,第一服务器从与第一服务器位于相同地理位置的包含多个第三服务器的集群接收数据。在本实施例中,第三服务器集群的数量不做限制,第三服务器集群的数量可以任意增减,但第二服务器始终从第一服务器获取数据,所以第二服务器与第一服务器之间的数据传输配置不需改变。Step 401: The first server receives data from a cluster that includes multiple third servers in the same geographical location as the first server. In this embodiment, the number of the third server clusters is not limited, and the number of the third server clusters may be arbitrarily increased or decreased, but the second server always obtains data from the first server, so the second server and the first server are The data transfer configuration does not need to be changed.
步骤410,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。Step 410: Receive data to be sent to the second server from the first server at a geographic location where the first server is located, where the second server and the first server are located in different geographic locations.
步骤420,将数据存放到预设的队列中。In step 420, the data is stored in a preset queue.
步骤430,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。In step 430, data is retrieved from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤440,判断数据是否成功发送到第二服务器。Step 440: Determine whether the data is successfully sent to the second server.
步骤450,在数据发送失败时,重新从队列中获取数据并进行发送。In step 450, when the data transmission fails, the data is re-acquired from the queue and sent.
步骤460,在数据发送成功时,从队列中删除数据。Step 460: Delete data from the queue when the data is successfully transmitted.
根据图4,游戏厂商配置了多个服务器来运行游戏程序(第三服务器),其所有的运行游戏程序的服务器都连接到同一服务器(第一服务器)上并传输数据,同时该服务器的数据按预设的配置信息传输到进行数据分析的服务器(第二服务器)上。无论第三服务器数量增减,由于第二服务器只与第一服务器进行连接,所以不需要改变配置信息,这有利于随时调整服务器的数量。 According to FIG. 4, the game manufacturer configures a plurality of servers to run the game program (the third server), and all the servers running the game programs are connected to the same server (the first server) and transmit data, and the data of the server is pressed. The preset configuration information is transmitted to the server (second server) that performs data analysis. Regardless of the increase or decrease in the number of third servers, since the second server is only connected to the first server, there is no need to change the configuration information, which is advantageous for adjusting the number of servers at any time.
如图5所示,本发明的一个实施例中提供了一种数据传输方法,其至少包括:As shown in FIG. 5, an embodiment of the present invention provides a data transmission method, which at least includes:
步骤510,实时接收第一服务器发送的数据,并记录在预设的日志文件中。Step 510: Receive data sent by the first server in real time and record it in a preset log file.
步骤520,从日志文件中提取数据,并存放到预设队列中。In step 520, data is extracted from the log file and stored in a preset queue.
步骤530,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。In step 530, data is retrieved from the queue and sent to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
步骤540,判断数据是否成功发送到第二服务器。Step 540: Determine whether the data is successfully sent to the second server.
步骤550,在数据发送失败时,重新从队列中获取数据并进行发送。Step 550: When the data transmission fails, the data is re-acquired from the queue and sent.
步骤560,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,通过记录日志文件的方式有利于实时接收并保存数据,以及延时从日志文件中提取数据并存放到队列中,既保证数据可以及时接收,又不会影响数据的发送。In step 560, the data is deleted from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, the method of recording the log file is advantageous for receiving and saving data in real time, and delaying the extraction of the data from the log file and storing it in the queue, thereby ensuring that the data can be received in time without affecting the data. send.
如图6所示,本发明的一个实施例中提供了一种数据传输装置,其至少包括:As shown in FIG. 6, an embodiment of the present invention provides a data transmission apparatus, which at least includes:
数据接收模块610,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。在本实施例中,对地理位置的范围大小不进行限制,例如,是否是相同地理位置可以是:是否是相同机房,在同一机房内进行的数据传输可以不经过公网,即使实时传输数据也难以出现数据丢失的情况。The data receiving module 610 receives data from the first server to be sent to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations. In this embodiment, the size of the geographic location is not limited. For example, whether the same geographical location is: whether it is the same equipment room, data transmission in the same equipment room may not pass through the public network, even if data is transmitted in real time. It is difficult to have data loss.
队列存放模块620,将数据存放到预设的队列中。The queue storage module 620 stores the data in a preset queue.
数据发送模块630,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 630 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块640,判断数据是否成功发送到第二服务器。The determining module 640 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块630重新从队列中获取数据并进行发送。根据本实施例的技术方案,即使数据没有成功发送到第二服务器,也可以从队列中获取数据重新进行发送,直至发送成功为止,可知本发明的技术方案可以有效地防止出现数据丢失的情况。When the data transmission fails, the data sending module 630 re-acquires the data from the queue and transmits it. According to the technical solution of the present embodiment, even if the data is not successfully transmitted to the second server, the data can be re-transmitted from the queue until the transmission is successful. It can be seen that the technical solution of the present invention can effectively prevent the occurrence of data loss.
根据图6,可以在游戏厂商的服务器(第一服务器)所在机房内,申请一台或几台游戏厂商日志中心机,并同时在厂商服务器和日志中心机上配置软件syslog-ng,厂商服务器用作syslog-ng的客户端,日志中心机用作syslog-ng的服务器,通过syslog-ng来采集玩家的关键行为(充值、消耗元宝等)作为日志数据。并在日志中心机上通过程序实现日志中继器和日志发射器,其中日志中继器用于将日志数据存储到队列中,日志发射器用于将日志数据经过公网发送到另一机房的数 据分析商的服务器(第二服务器)。如果公网传输失败,相应的日志记录仍会在队列中缓存,稍后再由日志发射器进行数据传输,直到数据传输成功。According to FIG. 6, one or several game manufacturer log center machines can be applied in the machine room where the game manufacturer's server (first server) is located, and the software syslog-ng is configured on the vendor server and the log center machine at the same time, and the vendor server is used as the server. The syslog-ng client, the log center machine is used as the syslog-ng server, through syslog-ng to collect the player's key behavior (recharge, consumption of ingots, etc.) as log data. The log repeater and the log transmitter are implemented by the program on the log center machine, wherein the log repeater is used to store the log data in the queue, and the log transmitter is used to send the log data to the other computer room through the public network. According to the analyst's server (second server). If the public network transmission fails, the corresponding log records will still be cached in the queue, and then the log transmitter will perform data transmission until the data transmission is successful.
如图7所示,本发明的一个实施例中提供了一种数据传输装置,其至少包括:As shown in FIG. 7, an embodiment of the present invention provides a data transmission apparatus, which at least includes:
数据接收模块710,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。The data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
队列存放模块720,将数据存放到预设的队列中。The queue storage module 720 stores the data in a preset queue.
数据发送模块730,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 730 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块740,判断数据是否成功发送到第二服务器。The determining module 740 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块730重新从队列中获取数据并进行发送。When the data transmission fails, the data transmission module 730 re-acquires the data from the queue and transmits it.
数据删除模块750,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,及时对队列中的数据进行清除,使得队列中有空间来存放新的数据。The data deletion module 750 deletes data from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, the data in the queue is cleared in time, so that there is space in the queue to store new data.
根据图7,结合前述内容,可知在日志数据成功发送到数据分析商的服务器(第二服务器)后,则在日志中心机(第一服务器)中,通过日志中继器来从队列中清除掉该数据。According to FIG. 7, combined with the foregoing, it can be seen that after the log data is successfully sent to the server (second server) of the data analyst, it is cleared from the queue by the log repeater in the log center machine (first server). The data.
本发明的一个实施例中提供了一种数据传输装置,其至少包括:In an embodiment of the present invention, a data transmission apparatus is provided, which at least includes:
数据接收模块710,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。The data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
队列存放模块720,将数据存放到预设的队列中。The queue storage module 720 stores the data in a preset queue.
数据发送模块730,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 730 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块740,判断是否在自发送数据后的预设时间段内接收到第二服务器发送的用于通知数据发送成功的消息。在本实施例中,对消息的内容不进行限制,只要是预设的用于指示已发送成功的内容即可。The determining module 740 determines whether a message sent by the second server for notifying that the data transmission is successful is received within a preset time period after the data is sent. In this embodiment, the content of the message is not limited, as long as it is preset to indicate that the content has been successfully sent.
如果自发送数据后的预设时间段内没有接收到消息,判断模块740判断数据发送失败,数据发送模块730重新从队列中获取数据并进行发送。If the message is not received within the preset time period after the data is transmitted, the determining module 740 determines that the data transmission has failed, and the data sending module 730 re-acquires the data from the queue and transmits the data.
如果自发送数据后的预设时间段内接收到消息,判断模块740判断数据发送成功,数据删除模块750从队列中删除数据。根据本实施例的技术方案,基于在预定时间段内是否收到消息,可以准确地判断数据是否发送成功。If the message is received within a preset time period after the data is transmitted, the determining module 740 determines that the data transmission is successful, and the data deletion module 750 deletes the data from the queue. According to the technical solution of the embodiment, whether the data is successfully transmitted can be accurately determined based on whether the message is received within a predetermined time period.
根据图7,同样以游戏厂商服务器(第一服务器)和数据分析商服务器(第二 服务器)之间的玩家行为日志传输为例,日志数据从游戏厂商服务器发出后,如果在1分钟(预设时间段)内没收到数据分析商服务器返回的包含特定字符的信息,则表示发送没有成功,需要从队列中取得数据并重新发送。According to Figure 7, the same is the game maker server (first server) and the data analyst server (second For example, the player behavior log transmission between the servers), after the log data is sent from the game manufacturer server, if the information containing the specific character returned by the data analyzer server is not received within 1 minute (preset time period), it means that there is no transmission. To be successful, you need to get the data from the queue and resend it.
本发明的一个实施例中提供了一种数据传输装置,其至少包括:In an embodiment of the present invention, a data transmission apparatus is provided, which at least includes:
数据接收模块710,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。The data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
队列存放模块720,根据待使用数据的计算任务,从多个队列中选择存放数据的队列,并将数据存放到选择出的队列中。队列的数量为多个,多个队列用于存放待发送至第二服务器上进行多种计算任务的数据。在本实施例中,对计算任务的类型不进行限制,其可以由第二服务器的所有者自动识别。The queue storage module 720 selects a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and stores the data in the selected queue. The number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks. In the present embodiment, the type of the computing task is not limited, and it can be automatically recognized by the owner of the second server.
数据发送模块730,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 730 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块740,判断数据是否成功发送到第二服务器。The determining module 740 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块730重新从队列中获取数据并进行发送。When the data transmission fails, the data transmission module 730 re-acquires the data from the queue and transmits it.
在数据发送成功时,数据删除模块740从队列中删除数据。根据本实施例的技术方案,多个队列与多个计算任务相对应,可以使得队列的数据发送到第二服务器时可以及时用于相应计算任务的计算。When the data transmission is successful, the data deletion module 740 deletes the data from the queue. According to the technical solution of the embodiment, multiple queues correspond to multiple computing tasks, and the data of the queue can be used for the calculation of the corresponding computing task in time when the data of the queue is sent to the second server.
根据图7,以游戏厂商服务器(第一服务器)和数据分析商服务器(第二服务器)之间的玩家行为日志传输为例,假设存在对应于玩家消费金额计算任务的队列1、对应于玩家上线时间分析任务的队列2,则如果从游戏厂商服务器获取的数据为某玩家的上线时间,则存放到队列2中,如果从游戏厂商服务器获取的数据为某玩家购买了游戏道具的金额,则存放到队列1中。According to FIG. 7, taking the player behavior log transmission between the game maker server (first server) and the data analyst server (second server) as an example, it is assumed that there is a queue 1 corresponding to the player consumption amount calculation task, corresponding to the player going online. Queue 2 of the time analysis task, if the data obtained from the game manufacturer server is the online time of a player, it is stored in the queue 2, and if the data obtained from the game manufacturer server is the amount of the game item purchased by a player, the storage is performed. Go to queue 1.
如图8所示,本发明的一个实施例中提供了一种数据传输装置,其至少包括:As shown in FIG. 8, an embodiment of the present invention provides a data transmission apparatus, which at least includes:
数据接收模块810,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。The data receiving module 810 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
计算任务识别模块820,根据数据的属性,识别待使用数据的计算任务。在本实施例中,对于数据的属性不进行限制,其可以是数据的类型、字段、数据量的一种或多种。The computing task identification module 820 identifies a computing task of the data to be used based on the attributes of the data. In this embodiment, the attribute of the data is not limited, and it may be one or more types of data, a field, and a data amount.
队列存放模块830,根据待使用数据的计算任务,从多个队列中选择存放数据的队列,并将数据存放到选择出的队列中。队列的数量为多个,多个队列用于存放待发送至第二服务器上进行多种计算任务的数据。在本实施例中,对计算任务的类 型不进行限制,其可以由第二服务器的所有者自动识别。The queue storage module 830 selects a queue for storing data from the plurality of queues according to the calculation task of the data to be used, and stores the data in the selected queue. The number of queues is multiple, and multiple queues are used to store data to be sent to the second server for various computing tasks. In this embodiment, the class for the computing task The type is not restricted and can be automatically recognized by the owner of the second server.
数据发送模块840,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 840 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块850,判断数据是否成功发送到第二服务器。The determining module 850 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块840重新从队列中获取数据并进行发送。When the data transmission fails, the data transmission module 840 retrieves the data from the queue and transmits it.
数据删除模块860,在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,不同的计算任务通常需求不同属性的数据,所以根据数据的属性识别出对应的计算任务,以便于数据存放到相应的队列中。The data deletion module 860 deletes data from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, different computing tasks usually require data of different attributes, so the corresponding computing tasks are identified according to the attributes of the data, so that the data is stored in the corresponding queue.
根据图8,以游戏厂商服务器(第一服务器)和数据分析商服务器(第二服务器)之间的玩家行为日志传输为例,如果从游戏厂商服务器获取的数据为时间类型(属性),则可判断该数据为用户的上线时间,该数据可存放到对应于玩家上线时间分析任务的队列中;如果从游戏厂商服务器获取的数据包含“人民币”(字段),则可判断该数据为用户购买道具消费的金额,该数据可存放到对应于用户消费金额计算任务的队列中。According to FIG. 8, taking the player behavior log transmission between the game maker server (first server) and the data analyzer server (second server) as an example, if the data acquired from the game maker server is a time type (attribute), Determining that the data is the user's online time, the data can be stored in a queue corresponding to the player's online time analysis task; if the data obtained from the game manufacturer server includes "RMB" (field), the data can be determined to be a user to purchase the item. The amount of consumption, which can be stored in a queue corresponding to the user consumption amount calculation task.
本发明的一个实施例中提供了一种数据传输装置,其至少包括:In an embodiment of the present invention, a data transmission apparatus is provided, which at least includes:
第一服务器从与第一服务器位于相同地理位置的包含多个第三服务器的集群接收数据。在本实施例中,第三服务器集群的数量不做限制,第三服务器集群的数量可以任意增减,但第二服务器始终从第一服务器获取数据,所以第二服务器与第一服务器之间的数据传输配置不需改变。The first server receives data from a cluster containing a plurality of third servers located in the same geographic location as the first server. In this embodiment, the number of the third server clusters is not limited, and the number of the third server clusters may be arbitrarily increased or decreased, but the second server always obtains data from the first server, so the second server and the first server are The data transfer configuration does not need to be changed.
数据接收模块710,在第一服务器所处的地理位置,接收来自第一服务器的待发送至第二服务器的数据,第二服务器和第一服务器位于不同地理位置。The data receiving module 710 receives data to be sent from the first server to the second server in a geographical location where the first server is located, and the second server and the first server are located in different geographical locations.
队列存放模块720,将数据存放到预设的队列中。The queue storage module 720 stores the data in a preset queue.
数据发送模块730,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 730 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块740,判断数据是否成功发送到第二服务器。The determining module 740 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块730重新从队列中获取数据并进行发送。When the data transmission fails, the data transmission module 730 re-acquires the data from the queue and transmits it.
数据删除模块750,在数据发送成功时,从队列中删除数据。The data deletion module 750 deletes data from the queue when the data is successfully transmitted.
根据图7,游戏厂商配置了多个服务器来运行游戏程序(第三服务器),其所有的运行游戏程序的服务器都连接到同一服务器(第一服务器)上并传输数据,同时该服务器的数据按预设的配置信息传输到进行数据分析的服务器(第二服务器) 上。无论第三服务器数量增减,由于第二服务器只与第一服务器进行连接,所以不需要改变配置信息,这有利于随时调整服务器的数量。According to FIG. 7, the game manufacturer configures a plurality of servers to run the game program (the third server), and all the servers running the game programs are connected to the same server (the first server) and transmit data, and the data of the server is pressed. The preset configuration information is transmitted to the server for data analysis (second server) on. Regardless of the increase or decrease in the number of third servers, since the second server is only connected to the first server, there is no need to change the configuration information, which is advantageous for adjusting the number of servers at any time.
本发明的一个实施例中提供了一种数据传输装置,其至少包括:In an embodiment of the present invention, a data transmission apparatus is provided, which at least includes:
数据接收模块710,实时接收第一服务器发送的数据,并记录在预设的日志文件中。The data receiving module 710 receives the data sent by the first server in real time and records it in a preset log file.
队列存放模块720,从日志文件中提取数据,并存放到预设队列中。The queue storage module 720 extracts data from the log file and stores it in a preset queue.
数据发送模块730,从队列中获取数据,并将数据发送到第二服务器。在本实施例中,根据前述内容可知,第一服务器和第二服务器可以位于不同的机房,导致需要通过公网来进行二者之间的数据传输。The data sending module 730 acquires data from the queue and transmits the data to the second server. In this embodiment, according to the foregoing, the first server and the second server may be located in different computer rooms, so that data transmission between the two needs to be performed through the public network.
判断模块740,判断数据是否成功发送到第二服务器。The determining module 740 determines whether the data is successfully sent to the second server.
在数据发送失败时,数据发送模块730重新从队列中获取数据并进行发送。When the data transmission fails, the data transmission module 730 re-acquires the data from the queue and transmits it.
数据删除模块750在数据发送成功时,从队列中删除数据。根据本实施例的技术方案,通过记录日志文件的方式有利于实时接收并保存数据,以及延时从日志文件中提取数据并存放到队列中,既保证数据可以及时接收,又不会影响数据的发送。The data deletion module 750 deletes data from the queue when the data is successfully transmitted. According to the technical solution of the embodiment, the method of recording the log file is advantageous for receiving and saving data in real time, and delaying the extraction of the data from the log file and storing it in the queue, thereby ensuring that the data can be received in time without affecting the data. send.
如图9所示,本发明的一个实施例中提供了一种服务器,其至少包括:图6至图8对应的任一实施例中的数据传输装置。As shown in FIG. 9, an embodiment of the present invention provides a server, which includes at least the data transmission device in any of the embodiments corresponding to FIG. 6 to FIG.
基于前述的实施例可知,本实施例的服务器在第一服务器所处的地理位置接收第一服务器的数据,由于地理位置相同,数据传输可以不经过公网网络,所以可以保证接收的数据完全准确;将数据向第二服务器发送时,由于数据通过队列进行了缓存,所以即使数据没有成功发送到第二服务器,也可以从队列中获取数据重新进行发送,直至发送成功为止,可知本发明的技术方案可以有效地防止出现数据丢失的情况。According to the foregoing embodiment, the server of the embodiment receives the data of the first server in the geographic location where the first server is located. Because the geographical location is the same, the data transmission may not pass through the public network, so the received data can be completely accurate. When the data is sent to the second server, since the data is cached through the queue, even if the data is not successfully transmitted to the second server, the data can be retrieved from the queue and sent again until the transmission is successful, and the technology of the present invention is known. The solution can effectively prevent data loss.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单 个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, in order to simplify the disclosure and to facilitate understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together An embodiment, a diagram, or a description thereof. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的数据传输装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a data transmission device in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图10示出了可以实现根据本发明的数据传输方法的计算设备。该计算设备传统上包括处理器1010和以存储器1020形式的计算机程序产品或者计算机可读介质。存储器1020可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1020具有用于执行上述方法中的任何方法步骤的程序代码1031的存储空间1030。例如,用于程序代码的存储空间1030可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1031。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产 品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图11所述的便携式或者固定存储单元。该存储单元可以具有与图10的计算设备中的存储器1020类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1031’,即可以由例如诸如1010之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, Figure 10 illustrates a computing device in which the data transfer method in accordance with the present invention can be implemented. The computing device conventionally includes a processor 1010 and a computer program product or computer readable medium in the form of a memory 1020. The memory 1020 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM. The memory 1020 has a memory space 1030 for executing program code 1031 of any of the above method steps. For example, storage space 1030 for program code may include various program code 1031 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products to the one or more computer programs. In the product. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 1020 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer readable code 1031', ie, code that can be read by, for example, a processor such as 1010, which when executed by a computing device causes the computing device to perform each of the methods described above step.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。"an embodiment," or "an embodiment," or "an embodiment," In addition, it is noted that the phrase "in one embodiment" is not necessarily referring to the same embodiment.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。 In addition, it should be noted that the language used in the specification has been selected for the purpose of readability and teaching, and is not intended to be construed or limited. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The disclosure of the present invention is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.

Claims (19)

  1. 一种数据传输方法,其包括:A data transmission method includes:
    在第一服务器所处的地理位置,接收来自所述第一服务器的待发送至第二服务器的数据,所述第二服务器和所述第一服务器位于不同地理位置;Receiving, in a geographic location where the first server is located, data to be sent from the first server to the second server, where the second server and the first server are located in different geographic locations;
    将所述数据存放到预设的队列中;Store the data in a preset queue;
    从所述队列中获取所述数据,并将所述数据发送到所述第二服务器;Obtaining the data from the queue and transmitting the data to the second server;
    判断所述数据是否成功发送到所述第二服务器;Determining whether the data is successfully sent to the second server;
    在所述数据发送失败时,重新从所述队列中获取所述数据并进行发送。When the data transmission fails, the data is retrieved from the queue and transmitted.
  2. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    在所述数据发送成功时,从所述队列中删除所述数据。The data is deleted from the queue when the data transmission is successful.
  3. 根据权利要求1所述的方法,其中,判断所述数据是否成功发送到所述第二服务器,具体包括:The method of claim 1, wherein determining whether the data is successfully sent to the second server comprises:
    判断是否在自发送所述数据后的预设时间段内接收到所述第二服务器发送的用于通知所述数据发送成功的消息;Determining whether a message sent by the second server for notifying that the data is successfully sent is received within a preset time period after the data is sent;
    如果自发送所述数据后的预设时间段内没有接收到所述消息,判断所述数据发送失败;If the message is not received within a preset time period after the data is sent, it is determined that the data transmission fails;
    如果自发送所述数据后的所述预设时间段内接收到所述消息,判断所述数据发送成功。If the message is received within the preset time period after the data is sent, it is determined that the data is successfully transmitted.
  4. 根据权利要求1所述的方法,其中,所述队列的数量为多个,多个所述队列用于存放待发送至所述第二服务器上进行多种计算任务的数据;The method according to claim 1, wherein the number of the queues is plural, and the plurality of queues are used for storing data to be sent to the second server for performing various computing tasks;
    将所述数据存放到预设的队列中,具体包括:The data is stored in a preset queue, including:
    根据待使用所述数据的计算任务,从多个所述队列中选择存放所述数据的队列,并将所述数据存放到选择出的所述队列中。A queue for storing the data is selected from a plurality of the queues according to a computing task to be used for the data, and the data is stored in the selected queue.
  5. 根据权利要求4所述的方法,其中,在根据待使用所述数据的计算任务,从多个所述队列中选择存放所述数据的队列之前,还包括:The method according to claim 4, wherein before the queue for storing the data is selected from the plurality of the queues according to the computing task of the data to be used, the method further comprises:
    根据所述数据的属性,识别待使用所述数据的计算任务。A computing task to be used for the data is identified based on the attributes of the data.
  6. 根据权利要求5所述的方法,其中,所述数据的属性包括所述数据的类型、字段、数据量的一种或多种。The method of claim 5, wherein the attributes of the data comprise one or more of a type, a field, and a quantity of data of the data.
  7. 根据权利要求1所述的方法,其中,在接收来自所述第一服务器的待发送至第二服务器的数据,所述第二服务器和所述第一服务器位于不同地理位置之前,还包括: The method of claim 1, wherein before receiving the data to be sent to the second server from the first server, the second server and the first server are located in different geographic locations, and further comprising:
    所述第一服务器从与所述第一服务器位于相同地理位置的包含多个第三服务器的集群接收所述数据。The first server receives the data from a cluster comprising a plurality of third servers located in the same geographic location as the first server.
  8. 根据权利要求1至7中任一项所述的方法,其中,接收所述第一服务器发送的数据,具体包括:The method according to any one of claims 1 to 7, wherein receiving the data sent by the first server comprises:
    实时接收所述第一服务器发送的数据,并记录在预设的日志文件中;Receiving data sent by the first server in real time and recording it in a preset log file;
    将所述数据存放到预设的队列中,具体包括:The data is stored in a preset queue, including:
    从所述日志文件中提取所述数据,并存放到预设队列中。Extracting the data from the log file and storing it in a preset queue.
  9. 一种数据传输装置,其包括:A data transmission device includes:
    数据接收模块,适于在第一服务器所处的地理位置,接收来自所述第一服务器的待发送至第二服务器的数据,所述第二服务器和所述第一服务器位于不同地理位置;a data receiving module, configured to receive data from the first server to be sent to the second server in a geographic location where the first server is located, where the second server and the first server are located in different geographic locations;
    队列存放模块,适于将所述数据存放到预设的队列中;a queue storage module, configured to store the data in a preset queue;
    数据发送模块,适于从所述队列中获取所述数据,并将所述数据发送到所述第二服务器;a data sending module, adapted to acquire the data from the queue, and send the data to the second server;
    判断模块,适于判断所述数据是否成功发送到所述第二服务器;a determining module, configured to determine whether the data is successfully sent to the second server;
    在所述数据发送失败时,所述数据发送模块重新从所述队列中获取所述数据并进行发送。When the data transmission fails, the data sending module re-acquires the data from the queue and transmits the data.
  10. 根据权利要求9所述的装置,其中,还包括:The apparatus according to claim 9, further comprising:
    数据删除模块,适于在所述数据发送成功时,从所述队列中删除所述数据。And a data deletion module, configured to delete the data from the queue when the data is successfully sent.
  11. 根据权利要求9所述的装置,其中,The apparatus according to claim 9, wherein
    所述判断模块还适于:判断是否在自发送所述数据后的预设时间段内接收到所述第二服务器发送的用于通知所述数据发送成功的消息;The determining module is further configured to: determine whether a message sent by the second server to notify that the data is successfully sent is received within a preset time period after the data is sent;
    如果自发送所述数据后的预设时间段内没有接收到所述消息,所述判断模块判断所述数据发送失败;If the message is not received within a preset time period after the data is sent, the determining module determines that the data transmission fails;
    如果自发送所述数据后的所述预设时间段内接收到所述消息,所述判断模块判断所述数据发送成功。If the message is received within the preset time period after the data is sent, the determining module determines that the data transmission is successful.
  12. 根据权利要求9所述的装置,其中,所述队列的数量为多个,多个所述队列用于存放待发送至所述第二服务器上进行多种计算任务的数据;The apparatus according to claim 9, wherein the number of the queues is plural, and the plurality of queues are used for storing data to be sent to the second server for performing various computing tasks;
    所述队列存放模块根据待使用所述数据的计算任务,从多个所述队列中选择存放所述数据的队列,并将所述数据存放到选择出的所述队列中。The queue storage module selects a queue for storing the data from a plurality of the queues according to a calculation task of the data to be used, and stores the data in the selected queue.
  13. 根据权利要求9所述的装置,其中,还包括:The apparatus according to claim 9, further comprising:
    计算任务识别模块,适于根据所述数据的属性,识别待使用所述数据的计算任 务。a calculation task identification module adapted to identify a calculation to use the data according to an attribute of the data Business.
  14. 根据权利要求13所述的装置,其中,所述数据的属性包括所述数据的类型、字段、数据量的一种或多种。The apparatus of claim 13, wherein the attributes of the data comprise one or more of a type, a field, and an amount of data of the data.
  15. 根据权利要求9所述的装置,其中,所述第一服务器从与所述第一服务器位于相同地理位置的包含多个第三服务器的集群接收所述数据。The apparatus of claim 9, wherein the first server receives the data from a cluster comprising a plurality of third servers located in the same geographic location as the first server.
  16. 根据权利要求9至15中任一项所述的装置,其中,还包括:The apparatus according to any one of claims 9 to 15, further comprising:
    日志文件记录模块,适于实时接收所述第一服务器发送的数据,并记录在预设的日志文件中;a log file recording module, configured to receive data sent by the first server in real time, and record the data in a preset log file;
    所述队列存放模块从所述日志文件中提取所述数据,并存放到预设队列中。The queue storage module extracts the data from the log file and stores the data in a preset queue.
  17. 一种服务器,其包括:A server comprising:
    权利要求9至16中任一项所述的数据传输装置。A data transmission device according to any one of claims 9 to 16.
  18. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一个所述的数据传输方法。A computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform a data transfer method according to any of claims 1-8.
  19. 一种计算机可读介质,其中存储了如权利要求18所述的计算机程序。 A computer readable medium storing the computer program of claim 18.
PCT/CN2015/095803 2014-12-08 2015-11-27 Data transmission method, device, and server WO2016091085A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410746563.5 2014-12-08
CN201410746563.5A CN104468399B (en) 2014-12-08 2014-12-08 Data transmission method and device and server

Publications (1)

Publication Number Publication Date
WO2016091085A1 true WO2016091085A1 (en) 2016-06-16

Family

ID=52913795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095803 WO2016091085A1 (en) 2014-12-08 2015-11-27 Data transmission method, device, and server

Country Status (2)

Country Link
CN (1) CN104468399B (en)
WO (1) WO2016091085A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001541A (en) * 2022-06-21 2022-09-02 美的集团股份有限公司 Data transmission method, device, electronic equipment, storage medium and product

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468399B (en) * 2014-12-08 2020-01-17 北京奇虎科技有限公司 Data transmission method and device and server
CN104980254A (en) * 2015-06-10 2015-10-14 柳州市智融科技有限公司 Internet information processing system
CN105022664A (en) * 2015-06-10 2015-11-04 柳州市智融科技有限公司 Internet information processing system
CN106897288B (en) * 2015-12-18 2021-01-08 阿里巴巴集团控股有限公司 Service providing method and system for database
CN105871520A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Data transmission method and device
CN105657017A (en) * 2016-01-04 2016-06-08 北京百度网讯科技有限公司 Data transmission method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447633A (en) * 2011-12-29 2012-05-09 北京亿赞普网络技术有限公司 Log transmission method and system
CN102611611A (en) * 2011-12-13 2012-07-25 北京安天电子设备有限公司 Log caching system and method
US20140129746A1 (en) * 2012-11-02 2014-05-08 Accenture Global Services Limited Real-time data management for a power grid
CN103905333A (en) * 2014-04-15 2014-07-02 广东未来信息技术有限公司 Internet of things multi-protocol access transform device and control method thereof
CN104468399A (en) * 2014-12-08 2015-03-25 北京奇虎科技有限公司 Data transmission method and device and server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5672491B2 (en) * 2011-03-29 2015-02-18 ソニー株式会社 Information processing apparatus and method, and log collection system
CN102624562A (en) * 2012-03-13 2012-08-01 网经科技(苏州)有限公司 Safety management method for distributed SYSLOG (System Log) in network management system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611611A (en) * 2011-12-13 2012-07-25 北京安天电子设备有限公司 Log caching system and method
CN102447633A (en) * 2011-12-29 2012-05-09 北京亿赞普网络技术有限公司 Log transmission method and system
US20140129746A1 (en) * 2012-11-02 2014-05-08 Accenture Global Services Limited Real-time data management for a power grid
CN103905333A (en) * 2014-04-15 2014-07-02 广东未来信息技术有限公司 Internet of things multi-protocol access transform device and control method thereof
CN104468399A (en) * 2014-12-08 2015-03-25 北京奇虎科技有限公司 Data transmission method and device and server

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001541A (en) * 2022-06-21 2022-09-02 美的集团股份有限公司 Data transmission method, device, electronic equipment, storage medium and product

Also Published As

Publication number Publication date
CN104468399B (en) 2020-01-17
CN104468399A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
WO2016091085A1 (en) Data transmission method, device, and server
US11379734B2 (en) Methods and systems for processing software traces
US10079842B1 (en) Transparent volume based intrusion detection
US9876696B2 (en) Method and system for processing browser crash information
US20130019242A1 (en) Cloud-Based Test System and Method and Computer-Readable Storage Medium with Computer Program to Execute the Method
WO2015081815A1 (en) Logistics status information monitoring method, device, and system
US10362086B2 (en) Method and system for automating submission of issue reports
WO2017113677A1 (en) User behavior data processing method and system
WO2015067102A1 (en) Antitheft processing method and device for mobile device
WO2016107327A1 (en) Method and apparatus for implementing unified management of intelligent hardware devices by app, and client
WO2014082484A1 (en) User login monitoring device and method
WO2016091069A1 (en) Data operation method and device
US9471610B1 (en) Scale-out of data that supports roll back
CN104123238A (en) Data storage method and device
CN105373899A (en) Server asset management method and apparatus
CN108134816B (en) Access to data on remote device
US9471349B1 (en) Computing resource provisioning failure mitigation
CN105207832B (en) A kind of server stress test method and device
JP2017509949A (en) Upload form attachment
CN107770161A (en) The method and device of brush present is prevented in a kind of live platform
WO2018068674A1 (en) Method and device for video playback
WO2017107679A1 (en) Historical information display method and apparatus
CN103490978A (en) Terminal, server and message monitoring method
CN108694022A (en) The system and method for solid-state disk for identification with the delay of minimum tail
WO2016058478A1 (en) Data acquisition method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15868407

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15868407

Country of ref document: EP

Kind code of ref document: A1