CN107333248B - A kind of real-time sending method of short message and system - Google Patents

A kind of real-time sending method of short message and system Download PDF

Info

Publication number
CN107333248B
CN107333248B CN201710514491.5A CN201710514491A CN107333248B CN 107333248 B CN107333248 B CN 107333248B CN 201710514491 A CN201710514491 A CN 201710514491A CN 107333248 B CN107333248 B CN 107333248B
Authority
CN
China
Prior art keywords
random number
short message
mark
task
storage table
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.)
Active
Application number
CN201710514491.5A
Other languages
Chinese (zh)
Other versions
CN107333248A (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.)
Beijing Honglian 95 Information Industries Co Ltd
Original Assignee
Beijing Honglian 95 Information Industries 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 Beijing Honglian 95 Information Industries Co Ltd filed Critical Beijing Honglian 95 Information Industries Co Ltd
Priority to CN201710514491.5A priority Critical patent/CN107333248B/en
Publication of CN107333248A publication Critical patent/CN107333248A/en
Application granted granted Critical
Publication of CN107333248B publication Critical patent/CN107333248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of real-time sending method of short message and system, which includes multiple web servers, multiple tasks storage table, a random number storage table and multiple retransmission process, and each retransmission process corresponds to a task storage table, and this method includes:Web server receives the short message sending request that client is submitted, and is stored to the request as a short message sending task in task storage table, and wherein short message sending task includes destination number, short message content and status indicator;And each retransmission process generation one identifies random number and stores into random number storage table;The first number is inquired about from corresponding task storage table has the short message sending task for not sending mark, and the status indicator of the short message sending task inquired is updated to mark random number;Multiple short message sending tasks with the mark random number are taken out from task storage table and are submitted to short message sending platform;After task pending is submitted and sent successfully, the status indicator of the task is updated to have sent mark.

Description

