CN109511094A - Sending short messages in groups method, apparatus, equipment and storage medium based on re-scheduling algorithm - Google Patents

Sending short messages in groups method, apparatus, equipment and storage medium based on re-scheduling algorithm Download PDF

Info

Publication number
CN109511094A
CN109511094A CN201811506841.4A CN201811506841A CN109511094A CN 109511094 A CN109511094 A CN 109511094A CN 201811506841 A CN201811506841 A CN 201811506841A CN 109511094 A CN109511094 A CN 109511094A
Authority
CN
China
Prior art keywords
subscriber
data
sent
scheduling algorithm
bytes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811506841.4A
Other languages
Chinese (zh)
Other versions
CN109511094B (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.)
Guangzhou Yijie Digital Technology Co Ltd
Original Assignee
Guangzhou Yijie Digital Technology 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 Guangzhou Yijie Digital Technology Co Ltd filed Critical Guangzhou Yijie Digital Technology Co Ltd
Priority to CN201811506841.4A priority Critical patent/CN109511094B/en
Publication of CN109511094A publication Critical patent/CN109511094A/en
Application granted granted Critical
Publication of CN109511094B publication Critical patent/CN109511094B/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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to the technical fields of the communication technology, more particularly, to a kind of sending short messages in groups method, apparatus, equipment and storage medium based on re-scheduling algorithm.Sending short messages in groups method based on re-scheduling algorithm includes: to obtain emergency message, obtains emergency short message content according to emergency message;Message of meeting an urgent need includes emergency region, obtains all subscriber phone numbers in emergency region, and subscriber phone number is written and sends table of bytes;User's flow-data is obtained by cluster message channel, and Subscriber Number to be increased and Subscriber Number to be deleted are obtained by re-scheduling algorithm;Subscriber Number to be increased is increased into transmission table of bytes, subscriber phone number identical with Subscriber Number to be deleted is deleted from transmission table of bytes, obtains table of bytes to be sent;The corresponding customer mobile terminal of subscriber phone number that short message content of meeting an urgent need is sent in table of bytes to be sent.The present invention has the efficiency for improving and searching subscriber phone number in extensive area, mitigates the effect of memory usage.

Description

