CN108696588A - A kind of sending method and equipment of information - Google Patents

A kind of sending method and equipment of information Download PDF

Info

Publication number
CN108696588A
CN108696588A CN201810455647.1A CN201810455647A CN108696588A CN 108696588 A CN108696588 A CN 108696588A CN 201810455647 A CN201810455647 A CN 201810455647A CN 108696588 A CN108696588 A CN 108696588A
Authority
CN
China
Prior art keywords
server
information
link
target
target information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810455647.1A
Other languages
Chinese (zh)
Other versions
CN108696588B (en
Inventor
程慧琳
柳德超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810455647.1A priority Critical patent/CN108696588B/en
Priority to PCT/CN2018/097552 priority patent/WO2019218479A1/en
Publication of CN108696588A publication Critical patent/CN108696588A/en
Application granted granted Critical
Publication of CN108696588B publication Critical patent/CN108696588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention is suitable for Internet technical field, provides a kind of sending method and system of information, including:First server receives the target information that information transmitting terminal is sent;Based on user identifier and application identities, link number is determined;If not including the link number in the first link-local list, link number is added to target information, and to target information described in Information Push Server;Each second server of the Information Push Server into information push list pushes target information;If including link number in the second link-local list, target information is sent to information receiving end by second server by the corresponding communication link of link number.It is mutually sent out into row information between different server in the present invention and no longer needs to establish dedicated physical link, but publication that can be by Information Push Server and push function, the information sending and receiving operation of cross-server is realized, to reduce information transmission cost.

Description

A kind of sending method and equipment of information
Technical field
The invention belongs to Internet technical field more particularly to the sending methods and equipment of a kind of information.
Background technology
With deepening continuously for IT application process, the frequency that equipment carries out data transmit-receive between each other is also higher and higher, when When equipment in different server needs to carry out information exchange, then the message-switching technique for using cross-server is needed.It is existing The message-switching technique of some cross-servers needs to build physical link between servers, can realize that information mutually passes.So And to build the period long for the above method, it is larger that network extends difficulty, and physical link is also required to additional manpower and materials and is tieed up Shield, improves the cost of transmission.
Invention content
In view of this, an embodiment of the present invention provides a kind of sending method of information and equipment, it is existing across clothes to solve Be engaged in the message-switching technique of device, need to build physical link between servers, it is long to lead to build the period, network extend difficulty compared with Greatly, and physical link is also required to the problem of additional manpower and materials are safeguarded, improve the cost of transmission.
The first aspect of the embodiment of the present invention provides a kind of sending method of information, the transmission system packet of described information It includes:The sending method of first server, second server and Information Push Server, described information includes:
The first server receives the target information that information transmitting terminal is sent;The target information carries information reception The application identities of the user identifier at end and the target information owning application;
The first server is based on the user identifier and the application identities, determines for sending the target letter The link number of breath;
If not including the link number, the first service in the first link-local list of the first server The link number is added to the target information by device, and sends the target information to described information push server;
Each second server of the described information push server into information push list pushes the target information;Institute Information push list is stated to be used to record the second server established with described information push server and have subscribing relationship;
If including the link number of the target information in the second link-local list of the second server, The target information is sent to described information by the corresponding communication link of the link number and received by the second server End.
The second aspect of the embodiment of the present invention provides a kind of transmission system of information, the transmission system packet of described information It includes:First server, second server and Information Push Server:
The first server, the target information for receiving information transmitting terminal transmission;The target information carries letter Cease the user identifier of receiving terminal and the application identities of the target information owning application;
The first server determines described for sending for being based on the user identifier and the application identities The link number of target information;
The first server, if for not including the link in the first link-local list of the first server The link number is then added to the target information, and sends the target letter to described information push server by number Breath;
Described information push server pushes the target letter for each second server into information push list Breath;Described information push list is used to record the second server established with described information push server and have subscribing relationship;
The second server, if for believing comprising the target in the second link-local list of the second server The link number of breath, then be sent to described information by the corresponding communication link of the link number by the target information Receiving terminal.
The sending method and system for implementing a kind of information provided in an embodiment of the present invention have the advantages that:
The embodiment of the present invention establishes service subscription by first server and second server with Information Push Server Relationship, the then message that can be pushed to Information Push Server upload message and reception push server.Based on above three Network construction characteristic between server, when information transmitting terminal sends target information to the first server belonging to it, first service Device can determine whether the link number of the target information, if the link number is sent out not in the link-local list of first server Information Push Server is given, Information Push Server is transferred to be transmitted to and its other server with subscribing relationship;If with There are a servers, i.e. the link-local list of second server in server of the Information Push Server with subscribing relationship Include the link number of target information, then target information is transmitted to the corresponding information of the link number and received by second server End.It is mutually sent out into row information compared with the exchange technology of existing cross-server, between different server and no longer needs to establish Dedicated physical link, but publication that can be by Information Push Server and push function, realize the information of cross-server Sending and receiving operate, to reduce information transmission cost.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of interaction diagrams of the sending method for information that first embodiment of the invention provides;
Fig. 2 is a kind of specific interaction diagrams of sending method S102 for information that second embodiment of the invention provides;
Fig. 3 is a kind of sending method specific implementation flow chart for information that third embodiment of the invention provides;
Fig. 4 is a kind of sending method S302 specific implementation flow charts for information that fourth embodiment of the invention provides;
Fig. 5 is a kind of sending method S104 specific implementation flow charts for information that fifth embodiment of the invention provides;
Fig. 6 is a kind of structure diagram of the transmission system for information that one embodiment of the invention provides.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The embodiment of the present invention establishes service subscription by first server and second server with Information Push Server Relationship, the then message that can be pushed to Information Push Server upload message and reception push server.Based on above three Network construction characteristic between server, when information transmitting terminal sends target information to the first server belonging to it, first service Device can determine whether the link number of the target information, if the link number is sent out not in the link-local list of first server Information Push Server is given, Information Push Server is transferred to be transmitted to and its other server with subscribing relationship;If with There are a servers, i.e. the link-local list of second server in server of the Information Push Server with subscribing relationship Include the link number of target information, then target information is transmitted to the corresponding information of the link number and received by second server End, solves the message-switching technique of existing cross-server, needs to build physical link between servers, cause to build week Phase is long, and network extends that difficulty is larger, and physical link is also required to additional manpower and materials and is safeguarded, improve transmission at This problem of.
In embodiments of the present invention, the executive agent of flow is the transmission system of information.The sending device of the information includes First server, second server and Information Push Server, wherein first server and second server can be for not The server of same type, but above-mentioned two server establishes subscribing relationship with Information Push Server, can be pushed away to information It send server upload information and receives the information of Information Push Server transmission.The Information Push Server can will receive Information to information push list in Servers-all pushed, to realize information publication function, specifically, the letter It can be the server based on Redis database buildings to cease push server.Fig. 1 shows what first embodiment of the invention provided The interaction diagrams of the sending method of information, details are as follows:
In S101, the first server receives the target information that information transmitting terminal is sent;The target information carries There are the user identifier of information receiving end and the application identities of the target information owning application.
It in the present embodiment, can be to belonging to local when if desired information transmitting terminal sends information to information receiving end Server, i.e., above-mentioned first server sends a target information, to be sent out by corresponding communication link by first server Information receiving end is given, information is completed and sends purpose.Wherein, information transmitting terminal can receive information when generating target information In the user identifier encapsulation at end and the target information, so that first server is when receiving target information, it may be determined that it should The corresponding receiving device of information.Also, the target information that different application is exported can similarly carry the application program Application identities, such as the audio file that audio application is exported, the application of the audio application can be marked with Mark, and for picture editting's application program, image can similarly enclose the picture editting and apply journey after the editor of output The application identities of sequence, its corresponding server of different application programs is different, and then corresponding information transmission link also can It has differences.
It should be noted that first server can receive the target information sent from different information transmitting terminals, it is right In different information transmitting terminals, the information transmission that a concurrent thread is used to handle the information transmitting terminal can be distributed in main thread Request, the present embodiment are illustrated with the target information for handling an information transmitting terminal, are to pass through master due to carrying out aforesaid operations Concurrent thread under thread, and be independent from each other between concurrent thread, thus the present embodiment can also be applied to while handle Multiple information transmitting terminals send the case where target information, no longer illustrate one by one herein.
In the present embodiment, the user identifier of Correspondent Node is particularly for the object for indicating to send needed for target information Identity information, can be the Correspondent Node user account, Customs Assigned Number, can also be Correspondent Node where destination address or Device numbering.If the Correspondent Node is user account, it needs to be determined that the server that the user currently logs in, in this case, The transmission system of information needs to obtain in each server associated by current online facility information and each facility information User account, based on the user account for including in target information and the current online facility information progress in each server Match, determine the user terminal that the user account is logged in, using the user terminal as the message sink end of target information.
In the present embodiment, application identities can by the program name for the application program that target information exports, using volume Number etc. information, be specifically used for mark different application.
In S102, the first server is based on the user identifier and the application identities, determines for sending The link number of the target information.
In the present embodiment, first server can then extract the use that the target message includes when receiving target message Family identifies and application identities, and the mailing address of information receiving end can be determined by user identifier, can be with by application identities Determine that transmitting the information receiving end transmits interface/port used in the information of the type, it, can be based on above-mentioned two information To obtain the link number for sending the target information.
In the present embodiment, the coding rule of link code used in each server is identical, therefore the first clothes Device be engaged according to the user identifier and the link number of application identities generation, is applicable not only to self-contained data transmission chain Road is encoded, other servers in addition to itself are equally applicable to.Wherein the coding rule of the link code can be from server It is downloaded at corresponding upper equipment, in this case, the server broadcast that the corresponding upper equipment of server can be into the whole network should The coding rule of link code, the purpose that the link code rule to realize unitizes.Optionally, which is provided with One coding update condition, if detecting, current time meets preset coding update condition, such as has new server to be added to In the network, or the coding update cycle is reached, then updated coding rule can be broadcasted, to realize that coding rule updates Purpose.
Optionally, in the present embodiment, first server generates link code based on user identifier and application identities Mode can be:According to preset intersection encryption algorithm, on the basis of user identifier, intersects and be inserted into the application identities, obtain The link number.Optionally, link code rule can also be a hash function, and first server is by user identifier and application Mark is imported into the hash function, to export the link number corresponding to above-mentioned two parameter.
In the present embodiment, first server record has the list of the link number of current all effective data link, That is the first link-local list.First server can detect this after link code used in transmission objectives message is determined Whether link code is in the link-local list.If should be in list, then it represents that transmitting the target message can be by first Server is transmitted to corresponding information receiving end, and in this case, first server determines the data-link described in the link code Road, and Correspondent Node is sent to by the data link, without being transferred to Information Push Server;If conversely, the link Coding is not in list, then it represents that belongs to the information exchange between cross-server, then executes the operation of S103.
In S103, if not including the link number, institute in the first link-local list of the first server It states first server and the link number is added to the target information, and the mesh is sent to described information push server Mark information.
In the present embodiment, if in link number and with being not recorded in first list of link, in this case, the first clothes Business device can be added to the link number in the target information, and the target information after addition is uploaded to have to subscribe to it and is closed The Information Push Server of system transfers to this with the server being transmitted to by the Information Push Server where information receiving end Server carries out the transmission operation of target information.
In the present embodiment, there is subscribing relationship, you can to pass through letter between first server and Information Push Server Cease push server into row information " publication " operate, i.e., Information Push Server receive server A send information when, Can be to all devices for the subscribing relationship for having subscribed the Information Push Server, it can also be various types of to be not limited to server Terminal device, the information transmitted and received operate that is, the information is carried out " publication " by server A.First server is also The function that " subscription " can be realized by Information Push Server receives what other servers were issued in above-mentioned " publication " operation Message.
Optionally, before first server sends target message to Information Push Server, can also include:First clothes Whether business device detection currently opens subscription function, if not opening the subscription function, one is sent to Information Push Server Subscribing relationship establishes request;Information Push Server can reflect to the request after receiving the subscribing relationship and establishing request Power, if authenticate successfully, by the first server be added to information push list in, and to the first server transmission subscription at Work(information, subscribing relationship are successfully established.After completing aforesaid operations, then target message can be sent to Information Push Server.
In S104, each second server of the described information push server into information push list pushes the mesh Mark information;Described information push list is used to record the second service established with described information push server and have subscribing relationship Device.
In the present embodiment, Information Push Server is stored with information push list, is recorded in information push list There is each second server that subscribing relationship is established with Information Push Server, certainly, if first server is pushed with information Server establishes subscribing relationship, then can also include first server in information push list.In Information Push Server After receiving target information, which can be pushed to each server, realize the operation of information publication.Optionally, should Information Push Server is provided with push trigger condition, such as whether detection current time reaches the preset push period, or waits for Whether the total amount of data of the information of push is more than predetermined threshold value, when detecting that current time meets push trigger condition, is then held It is about to target message to be pushed.
In the present embodiment, only there can be current time subscribing relationship effective each the by record in information push list Two servers can also record the unsubscribe from services device for once subscribing to the Information Push Server.For unsubscribe from services Device or terminal device, Information Push Server can be by the information storages not pushed in unsubscribe from services device or the terminal device pair In the buffer unit answered, after detecting that above equipment re-establishes subscribing relationship, then the message not sent in buffer unit It is pushed.
In S105, if including the chain of the target information in the second link-local list of the second server Road is numbered, then the target information is sent to described by the second server by the corresponding communication link of the link number Information receiving end.
In the present embodiment, if record has the link of target information in the second link-local list of a certain second server Number, then it represents that the information receiving end of target information is connected with the second server, and in this case, second server can be inquired Communication link corresponding to the link number, and the target information is sent to information receiving end by the communication link.
In the present embodiment, if there is no the chain that record has the target information in the second link-local list of second server It numbers on road, then it represents that the information receiving end is not connect with itself, and in this case, second server can delete the target and disappear Breath.Optionally, if the second server also establishes subscribing relationship, in this case, second with other information push server Target information can also be pushed to other information push server by server, and other information push server is transferred to forward the mesh Information is marked, concrete implementation process is referred to the relevant operation of S104 and S105, is arrived and the information receiving end until determining Connected server.
Above as can be seen that a kind of sending method of information provided in an embodiment of the present invention passes through first server and Two servers establish service subscription relationship with Information Push Server, then to Information Push Server upload message and can connect Receive the message of push server push.Based on the network construction characteristic between above three server, when information transmitting terminal is to belonging to it First server send target information when, first server can determine whether the link number of the target information, if the link number Not in the link-local list of first server, then it is sent to Information Push Server, Information Push Server is transferred to forward Give its other server with subscribing relationship;If having with Information Push Server in the server of subscribing relationship, there are one The link-local list of a server, i.e. second server includes the link number of target information, then second server is by target Information is transmitted to the corresponding information receiving end of the link number.It is different compared with the exchange technology of existing cross-server It is mutually sent out into row information between server and no longer needs to establish dedicated physical link, but Information Push Server can be passed through Publication and push function realize the information sending and receiving operation of cross-server, to reduce information transmission cost.
Fig. 2 shows the specific interaction flows of the sending method S102 of information of second embodiment of the invention offer a kind of Figure.It is shown in Figure 2, state embodiment relative to Fig. 1, S102 includes in a kind of sending method of information provided in this embodiment: S1021~S1025, specific details are as follows:
Further, the user identifier includes the destination address of described information receiving terminal;The first server is based on The user identifier and the application identities determine the link number for sending the target information, including:
In S1021, the first server sends routing table to described information push server and obtains request.
In the present embodiment, user identifier includes the destination address of information receiving end, and first server, which only records, this The address information of the terminal device of each port connection of server, and the information receiving end might not be with local port phase Even, in this case, first server also needs to obtain external routing table.Therefore, first server can be to Information Push Service Device sends a routing table and obtains request, to pass through Information Push Server acquisition and its Servers-all with subscribing relationship Routing iinformation.
In the present embodiment, first server can establish subscribing relationship with multiple Information Push Servers simultaneously, at this In the case of, first server can establish communication link with each Information Push Server, and be sent out to each Information Push Server Routing table is sent to obtain request.By the above-mentioned means, being determined that information receiving end is not to be connected with first server and need logical When crossing Information Push Server and being forwarded, target information can be also sent to the Information Push Service corresponding to destination address Device, to improve the efficiency of information push, the case where avoiding uploading in vain.
In S1022, described information push server broadcast table summarizes instruction, is taken with described information push with receiving Business device establishes the routing iinformation for having each server of subscribing relationship to send, and summarizes to all routing iinformations, raw At external routing table.
In the present embodiment, Information Push Server can generate a routing table after receiving routing table and obtaining request Summarize instruction, and summarize instruction to coupled each device broadcasts routing table, so as to be built with the Information Push Server It is vertical to there is each server of subscribing relationship to return to the routing iinformation of its own.It should be noted that if section terminating equipment is not By server and Information Push Server direct communication, in this case, Information Push Server can be by the end direct-connected with it The routing iinformation of end equipment is directly appended in external routing table.
In the present embodiment, when with Information Push Server foundation have the server of subscribing relationship receive the routing table converge After total instruction, the network address of each port can be obtained, the corresponding routing iinformation of the server is generated, and return to information push Server.Information Push Server can carry out all routing iinformations after the routing iinformation for receiving Servers-all return Summarize, generates the external routing table of first server.Optionally, Information Push Server can be provided with maximum latency, After Information Push Server summarizes instruction to each server broadcast routing table, waiting timer can be started, if the waiting meter When device reach the maximum latency after, there are still servers not to return to routing iinformation, then is received based on current time Routing iinformation generates external routing table, and it is abnormal server to identify that this does not return to the server of routing iinformation, executes abnormal behaviour Make.
In S1023, the first server receives the external routing table that described information push server is sent, and The local routing table of the first server and the external routing table are inquired, determines the destination address pair of the user identifier The destination server answered;Based on the device identification of the destination server, the main coding factor is generated.
In the present embodiment, Information Push Server can be sent to the external routing table after generating external routing table First server, then first server inquiry record local routing table and the outside road for the routing iinformation for having each port By, whether comprising the destination address in target information, can then position to obtain the destination service described in the destination address in table Device is indicated target information being sent to the destination server, then can be transmitted to target information by the destination server The receiving terminal of information.
In the present embodiment, first server can obtain its device identification, be set according to this after destination server is determined Standby mark generates the main coding factor for determining link number.It should be noted that the main coding factor is with uniqueness, Due to different servers, its device identification is different, and the main coding factor exported after conversion can also differ, if main Identical two link codes of encoding Factor, then it represents that belong to same equipment.And sub- encoding Factor is by being then based on transmission objectives Procotol used in information and determination, different servers can share same set of procotol, thus different services Sub- encoding Factor corresponding to device is can be identical, does not have uniqueness.
In the present embodiment, can be according to the mode of the device identification generation main coding factor:First server is stored with The conversion algorithm of the main coding factor, the conversion algorithm can be a hash function, and device identification is imported into this by first server In conversion algorithm, then the corresponding main coding factor can be exported.Preferably, first server can directly using device identification as The content of fixed field is as the main coding factor in the main coding factor or selected equipment mark.
In S1024, the first server is based on the application identities, determines to transmit and be called needed for the target information Procotol and the corresponding communication port numbers of each procotol;According to the communication port numbers, son coding is generated The factor.
In the present embodiment, first server also can determine whether that the application identities belonging to target message, the i.e. target message are Which kind of exported by application program.During different application programs carries out data interaction, used network association Discuss different, such as web application, used mainly http protocol, which is 80, and for Mail applications, used mainly STMP agreements, corresponding port numbers are 25.Therefore, different application programs is used Procotol it is different, but also the port numbers for transmitting the agreement also differ.First server is not only it needs to be determined that mesh The corresponding device identification of message is marked, also needs which port that the target message is transferred to the equipment determined, thus is answered based on this It is determined with mark and transmits the procotol for applying required calling, to obtain the corresponding communication port numbers of each procotol, Sub- encoding Factor is generated based on port numbers.Preferably, first server can be directly using port numbers as sub- encoding Factor.
It should be noted that be independent from each other between S1021~S1023 and S1024, there is no precedence relation, I.e. first server can first determine the main coding factor, can also first determine sub- encoding Factor, can also while determine two kinds of volumes The code factor.
In S1025, the first server is based on the main coding factor and the sub- encoding Factor, obtains described Link number.
In the present embodiment, first server, can be by above-mentioned two after determining the main coding factor and sub- encoding Factor A encoding Factor is synthesized, and the link number of target information is obtained.Wherein, the detailed process of synthesis can be:By main coding The two direct splits of character string of the factor and sub- encoding Factor, can also carry out cross-combining.Certainly, user can be voluntarily arranged Merging mode is consistent in the server that after setting completed, will synchronize to the whole network in a manner of the merging for making the whole network.
In embodiments of the present invention, it after the main coding factor and the sub- encoding Factor by determining link code, is exporting Link code, so that the link code is with uniqueness simultaneously, additionally it is possible to be accurately positioned needed for transmit target device and The required communication channel used is realized and is precisely sent.
Fig. 3 shows a kind of specific implementation flow chart of the sending method for information that third embodiment of the invention provides.Ginseng As shown in Figure 3, relative to embodiment described in Fig. 1, a kind of sending method of information provided in this embodiment further include S301~ S304, specific details are as follows:
Further, before first server and Information Push Server establish long connection, the method which sends is also Including:
In S301, if the first server receives the long connection request of described information transmitting terminal transmission, start It is long to connect effective timer, and the long connecting link between described information transmitting terminal is added to first link-local and is arranged In table.
In the present embodiment, when first server needs to establish connection with information transmitting terminal, a long company can be sent to Request is connect, due to when returning to information transmitting terminal and to send when result information and information transmitting terminal push to first server Information is random, therefore the connection in connection procedure between first server and information transmitting terminal needs long-time effective, To guarantee to send into row information immediately and send result to its return.
In the present embodiment, in order to safeguard that the long connection between first server and information transmitting terminal is effective, first service Device can start the one long effective timer of connection, to judge the validity of length connection.At this point, first server is sent with information Effective long connection is had been set up between end, therefore the long connecting link can be added in the first link-local list, and A link number is configured for long connecting link.
In S302, if the first server receives the data packet of information transmitting terminal transmission, the data are identified Whether the data type of packet is heartbeat data type.
In the present embodiment, information transmitting terminal is after the completion of long connecting link is established, in order to keep the long connecting link Validity, information transmitting terminal can send a heartbeat data packets with predetermined period interval to first server.Wherein, the default week The duration of phase is less than the long failure threshold for connecting effective timer.
In the present embodiment, if the value of effective timer of first server is less than predetermined threshold value, and information hair is received The data packet that sending end is sent, whether the data type that can detect the data packet is heartbeat data type.The heartbeat data type has Body is to connect effective data packet for remaining long.Preferably, which does not carry effective information.The heartbeat data Packet can be a data packet constituted with predetermined pulse frequency, can also for presetting digit capacity full 0 or complete 1 data packet.First Server obtains the data characteristics of heartbeat data packets, and detects whether the data packet received meets the data characteristics.If should Data packet meets the data characteristics, then executes the relevant operation of S303;If conversely, the data packet is not heartbeat data packets, grow It connects effective timer and will continue to Clocked operation.
In S303, if the data type of the data packet is heartbeat data type, the first server resets institute State the long value for connecting effective timer.
In the present embodiment, if the data type for the data packet that information transmitting terminal is sent is heartbeat data type, then it represents that The data packet is heartbeat data packets, is the validity for maintaining long connection, therefore can reset the long effective timer of connection Value leads to long Joint failure to avoid the long effective timer expired of connection.
In S304, if the long value for connecting effective timer reaches predetermined threshold value, the first server disconnects The long connecting link, and the corresponding link number of the long connecting link is deleted from the first link-local list.
In the present embodiment, if the long value for connecting effective timer reaches predetermined threshold value, and information transmission is not received Hold send heartbeat data packets, then can be determined that abnormal conditions occurs in the information transmitting terminal, can not by effective means come Safeguard the long connecting link.In this case, lead to the wasting of resources in order to avoid long connectivity port is occupied, first server The long connecting link is will disconnect, and discharges the resource for maintaining the long connecting link, such as port resource and monitoring heartbeat data The monitor of packet and relevant thread resources.On the other hand, since the long connecting link has failed, first server can also incite somebody to action The corresponding link number of the long connecting link is deleted from the first link-local list.
In embodiments of the present invention, after the long connection between first server and information transmitting terminal is established, pass through transmission The long value for connecting effective counter is periodically flushed to safeguard that the length connects in heartbeat data packets, improves the stability of long connection.
Fig. 4 shows the specific implementation flow of the sending method S302 for information that fourth embodiment of the invention provides a kind of Figure.It is shown in Figure 4, relative to embodiment described in Fig. 3, S302 packets in a kind of sending method of information provided in this embodiment It includes:S3021~S3023, specific details are as follows:
In S3021, the first server obtains the data volume of the data packet.
In the present embodiment, effective data are not included since heartbeat data packets are in general, then a certain data packet Data type be heartbeat data type, the data volume corresponding to the data packet should be smaller.Therefore, in order to quickly identify data packet Whether it is heartbeat data packets, the data packet of most of non-heartbeat data type can be filtered out by data volume.
In the present embodiment, if the data volume of the data packet received is greater than or equal to preset data-quantity threshold, table It is non-heartbeat data packets to show the data packet to have effective information field, data type, and first server can be to the data packet The corresponding operatings such as it is forwarded or exports;If conversely, the data volume of the data packet is less than preset data-quantity threshold, execute The operation of S3022.
In S3022, if the data volume is less than the preset data-quantity threshold, the first server parses institute State the place value of the reserved field of data packet.
In the present embodiment, it if the data volume of data packet is less than preset data-quantity threshold, detects for marking the number Whether it is default place value according to the place value in the reserved field of type.If the place value in the reserved field does not preset place value, can The energy data packet is the data packets such as synchronization frame or communication with detection frame, and corresponding behaviour can be executed based on the data type of the data packet Make;If conversely, the position of the reserved field of the data packet is default place value, the relevant operation of S3023 is executed.
In S3023, if the place value of the reserved field is default place value, the first server identifies the data The data type of packet is heartbeat data type.
In the present embodiment, first server record has the place value information corresponding to heartbeat data packets, i.e., above-mentioned is default Place value, if a certain data packet is identical as default place value in the place value of reserved field, then it represents that the data type of the data packet is the heart Type is jumped, realizes that the identification to heartbeat data packets operates.
In embodiments of the present invention, the data packet of large capacity is filtered by the size of data volume, is avoided to great Rong The data of amount carry out the identification operation of heartbeat data type, improve the recognition efficiency of heartbeat data packets.Due to large capacity Time required for data packet is parsed is longer, and in general the data packet of large capacity is not heartbeat data type, therefore can To avoid a large amount of invalid parsing operation.
Fig. 5 shows the specific implementation flow of the sending method S104 for information that fifth embodiment of the invention provides a kind of Figure.It is shown in Figure 5, relative to embodiment described in Fig. 1-Fig. 4, S104 in a kind of sending method of information provided in this embodiment Including:S1041 and S1042, specific details are as follows:
Further, jump on count device is carried in the target information;Described information push server is pushed to information Each second server in list pushes the target information, including:
In S1041, if the count value of the jump on count device is less than or equal to preset hop threshold, described information Push server increases the count value of the jump on count device of the target information, and each the into described information push list Target information described in two server push.
In the present embodiment, since server can establish subscribing relationship with multiple Information Push Servers simultaneously, When a certain server detect target information link number and be not present in link-local list, other information can be transferred to Push server is forwarded the target information, to realize that the information between transinformation push server is issued.And in order to It avoids a target information from constantly circulating between two Information Push Servers and lead to endless loop, can be carried in target information Timer is redirected, the number for recording the Information Push Server that target message passes through in transmission process.If this is redirected The count value of counter is less than or equal to hop threshold, then executes the relevant operation of S1041;If conversely, the jump on count device Count value is more than preset hop threshold, then executes the relevant operation of S1042.
In the present embodiment, if the count value of jump on count device and being less than hop threshold, then it represents that the target information is also It can carry out transinformation push server to be issued again, in this case, Information Push Server can increase this and redirect meter When device count value, and to push list in each second server push the target message.
In S1042, if the count value for redirecting timer is more than the hop threshold, described information Push Service Device returns to the first server and sends failure information.
In the present embodiment, if the count value for redirecting timer is more than hop threshold, then it represents that the target message is being believed The number of hops for ceasing push server is more than normal range (NR), therefore can return to one to first server and send failure, and is abandoned The target information is not transmitted to second server by the target information.
In embodiments of the present invention, by the way that jump on count device is arranged, avoid target information between Information Push Server Constantly circulation, improves the stability of network.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Fig. 6 shows a kind of structure diagram of the transmission system for information that one embodiment of the invention provides, the hair of the information Each equipment that equipment includes is sent to be used to execute each step in the corresponding embodiments of Fig. 1.Corresponding to Fig. 1 and Fig. 1 Embodiment in associated description.For convenience of description, only the parts related to this embodiment are shown.
Referring to Fig. 6, the transmission system of described information includes:First server 61, Information Push Server 62 and second Server 63:
The first server 61, the target information for receiving information transmitting terminal transmission;The target information carries The application identities of the user identifier of information receiving end and the target information owning application;
The first server 61 is determined for being based on the user identifier and the application identities for sending State the link number of target information;
The first server 61, if for not including the chain in the first link-local list of the first server Road is numbered, then the link number is added to the target information, and send the mesh to described information push server 62 Mark information;
Described information push server 62 pushes the mesh for each second server 63 into information push list Mark information;Described information push list is used to record the second server established with described information push server and have subscribing relationship 63;
The second server 63, if for including the target in the second link-local list of the second server The target information is then sent to the letter by the link number of information by the corresponding communication link of the link number Cease receiving terminal.
Optionally, the user identifier includes the destination address of described information receiving terminal;The first server 61, is used for Based on the user identifier and the application identities, determine that the link number for sending the target information includes:
The first server 61 obtains request for sending routing table to described information push server 62;
Described information push server 62 summarizes instruction for broadcast table, to receive and described information Push Service Device establishes the routing iinformation for having each server of subscribing relationship to send, and summarizes to all routing iinformations, generates External routing table;
The first server 61, the external routing table for receiving the transmission of described information push server 62, and The local routing table of the first server 61 and the external routing table are inquired, determines the destination address of the user identifier Corresponding destination server;Based on the device identification of the destination server, the main coding factor is generated;
The first server 61 is called for being based on the application identities needed for the determining transmission target information Procotol and the corresponding communication port numbers of each procotol;According to the communication port numbers, generate son coding because Son;
The first server 61 obtains the chain for being based on the main coding factor and the sub- encoding Factor It numbers on road.
Optionally, the first server 61, is additionally operable to:
The first server 61, if the long connection request for receiving the transmission of described information transmitting terminal, starts length Effective timer is connected, and the long connecting link between described information transmitting terminal is added to the first link-local list It is interior;
The first server 61, if the data packet for receiving information transmitting terminal transmission, identifies the data packet Data type whether be heartbeat data type;
The first server 61, if the data type for the data packet is heartbeat data type, described in resetting The long value for connecting effective timer;
The first server 61 disconnects institute if reaching predetermined threshold value for the long value for connecting effective timer It states long connecting link, and the corresponding link number of the long connecting link is deleted from the first link-local list.
Optionally, the first server 61, if the data packet for receiving information transmitting terminal transmission, described in identification Whether the data type of data packet is heartbeat data type, including:
The first server 61, the data volume for obtaining the data packet;
The first server 61, if for the data volume be less than the preset data-quantity threshold, parsing described in The place value of the reserved field of data packet;
The first server 61 identifies the data packet if the place value for the reserved field is default place value Data type be heartbeat data type.
Optionally, jump on count device is carried in the target information;Described information push server 62 is used for information Each second server 63 in push list pushes the target information, including:
Described information push server 62, if the count value for the jump on count device is less than or equal to preset redirect Threshold value then increases the count value of the jump on count device of the target information, and each second into described information push list Server 63 pushes the target information;
Described information push server 62, if being more than the hop threshold for the count value for redirecting timer, It is returned to the first server and sends failure information.
Therefore, it in the transmission system of information provided in an embodiment of the present invention, is mutually sent out not into row information between different server Need to establish dedicated physical link again, but publication that can be by Information Push Server and push function, it realizes across clothes The information sending and receiving operation of business device, to reduce information transmission cost.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of sending method of information is applied to the transmission system of information, which is characterized in that the transmission system packet of described information It includes:The sending method of first server, second server and Information Push Server, described information includes:
The first server receives the target information that information transmitting terminal is sent;The target information carries information receiving end The application identities of user identifier and the target information owning application;
The first server is based on the user identifier and the application identities, determines for sending the target information Link number;
If not including the link number in the first link-local list of the first server, the first server will The link number is added to the target information, and sends the target information to described information push server;
Each second server of the described information push server into information push list pushes the target information;The letter Breath push list is used to record the second server established with described information push server and have subscribing relationship;
It is described if including the link number of the target information in the second link-local list of the second server The target information is sent to described information receiving terminal by second server by the corresponding communication link of the link number.
2. sending method according to claim 1, which is characterized in that the user identifier includes described information receiving terminal Destination address;The first server is based on the user identifier and the application identities, determines for sending the target The link number of information includes:
The first server sends routing table to described information push server and obtains request;
Described information push server broadcast table summarizes instruction, has subscription with the foundation of described information push server to receive The routing iinformation that each server of relationship is sent, and all routing iinformations are summarized, generate external routing table;
The first server receives the external routing table that described information push server is sent, and inquires first clothes The local routing table and the external routing table of business device, determine the corresponding destination service of the destination address of the user identifier Device;Based on the device identification of the destination server, the main coding factor is generated;
The first server is based on the application identities, determine transmit the procotol called needed for the target information and The corresponding communication port numbers of each procotol;According to the communication port numbers, sub- encoding Factor is generated;
The first server is based on the main coding factor and the sub- encoding Factor, obtains the link number.
3. sending method according to claim 1, which is characterized in that further include:
If the first server receives the long connection request of described information transmitting terminal transmission, start the long effective timing of connection Device, and the long connecting link between described information transmitting terminal is added in the first link-local list;
If the first server receives the data packet of information transmitting terminal transmission, identify that the data type of the data packet is No is heartbeat data type;
If the data type of the data packet is heartbeat data type, the first server resetting long connection effectively meter When device value;
If the long value for connecting effective timer reaches predetermined threshold value, the first server disconnects the long connection chain Road, and the corresponding link number of the long connecting link is deleted from the first link-local list.
4. sending method according to claim 3, which is characterized in that if the first server receives information hair The data packet that sending end is sent, then identify whether the data type of the data packet is heartbeat data type, including:
The first server obtains the data volume of the data packet;
If the data volume is less than the preset data-quantity threshold, the first server parses the reservation of the data packet The place value of field;
If the place value of the reserved field is default place value, the first server identifies that the data type of the data packet is Heartbeat data type.
5. according to claim 1-4 any one of them sending methods, which is characterized in that carry and redirect in the target information Counter;Each second server of the described information push server into information push list pushes the target information, packet It includes:
If the count value of the jump on count device is less than or equal to preset hop threshold, described information push server increases The count value of the jump on count device of the target information, and each second server into described information push list pushes institute State target information;
If the count value for redirecting timer is more than the hop threshold, described information push server takes to described first Business device, which returns, sends failure information.
6. a kind of transmission system of information, which is characterized in that the transmission system of described information includes:First server, the second clothes Business device and Information Push Server:
The first server, the target information for receiving information transmitting terminal transmission;The target information carries information and connects The application identities of the user identifier of receiving end and the target information owning application;
The first server is determined for being based on the user identifier and the application identities for sending the target The link number of information;
The first server, if being compiled for not including the link in the first link-local list of the first server Number, then the link number is added to the target information, and the target information is sent to described information push server;
Described information push server pushes the target information for each second server into information push list; Described information push list is used to record the second server established with described information push server and have subscribing relationship;
The second server, if for including the target information in the second link-local list of the second server The target information is then sent to described information by the corresponding communication link of the link number and received by the link number End.
7. transmission system according to claim 6, which is characterized in that the user identifier includes described information receiving terminal Destination address;The first server determines described for sending for being based on the user identifier and the application identities The link number of target information includes:
The first server obtains request for sending routing table to described information push server;
Described information push server summarizes instruction for broadcast table, is established with described information push server with receiving There is the routing iinformation that each server of subscribing relationship is sent, and all routing iinformations are summarized, generates external road By table;
The first server, the external routing table for receiving the transmission of described information push server, and described in inquiry The local routing table of first server and the external routing table determine the corresponding target of the destination address of the user identifier Server;Based on the device identification of the destination server, the main coding factor is generated;
The first server determines the network association transmitted and called needed for the target information for being based on the application identities View and the corresponding communication port numbers of each procotol;According to the communication port numbers, sub- encoding Factor is generated;
The first server obtains the link number for being based on the main coding factor and the sub- encoding Factor.
8. transmission system according to claim 6, which is characterized in that the first server is additionally operable to:
The first server starts length and is connected with if the long connection request for receiving the transmission of described information transmitting terminal Timer is imitated, and the long connecting link between described information transmitting terminal is added in the first link-local list;
The first server, if the data packet for receiving information transmitting terminal transmission, identifies the data of the data packet Whether type is heartbeat data type;
The first server resets the long connection if the data type for the data packet is heartbeat data type The value of effective timer;
The first server disconnects the length even if reaching predetermined threshold value for the long value for connecting effective timer Chain link road, and the corresponding link number of the long connecting link is deleted from the first link-local list.
9. transmission system according to claim 8, which is characterized in that the first server, if for receiving information The data packet that transmitting terminal is sent, then identify whether the data type of the data packet is heartbeat data type, including:
The first server, the data volume for obtaining the data packet;
The first server parses the data packet if being less than the preset data-quantity threshold for the data volume Reserved field place value;
The first server identifies the data of the data packet if the place value for the reserved field is default place value Type is heartbeat data type.
10. sending system according to claim 6-9 any one of them, which is characterized in that carry jump in the target information Turn counter;Described information push server pushes the target for each second server into information push list Information, including:
Described information push server, if the count value for the jump on count device is less than or equal to preset hop threshold, Then increase the count value of the jump on count device of the target information, and each second server into described information push list Push the target information;
Described information push server, if being more than the hop threshold for the count value for redirecting timer, to described First server, which returns, sends failure information.
CN201810455647.1A 2018-05-14 2018-05-14 Information sending method and equipment Active CN108696588B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810455647.1A CN108696588B (en) 2018-05-14 2018-05-14 Information sending method and equipment
PCT/CN2018/097552 WO2019218479A1 (en) 2018-05-14 2018-07-27 Method and device for sending information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810455647.1A CN108696588B (en) 2018-05-14 2018-05-14 Information sending method and equipment

Publications (2)

Publication Number Publication Date
CN108696588A true CN108696588A (en) 2018-10-23
CN108696588B CN108696588B (en) 2021-06-25

Family

ID=63846421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810455647.1A Active CN108696588B (en) 2018-05-14 2018-05-14 Information sending method and equipment

Country Status (2)

Country Link
CN (1) CN108696588B (en)
WO (1) WO2019218479A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083193A (en) * 2019-11-11 2020-04-28 厦门网宿有限公司 Long connection message sending method, server and storage medium
CN112804309A (en) * 2020-12-31 2021-05-14 中国人寿保险股份有限公司上海数据中心 Multicast pushing method
CN114189489A (en) * 2021-11-11 2022-03-15 深圳市科脉技术股份有限公司 Message pushing method, device, server and medium
WO2023155739A1 (en) * 2022-02-18 2023-08-24 华为技术有限公司 Data transmission method, network device, and user equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184312A (en) * 2020-09-28 2021-01-05 建信金融科技有限责任公司 Touch frequency control method, device, equipment and medium
CN112231601B (en) * 2020-10-14 2024-05-28 深圳前海微众银行股份有限公司 Link management method, device, equipment and computer storage medium
CN112559558B (en) * 2020-12-07 2024-04-09 北京理房通支付科技有限公司 Method and device for generating serial numbers, computing equipment and storage medium
CN114374705A (en) * 2022-01-06 2022-04-19 青岛海信智慧生活科技股份有限公司 Service cluster and message pushing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001025908A2 (en) * 1999-10-01 2001-04-12 Accenture Llp Presentation service architectures for netcentric computing systems
CN101610280A (en) * 2008-06-20 2009-12-23 华为技术有限公司 The method and apparatus that between the PUSH server and client side, communicates
CN102365841A (en) * 2009-03-09 2012-02-29 苹果公司 Push notification service
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9137679B2 (en) * 2011-09-18 2015-09-15 Loyalblocks Ltd Methods circuits systems and associated computer executable code for localizing and messaging a wireless communication device
CN105139599A (en) * 2015-09-29 2015-12-09 深圳市国投电信有限公司 Community alarm method and system
CN105389219A (en) * 2015-10-15 2016-03-09 北京乐动卓越科技有限公司 Cross-computer room communication method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001025908A2 (en) * 1999-10-01 2001-04-12 Accenture Llp Presentation service architectures for netcentric computing systems
CN101610280A (en) * 2008-06-20 2009-12-23 华为技术有限公司 The method and apparatus that between the PUSH server and client side, communicates
CN102365841A (en) * 2009-03-09 2012-02-29 苹果公司 Push notification service
CN106230896A (en) * 2016-07-18 2016-12-14 深圳国泰安教育技术股份有限公司 A kind of information push method, Apparatus and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083193A (en) * 2019-11-11 2020-04-28 厦门网宿有限公司 Long connection message sending method, server and storage medium
CN112804309A (en) * 2020-12-31 2021-05-14 中国人寿保险股份有限公司上海数据中心 Multicast pushing method
CN112804309B (en) * 2020-12-31 2022-09-20 中国人寿保险股份有限公司上海数据中心 Multicast pushing method
CN114189489A (en) * 2021-11-11 2022-03-15 深圳市科脉技术股份有限公司 Message pushing method, device, server and medium
WO2023155739A1 (en) * 2022-02-18 2023-08-24 华为技术有限公司 Data transmission method, network device, and user equipment

Also Published As

Publication number Publication date
WO2019218479A1 (en) 2019-11-21
CN108696588B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN108696588A (en) A kind of sending method and equipment of information
CN107864228B (en) Connection establishment method and system in content distribution network
CN104023006B (en) Multi-path transmission system and method based on application layer relaying
US11153207B2 (en) Data link layer-based communication method, device, and system
WO2017054576A1 (en) Unicast tunnel building method, apparatus and system
CN105933199B (en) A kind of method and gateway and chat server keeping heartbeat connection
CN102202104A (en) Managing distributed address pools within network devices
US10581735B2 (en) Packet processing method and apparatus
CN102202281B (en) Ticket processing method and system
CN114501469A (en) Method, device and system for configuring network slice
KR20160111668A (en) Method and apparatus for generating packet
CN112437153A (en) Equipment linkage processing method and device
CN112203261A (en) Charging pile management method and device, electronic equipment and readable storage medium
JP2021501519A (en) Methods, related devices, and systems for obtaining target transmission routes
CN109818901B (en) Method, device and system for determining message header compression mechanism
CN110798897B (en) Network resource scheduling method and device
CN111817986B (en) Message processing method and device and computer readable storage medium
CN110601893A (en) Data transmission system, method and device
CN100334860C (en) Message intercommunication method with improved forwarding performance of equipment
CN113258958B (en) Power line carrier communication method based on OFDM and communication node
KR101078840B1 (en) Multicast Service Method for Different Kinds of Networks
CN117896726A (en) Private network authentication method, private network authentication system, storage medium and electronic equipment
KR102115392B1 (en) Method and apparatus for processing traffic for service of high quality
CN116390241A (en) Data transmission method, device, system, electronic equipment and storage medium
KR102106569B1 (en) Method and apparatus for processing traffic for service of high quality

Legal Events

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