A kind of real-time sending method of short message and system
Technical field
The present invention relates to computer and Internet technical field more particularly to a kind of real-time sending methods of short message and system.
Background technology
With the rapid growth of China mobile user, SMS has become the important side of the daily information express delivery of people Formula.Enterprise messaging is as the communication mode between a kind of enterprise and client, with its broad covered area, quick, no space-time limitation, it is low into Numerous advantages such as sheet, precision marketing, be widely used in finance, disappear soon, general merchandise, after-sale service, Express Logistics, education, Numerous industries such as real estate, automobile, agricultural, government become modern enterprise informationization important component.As enterprise messaging is advised Modelling application, traditional SMS platform single piece of information transmission-receiving function cannot fully meet the demand of Modern Enterprise Administration, large quantities of Measuring the transmission of instant short message has become SMS platform development trend.
The processing mode of short message sending Universal joint is at present:The transmission request of client is transmitted in web server;Web Server will send and ask, and store in tables of data;Retransmission process takes out data pending from tables of data, is submitted to short message hair Send platform.But when high-volume is needed to send, a web server can not handle request, cause to submit failure or processing slow; And all data are stored in a tables of data, it is slow to be easy to cause data processing, can not submit to short message sending platform in time.
Moreover, when carrying out messages in batch transmission, it is typically that multiple retransmission process are run simultaneously, extracts short in database Short message sending platform is submitted to after letter transmission task.If retransmission process 1 extracts 100 short message sending tasks in database, so This 100 short message sending tasks are progressively submitted to short message sending platform afterwards, after short message sending success, then task will be sent State is updated to send.But due to submitting and transmission needs certain time, other retransmission process may be had during this period Also taken out some task in this 100 tasks and submitted, that is, occur multiple retransmission process have submitted it is same short The problem of believing transmission task sends so as to cause the repetition of same short message.
Accordingly, it is desirable to provide a kind of new scheme that can effectively improve short message sending efficiency and prevent short message from retransmitting.
The content of the invention
For this purpose, the present invention provides a kind of real-time sending method of short message and system, to try hard to solve or at least alleviate deposit above The problem of.
According to an aspect of the present invention, a kind of short message is provided and sends system in real time, including multiple web servers, multiple Task storage table, a random number storage table and multiple retransmission process, each retransmission process correspond to a task storage table, each Task storage table corresponds to one or more retransmission process, and each retransmission process is connected with short message sending platform;Web server bag It includes:Request reception unit, suitable for receiving the short message sending request that client is submitted;And task location, suitable for by short message Request is sent as the storage of short message sending task into task storage table, wherein, short message sending task include destination number, Short message content and status indicator, status indicator include having sent mark, do not send mark and having sent mark;Retransmission process bag It includes:Random number generation unit is used as suitable for one mark random number of generation and is sending mark, and the mark random number is stored Into random number storage table;First updating block has suitable for inquiring about the first number from corresponding task storage table and does not send out The short message sending task of mark is sent, and the status indicator of those short message sending tasks inquired is updated to mark random number; Task submit unit, suitable for from task storage table take out with the mark random number multiple short message sending tasks be submitted to it is short Letter sends platform;And second updating block, it, will be corresponding to the task suitable for working as after short message sending task submits and send successfully Status indicator be updated to send mark.
Optionally, in the method according to the invention, random number generation unit be suitable for according to following methods generation mark with Machine number:First random number is generated according to pre-defined algorithm, and to the first generating random number hash index, it is random to obtain second Number;And the predetermined figure of second random number is taken out from right to left, obtain mark random number.
Optionally, in the method according to the invention, sent and be identified as 1, do not sent and be identified as 0;Generating random number list Member is further adapted for, when the mark random number of generation is 1, regenerating mark random number.
Optionally, in the method according to the invention, random number generation unit is further adapted for having worked as the mark random number generated When being present in random number storage table, mark random number is regenerated.
Optionally, in the method according to the invention, random number generation unit is further adapted in current random number storage table When middle stored mark random number is more than the second number, stored again after first removing all random numbers in the random number storage table The mark random number generated.
Optionally, in the method according to the invention, further include:Load-balancing device, suitable for equal according to predetermined load It accounts method and the short message sending that client is sent is requested assignment into the multiple web server.
Optionally, in the method according to the invention, the number of task storage table is 10, and task location is suitable for basis Last position of the destination number of short message sending task selects corresponding task storage table to carry out the storage;Or task storage The number of table is 100, and task location is corresponding suitable for last two selections of the destination number according to short message sending task Task storage table carries out the storage.
Optionally, in the method according to the invention, the first number is 100, predetermined figure 6, and the second number is 10,000.
According to another aspect of the present invention, provide a kind of short message real-time sending method, be suitable for being sent in real time in short message Performed in system, short message send in real time system include multiple web servers, multiple tasks storage table, a random number storage table and Multiple retransmission process, each retransmission process correspond to a task storage table, and each task storage table corresponds to one or more forwardings Program, each retransmission process are connected with short message sending platform, and this method includes:Web server receives the short message that client is submitted Request is sent, and using short message sending request as a short message sending task storage into task storage table, wherein, short message sending Task includes destination number, short message content and status indicator, and status indicator includes having sent mark, do not send mark and sending out Send mark;And in each retransmission process:One mark random number of generation is as sending mark, and by the mark random number It stores in random number storage table;The first number is inquired about from corresponding task storage table has the short message hair for not sending mark Task is sent, and the status indicator of those short message sending tasks inquired is updated to mark random number;From task storage table It takes out multiple short message sending tasks with the mark random number and is submitted to short message sending platform;And when short message sending task carries After handing over and sending successfully, the status indicator corresponding to the task is updated to have sent mark.
Technique according to the invention scheme, first by the short message sending request of client by hardware load equalizing equipment point Multiple servers are fitted on, this multiple servers stores short message sending request into the database of distributed structure/architecture, and more clothes Business device multiple tasks storage table store data simultaneously, with sharing data processing pressure, it is ensured that high-volume send when stability and Processing speed.
Afterwards, retransmission process takes out data pending from task storage table, and is submitted to short message sending platform and is sent out It send.Each retransmission process is carried out before forwarding every time, and first the unique mark random number of each self-generating one, then goes in task storage table Short message task pending is inquired about, once inquiring task pending, the status indicator of the task is just updated to the forwarding journey immediately Then the mark random number that sequence is generated is taken out the task pending with these mark random numbers from task storage table and is carried out again It submits.It is far smaller than task to the time that the status indicator of task is updated to submit and send the required time, therefore right The probability that other retransmission process operate the task during status indicator is updated also can be very low.And in this taking-up In repeating process, each retransmission process searches the task pending with each tagging random number respectively, therefore is not in conflict, So as to be effectively prevented from when multiple retransmission process while run and when transmission task is submitted to short message sending platform, due to Submit and send need certain time and appear in this during other retransmission process can also take out same batch of data and be sent out The problem of sending, so as to which the repetition of short message be avoided to send.
Moreover, the background technology such as the present invention is sayed, traditional short message sending side is to inquire task pending to take out this Task is submitted, and the repetition for being present with task pending during this instead takes out and submits and spin out data processing event, And the repeating process of the present invention is only with the addition of a step data and rewrites update operation, i.e., when inquiring task pending, first by this The status indicator of business is changed to mark random number, and this rewriting operation is usually fast in the extreme, can't delay data Treatment progress, therefore the present invention also further improves the treatment effeciency that short message is sent in real time on the whole, ensure that batch The quick transmission of short message.
Description of the drawings
In order to realize above-mentioned and related purpose, some illustrative sides are described herein in conjunction with following description and attached drawing Face, these aspects indicate the various modes that can put into practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall under in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical reference numeral generally refers to identical Component or element.
Fig. 1 shows that short message according to an embodiment of the invention sends the structure diagram of system 100 in real time;
Fig. 2 shows that short message in accordance with another embodiment of the present invention sends the structure diagram of system 100 in real time;
Fig. 3 shows the flow chart of the real-time sending method 300 of short message according to an embodiment of the invention;
Fig. 4 shows the entire flow figure of the real-time sending method of short message according to an embodiment of the invention;
Fig. 5 shows the schematic diagram of 140 runnable interface of retransmission process of one embodiment of the invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Fig. 1 shows that short message according to an embodiment of the invention sends the schematic diagram of system 100 in real time.It is shown in FIG. 1 Short message sends system 100 in real time includes multiple web servers 110 (the web server 1-m in such as Fig. 1), multiple tasks storage table 120 (the task storage table 1-n in such as Fig. 1), a random number storage table 130 and multiple retransmission process 140 (turn in such as Fig. 1 Send out program 1-p), wherein, each retransmission process 140 corresponds to a task storage table 120, and each task storage table 120 corresponds to one A or multiple retransmission process 140, each retransmission process 140 are connected with short message sending platform.That is, different retransmission process It is possible that corresponding same task storage table.If retransmission process 1 corresponds to task storage table 1, retransmission process 2 also corresponds to task storage In table 1, retransmission process 3 corresponds to task storage table 2.It should be pointed out that it is only exemplary that the short message in Fig. 1 sends system 100 in real time , in specific practice situation, can there are the web server, task storage table and forwarding journey of different number in system 100 Sequence, the present invention are not limited the specific number of equipment included in system 100, these facilities can also reside in multiplely It manages in position.
Web server 110 is mainly responsible for the request for receiving client and is stored, and can be a server, It can be by server cluster that several servers form or a cloud computing service center.In addition, for forming clothes Business device cluster or multiple servers of cloud computing service center may reside in multiple geographical locations, and the present invention is to web services The deployment way of device 110 is not limited.
Task storage table 120 is mainly used to storage web server and stores short message sending request, random number storage table 130 It is mainly used to store the random number of retransmission process generation.Task storage table 120 and random number storage table 130 can be stored in data It in storage device, is communicated to connect between data storage device and multiple web servers 110, data storage device can be data Storehouse can be both resided at as local data base in web server 110, be can also be used as remote data base and be arranged at web clothes It is engaged in outside device 110, the present invention is not limited the deployment way of data storage device.Wherein, data storage device can also be Hadoop distributed file systems.In addition, it will be appreciated that task storage table 120 has multiple, distributed can be stored in more In a data storage device, i.e., each data storage device can store one or more task storage tables 120 respectively.Moreover, Random number storage table 130 can be stored in the data storage device at some 120 place of task storage table, can also specially be stored In different data storage devices.
Retransmission process 140 is also established by network between data storage device and communicated to connect, and is mainly responsible in database Extraction transmission state is not sending for task, and submits it short message sending platform and send out this in task storage table The transmission state of task is sent to be updated to send.Retransmission process 140 can be set on the server, on forwarding server, one One or more retransmission process 140 can be arranged as required on platform forwarding server.Retransmission process 140 is set based on loose coupling Meter, supports multiple programs to be deployed in different servers simultaneously, and multiple retransmission process run deposited respectively from corresponding task simultaneously Task to be sent is taken in storage table, so as to improve the processing speed of retransmission process.The number of tasks taken every time is all forwarding in advance Initial setting up is done in program.Fig. 4 shows the signal of the runnable interface of retransmission process 140 according to an embodiment of the invention Figure.
Fig. 2 shows that short message according to an embodiment of the invention sends 110 He of web server in system 100 in real time The structure diagram of retransmission process 140.As shown in Fig. 2, web server 110 includes request reception unit 111 and task storage is single Member 112, retransmission process 140 include random number generation unit 141, the first updating block 142, task and submit unit 143 and second Updating block.It should be appreciated that a web server 110, task storage table 120 are only illustratively shown in Fig. 2 respectively and is turned Program 140 is sent out, it is actual to also have other multiple web servers 110, task storage table 120 and retransmission process 140.
Request reception unit 111 is suitable for receiving the short message sending request that client is submitted.Multiple client is usually had to carry Multiple short message sendings is handed over to ask, short message sending request includes sending the destination number and short message content of short message.
According to one embodiment, system 100 can be with load-balancing device, can be according to predetermined load-balancing algorithm The short message sending that client is sent is requested assignment into this multiple web server 120.More web servers 120 handle short simultaneously Letter sends request, it is ensured that stability and processing speed when high-volume is sent.
Task location 112 is suitable for using short message sending request as a short message sending task storage to task storage table In 120, wherein, short message sending task generally includes destination number, short message content and status indicator.In the prior art, state Mark only includes having sent mark and does not send mark, and in embodiments of the present invention, status indicator includes having sent mark, not sent out It send mark and is sending mark.In general, having sent mark could be provided as 1, mark is not sent and is arranged to 0;It can certainly It is arranged as required to as other numerical value, the invention is not limited in this regard.Mark is being sent to be arranged to be generated by retransmission process Random number.
Here distributed database schema may be employed, more web servers 110 please seek survival the short message sending of batch Distributed storage is into multiple storage tables 120, with sharing data processing pressure.It in addition, can be according to industry during storage data The tail number of business amount and destination number carrys out the quantity of design data sheet.Such as:10 task storage tables are set, and at this moment task storage is single Member 112 can be stored according to last corresponding task storage table of selection of the destination number of short message sending task.This If sample, tail number is 0 to be all stored in the 1st table, tail number is 1 to be all stored in the 2nd table ... ..., and tail number is 9 to be all stored to In 10th table.Alternatively, can set 100 task storage tables when task amount is big, at this moment task location 112 can root It is stored according to the corresponding task storage table of last two selections of the destination number of short message sending task.Similarly, tail number 00 Be all stored in the 1st table, tail number is stored to the 2nd table ... ... for 01, and tail number is 99 to be all stored in the 100th table.Further Ground, it is 4 or 44 fewer to consider tail number, and the comparison that tail number is 6 or 8 is more, therefore can count last position or two The distribution probability value of each numerical value in tail number, and distributed storage is carried out to short message sending task according to the probability value, to ensure The task number stored in every table is more uniform.
Random number generation unit 141 is suitable for one mark random number of generation as sending mark, and by the mark with Machine number is stored into random number storage table.Here, each retransmission process 140 all can first generate one before forwarding operation every time is performed A unique mark random number, and this mark random number is stored in random number storage table, it is then random according to this mark It counts to perform forwarding task.Before forwarding next time is performed, as soon as then new mark random number again, so multiple retransmission process It is accumulative to store multiple mark random numbers.
According to one embodiment, random number generation unit 141 can generate mark random number according to following methods:According to pre- Determine algorithm and generate first random number, and to the first generating random number hash index, obtain the second random number, thus will First random number is converted for number.Afterwards, the predetermined figure of second random number is taken out from right to left with specification random number lattice Formula, such as predetermined six digits, so that it may obtain the mark random number.Here, existing arbitrary random number may be employed in pre-defined algorithm Database functions NEWID () such as may be employed to generate the first random number in generation method, the invention is not limited in this regard.Together Reason, generation hash index algorithm can also use existing arbitrary hash index generation method, the invention is not limited in this regard, such as Database functions CHECKSUM may be employed to come to the first generating random number hash index.
First random number example of generation is as follows:
6BCDB8B3-D032-4808-8F8B-2F1A99117970
36832DE7-6D6D-4493-8ACA-223D70D69F1B
D3C974AC-9F31-48EE-BA6A-6525D379ECBE
Second random number example of generation is as follows:
-1998487002
50627070
341728105
For the mark random number that is generated, it is necessary to test to it, when the mark that random number generation unit 141 is generated Know random number and be exactly set transmission mark, when being 1, then need to regenerate new mark random number, i.e., again from The first random number is generated to start to generate new mark random number.In addition, it is also necessary to examine the uniqueness of the mark random number, that is, examine It surveys it to whether there is in current random number storage table, if it is, also needing to regenerate new mark random number.
In addition, random keep count of after repeatedly forwarding in random number storage table may be excessive, and it is random in order to prevent Number storage table is excessive, influences processing speed, it is necessary to carry out random number storage table from maintenance management.Therefore, generating random number list Member 141 be further adapted for the mark random number stored in current random number storage table 130 more than the second number when, such as 10,000 when, Generated mark random number is stored again after first removing all random numbers in the random number storage table.Here, clear table can make Whole table removing is carried out with the order of data function truncate table.Certainly, if the number of current random number is not yet super The second number is crossed, then can directly store the mark random number.
First updating block 142, which is suitable for inquiring about the first number from corresponding task storage table having, does not send mark Short message sending task, and the status indicator of those short message sending tasks inquired is updated to the mark random number.Also It is that will not send mark (i.e. 0) to be updated to sending mark, that is, identifies random number.According to one embodiment, the first number can Think 100.
In general, retransmission process 140, when extracting short message sending task, extraction status indicator is not send mark (i.e. 0) Short message sending task after submitting it short message sending platform, then the status indicator of the task is updated to have sent mark (i.e. 1).But it is deposited because the process of submission is often present with multiple retransmission process than relatively time-consuming, and in repeating process and corresponds to same task Store up table, it is thus possible to have other retransmission process and similarly be extracted the short message that some status indicator in the task storage table is 0 Transmission task, the repetition for thus causing the short message are submitted and sent.
Therefore, creatively it is with the addition of sending in the present invention and identifies this mark, i.e., each retransmission process 140 is given birth to Into unique mark random number, when the status indicator that retransmission process 140 inquires some short message sending task is 0, first The status indicator of the task is first updated to the mark random number (sending mark) by 0 in time, and what numerical value was rewritten Speed is exceedingly fast again, is thus effectively guaranteed and there will be no other program inquiring to the task pending, also will not be again with regard to nature The repetition for short message task occur is submitted and sent.
Task submits unit 143 to be suitable for taking out multiple short messages hair with the mark random number from task storage table 120 Task is sent to be submitted to short message sending platform.Here, each self-generating of each retransmission process has corresponding mark random number, therefore is carrying out Each performs its own functions for each program during forwarding, each searches the task of the mark random number with the program, is not in conflict.Moreover, Compared to traditional inquiry-extraction-submission process, it is non-to merely add a step to inquiry-rewriting-extraction-submission process of the invention Normal fast ground rewriting operation, can't delay data processing process, instead because this step rewriting operation improves follow-up data and carries The speed for taking and submitting so as to improve data-handling efficiency on the whole, ensures the quick transmission of messages in batch.
Second updating block 144 is suitable for after short message sending task is submitted and sent successfully, by the shape corresponding to the task State mark is updated to send mark, will identify random number update for 1.Here, retransmission process 140 is by short message sending task Short message sending platform is submitted to, short message sending task is performed by the platform, after short message sending task is sent successfully, platform will be sent out Successful result is sent to feed back to retransmission process 140, retransmission process 140 receives short message sending, and successfully more new task is deposited again after feedback Store up the status indicator in table.
The following table shows a collection of outgoing data example, the expression that wherein status indicator is 0 is not sent also, status indicator 1 Expression sent, status indicator is updated mark random number for 6 bit digitals, wherein 856236 be 1 institute of retransmission process The mark random number of generation, representing the task will be forwarded by retransmission process 1;123356 be the mark that is generated of retransmission process 2 with Machine number, representing the task will be forwarded by retransmission process 2.
Fig. 3 shows the flow chart of the real-time sending method 300 of short message according to an embodiment of the invention.It is suitable for short It sends in system 100 and performs when reliable, as shown in figure 3, this method starts from step S310.
In step S310, web server receives the short message sending request that client is submitted, and short message sending is asked to make Be the storage of short message sending task into task storage table, wherein, short message sending task include destination number, short message content and Status indicator, status indicator include having sent mark, do not send mark and having sent mark.Wherein, having sent mark can be with For 1, it can be 0 not send mark.
According to one embodiment, the number of task storage table is 10, and web server can be according to the mesh of short message sending task Last position of label code selects corresponding task storage table to carry out the storage.According to another embodiment, task storage table Number for 100, web server is suitable for being deposited according to the corresponding task of last two selections of the destination number of short message sending task It stores up table and carries out the storage.In addition, before step S210, step can also be included:Load-balancing device is born according to predetermined It carries equalization algorithm and the short message sending that client is sent is requested assignment into multiple web servers.
Then, in step s 320, each one mark random number of retransmission process generation, which is used as, is sending mark, and should Random number storage is identified into random number storage table.
According to one embodiment, generating the step of identifying random number can include:One first is generated according to pre-defined algorithm Random number, and to the first generating random number hash index, obtain the second random number;And to take out this from right to left second random Several predetermined figures obtains mark random number.According to another embodiment, generate the step of identifying random number and further include:Work as life Into mark random number be 1 or when being present in random number storage table, regenerate mark random number.In addition, will mark with Machine number, which was stored to the step of random number storage table, to be included:The mark random number stored in current random number storage table During more than the second number, generated mark random number is stored again after first removing all random numbers in the random number storage table.
Then, in step S330, each retransmission process inquires about the first number from corresponding task storage table to be had not Send mark short message sending task, and by the status indicator of those short message sending tasks inquired be updated to it is described mark with Machine number.
Then, in step S340, each retransmission process takes out multiple with the mark random number from task storage table Short message sending task is submitted to short message sending platform;And in step S350, after short message sending task is submitted, by the task institute Corresponding status indicator is updated to send mark.
Fig. 4 shows the entire flow figure of the real-time sending method 300 of short message of the present invention, specific thin on method 300 Section is disclosed in detail in the description based on Fig. 1 and Fig. 2, is no longer repeated herein.
Technique according to the invention scheme by the control mode from maintenance used to mark random number, ensure that this The uniqueness of random number.Retransmission process uses distributed deployment, when multiprogram is run simultaneously, by being stored to mark random number The control of process, it is ensured that the uniqueness for the outgoing data that each program is taken avoids different programs from getting same and send and appoints Business, causes the repeating transmission of short message.
Moreover, the present invention, using hardware load equalizing frame, each processing links using distributed deployment, possess and deal with Large capacity, the ability of highly dense business impact, can in real time, it is efficient, steadily support the other short message sending of millions per hour Amount;Key modules use the system architecture of distributed deployment, possess and deal with large capacity, the ability of highly dense business impact;Web takes Business device, database purchase table and retransmission process can be adjusted according to short message sending, be easy to extend;In system data volume into Distributed storage is gone, it can be ensured that data processing speed ensures the timeliness of short message sending.To sum up, the present invention improves interface Processing speed and interface stability, while promote the processing time of data, reduce data processing link, it is ensured that carry in time It is sent to short message sending platform.
B11, the method as described in B9 or B10, wherein, described sent is identified as 1, and described do not send is identified as 0, generation The step of mark random number, further includes:When the mark random number of generation is 1, mark random number is regenerated.
B12, the method as described in B9 or B10, generate it is described mark random number the step of further include:When generation mark with When machine number is present in random number storage table, mark random number is regenerated.
B13, the method as any one of B9-B12, by mark random number storage to the step in random number storage table Including:When the mark random number stored in current random number storage table is more than the second number, first removes the random number and deposit Generated mark random number is stored after all random numbers in storage table again.
B14, the method as described in B9, further include step:Load-balancing device is according to predetermined load-balancing algorithm by visitor The short message sending that family end is sent requests assignment to the multiple web server.
B15, the method as described in B9, wherein, the number of the task storage table is 10, and the web server is suitable for root According to last position of the destination number of short message sending task corresponding task storage table is selected to carry out the storage;Or described The number for storage table of being engaged in is 100, and the web server is suitable for last two selections of the destination number according to short message sending task Corresponding task storage table carries out the storage.
B16, the method as any one of B9-B13, wherein, first number is 100, and the predetermined figure is 6, second number is 10,000.
In the specification provided in this place, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice without these specific details.In some instances, well known method, knot is not been shown in detail Structure and technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor Shield the present invention claims the feature more features than being expressly recited in each claim.More precisely, as following As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim is in itself Separate embodiments as the present invention.
Those skilled in the art should understand that the modules or unit or group of the equipment in example disclosed herein Part can be arranged in equipment as depicted in this embodiment or alternatively can be positioned at and the equipment in the example In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into addition multiple Submodule.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.It can be the module or list in embodiment Member or component be combined into a module or unit or component and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it may be employed any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power Profit requirement, summary and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included some features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
Various technologies described herein can combine hardware or software or combination thereof is realized together.So as to the present invention Method and apparatus or the process and apparatus of the present invention some aspects or part can take embedded tangible media, it is such as soft The form of program code (instructing) in disk, CD-ROM, hard disk drive or other arbitrary machine readable storage mediums, Wherein when program is loaded into the machine of such as computer etc, and is performed by the machine, the machine becomes to put into practice this hair Bright equipment.
In the case where program code performs on programmable computers, computing device generally comprises processor, processor Readable storage medium (including volatile and non-volatile memory and or memory element), at least one input unit and extremely A few output device.Wherein, memory is arranged to storage program code;Processor is arranged to according to the memory Instruction in the said program code of middle storage, the user for performing the online customer service system of the present invention ask distribution method.
By way of example and not limitation, computer-readable medium includes computer storage media and communication media.It calculates Machine readable medium includes computer storage media and communication media.Computer storage media storage such as computer-readable instruction, The information such as data structure, program module or other data.Communication media is generally modulated with carrier wave or other transmission mechanisms etc. Data-signal processed passes to embody computer-readable instruction, data structure, program module or other data including any information Pass medium.Above any combination is also included within the scope of computer-readable medium.
In addition, be described as herein can be by the processor of computer system or by performing for some in the embodiment The method or the combination of method element that other devices of the function are implemented.Therefore, have to implement the method or method The processor of the necessary instruction of element forms to implement the device of this method or method element.In addition, device embodiment Element described in this is the example of following device:The device is for implementing as in order to performed by implementing the element of the purpose of the invention Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " the 3rd " etc. Description plain objects are merely representative of the different instances for being related to similar object, and are not intended to imply that the object being so described must Must have the time it is upper, spatially, in terms of sequence or given order in any other manner.
Although describing the present invention according to the embodiment of limited quantity, above description, the art are benefited from It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that The language that is used in this specification primarily to readable and introduction purpose and select rather than in order to explain or limit Determine subject of the present invention and select.Therefore, in the case of without departing from the scope and spirit of the appended claims, for this Many modifications and changes will be apparent from for the those of ordinary skill of technical field.For the scope of the present invention, to this The done disclosure of invention is illustrative and not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (16)

