Summary of the invention
Technical problem to be solved by the present invention lies in, provide a kind of offline message transmission method based on dipper system and
Offline message transmitting device, improves the accessibility, not repeated of message transmission, while improving the transmission effect of short message offline message
Rate.
In order to solve the above technical problem, the present invention provides a kind of offline message transmission method based on dipper system,
Be characterized in that, comprising: base station group receive first terminal send initial message, the initial message include first terminal card number,
Second terminal card number and message content;The base station group generates according to the initial information and stores transfer message, the transfer
Message includes message id, message content and type of message;The base station group sends the corresponding transfer of second terminal to second terminal
Message.
As an improvement of the above scheme, the step of base station group generates according to initial information and stores transfer information packet
It includes: dissection process is carried out to the initial message;Checking treatment is carried out to the initial message after the dissection process;To the school
Testing treated, initial information is packaged processing to generate transfer information;Store the transfer information.
As an improvement of the above scheme, the base station group sends the side of the corresponding transfer message of second terminal to second terminal
Method, comprising: the base station group sends the corresponding transfer message of second terminal generated in real time to second terminal.
As an improvement of the above scheme, the base station group sends the side of the corresponding transfer message of second terminal to second terminal
Method, further includes: the base station group obtains the solicited message that the second terminal is sent;The base station group is inquired according to solicited message
Database, and judge to whether there is the corresponding transfer message of not sent successful second terminal in database, it is judged as YES, it is described
Base station group sends the corresponding offline transfer information of second terminal to second terminal, is judged as NO, and the base station group is to second terminal
Send prompt information.
As an improvement of the above scheme, the base station group sends the corresponding offline middle transfering the letter of second terminal to second terminal
Breath, specific steps include: to judge whether the idle base station number in base station group is greater than or equal to the quantity of offline message pending, are sentenced
It is yes for breaking, while sending offline message to the second terminal;It is judged as NO, continues waiting for.
As an improvement of the above scheme, the offline message transmission method based on dipper system further include: second terminal
The transfer information is stored after turning message in the reception and updates the message id in memory.
The invention also discloses a kind of offline message transmitting device, for realizing described in claim 1-6 based on Beidou
The offline message transmission method of system characterized by comprising initial message obtains processing module, for receiving first terminal
The initial message of transmission, the initial message include first terminal card number, second terminal card number and message content;Transfer message is raw
At module, for transfer message to be generated and stored according to the initial information, the transfer message includes message id, message content
And type of message;Transfer message transmission module, for sending the corresponding transfer message of second terminal to second terminal.
As an improvement of the above scheme, transfer message generating module includes: resolution unit, for the initial message into
Row dissection process;Verification unit, for carrying out checking treatment to the initial message after the dissection process;Encapsulation unit is used for
Processing is packaged to generate transfer information to the initial information after the checking treatment;Storage unit, for storing in described
Transfering the letter breath.
As an improvement of the above scheme, the transfer message transmission module includes: online transmission unit, for whole to second
End sends the corresponding transfer message of second terminal generated in real time;Offline transmission unit, including following three subelements: acquisition is asked
Subelement is sought, the solicited message sent for obtaining the second terminal;It screens and determines subelement, for being looked into according to solicited message
Database is ask, and judges to whether there is the corresponding transfer message of not sent successful second terminal in database, when being judged as YES,
The base station group sends the corresponding transfer information of second terminal to second terminal;More base station transmission sub-units, for judging base station
Whether the idle base station number in group is greater than or equal to the quantity of offline message pending, if so, simultaneously to the second terminal
Send offline message;If it is not, continuing waiting for.
As an improvement of the above scheme, the offline transmission unit further includes more base station transmission sub-units, for judging base
Whether the idle base station number in group of standing is greater than or equal to the quantity of offline message pending, if so, simultaneously eventually to described second
End sends offline message;If it is not, continuing waiting for.
As an improvement of the above scheme, the offline message transmitting device, further includes: transfer message sink update module,
For storing the transfer information after second terminal turns message in the reception and updating the message id in memory.
The invention has the following beneficial effects:
The present invention is based on the offline message transmission methods of dipper system and offline message transmitting device, and message transmission can be improved
Accessibility, not repeated, while improving the efficiency of transmission of short message offline message.
Specifically, base station group, can also be right other than being parsed and being verified after receiving first terminal and sending message
The message is saved, and turns to work out a part of a message id as transfer message when message in a package, so as in the future
Offline transfer message can be sent.If the second terminal for receiving transfer message is online, by on-line normalization
Mode transmits message, if second terminal is in off-line state, can issue and request to base station group after second terminal starting, base
The group that stands can be sent to second terminal according to the offline message that is stored of request, such second terminal can receive its from
There is no received transfer message during line, utmostly ensure that the accessibility of transfer message, is sent out again without first terminal
Send initial message.
In addition, base station group when sending transfer message to second terminal, disappears offline when idle base station number reaches pending
Breath quantity or more just starts while sending, and transfer as much as possible can be sent out when may insure to send every time in this way
Message improves the transmitting efficiency of transfer message to a certain extent.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, the present invention is made into one below in conjunction with attached drawing
Step ground detailed description.Only this is stated, the present invention occurs in the text or will occur up, down, left, right, before and after, it is inside and outside etc. just
Position word is not to specific restriction of the invention only on the basis of attached drawing of the invention.
One, offline message transmission method
Fig. 1 is offline message transmission method overview flow chart of the present invention, comprising:
S100, base station group receive the initial message that first terminal is sent, and the initial message includes first terminal card number, the
Two terminal card numbers and message content;
S200, the base station group generate according to the initial information and store transfer message, and the transfer message includes disappearing
Cease ID, message content and type of message;
S300, the base station group send the corresponding transfer message of second terminal to second terminal.
It should be noted that the sequencing that above-mentioned steps are not inevitable.On first terminal, base station group and second terminal be
The basic framework of method is stated, on-line normalization message and offline transmission message are the implementation method of two different message transmission,
Difference is mainly reflected in method of reseptance of the base station group to the receiving handling method of message and second terminal to message.
Base station group receives the initial message that first terminal is sent, and the initial message includes first terminal card number, the second end
Hold card number and the step for message content for, either on-line normalization message, or transmit message offline, the equal indifference of the step
It is different.Wherein, initial information needs to encrypt to prevent initial message to be ravesdropping, and transmitted message should include first terminal card
Number, second terminal card number and message content.Wherein, first terminal card number is for identifying first terminal, allows base station group verification message
Whether source is legal, i.e., whether first terminal is authorized using communication system, and then filters unwarranted first terminal institute
The message of sending.Second terminal card number is for determining the message object to be sent.
Processing initial message is received to base station group below and second terminal receives the big step of transfer message two and carries out specifically
Explanation.
The base station group generates according to the initial information and stores transfer message, as shown in Fig. 2, specific steps include:
S210, dissection process is carried out to the initial message;
S220, checking treatment is carried out to the initial message after the dissection process;
S230, processing is packaged to the initial information after the checking treatment to generate transfer information;
S240, the storage transfer information.
It should be noted that the message that first terminal is sent is by encryption, therefore base station group is after receiving the message
It needs to parse message, restores transfer message, then the first terminal card number in transfer message is verified, confirmation the
One terminal is authorized, and then filters the message of illicit sources.Other than being parsed and being verified, it is also necessary to by initial information
Encapsulation process generates transfer message, and saves to transfer message, to receive offline transfer message in second terminal request
When can according to request content determination need to send offline transfer message.When being packaged, need to work out each transfer message
One message id, and a part as transfer message.Message id makes base station group and second terminal for being identified to message
It can identify the message, and further process accordingly.Message id is in the offline transfer message and determine most for determining that needs are sent
Effect is even more important when new received transfer message.Message id distinguishes this message and other message, and related place to realize
Reason needs, should minute book message receiving time or reception sequence, for example message id can be base station group and receives the message
Time, be also possible to the serial number that base station group receives the message.After saving transfer message, transfer message is sent to
Two terminals, therefore transfer message should also contain second terminal card number, to allow second terminal identification relevant information to be intended for this terminal.
In addition to message id, message content and second terminal card number, transfer message may also comprise type of message (such as end-to-end or server
To transport-types such as ends), first terminal card number etc., to meet different communication needs.
The base station group sends the corresponding transfer message of second terminal to second terminal, wherein during second terminal is corresponding
Turning message can be determined with card number, as long as that is, transfer message contains the card number of second terminal, then the transfer message is exactly
The corresponding transfer message of second terminal.When base station group sends transfer message to second terminal, second terminal is because of status
Presence or off-line state and have different method of reseptances to message, however, second terminal is online or offline
State is required to be for further processing according to the message id of transfer message after turning message in the reception.
The method that the base station group sends the corresponding transfer message of second terminal to second terminal, as shown in figure 3, specific step
Suddenly include:
S310, the base station group send the corresponding transfer message of second terminal generated in real time to second terminal.
Above-mentioned steps are the situations for on-line normalization transfer message.It should be noted that during second terminal receives online
The newest reception of base station group will be recorded and be successfully sent to the transfer message of second terminal by turning message also, and its message id is recorded as
Latest news ID.In this way after second terminal offline a period of time, when request receives offline message after starting, in the request of sending
Comprising latest news ID, base station group energy can be allowed to filter out the offline transfer for needing to send from whole transfer message that it is saved
Message issues second terminal in turn.
The method that the base station group sends the corresponding transfer message of second terminal to second terminal, as shown in figure 4, also wrapping
It includes:
S320, the base station group obtain the solicited message that the second terminal is sent;
S330, the base station group according to solicited message inquire database, and judge in database with the presence or absence of it is not sent at
The corresponding transfer message of the second terminal of function, is judged as YES, the base station group to second terminal send second terminal it is corresponding from
Line transfer information, is judged as NO, and the base station group sends prompt information to second terminal.
Above-mentioned steps are directed to transmit the situation of transfer message offline.It should be noted that as described above, receive from
The message id that the solicited message of line transfer message is included should be that base station group is recently received and be successfully sent to second terminal
Transfer message message id.Since message id itself has recorded time or the sequence that base station group receives the message, base station group root
The transfer message that base station group after the time or sequence that the message id is recorded receives, the part can be found out according to the message id
Data are exactly to need to be sent to the offline message of second terminal.
The base station group sends the corresponding offline transfer information of second terminal to second terminal, as shown in figure 5, specific steps
Include:
S340, judge whether the idle base station number in base station group is greater than or equal to the quantity of offline message pending, judge
It is yes, while sends offline message to the second terminal;It is judged as NO, continues waiting for.
It should be noted that base station group can send prompting message to second terminal in not offline transfer message, prompt
Second terminal user its there is no offline message.When there is offline transfer message, the present invention is sent offline simultaneously using multiple base stations
The method of transfer message, utmostly to reduce the influence for sending frequency and transmission length limitation to efficiency of transmission.In this method
Under, base station group contains multiple base stations, and there are many states for each base station, for example base station group may include 48 base stations, each base station
Have a three state: in idle, task, abnormal, the free time indicates that base station sends task currently without message is received, in etc. it is pending
State is sent, indicates that base station is carrying out message and sends task in task, it is abnormal to indicate that base station signal is unstable or equipment, antenna go out
Existing failure.When the offline transfer message of transmission in need, if being now in idle base station number more than or equal to pending
When the offline transfer message number sent, then offline transfer message is sent simultaneously by idle base station, otherwise continued waiting for, Zhi Daokong
Not busy base station number reaches the quantity or more of offline transfer message to be sent, then is sent appointing for offline message simultaneously
Business.
For example the offline transfer message for needing to send is when being 15, if base station number idle at this time is 15 (or more
It is more), then 15 offline transfer message are sent simultaneously by 15 idle base stations.Since offline transfer message is passed with the light velocity
Defeated, therefore the time for sending offline message is very short, the base station of state executes speed that other send tasks also quickly in task,
Idle state can comparatively fast be restored, therefore the time that the above process expends is shorter.If still direct using existing idle base station
The method of transmission needs at least one to send week when idle base station number is less than the offline transfer message number for needing to send
Phase can just be sent.For example the offline transfer message for needing to send has 15, but idle base station number only has 10 at this time, such as
Fruit directly transmits without waiting at this time, then after 10 base stations have sent 10 offline transfer message, after waiting 60 seconds
Remaining 5 offline transfer message can be sent.Compared with prior art, the time spent by method of the invention practical just waits for
Time and sending time, the problem of not considering further that sending cycle, the time is shorter, relatively efficiently improves efficiency of transmission.
As shown in fig. 6, the offline message transmission method based on dipper system further include:
S400, second terminal store the transfer information after turning message in the reception and update the message id in memory.
It should be noted that being received as message with online, it is also desirable to record base station after second terminal receives offline message
The newest reception of group and the transfer message for being successfully sent to second terminal, including the offline transfer message being successfully transmitted, and should
The message id of transfer message is updated to latest news ID.So that when starting in the future, Xiang Jizhan pocket transmission includes latest news ID
Solicited message to receive offline transfer message.After receiving offline transfer message, need to received offline transfer message
It is ranked up and then determines which is the recently received message of base station group in these message, for example comparison second terminal connects
The message id of each offline transfer message received finds out receiving time the latest or the last message id of reception sequence, mark
Message be the newest received message of base station group, then recorded.
Two, offline message Transmission system
The invention also discloses a kind of offline message transmitting devices, to realize the above-mentioned offline message based on dipper system
Transmission method, as shown in fig. 7, offline message transmitting device includes:
Initial message obtains processing module 100, for receiving the initial message of first terminal transmission, the initial message packet
Include first terminal card number, second terminal card number and message content;
Transfer message generating module 200, for transfer message to be generated and stored according to the initial information, the transfer disappears
Breath includes message id, message content and type of message;
Transfer message transmission module 300, for sending the corresponding transfer message of second terminal to second terminal.
It should be noted that initial message obtains the either on-line normalization message of processing module 100, or offline transmission disappears
In the case of breath, the equal indifference of the function and structure of the module.Wherein, initial information is encrypted to prevent initial message stolen
It listens, initial message should include first terminal card number, second terminal card number and message content.Wherein, first terminal card number is used for
It identifies first terminal, makes base station group verification message source whether legal, i.e., whether first terminal is authorized using communication system,
And then filter the message that unwarranted first terminal is issued.Second terminal card number is for determining message pair to be sent
As.
Transfer message generating module 200 and 300 liang of transfer message transmission module big functional module are carried out below specific
Explanation.
Fig. 8 is the functional structure chart of transfer message generating module 200, as shown in Figure 6, comprising:
Resolution unit 210, for carrying out dissection process to the initial message;
Verification unit 220, for carrying out checking treatment to the initial message after the dissection process;
Encapsulation unit 230, for being packaged processing to the initial information after the checking treatment to generate transfer information;
Storage unit 240, for storing the transfer information.
It should be noted that initial message is by encryption, therefore resolution unit 210 needs after receiving initial message
Initial message parsed, restore message content, then 220 pairs of the verification unit initial informations Jing Guo dissection process carry out
Verification, specifically verifies the first terminal card number in initial information, and confirmation first terminal is authorized, and then is filtered
The message of illicit sources.Initial information encapsulation process is generated transfer message by encapsulation unit 230, when being packaged, is needed pair
Each transfer message works out a message id, and a part as transfer message.Message id makes for being identified to message
Base station group and second terminal can identify the message, and further process accordingly.Message id is determining that it is offline that needs are sent
Effect is even more important when transfer message and determining newest received transfer message.Message id distinguishes this message and other to realize
Message, and related processing need, should minute book message receiving time or reception sequence, for example message id can be base station
Group receives the time of the message, is also possible to the serial number that base station group receives the message.Transfer message should also contain second
Terminal card number, to allow second terminal identification relevant information to be intended for this terminal.In addition to message id, message content and second terminal
Card number, transfer message may also comprise type of message (such as end-to-end or server to the transport-types such as end), first terminal card number
Deng to meet different communication needs.Storage unit 240 saves transfer message, to request to receive in second terminal
Offline transfer message can be needed to send according to request content determination when offline transfer message.
After saving transfer message, transfer message is sent to second terminal by transfer message transmission module 300.Such as Fig. 9 institute
Show, the transfer message transmission module 300 includes:
Online transmission unit 310, for sending the corresponding transfer message of second terminal generated in real time to second terminal;
Offline transmission unit 320, including following three subelements:
Acquisition request subelement 321, the solicited message sent for obtaining the second terminal;
It screens and determines subelement 322, for inquiring database according to solicited message, and judge in database with the presence or absence of not
The corresponding transfer message of successful second terminal is sent, when being judged as YES, the base station group sends second terminal to second terminal
Corresponding transfer information;
More base station transmission sub-units 323, it is pending whether the idle base station number for judging in base station group is greater than or equal to
The quantity of offline message, if so, sending offline message to the second terminal simultaneously;If it is not, continuing waiting for.
Online transmission and offline two kinds of situations of transmission can be divided into second terminal transmission transfer message, wherein send online
Task is executed by online transmission unit 310, and sending offline for task is executed by offline transmission unit 320.Offline transmission unit 320
It is critical function unit of the invention, offline transmission unit 320 is specifically described below.
The message id that solicited message acquired in acquisition request subelement 321 is included should be that base station group is recently received
And it is successfully sent to the message id of the transfer message of second terminal.The message is received since message id itself has recorded base station group
Time or sequence screen and determine that subelement 322 can find out the time or sequence that the message id is recorded according to the message id
The transfer message that base station group receives later, the partial data are exactly to need to be sent to the offline message of second terminal.
Screening determine need to send offline transfer message when, if through screening, do not need to send it is offline in
Turn message, more base station transmission sub-units 323 can send prompting message to second terminal, and prompting second terminal user, it is not offline
Message.If the offline transfer message of transmission in need, then more base station transmission sub-units 323 can be sent out to second terminal through screening
Send all offline transfer message.For more base station transmission sub-units 323, prompting message also can be regarded as it is a kind of it is special from
Line transfer message.More base station transmission sub-units 323 are sent in offline simultaneously when sending offline transfer message, using multiple base stations
Turn the method for message, utmostly to reduce the influence for sending frequency and transmission length limitation to efficiency of transmission.Base station group includes
Multiple base stations, there are many states for each base station, for example base station group may include 48 base stations, and there is three state in each base station: empty
In not busy, task, it is abnormal, the free time indicates that base station sends task currently without message is received, in etc. state to be sent, in task
Indicate that base station is carrying out message and sends task, it is abnormal to indicate that unstable base station signal or equipment, antenna break down.It is needed when having
When the offline transfer message to be sent, disappear if being now in idle base station number and being greater than or equal to offline transfer to be sent
When ceasing quantity, then more base station transmission sub-units 323 can control idle base station while send offline transfer message, otherwise more base stations
Transmission sub-unit 323 continues waiting for, until idle base station number reaches the quantity or more of offline transfer message to be sent
When, then the task of offline message is sent simultaneously.
For example the offline transfer message for needing to send is when being 15, if base station number idle at this time is 15 (or more
It is more), then more base station transmission sub-units 323 control 15 idle base stations while sending 15 offline transfer message.Due to offline
Transfer message is transmitted with the light velocity, therefore the time for sending offline message is very short, and the base station of state executes other in task
The speed of transmission task also quickly, can comparatively fast restore idle state, therefore the time that the above process expends is shorter.If without more
The processing of base station transmission sub-unit 323, the method directly transmitted using existing idle base station, is needed when idle base station number is less than
When the offline transfer message number to be sent, need at least one sending cycle that can just be sent.Such as need to send from
Line transfer message has 15, but idle base station number only has 10 at this time, if being not to wait for and directly transmitting at this time, can only control
It makes 10 idle base stations and sends 10 offline transfer message simultaneously, could be sent out after then waiting a sending cycle (60 seconds)
Send remaining 5 offline transfer message.Compared with prior art, when 323 considerations of more base station transmission sub-units of the invention wait
Between and sending time, the problem of not considering further that sending cycle, the time is shorter, relatively efficiently improves efficiency of transmission.
As shown in Figure 10, the offline message transmitting device further include:
Transfer message sink update module 400, for storing the middle transfering the letter after second terminal turns message in the reception
It ceases and updates the message id in memory.
It should be noted that transfer message sink update module 400, other than having the function of storage transfer message, there are also one
A critical function, i.e., for updating the value of the latest news ID in second terminal memory.Latest news ID is the interior of second terminal
The data having in depositing, the message id of the transfer message for recording the newest reception of base station group and being successfully sent to second terminal.
Either on-line normalization transfer message, or offline transmission transfer message, transfer message sink update module 400 is in second terminal
After turning message in the reception, it is required to update the message id in second terminal memory.
Specifically, it in the case of on-line normalization transfer message, when second terminal receives transfer message every time, is connect
The message id of the transfer message received is obviously exactly to receive newest message id at that time.Transfer message reception module 400 only need to be
Latest news ID in second terminal memory is updated to the received transfer of institute and disappeared by each second terminal after line receives transfer message
The message id of breath.
When receiving transfer message offline, transfer message reception module 400 carries out received all offline transfer message
It sorts and then determines which is the recently received message of base station group in these message, for example comparison second terminal receives
Each offline transfer message message id, find out receiving time the latest or the last message id of reception sequence, mark disappear
Breath is the newest received message of base station group, is then recorded.
After transfer message reception module 400 updates message id, after second terminal offline a period of time, requested after starting
When receiving offline message, includes latest news ID in the solicited message of sending, can allow base station group energy from the whole that it is saved
Turn to filter out in message and needs the offline transfer message sent and then issue second terminal.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.