The content of the invention
An embodiment of the present invention provides a kind of live broadcasting method and devices, and it is real can to solve existing electronic gaming machine game video
When live streaming the problem of being technically restricted.
A kind of live broadcasting method provided in an embodiment of the present invention, including:
PC hosts obtain the electronic game machine being in the PC hosts in same LAN and are sent to given server
Data packet, the PC hosts are configured with routing table, and the routing table includes the IP address of the given server;
Data packet described in the PC aster Resolutions, obtains the live data of preset format;
The PC hosts send the live data and are broadcast live to platform is broadcast live.
Optionally, data packet described in the PC aster Resolutions obtains further including before the live data of preset format:
The packet header of data packet described in the PC aster Resolutions obtains the network information of the data packet, the PC hosts root
When judging that the data packet is normal according to the network information, the data packet is just parsed;
The network information includes protocol type, source IP address and the purpose IP address of the data packet.
Optionally,
When the PC hosts judge the data packet exception according to the network information, the PC hosts are in preset time
The interior capture given server feeds back to the wrong return information of the electronic game machine;
The PC hosts do not write the given server of the routing table according to the wrong return information acquisition
IP address;
The IP address not write is write the routing table by the PC hosts.
Optionally, the PC hosts do not write the specified clothes of the routing table according to the wrong return information acquisition
It is engaged in after the IP address of device, further includes:
The IP address that PC hosts upload does not write is to address database.
Optionally,
Before after the PC hosts start each time and performing the live broadcasting method for the first time, from described address database
It obtains the IP address of the given server and is updated to the routing table.
A kind of live broadcast device provided in an embodiment of the present invention, is configured at PC hosts, including:
Routing module is sent to specified clothes for obtaining the electronic game machine being in the PC hosts in same LAN
The data packet of business device, the routing table of the routing module include the IP address of the given server;
Data resolution module for parsing the data packet, obtains the live data of preset format;
Sending module is broadcast live, is broadcast live for sending the live data to platform is broadcast live.
Optionally, the live broadcast device further includes:
Network information acquisition module for parsing the packet header of the data packet, obtains the network information of the data packet, institute
Stating the network information includes protocol type, source IP address and the purpose IP address of the data packet;
Module is analyzed and determined, for judging whether the data packet is abnormal according to the network information;
Trigger module, for when the judging result of the analytical judgment module is no, triggering the data resolution module.
Optionally, the live broadcast device further includes:
Trapping module is monitored, for when the judging result of the analytical judgment module is is, being captured in preset time
The given server feeds back to the wrong return information of the electronic game machine;
IP acquisition modules, for not writing the specified services of the routing table according to the wrong return information acquisition
The IP address of device;
IP writing modules, for the IP address not write to be write the routing table.
Optionally, the live broadcast device further includes:
Uploading module, for uploading the IP address not write to address database.
Optionally,
IP update modules, for after the PC hosts start each time and for the first time be broadcast live before, from described
The IP address of the given server is obtained in the database of location and is updated to the routing table.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, first, PC hosts obtain the electronic game being in the PC hosts in same LAN
Machine is sent to the data packet of given server, and the PC hosts are configured with routing table, which includes the given server
IP address;Then, data packet described in the PC aster Resolutions, obtains the live data of preset format;Finally, the PC hosts
It sends the live data and is broadcast live to platform is broadcast live.In embodiments of the present invention, which can break through existing electricity
The limitation of sub- Console Game video real-time live broadcast technically is realized and can be completed by PC hosts on live streaming platform is specified
The function of real-time live broadcast.
Specific embodiment
Goal of the invention, feature, advantage to enable the present invention is more apparent and understandable, below in conjunction with the present invention
Attached drawing in embodiment is clearly and completely described the technical solution in the embodiment of the present invention, it is clear that disclosed below
Embodiment be only part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field
All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention
Scope.
Referring to Fig. 1, a kind of live broadcasting method one embodiment includes in the embodiment of the present invention:
101st, PC hosts obtain the electronic game machine being in the PC hosts in same LAN and are sent to given server
Data packet;
First, PC hosts can obtain the electronic game machine being in the PC hosts in same LAN and be sent to specified clothes
The data packet of business device, the PC hosts are configured with routing table, which includes the IP address of the given server.
102nd, PC aster Resolutions data packet, obtains the live data of preset format;
Given server is sent in the electronic game machine that PC hosts obtain and the PC hosts are in same LAN
After data packet, which can parse the data packet, obtain the live data of preset format.
103rd, the PC hosts send the live data and are broadcast live to platform is broadcast live.
In the PC aster Resolutions data packet, after obtaining the live data of preset format, which can send this
Live data is broadcast live to platform is broadcast live.
In the present embodiment, first, PC hosts obtain the electronic game machine being in the PC hosts in same LAN and send
To the data packet of given server, which is configured with routing table, which includes the IP address of the given server;So
Afterwards, PC aster Resolutions data packet, obtains the live data of preset format;Finally, which sends the live data extremely
Live streaming platform is broadcast live.In the present embodiment, which it is straight in real time can to break through existing electronic gaming machine game video
Limitation technically is broadcast, realizes the function that the real-time live broadcast on live streaming platform is specified can be completed by PC hosts.
For ease of understanding, a kind of live broadcasting method in the embodiment of the present invention is described in detail below, referring to Fig. 2,
A kind of another embodiment of live broadcasting method includes in the embodiment of the present invention:
201st, before after the PC hosts start each time and performing the live broadcasting method for the first time, obtained from the address database
It takes the IP address of the given server and is updated to the routing table;
Before after the PC hosts start each time and performing the live broadcasting method for the first time, it can be obtained from address database
The IP address of the given server is simultaneously updated to the routing table.It is understood that be stored in the address database change it is specified
The IP address of server starts every time in PC hosts, and is ready to carry out before the live broadcasting method, in order to configure the road of the PC hosts
By function, the IP address backed up in address database should be updated in routing table.
202nd, PC hosts obtain the electronic game machine being in the PC hosts in same LAN and are sent to given server
Data packet;
The routing function and after updating routing table in PC host-initiateds, PC hosts can be obtained is in same with the PC hosts
Electronic game machine in one LAN is sent to the data packet of given server, which is configured with routing table, the routing table
IP address including the given server.It it is understood that can be by enabling the RemoteAccess systems of windows systems
System service, this system service can realize the routing function of PC hosts;Windows systems also provide corresponding API (application programs
Interface), it can call in the application, the map information of IP address and host is added into routing table.
It should be noted that in the IP Route Selections of computer network, if destination host is connected directly with source host
(such as point-to-point link) or all on a shared network (Ethernet or token-ring network), then host directly sends out IP datagram
It is sent on destination host.Otherwise, host is sent to datagram on the router of acquiescence, by router the data is forwarded to report for work down
One router or destination host nearest from destination host.As shown in figure 3, network packet is patrolled in different network transmissions
It collects in layer, corresponding network headers information can be added into, to ensure network packet energy correctly in cellular logic layer
Reason.Wherein, in IP layers of network headers information, purpose IP address is added, IP layers can be by purpose IP address and LAN
Gateway is compared, to determine that this data packet is that a downward router is sent, another host being also sent in LAN.
Thus, it can be known that in the present embodiment, which is sent to given server by data packet (can be video data), it should
The network headers information of data packet necessarily includes the IP address of given server.And PC hosts are configured with routing table, the routing table
IP address including the given server.So routing will be passed through by PC hosts by being sent to the data packet of given server originally
The mode of mapping is got.It should be noted that the PC hosts must be in the electronic game machine in same LAN, ability
PC hosts is allowd to get the data packet before electronic game machine forwards data packet by router.
203rd, the packet header of the PC aster Resolutions data packet obtains the network information of the data packet;
Given server is sent in the electronic game machine that PC hosts obtain and the PC hosts are in same LAN
After data packet, which can parse the packet header of the data packet, obtain the network information of the data packet, the network information bag
Include the protocol type, source IP address and purpose IP address of the data packet.
204th, the PC hosts judge whether the data packet is abnormal according to the network information, if so, step 207 is performed, if
It is no, then perform step 205;
After the network information of the data packet is obtained, which can judge that the data packet is according to the network information
No exception, if so, step is performed, if it is not, then performing step 205.
205th, PC aster Resolutions data packet, obtains the live data of preset format;
When the PC hosts learn the data packet there is no during exception according to network information judgement, then the PC aster Resolutions should
Data packet obtains the live data of preset format.It is understood that in order to enable the live data that parsing obtains meets live streaming
The demand of platform, therefore converted in parsing according to preset format, obtain the live streaming number being broadcast live for live streaming platform
According to.
206th, the PC hosts send the live data and are broadcast live to platform is broadcast live;
After the live data of preset format is obtained, which can send the live data and be carried out to platform is broadcast live
Live streaming, so as to fulfill the real-time live broadcast of electronic game machine.
207th, the PC hosts capture the mistake return that the given server feeds back to the electronic game machine in preset time
Information;
When the PC hosts learn the data packet exception according to network information judgement, such as there is loss, lack in data packet
The situation of mistake is likely that there are the IP address for the given server for not writing routing table at this time so that partial data bag passes through this
IP address reaches given server and can not be got by PC hosts.Therefore, which can be in preset time to dealing
Data be monitored, capture the wrong return information that the given server feeds back to the electronic game machine.It is understood that
Since partial data bag by lacking IP address reaches given server, then for given server, what these were received
Data packet equally exists abnormal (lose or lack), therefore the given server can send mistake to electronic game machine and return to letter
Breath.At this point, PC hosts can get the mistake return information by being monitored to data.
208th, the PC hosts do not write the IP of the given server of the routing table according to mistake return information acquisition
Location;
After capturing the given server and feeding back to the wrong return information of the electronic game machine, which can root
The IP address of the given server of the routing table is not write according to mistake return information acquisition.
209th, the IP address not write is write the routing table by the PC hosts;
After the IP address for the given server for not writing the routing table is obtained, which will can not write
IP address writes the routing table, so as to which PC hosts can get the data packet of missing IP address by routing function, after avoiding
Occurs the situation of data packet exception again during continuous live streaming.
210th, the PC hosts IP address that does not write of upload is to address database.
Further it will be understood that whenever the IP address for finding not write, which can be uploaded to number of addresses
According in storehouse, operation is updated to routing table after start next time and before being broadcast live in order to PC hosts.
In the present embodiment, it can judge whether data packet is abnormal by analyzing the network information of data packet, if abnormal,
Monitoring data flow capture given server feeds back to the wrong return information of electronic game machine, so as to not write routing table
IP address, ensure that follow-up live streaming is not in the situation of data packet exception, it is ensured that the quality of live streaming.
A kind of live broadcasting method is essentially described above, a kind of live broadcast device will be described in detail, and referred to below
Fig. 4, a kind of live broadcast device one embodiment includes in the embodiment of the present invention:
The live broadcast device is configured at PC hosts, including:
Routing module 401, for obtain be sent to the electronic game machine that the PC hosts are in same LAN it is specified
The data packet of server, the routing table of the routing module include the IP address of the given server;
Data resolution module 402 for parsing the data packet, obtains the live data of preset format;
Sending module 403 is broadcast live, is broadcast live for sending the live data to platform is broadcast live.
In the present embodiment, first, routing module 401 obtains the electronic game machine being in the PC hosts in same LAN
The data packet of given server is sent to, the routing table of the routing module includes the IP address of the given server;Then, data
Parsing module 402 parses the data packet, obtains the live data of preset format;Finally, sending module 403 is broadcast live and sends the live streaming
Data are broadcast live to platform is broadcast live.In the present embodiment, which can break through existing electronic gaming machine game video
The function that the real-time live broadcast on live streaming platform is specified can be completed by PC hosts is realized in the limitation of real-time live broadcast technically.
For ease of understanding, a kind of live broadcast device in the embodiment of the present invention is described in detail below, referring to Fig. 5,
A kind of another embodiment of live broadcast device includes in the embodiment of the present invention:
The live broadcast device is configured at PC hosts, including:
Routing module 501, for obtain be sent to the electronic game machine that the PC hosts are in same LAN it is specified
The data packet of server, the routing table of the routing module include the IP address of the given server;
Data resolution module 502 for parsing the data packet, obtains the live data of preset format;
Sending module 503 is broadcast live, is broadcast live for sending the live data to platform is broadcast live.
The live broadcast device can also include in the present embodiment:
Network information acquisition module 504 for parsing the packet header of the data packet, obtains the network information of the data packet, should
The network information includes protocol type, source IP address and the purpose IP address of the data packet;
Module 505 is analyzed and determined, for judging whether the data packet is abnormal according to the network information;
Trigger module 506, for when the judging result of the analytical judgment module 505 is no, triggering data parsing mould
Block.
The live broadcast device can also include in the present embodiment:
Monitor trapping module 507, for when the judging result of the analytical judgment module 505 for be when, in preset time
Capture the wrong return information that the given server feeds back to the electronic game machine;
IP acquisition modules 508, for not writing the given server of the routing table according to mistake return information acquisition
IP address;
IP writing modules 509, for the IP address not write to be write the routing table.
The live broadcast device can also include in the present embodiment:
Uploading module 510, for uploading the IP address not write to address database;
IP update modules 511, for after the PC hosts start each time and for the first time be broadcast live before, from the address
The IP address of the given server is obtained in database and is updated to the routing table.
In the present embodiment, which can judge whether data packet is different by analyzing the network information of data packet
Often, if abnormal, Monitoring data flow capture given server feeds back to the wrong return information of electronic game machine, so as to obtain not
The IP address of routing table is write, ensure that follow-up live streaming is not in the situation of data packet exception, it is ensured that the quality of live streaming.
It should be noted that the present invention also provides a kind of live broadcast system, including electronic game machine and configuration just like
Fig. 4 or Fig. 5 corresponds to the PC hosts of the described live broadcast device of embodiment.The PC hosts can break through existing electronic game machine trip
The limitation of play video real-time live broadcast technically is realized and the real-time live broadcast on live streaming platform is specified can be completed by PC hosts
Function.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit may be referred to the corresponding process in preceding method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
Division is only a kind of division of logic function, can there is other dividing mode, such as multiple units or component in actual implementation
It may be combined or can be integrated into another system or some features can be ignored or does not perform.It is another, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit
It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be employed in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to contribute in other words to the prior art or all or part of the technical solution can be in the form of software products
It embodies, which is stored in a storage medium, is used including some instructions so that a computer
Equipment (can be personal computer, server or the network equipment etc.) performs the complete of each embodiment the method for the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding
The technical solution recorded in each embodiment is stated to modify or carry out equivalent substitution to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is not made to depart from the spirit and scope of various embodiments of the present invention technical solution.