1. a kind of short message sends system in real time, including multiple web servers, multiple tasks storage table, a random number storage table With multiple retransmission process, each retransmission process corresponds to a task storage table, and each task storage table corresponds to one or more turn Program is sent out, each retransmission process is connected with short message sending platform;
The web server includes:
Request reception unit, suitable for receiving the short message sending request that client is submitted;And
Task location, suitable for being stored short message sending request into task storage table as a short message sending task, In, the short message sending task includes destination number, short message content and status indicator, and the status indicator includes having sent mark Know, do not send mark and sending mark;
The retransmission process includes:
Random number generation unit is used as suitable for one mark random number of generation and is sending mark, and the mark random number is deposited It stores up in random number storage table;
First updating block has the short message hair for not sending mark suitable for inquiring about the first number from corresponding task storage table Task is sent, and the status indicator of those short message sending tasks inquired is updated to the mark random number;
Task submits unit, suitable for taking out multiple short message sending tasks with the mark random number from the task storage table It is submitted to short message sending platform;And
Second updating block, after working as the submission of short message sending task and sending successfully, by the status indicator corresponding to the task It is updated to send mark.
2. the system as claimed in claim 1, wherein, the random number generation unit is suitable for generating the mark according to following methods Know random number:
First random number is generated according to pre-defined algorithm, and to the first generating random number hash index, it is random to obtain second Number;And
The predetermined figure of second random number is taken out from right to left, obtains the mark random number.
3. system as claimed in claim 1 or 2, wherein, described sent is identified as 1, and described do not send is identified as 0;It is described Random number generation unit is further adapted for, when the mark random number of generation is 1, regenerating mark random number.
4. system as claimed in claim 1 or 2, wherein, the random number generation unit is further adapted for when the mark of generation is random When number is present in random number storage table, mark random number is regenerated.
5. system as claimed in claim 2, the random number generation unit is further adapted for the institute in current random number storage table When the mark random number of storage is more than the second number, first removes to store again after all random numbers in the random number storage table and give birth to Into mark random number.
6. the system as claimed in claim 1 further includes:
Load-balancing device, suitable for the short message sending that client is sent is requested assignment to institute according to predetermined load-balancing algorithm State multiple web servers.
7. the system as claimed in claim 1, wherein,
The number of the task storage table is 10, and the task location is suitable for the destination number according to short message sending task Last position selects corresponding task storage table to carry out the storage;Or
The number of the task storage table is 100, and the task location is suitable for the destination number according to short message sending task The corresponding task storage table of last two selections carry out the storage.
8. system as claimed in claim 5, wherein, first number is 100, and the predetermined figure is 6, second number Mesh is 10,000.
9. a kind of real-time sending method of short message, suitable for being performed in short message in real time transmission system, the short message sends system in real time Including multiple web servers, multiple tasks storage table, a random number storage table and multiple retransmission process, each retransmission process A corresponding task storage table, each task storage table correspond to one or more retransmission process, and each retransmission process is sent out with short message Platform is sent to connect, this method includes:
Web server receives the short message sending request that client is submitted, and appoints using short message sending request as a short message sending Business is stored into task storage table, wherein, the short message sending task includes destination number, short message content and status indicator, institute Stating status indicator includes having sent mark, do not send mark and having sent mark;And
In each retransmission process:
One mark random number of generation, which is used as, is sending mark, and by mark random number storage into random number storage table;
The first number is inquired about from corresponding task storage table has the short message sending task for not sending mark, and will inquire The status indicators of those short message sending tasks be updated to the mark random number;
Being taken out from the task storage table, there are multiple short message sending tasks of the mark random number, which to be submitted to short message sending, puts down Platform;And
After short message sending task is submitted and sent successfully, the status indicator corresponding to the task is updated to have sent mark.
10. method as claimed in claim 9, wherein, the step of generating the mark random number, includes:
First random number is generated according to pre-defined algorithm, and to the first generating random number hash index, it is random to obtain second Number;And
The predetermined figure of second random number is taken out from right to left, obtains the mark random number.
11. the method as described in claim 9 or 10, wherein, described sent is identified as 1, and described do not send is identified as 0, life It is further included into the step of mark random number:
When the mark random number of generation is 1, mark random number is regenerated.
12. the method as described in claim 9 or 10, the step of generating the mark random number, further includes:
When the mark random number of generation is present in random number storage table, mark random number is regenerated.
13. method as claimed in claim 10 includes mark random number storage to the step in random number storage table:
When the mark random number stored in current random number storage table is more than the second number, random number storage is first removed Generated mark random number is stored after all random numbers in table again.
14. method as claimed in claim 9, further includes step:
Load-balancing device requests assignment to the short message sending that client is sent according to predetermined load-balancing algorithm described more A web server.
15. method as claimed in claim 9, wherein,
The number of the task storage table is 10, and the web server is suitable for according to the destination number of short message sending task most Latter position selects corresponding task storage table to carry out the storage;Or
The number of the task storage table is 100, and the web server is suitable for according to the destination number of short message sending task most The corresponding task storage table of two selections carries out the storage afterwards.
16. method as claimed in claim 13, wherein, first number is 100, and the predetermined figure is 6, described second Number is 10,000.
CN201710514491.5A 2017-06-29 2017-06-29 A kind of real-time sending method of short message and system Active CN107333248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710514491.5A CN107333248B (en) 2017-06-29 2017-06-29 A kind of real-time sending method of short message and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710514491.5A CN107333248B (en) 2017-06-29 2017-06-29 A kind of real-time sending method of short message and system