Sending short messages in groups method, apparatus, equipment and storage medium based on re-scheduling algorithm
Technical field
The present invention relates to the technical fields of the communication technology, more particularly, to a kind of sending short messages in groups side based on re-scheduling algorithm Method, device, equipment and storage medium.
Background technique
Currently, in particular in some region, short message of meeting an urgent need is sent carrying out bulk SMS message to a large number of users, Such as have typhoon, heavy rain or other emergency events, it needs to send emergency short message, but crowd within the scope of the whole province or some city Be it is continually changing, all the time all someone enter this region, also someone leaves this region.It needs to newly into this area The crowd in domain sends emergency short message, and in order to mitigate the pressure in the channel of mass-sending emergency short message and promote user experience, needs Accomplish not send the emergency short message content to the crowd for leaving this region, then the crowd for needing to leave this region is corresponding Phone number is deleted from list to be sent.When searching the phone number for needing to delete from the list to be sent, generally adopt Using the following method:
1, in the case of without using database or caching component, list to be sent is stored using data structures such as array, chained lists, is used The phone number that sequential search or binary search need to delete, if being feasible, but right in the case that data volume is little In however in the range of being related to the whole province or some city, have several ten million even more than one hundred million populations, that is, correspond to list to be sent In, it has and accordingly there are several ten million even more than one hundred million phone numbers, will there is problem on EMS memory occupation and efficiency, so that It is unable to run in single computer.In addition, even if the higher binary chop of service efficiency, it is also desirable to retain data are orderly, Search performance needs a millisecond rank at the soonest.
2, cached using relevant database or NoSQL, under several hundred million grades of data volumes, MySQL and Redis need second grade or Person's Millisecond is searched, and EMS memory occupation ratio does not use component Shi Genggao.
The prior art in the list to be sent of covering the whole province or the emergency short message of city-level for searching the use for needing to delete Family phone number has the following deficiencies: EMS memory occupation height, low efficiency, and the efficient requirement of low-resource is not achieved.It is especially needed anti- When searching again different subscriber phone numbers, the efficiency and resource problem of the prior art can be protruded more.Other part Technical solution also needs to dispose third party database, increases the cost of scheme.
Summary of the invention
The object of the present invention is to provide the efficiency that subscriber phone number is searched in a kind of raising in extensive area, in mitigation Deposit sending short messages in groups method, apparatus, equipment and the storage medium based on re-scheduling algorithm of occupancy.
Foregoing invention purpose one of the invention has the technical scheme that
A kind of sending short messages in groups method based on re-scheduling algorithm, the sending short messages in groups method based on re-scheduling algorithm include:
Emergency message is obtained, emergency short message content is obtained according to the emergency message;
The emergency message includes emergency region, obtains all subscriber phone numbers in the emergency region, and by the use Phone number write-in in family sends table of bytes;
User's flow-data is obtained by cluster message channel, and Subscriber Number to be increased and to be deleted is obtained by re-scheduling algorithm Subscriber Number;
The Subscriber Number to be increased is increased into the transmission table of bytes, it will be described identical with the Subscriber Number to be deleted The subscriber phone number is deleted from the transmission table of bytes, obtains table of bytes to be sent;
The corresponding user of the subscriber phone number that the emergency short message content is sent in the table of bytes to be sent is moved Dynamic terminal.
By using above-mentioned technical proposal, the subscriber phone number for needing to delete can be searched in table of bytes to be sent When, the corresponding integer array of subscriber phone number is written in the form of byte and sends table of bytes, EMS memory occupation sky can be reduced Between, re-scheduling is carried out to all integer types in time, more than 40 hundred million numerical value at most only use 512M memory;Using re-scheduling simultaneously When algorithm searches duplicate Subscriber Number, several bit arithmetics and numerical division and remainder are only carried out, can be completed in nanosecond, it is per second Million ranks can easily be handled to search, improve the efficiency of lookup;And this scheme is not needed by third party software and group yet Part reduces the cost of scheme.
The present invention is further arranged to: being obtained user's flow-data by cluster message channel described, is calculated by re-scheduling Before method obtains the step of Subscriber Number to be increased and Subscriber Number to be deleted, the sending short messages in groups method based on re-scheduling algorithm Further include:
The corresponding value range of data set where the transmission table of bytes is obtained, numerical space is obtained;
Subscriber phone number in the data space is mapped into byte array, obtains byte arrays to be sent.
Further, the subscriber phone number by the data space maps to byte array, obtains to be sent Byte arrays include:
Virtual index is calculated, each subscriber phone number in the data space is corresponded into a bit in bit array, is obtained To bit index;
True index is calculated, by the bit index, the corresponding byte of every eight bit obtains the byte array;
Position of each bit index in the byte array is calculated, the byte arrays to be sent are obtained.
By using above-mentioned technical proposal, before being judged using re-scheduling algorithm user's flow-data, will send Data set where table of bytes is initialized, by each of data set numerical value, i.e., each subscriber phone number into Row Mapping and Converting is 1 the corresponding bit value of each subscriber phone number, then by every 8 is the corresponding byte of bit, obtain to Send byte arrays.Since in sending table of bytes, each subscriber phone number is an integer array, if it exists several ten million Even several hundred million a subscriber phone numbers, then sending table of bytes the space occupied will be very huge, and by each subscriber phone number A bit is mapped to, then by the corresponding byte of every 8 bit, so as to reduce the entire sky for sending table of bytes committed memory Between, even if at most only using 512M memory there are more than 40 hundred million subscriber phone numbers.
The present invention is further arranged to: it is described that user's flow-data is obtained by cluster message channel, and calculated by re-scheduling Method obtains Subscriber Number to be increased and Subscriber Number to be deleted, comprising:
Judge that user's flow-data whether there is in the byte arrays to be sent by re-scheduling algorithm, obtains judgement knot Fruit;
If user's flow-data is that user flows out data and the judging result is presence, the user is flowed out into data As the Subscriber Number to be deleted;
If user's flow-data is that user flows into data and the judging result is that there is no flow into number for the user According to as the Subscriber Number to be increased.
Further, described to judge user's flow-data with the presence or absence of the byte number to be sent by re-scheduling algorithm In group, obtaining judging result includes:
Array is stated, wherein the array is the byte arrays to be sent;
Re-scheduling expression formula is obtained according to the byte arrays to be sent, and number is flowed to the user by the re-scheduling expression formula According to being calculated, using calculated result as the judging result.
The re-scheduling table in re-scheduling algorithm is used according to the byte arrays to be sent of statement by using above-mentioned technical proposal Up to formula, user's flow-data is calculated, judges that user's flow-data whether there is in word to be sent according to calculated result Joint number group can further increase the efficiency of re-scheduling.User flow-data quartile user is flowed into data and user flows out data, And data and user's outflow data are flowed into the user respectively, using different processing modes, so that obtained byte to be sent The data precision in table is higher.
Foregoing invention purpose two of the invention has the technical scheme that
A kind of sending short messages in groups device based on re-scheduling algorithm, the sending short messages in groups device based on re-scheduling algorithm include:
Short message content obtains module, for obtaining emergency message, obtains emergency short message content according to the emergency message;
Phone number obtains module, includes emergency region for the emergency message, and the institute obtained in the emergency region is useful Family phone number, and the subscriber phone number is written and sends table of bytes;
Re-scheduling module for obtaining user's flow-data by cluster message channel, and obtains use to be increased by re-scheduling algorithm Family number and Subscriber Number to be deleted;
Data update module, for the Subscriber Number to be increased to be increased to the transmission table of bytes, will with it is described to be deleted The identical subscriber phone number of Subscriber Number is deleted from the transmission table of bytes, obtains table of bytes to be sent;
SMS transmission module, for the emergency short message content to be sent to the user mobile phone in the table of bytes to be sent The corresponding customer mobile terminal of number.
By using above-mentioned technical proposal, the subscriber phone number for needing to delete can be searched in table of bytes to be sent When, the corresponding integer array of subscriber phone number is written in the form of byte and sends table of bytes, EMS memory occupation sky can be reduced Between, re-scheduling is carried out to all integer types in time, more than 40 hundred million numerical value at most only use 512M memory;Using re-scheduling simultaneously When algorithm searches duplicate Subscriber Number, several bit arithmetics and numerical division and remainder are only carried out, can be completed in nanosecond, it is per second Million ranks can easily be handled to search, improve the efficiency of lookup;And this scheme is not needed by third party software and group yet Part reduces the cost of scheme.
Foregoing invention purpose three of the invention has the technical scheme that
A kind of computer equipment, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, the processor realize the above-mentioned sending short messages in groups based on re-scheduling algorithm when executing the computer program The step of method.
Foregoing invention purpose four of the invention has the technical scheme that
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the computer The step of above-mentioned sending short messages in groups method based on re-scheduling algorithm is realized when program is executed by processor.
In conclusion advantageous effects of the invention are as follows:
It is 1. the subscriber phone number for needing to delete can be searched in table of bytes to be sent, subscriber phone number is corresponding whole Type array is written in the form of byte sends table of bytes, can reduce memory footprint, carry out in time to all integer types Re-scheduling, more than 40 hundred million numerical value, at most only uses 512M memory;
2. several bit arithmetics and numerical division and remainder are only carried out when searching duplicate Subscriber Number using re-scheduling algorithm, it can It is completed in nanosecond, it is per second easily to handle million ranks lookups, improve the efficiency of lookup;
3. this scheme does not need the cost for reducing scheme by third party software and component yet.
Detailed description of the invention
Fig. 1 is an application environment schematic diagram of the sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 2 is a flow chart of the sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 3 is the another flow chart of the sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 4 is the implementation flow chart of step S32 in sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 5 is the implementation flow chart of step S40 in sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 6 is the implementation flow chart of step S41 in sending short messages in groups method in one embodiment of the invention based on re-scheduling algorithm;
Fig. 7 is a functional block diagram of the sending short messages in groups device in one embodiment of the invention based on re-scheduling algorithm;
Fig. 8 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Below in conjunction with attached drawing, invention is further described in detail.
Sending short messages in groups method provided by the present application based on re-scheduling algorithm, can be applicable in the application environment such as Fig. 1, In, upstream server-side is communicated by network with downstream service end.Upstream server-side obtains user's flow-data, by the user Flow-data is sent to downstream service end.After downstream service end gets user's flow-data, carried out just to table of bytes is sent Beginningization is obtained sending array, and is obtained with the presence or absence of the transmission array using corresponding operation according to user's flow-data The table of bytes to be sent.Upstream server-side and downstream service end can be formed with the either multiple servers of independent server Server cluster realize.
Embodiment one:
In one embodiment, it as shown in Fig. 2, providing a kind of sending short messages in groups method based on re-scheduling algorithm, applies in this way It is illustrated, includes the following steps: for server-side in Fig. 1
S10: obtaining emergency message, obtains emergency short message content according to emergency message.
In the present embodiment, emergency message refers in a certain panel region, such as the whole province or the whole city etc., i.e., will occur certain prominent The natural calamities such as heat condition, such as typhoon, heavy rain, earthquake or mud-rock flow need to issue the masses in the region message of early warning. Emergency short message content refers to the short message content that the region masses are issued with emergency case early warning.
Specifically, it according to the particular content in emergency message, writes and obtains corresponding emergency short message content.Wherein, may be used The particular content for message of meeting an urgent need to be filled in into the emergency short message template, this is obtained and answers by preset emergency short message template Anxious short message content.Writing for the emergency message can gradually be write according to the development of emergency case, for example, according to platform The path that wind " mangosteen " logs in, from Hainan Province to Coast of Guangdong Province city, then the sequence for arriving Guangzhou, arriving inland city again, according to The route of the typhoon " mangosteen " and the grade of prediction, according to the different time, the different grade of typhoon " mangosteen ", to corresponding Corresponding emergency message content is write in region.
S20: emergency message includes emergency region, obtains all subscriber phone numbers in emergency region, and by user hand The write-in of machine number sends table of bytes.
In the present embodiment, emergency region refers to regional areas involved in the emergency message.Wherein, which can To include the whole province, certain city or coastal area, the high-incidence region of earthquake etc..Send table of bytes refer to be stored in the emergency region it is used The tables of data of subscriber phone number.
Specifically, according to the emergency region, the user mobile phone that all masses register in operator in the emergency region is obtained Number, and the subscriber phone number is written in the transmission table of bytes.
S30: user's flow-data is obtained by cluster message channel, and Subscriber Number to be increased is obtained by re-scheduling algorithm With Subscriber Number to be deleted.
In the present embodiment, user's flow-data refers to that user passes in and out the data in the emergency region.Cluster message channel is Refer to that big data obtains the channel of data, specifically can be Kafka, Kafka is that a kind of distributed post subscription of high-throughput disappears Breath system.Kafka can obtain user's flow-data in real time.
Specifically, according to re-scheduling algorithm, user's flow-data is judged whether from the transmission table of bytes, and according to sentencing Break as a result, user's flow-data is determined as Subscriber Number to be increased and number to be deleted.Wherein, Subscriber Number to be increased refers to Need the subscriber phone number increased corresponding subscriber phone number in user's flow-data into the transmission table of bytes;To Deletion Subscriber Number, which refers to, to be needed to delete corresponding subscriber phone number in user's flow-data from the transmission table of bytes Subscriber phone number.
S40: increasing to transmission table of bytes for Subscriber Number to be increased, will user mobile phone identical with Subscriber Number to be deleted Number is deleted from transmission table of bytes, obtains table of bytes to be sent.
In the present embodiment, table of bytes to be sent refers to that storage is in need and carries out sending emergency that short message is corresponding uses cell-phone number The data form of code.
Specifically, Subscriber Number to be increased is written in the transmission table of bytes;For Subscriber Number to be deleted, word is being sent Inquire subscriber phone number identical with the Subscriber Number to be deleted in section table, and by the subscriber phone number from sending byte It is deleted in table, obtains the table of bytes to be sent.
S50: by meeting an urgent need, the corresponding user of subscriber phone number that short message content is sent in table of bytes to be sent is mobile eventually End.
Specifically, the subscriber phone number in table of bytes to be sent is sent to corresponding customer mobile terminal.It needs Bright, step S50 synchronous can be carried out with step S30, S40, i.e., server-side is synchronous to receive while sending emergency short message User's flow-data, and table of bytes is sent according to user's flow-data real-time update, corresponding table of bytes to be sent is obtained, directly The short message that will extremely meet an urgent need is sent in the corresponding customer mobile terminal of subscriber phone number all in the emergency region.
In the present embodiment, it is possible to when searching the subscriber phone number for needing to delete in table of bytes to be sent, by user The corresponding integer array of phone number is written in the form of byte sends table of bytes, can reduce memory footprint, right in time All integer types carry out re-scheduling, and more than 40 hundred million numerical value at most only use 512M memory;Weight is being searched using re-scheduling algorithm simultaneously When multiple Subscriber Number, several bit arithmetics and numerical division and remainder are only carried out, can be completed in nanosecond, it is per second easily to handle Million times rank is searched, and improves the efficiency of lookup;And this scheme is not needed by third party software and component, the side of reducing yet The cost of case.
In one embodiment, as shown in figure 3, before step S30, the sending short messages in groups method based on re-scheduling algorithm further includes Following steps:
S31: the corresponding value range of data set sent where table of bytes is obtained, numerical space is obtained.
Specifically, the memory of server-side stores the transmission table of bytes by data set, each use in the transmission table of bytes Family phone number corresponds to an int value in the data set.The value range of the data set is the value model of entire int value It encloses, i.e. 2^32, using the value range of the data set as a numerical space.
S32: the subscriber phone number in data space is mapped into byte array, obtains byte arrays to be sent.
In the present embodiment, byte array is a basic array storage class in java environment.Byte number to be sent Group refers to the byte array for being stored with the subscriber phone number.
Specifically, by each subscriber phone number by mapping by way of, by each subscriber phone number map one A bit, i.e., by all subscriber phone number corresponding data collection, i.e. int array, by the every int numerical value of int array, i.e. user hand Machine number is corresponding with a bit, and by int array maxima and minima and bit array in largest index and minimum Index corresponds to, and completion maps to a bit to each subscriber phone number.
Further, the corresponding bit byte of all subscriber phone numbers is stored to byte array, obtains the word to be sent Joint number group.
In one embodiment, as shown in figure 4, in step s 32, i.e., the subscriber phone number in data space maps to Byte array obtains byte arrays to be sent, specifically comprises the following steps:
S321: virtual index is calculated, each subscriber phone number in data space is corresponded into a bit in bit array, is obtained To bit index.
In the present embodiment, in relational database, index be it is a kind of individually, physics to a column in database table or A kind of storage organization that the value of multiple row is ranked up, it is set and the corresponding Compass of a column or several train values in some table The logical pointer inventory of the data page of middle these values of physical label.The catalogue for functioning as books of index, can be according to mesh The page number in record is quickly found out required content.Since in Java context, bit array does not have necessary being, therefore the bit rope Drawing becomes virtual index.
Specifically, by the corresponding bit of each subscriber phone number, the bit index is obtained.Server-side can be by this Bit index inquires corresponding subscriber phone number.
S322: calculating true index, and by bit index, the corresponding byte of every eight bit obtains byte array.
In the present embodiment, in Java context, there are byte arrays, and the relationship of byte and bit is 8bit=1byte, Therefore, by bit index, the corresponding byte of every eight bit obtains the byte array.
S323: position of each bit index in byte array is calculated, byte arrays to be sent are obtained.
Specifically, it by calculating byte index, to obtain position of each bit index in the byte array, services End can inquire corresponding bit index, and then inquire corresponding subscriber phone number by the byte index.
In one embodiment, as shown in figure 5, in step s 40, i.e., Subscriber Number to be increased is increased to transmission byte Subscriber phone number identical with Subscriber Number to be deleted is deleted from transmission table of bytes, is specifically comprised the following steps: by table
S41: judge that user's flow-data with the presence or absence of in byte arrays to be sent, obtains judging result by re-scheduling algorithm.
Specifically, in byte arrays to be sent, user's flow-data is calculated by re-scheduling algorithm, according to calculating As a result, judge user's flow-data whether there is in the byte arrays to be sent, obtain the judging result.Wherein this is sentenced Disconnected result be specially user's flow-data there are in the byte arrays to be sent or user's flow-data be not present in this to It sends in byte arrays.
S42: if user's flow-data is that flow out data and judging result be presence to user, using user flow out data as Subscriber Number to be deleted.
In the present embodiment, user's outflow data refer to that user leaves corresponding subscriber phone number from the emergency region.
Specifically, if the judging result is to exist, i.e., the user is flowed out data and is present in the byte arrays to be sent, then The user is flowed out into the corresponding subscriber phone number of data as the Subscriber Number to be deleted.
It should be noted that if the judging result is that there is no that is, user outflow data are not present in the word to be sent In joint number group, then without doing any processing.
S43: if user's flow-data is that user flows into data and judging result is that there is no flow into data for user and make For Subscriber Number to be increased.
In the present embodiment, user's inflow data refer to the corresponding subscriber phone number of user into the emergency region.
Specifically, if the judging result is that there is no that is, the user flows into data and is not present in the byte arrays to be sent It is interior, then the user is flowed into the corresponding subscriber phone number of data as Subscriber Number to be increased.
In one embodiment, as shown in fig. 6, in step S41, i.e., whether user's flow-data is judged by re-scheduling algorithm There are in byte arrays to be sent, obtains judging result and specifically comprise the following steps:
S411: statement array, wherein array is byte arrays to be sent.
Specifically, the byte arrays to be sent are stated, that is, call the byte arrays to be sent.
S412: re-scheduling expression formula is obtained according to byte arrays to be sent, and by re-scheduling expression formula to user's flow-data It is calculated, using calculated result as judging result.
Specifically, it is obtained according to the byte arrays to be sent of the calling by the byte arrays write-in re-scheduling algorithm to be sent To the re-scheduling expression formula, for example, (dataBytes [index] & (1 < < innerIndex)), wherein dataBytes is sound Bright byte arrays to be sent, index are index, and innerIndex is that bit index is specific in the byte arrays to be sent Position.
Further, user's flow-data is calculated by using re-scheduling expression formula, if calculated result is 1, is said Bright user's flow-data is present in the byte arrays to be sent;If calculated result is 0, illustrate that user's flow-data is not deposited It is the byte arrays to be sent.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Embodiment two:
In one embodiment, a kind of sending short messages in groups device based on re-scheduling algorithm is provided, it should the sending short messages in groups based on re-scheduling algorithm Sending short messages in groups method in device and above-described embodiment based on re-scheduling algorithm corresponds.As shown in fig. 7, re-scheduling algorithm should be based on Sending short messages in groups device include short message content obtain module 10, phone number obtain module 20, re-scheduling module 30, data update mould Block 40 and SMS transmission module 50.Detailed description are as follows for each functional module:
Short message content obtains module 10, for obtaining emergency message, obtains emergency short message content according to emergency message;
Phone number obtains module 20, includes emergency region for message of meeting an urgent need, obtains all user mobile phones in emergency region Number, and subscriber phone number is written and sends table of bytes;
Re-scheduling module 30 for obtaining user's flow-data by cluster message channel, and is obtained by re-scheduling algorithm to be increased Subscriber Number and Subscriber Number to be deleted;
Data update module 40 will be with Subscriber Number phase to be deleted for Subscriber Number to be increased to be increased to transmission table of bytes Same subscriber phone number is deleted from transmission table of bytes, obtains table of bytes to be sent;
SMS transmission module 50, for that will meet an urgent need, the subscriber phone number that short message content is sent in table of bytes to be sent is corresponding Customer mobile terminal.
It is preferably based on the sending short messages in groups device of re-scheduling algorithm further include:
Numerical space obtains module 31, for obtaining the corresponding value range of data set where sending table of bytes, obtains numerical value Space;
Mapping block 32 obtains byte number to be sent for the subscriber phone number in data space to be mapped to byte array Group.
Preferably, mapping block 32 includes:
Virtual index computational submodule 321, it is for calculating virtual index, each subscriber phone number in data space is corresponding A bit in bit array, obtains bit index;
True index computational submodule 322, for calculating true index, by bit index, every eight bit correspond to a byte, Obtain byte array;
Position computational submodule 323 obtains byte number to be sent for calculating position of each bit index in byte array Group.
Preferably, data update module 40 includes:
Judging submodule 41, for judging that user's flow-data with the presence or absence of in byte arrays to be sent, obtains by re-scheduling algorithm To judging result;
Data processing submodule 42 is flowed out, if being that user flows out data and judging result is presence for user's flow-data, User is flowed out into data as Subscriber Number to be deleted;
Flow into data processing submodule 43, if for user's flow-data be user flow into data and judging result be there is no, User is then flowed into data as Subscriber Number to be increased.
Preferably, judging submodule 41 includes:
Array call unit 411, for stating array, wherein array is byte arrays to be sent;
Computing unit 412 for obtaining re-scheduling expression formula according to byte arrays to be sent, and flows user by re-scheduling expression formula Dynamic data are calculated, using calculated result as judging result.
Specific restriction about the sending short messages in groups device based on re-scheduling algorithm may refer to calculate above for based on re-scheduling The restriction of the sending short messages in groups method of method, details are not described herein.Each mould in the above-mentioned sending short messages in groups device based on re-scheduling algorithm Block can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independence In processor in computer equipment, it can also be stored in a software form in the memory in computer equipment, in order to Processor, which calls, executes the corresponding operation of the above modules.
Embodiment three:
In one embodiment, a kind of computer equipment is provided, which can be server, internal structure chart It can be as shown in Figure 8.The computer equipment includes processor, memory, network interface and the data connected by system bus Library.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory of the computer equipment includes non- Volatile storage medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and database. The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The computer is set Standby database sends table of bytes for storing.The network interface of the computer equipment is used to connect with external terminal by network Connect letter.To realize a kind of sending short messages in groups method based on re-scheduling algorithm when the computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of when executing computer program
Emergency message is obtained, emergency short message content is obtained according to emergency message;
Message of meeting an urgent need includes emergency region, obtains all subscriber phone numbers in emergency region, and subscriber phone number is write Enter to send table of bytes;
User's flow-data is obtained by cluster message channel, and Subscriber Number to be increased and to be deleted is obtained by re-scheduling algorithm Subscriber Number;
Subscriber Number to be increased is increased into transmission table of bytes, will subscriber phone number identical with Subscriber Number to be deleted from hair It send in table of bytes and deletes, obtain table of bytes to be sent;
The corresponding customer mobile terminal of subscriber phone number that short message content of meeting an urgent need is sent in table of bytes to be sent.
Example IV:
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer journey are stored thereon with It is performed the steps of when sequence is executed by processor
Emergency message is obtained, emergency short message content is obtained according to emergency message;
Message of meeting an urgent need includes emergency region, obtains all subscriber phone numbers in emergency region, and subscriber phone number is write Enter to send table of bytes;
User's flow-data is obtained by cluster message channel, and Subscriber Number to be increased and to be deleted is obtained by re-scheduling algorithm Subscriber Number;
Subscriber Number to be increased is increased into transmission table of bytes, will subscriber phone number identical with Subscriber Number to be deleted from hair It send in table of bytes and deletes, obtain table of bytes to be sent;
The corresponding customer mobile terminal of subscriber phone number that short message content of meeting an urgent need is sent in table of bytes to be sent.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM(EPROM), electrically erasable ROM(EEPROM) or flash memory.Volatile memory may include Random-access memory (ram) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM(SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM(ESDRAM), synchronization link (Synchlink) DRAM(SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of sending short messages in groups method based on re-scheduling algorithm, which is characterized in that the sending short messages in groups side based on re-scheduling algorithm Method includes:
Emergency message is obtained, emergency short message content is obtained according to the emergency message;
The emergency message includes emergency region, obtains all subscriber phone numbers in the emergency region, and by the use Phone number write-in in family sends table of bytes;
User's flow-data is obtained by cluster message channel, and Subscriber Number to be increased and to be deleted is obtained by re-scheduling algorithm Subscriber Number;
The Subscriber Number to be increased is increased into the transmission table of bytes, it will be described identical with the Subscriber Number to be deleted The subscriber phone number is deleted from the transmission table of bytes, obtains table of bytes to be sent;
The corresponding user of the subscriber phone number that the emergency short message content is sent in the table of bytes to be sent is moved Dynamic terminal.
2. the sending short messages in groups method based on re-scheduling algorithm as described in claim 1, which is characterized in that disappeared described by cluster Cease channel and obtain user's flow-data, the step of Subscriber Number to be increased and Subscriber Number to be deleted are obtained by re-scheduling algorithm it Before, the sending short messages in groups method based on re-scheduling algorithm further include:
The corresponding value range of data set where the transmission table of bytes is obtained, numerical space is obtained;
Subscriber phone number in the data space is mapped into byte array, obtains byte arrays to be sent.
3. the sending short messages in groups method based on re-scheduling algorithm as claimed in claim 2, which is characterized in that described that the data are empty Between in subscriber phone number map to byte array, obtaining byte arrays to be sent includes:
Virtual index is calculated, each subscriber phone number in the data space is corresponded into a bit in bit array, is obtained To bit index;
True index is calculated, by the bit index, the corresponding byte of every eight bit obtains the byte array;
Position of each bit index in the byte array is calculated, the byte arrays to be sent are obtained.
4. the sending short messages in groups method based on re-scheduling algorithm as described in claim 1, which is characterized in that described to pass through cluster message Channel obtains user's flow-data, and obtains Subscriber Number to be increased and Subscriber Number to be deleted by re-scheduling algorithm, comprising:
Judge that user's flow-data whether there is in the byte arrays to be sent by re-scheduling algorithm, obtains judgement knot Fruit;
If user's flow-data is that user flows out data and the judging result is presence, the user is flowed out into data As the Subscriber Number to be deleted;
If user's flow-data is that user flows into data and the judging result is that there is no flow into number for the user According to as the Subscriber Number to be increased.
5. the sending short messages in groups method based on re-scheduling algorithm as claimed in claim 4, which is characterized in that described to pass through re-scheduling algorithm User's flow-data is judged with the presence or absence of in the byte arrays to be sent, and obtaining judging result includes:
Array is stated, wherein the array is the byte arrays to be sent;
Re-scheduling expression formula is obtained according to the byte arrays to be sent, and number is flowed to the user by the re-scheduling expression formula According to being calculated, using calculated result as the judging result.
6. a kind of sending short messages in groups device based on re-scheduling algorithm, which is characterized in that the sending short messages in groups dress based on re-scheduling algorithm It sets and includes:
Short message content obtains module, for obtaining emergency message, obtains emergency short message content according to the emergency message;
Phone number obtains module, includes emergency region for the emergency message, and the institute obtained in the emergency region is useful Family phone number, and the subscriber phone number is written and sends table of bytes;
Re-scheduling module for obtaining user's flow-data by cluster message channel, and obtains use to be increased by re-scheduling algorithm Family number and Subscriber Number to be deleted;
Data update module, for the Subscriber Number to be increased to be increased to the transmission table of bytes, will with it is described to be deleted The identical subscriber phone number of Subscriber Number is deleted from the transmission table of bytes, obtains table of bytes to be sent;
SMS transmission module, for the emergency short message content to be sent to the user mobile phone in the table of bytes to be sent The corresponding customer mobile terminal of number.
7. the sending short messages in groups device based on re-scheduling algorithm as claimed in claim 6, which is characterized in that described to be based on re-scheduling algorithm Sending short messages in groups device further include:
Numerical space obtain module, for obtain it is described transmission table of bytes where the corresponding value range of data set, counted It is worth space;
Mapping block obtains byte to be sent for the subscriber phone number in the data space to be mapped to byte array Array.
8. the sending short messages in groups device based on re-scheduling algorithm as claimed in claim 7, which is characterized in that the mapping block packet It includes:
Virtual index computational submodule, for calculating virtual index, by each subscriber phone number pair in the data space A bit in bit array is answered, bit index is obtained;
True index computational submodule, for calculating true index, by the bit index, every eight bit are one corresponding Byte obtains the byte array;
Position computational submodule obtains described pending for calculating position of each bit index in the byte array Send byte arrays.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The step of sending short messages in groups method described in 5 any one based on re-scheduling algorithm.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization is as described in any one of claim 1 to 5 based on the short message of re-scheduling algorithm when the computer program is executed by processor The step of method for group sending.
CN201811506841.4A 2018-12-10 2018-12-10 Short message group sending method, device, equipment and storage medium based on repetition elimination algorithm Active CN109511094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811506841.4A CN109511094B (en) 2018-12-10 2018-12-10 Short message group sending method, device, equipment and storage medium based on repetition elimination algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811506841.4A CN109511094B (en) 2018-12-10 2018-12-10 Short message group sending method, device, equipment and storage medium based on repetition elimination algorithm

Publications (2)

Publication Number Publication Date
CN109511094A true CN109511094A (en) 2019-03-22
CN109511094B CN109511094B (en) 2021-04-27

Family

ID=65753125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811506841.4A Active CN109511094B (en) 2018-12-10 2018-12-10 Short message group sending method, device, equipment and storage medium based on repetition elimination algorithm

Country Status (1)

Country Link
CN (1) CN109511094B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810864A (en) * 2020-05-29 2021-12-17 中国移动通信集团广东有限公司 Method and system for targeted group sending of regional short messages
CN114666753A (en) * 2020-12-04 2022-06-24 中国移动通信集团广东有限公司 Signaling stream data processing method, position information service method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917667A (en) * 2006-09-08 2007-02-21 华为技术有限公司 System for processing numbers and processing method in service of sending grouped short message
CN104618877A (en) * 2015-01-30 2015-05-13 广东欧珀移动通信有限公司 Short message arranging method and device
US20170359705A1 (en) * 2014-06-13 2017-12-14 Kool Telecom Ltd. Short Message Service Management Systems and Methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917667A (en) * 2006-09-08 2007-02-21 华为技术有限公司 System for processing numbers and processing method in service of sending grouped short message
US20170359705A1 (en) * 2014-06-13 2017-12-14 Kool Telecom Ltd. Short Message Service Management Systems and Methods
CN104618877A (en) * 2015-01-30 2015-05-13 广东欧珀移动通信有限公司 Short message arranging method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810864A (en) * 2020-05-29 2021-12-17 中国移动通信集团广东有限公司 Method and system for targeted group sending of regional short messages
CN114666753A (en) * 2020-12-04 2022-06-24 中国移动通信集团广东有限公司 Signaling stream data processing method, position information service method and electronic equipment
CN114666753B (en) * 2020-12-04 2023-08-15 中国移动通信集团广东有限公司 Signaling stream data processing method, position information service method and electronic equipment

Also Published As

Publication number Publication date
CN109511094B (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN104486777B (en) A kind of method and device for realizing data processing
CN109511094A (en) Sending short messages in groups method, apparatus, equipment and storage medium based on re-scheduling algorithm
JP6243045B2 (en) Graph data query method and apparatus
CN106250310B (en) A kind of method for generating test case and device
CN106294421A (en) A kind of data write, read method and device
CN109213792A (en) Method, server-side, client, device and the readable storage medium storing program for executing of data processing
CN107590123A (en) Vehicle-mounted middle place context reference resolution method and device
WO2020019313A1 (en) Graph data updating method, system, computer readable storage medium, and device
CN109783023A (en) The method and relevant apparatus brushed under a kind of data
CN102469112B (en) Position tracking implementation method, Apparatus and system
CN110378778A (en) Multi-data source account checking method, system, electronic equipment and storage medium
CN106844233A (en) A kind of router service data caching method and system based on Hash table
CN103561083A (en) Data processing method for Internet of things
CN107766258A (en) Memory storage method and apparatus, memory lookup method and apparatus
CN104394518B (en) A kind of note transmission method and SMS platform
CN107391564A (en) Data transfer device, device and electronic equipment
CN107153683A (en) The method and apparatus for realizing data query
CN106453822A (en) Map information display method based on asynchronous loading
CN109597825A (en) Regulation engine call method, device, equipment and computer readable storage medium
CN101644992A (en) Method and system for recreating data of file system
CN112199154B (en) Reinforced learning training system and method based on distributed collaborative sampling center type optimization
CN104516734B (en) Operation flow configuration method and device
CN109542877A (en) The parameter management method and device of battery management system
CN109189994A (en) A kind of CAM structure storage system calculating application towards figure
BRPI0920319B1 (en) method for accessing magnitude data from the smart grid services database and system and device for it

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