Publications (2)

Publication Number Publication Date
CN107333248A CN107333248A (en) 2017-11-07
CN107333248B true CN107333248B (en) 2018-05-29

Family

ID=60197320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710514491.5A Active CN107333248B (en) 2017-06-29 2017-06-29 A kind of real-time sending method of short message and system

Country Status (1)

Country Link
CN (1) CN107333248B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650642B (en) * 2018-05-09 2022-11-11 厦门南讯股份有限公司 Short message high-efficiency sending method and cross-province short message high-efficiency sending method
CN109246631B (en) * 2018-11-29 2022-03-15 中电万维信息技术有限责任公司 Method for sending short message
CN110427763B (en) * 2019-07-24 2021-07-23 上海朝夕网络技术有限公司 Consensus method of distributed system based on predefined execution codes
CN112040429B (en) * 2020-07-28 2021-09-21 南京云中云信息技术有限公司 Short message management system and method based on distributed storage
CN113423075A (en) * 2021-05-18 2021-09-21 北京达佳互联信息技术有限公司 Short message sending control method and device, electronic equipment, storage medium and product
CN113810477A (en) * 2021-08-30 2021-12-17 深圳壹账通智能科技有限公司 File uploading method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750669A (en) * 2004-09-16 2006-03-22 华为技术有限公司 Method for group transmittings short message
CN101137087A (en) * 2007-08-01 2008-03-05 浙江大学 Short message monitoring center and monitoring method
CN102340580A (en) * 2010-07-16 2012-02-01 希姆通信息技术(上海)有限公司 Mobile phone and method for preventing repeated sending of mobile phone by using same
CN102946596A (en) * 2012-11-29 2013-02-27 广东全通教育股份有限公司 Method and system for preventing resending of short message based on digital signature technology
CN104717065A (en) * 2013-12-16 2015-06-17 ***通信集团公司 Short message certification information submitting method, device and system and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060019643A1 (en) * 2004-07-20 2006-01-26 Inventec Appliances Corporation Method of sending instruction to mobile phone by short message

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1750669A (en) * 2004-09-16 2006-03-22 华为技术有限公司 Method for group transmittings short message
CN101137087A (en) * 2007-08-01 2008-03-05 浙江大学 Short message monitoring center and monitoring method
CN102340580A (en) * 2010-07-16 2012-02-01 希姆通信息技术(上海)有限公司 Mobile phone and method for preventing repeated sending of mobile phone by using same
CN102946596A (en) * 2012-11-29 2013-02-27 广东全通教育股份有限公司 Method and system for preventing resending of short message based on digital signature technology
CN104717065A (en) * 2013-12-16 2015-06-17 ***通信集团公司 Short message certification information submitting method, device and system and terminal device

Also Published As

Publication number Publication date
CN107333248A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN107333248B (en) A kind of real-time sending method of short message and system
WO2019211607A1 (en) System for controlling user interaction via an application with remote servers
CN102955717B (en) Message management equipment and method in distributed message processing system
CN110290186A (en) A kind of system and method suitable for the transmission of more Supercomputer Center's files
CN104750549A (en) Computational task processing device, method and system
CN111083179B (en) Internet of things cloud platform, and equipment interaction method and device based on same
CN108737534A (en) A kind of data transmission method, device, block catenary system based on block chain
CN108933695B (en) Method and apparatus for processing information
CN104199912B (en) A kind of method and device of task processing
CN104932941A (en) Distributed message processing system and device and method thereof
CN105530311B (en) Load allocation method and equipment
CN107819825A (en) A kind of service scheduling method, device and electronic equipment
CN116134448A (en) Joint machine learning using locality sensitive hashing
KR20220051131A (en) Centralized health monitoring in multi-domain networks
CN104125303B (en) Reading and writing data requesting method, client and system
CN107330119A (en) Caching data processing method, electronic equipment, computer-readable storage medium
CN110309142B (en) Method and device for rule management
CN107704357B (en) Log generation method and device
CN105637842B (en) The method that reliable news for the intermediary in network communications environment transmits
CN106657358A (en) Service proxy method and device for Android applications
CN104994088B (en) Data verification method, client, server-side based on WiFi connections and system
CN113064905B (en) Business process processing method, device, electronic equipment and computer readable medium
CN115130911A (en) Method and device for processing delivery tasks failed to execute by robot
US11789959B2 (en) Data visualization method
CN110019456A (en) Data lead-in method, device and system

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