A short message processing method, device, equipment, medium and product

By preprocessing and grouping SMS instructions, customized SMS content is generated, and fees are deducted based on user type. This solves the problem that traditional SMS platforms cannot parse civil aviation SMS instructions, and achieves high adaptability and flexible billing of SMS services.

CN119767259BActive Publication Date: 2025-10-17TRAVELSKY TECHNOLOGY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411910596.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-10-17
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

Traditional SMS platforms are unable to parse civil aviation SMS instructions, resulting in low adaptability of SMS services and the inability to perform separate statistical billing for aviation information agents.

Method used

By preprocessing and grouping SMS commands, verifying user permissions, generating customized SMS content, and deducting fees based on user type and frequency of use, a templated design is used to generate SMS content to achieve a flexible billing mechanism.

Benefits of technology

The adaptability of SMS services has been improved to ensure that flight information is pushed to passengers accurately. At the same time, differentiated deduction services are provided, increasing billing flexibility and cost control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767259B_ABST
    Figure CN119767259B_ABST
Patent Text Reader

Abstract

The application discloses a short message processing method, device, equipment, medium and product, and relates to the technical field of communication. The method comprises the following steps: performing user permission verification based on an obtained short message instruction; when the user permission verification is passed, generating short message content based on the short message instruction; and when it is determined that the generated short message content is successfully sent to an operator gateway, charging a user account based on user information corresponding to the short message instruction. Through the application, the adaptability of the short message service is improved, and the technical problem that the short message service has low adaptability because the civil aviation short message instruction cannot be parsed and the air information agent cannot be separately counted and charged in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, and in particular to a short message processing method, device, equipment, medium and product. BACKGROUND

[0002] Currently, real-time updating of key information such as flight dynamics and passenger lists has become the focus of passengers. Passengers expect to obtain instant push of such information through the most convenient way, such as short message service. Therefore, short message service has become an important part of the aviation information service field that cannot be replaced.

[0003] However, the traditional short message platform cannot parse civil aviation short message instructions, and cannot perform separate statistical billing for air information agents, resulting in low adaptability of short message service. SUMMARY

[0004] The present application provides a short message processing method, device, equipment, medium and product, which can solve the technical problem of low adaptability of short message service in the prior art.

[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0006] In a first aspect, the present application provides a short message processing method, which comprises:

[0007] Performing user permission verification based on the obtained short message instruction;

[0008] When the user permission verification is passed, generating short message content based on the short message instruction;

[0009] After determining that the generated short message content is sent to the operator gateway, charging the user account based on the user information corresponding to the short message instruction.

[0010] Optionally, the user permission verification based on the obtained short message instruction comprises:

[0011] Preprocessing and grouping the obtained short message instruction to obtain a plurality of groups of preprocessed sub-short message instructions;

[0012] Verifying the user permission based on a preset group name and the plurality of groups of preprocessed sub-short message instructions.

[0013] Optionally, the step of preprocessing and grouping the obtained short message instruction to obtain a plurality of groups of preprocessed sub-short message instructions comprises:

[0014] Converting the host Chinese code of the short message instruction into a national standard code, and deleting special characters in the short message instruction to obtain the preprocessed short message instruction;

[0015] grouping the preprocessed short message instructions according to the types of information contained in the preprocessed short message instructions, to obtain a plurality of groups of preprocessed sub-short message instructions;

[0016] The short message instruction includes passenger order record information, passenger identity information, flight information, to-be-sent mobile phone number information, and flight change information.

[0017] Optionally, the step of verifying user rights based on the preset group name and the plurality of groups of preprocessed sub-short message instructions includes:

[0018] determining target sub-short message instructions from the plurality of groups of preprocessed sub-short message instructions based on the preset group name;

[0019] verifying whether a user type corresponding to the target sub-short message instruction is a free user, a postpaid user, or a prepaid user, and whether a number of free short messages or a balance of the prepaid user is greater than zero;

[0020] If yes, it is determined that the user right verification is passed.

[0021] Optionally, the step of generating short message content based on the short message instruction includes:

[0022] determining a first short message template according to whether the short message instruction contains flight change information;

[0023] determining a second short message template according to flight information contained in the short message instruction;

[0024] determining a third short message template according to passenger order record information contained in the short message instruction;

[0025] filling the first short message template, the second short message template, and the third short message template to generate short message content.

[0026] Optionally, the step of determining a first short message template according to whether the short message instruction contains flight change information includes:

[0027] determining whether a flight is changed according to whether the short message instruction contains flight change information;

[0028] if the flight is changed, determining a changed flight short message template as the first short message template;

[0029] if the flight is not changed, determining a normal flight short message template as the first short message template.

[0030] Optionally, the step of determining a second short message template according to flight information contained in the short message instruction includes:

[0031] determining whether the flight is a multi-leg flight according to flight information contained in the short message instruction;

[0032] if the flight is a multi-leg flight, determining a multi-leg flight sub-template as the second short message template;

[0033] if the flight is not a multi-leg flight, determining a single-leg flight sub-template as the second short message template.

[0034] Optionally, the third short message template is determined according to passenger order record information contained in the short message instruction, comprising:

[0035] determining whether weather needs to be sent according to passenger order record information contained in the short message instruction;

[0036] if weather needs to be sent, querying weather data and determining a weather sub-template as the third short message template;

[0037] if weather does not need to be sent, the third short message template is empty.

[0038] Optionally, before the user account is debited based on user information corresponding to the short message instruction after the generated short message content is determined to be sent to the operator gateway, comprising:

[0039] detecting whether the generated short message content is successfully sent to the operator gateway;

[0040] when the sending result returned by the operator is sending success, determining that the generated short message content is sent to the operator gateway;

[0041] when the sending result returned by the operator is sending timeout, determining that the generated short message content fails to be sent.

[0042] Optionally, the step of debiting the user account based on the user information corresponding to the short message instruction, comprising:

[0043] when it is determined that the user type is not a free user based on the user information corresponding to the short message instruction, detecting whether the number of short message gifts in the user account is zero;

[0044] if not, detecting whether the character length of the sent short message content exceeds a first preset number of characters;

[0045] if not, the number of short message gifts in the user account is reduced by one;

[0046] if the character length exceeds the first preset number of characters, a second preset number of characters is taken as one sent short message, and the total number of sent short messages is counted, wherein the first preset number is greater than the second preset number;

[0047] comparing the total number of sent short messages with the number of short message gifts;

[0048] If the total number of sent messages is greater than the number of free messages, then the difference between the total number of sent messages and the number of free messages is calculated, and the user account is charged according to the difference and the cost of a single message;

[0049] If the total number of sent messages is less than or equal to the number of free messages, then the number of free messages in the user account is reduced by the total number of sent messages.

[0050] In a second aspect, an embodiment of the present application provides a message processing device, the device comprising:

[0051] A permission verification module configured to perform user permission verification based on the obtained message instruction;

[0052] A message generation module configured to generate message content based on the message instruction when the user permission verification is passed;

[0053] An information charge module configured to charge the user account based on user information corresponding to the message instruction when it is determined that the generated message content is sent to the operator gateway.

[0054] Optionally, the permission verification module is configured to:

[0055] Preprocess and group the obtained message instruction to obtain a plurality of groups of preprocessed sub-message instructions;

[0056] Verify the user permission based on a preset group name and the plurality of groups of preprocessed sub-message instructions.

[0057] Optionally, the message generation module is configured to:

[0058] Determine a first message template according to whether the message instruction contains flight change information;

[0059] Determine a second message template according to flight information contained in the message instruction;

[0060] Determine a third message template according to passenger order record information contained in the message instruction;

[0061] Fill the first message template, the second message template, and the third message template to generate message content.

[0062] Optionally, the information charge module is configured to:

[0063] When it is determined that the user type is not a free user based on user information corresponding to the message instruction, detect whether the number of free messages in the user account is zero;

[0064] If not, detecting whether the character length of the sent short message content exceeds a first preset number of characters;

[0065] If not, the number of short message gift in the user account is reduced by one;

[0066] If yes, a second preset number of characters is taken as one sent short message, and the total number of sent short messages is counted, wherein the first preset number of characters is greater than the second preset number of characters;

[0067] The total number of sent short messages is compared with the number of short message gift;

[0068] If the total number of sent short messages is greater than the number of short message gift, the difference between the total number of sent short messages and the number of short message gift is calculated, and the user account is charged according to the difference and the cost of one short message;

[0069] If the total number of sent short messages is less than or equal to the number of short message gift, the number of short message gift in the user account is reduced by the total number of sent short messages.

[0070] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the processor is configured to read and execute a computer program stored in the memory, so as to implement the steps of the short message processing method.

[0071] In a fourth aspect, a computer storage medium is provided, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions implement the steps of the short message processing method when executed.

[0072] In a fifth aspect, a computer program product is provided, comprising computer program / instructions, and the computer program / instructions implement the steps of the short message processing method when executed by a processor.

[0073] The technical scheme provided by the embodiments of the present application has the following beneficial effects:

[0074] The user permission is verified based on the obtained short message instruction, and when the user permission verification is passed, the generation of the short message content is performed based on the short message instruction, that is, the customized reminding short message content for various flights is generated according to the short message instruction sent by the user, which not only ensures that the passenger can receive accurate flight information, but also meets the specific needs of the passenger for the flight reminding service;

[0075] After the generated SMS content is determined and sent to the operator gateway, the user account is deducted based on the user information corresponding to the SMS instruction, thereby providing differentiated deduction services for upstream users based on user type, SMS usage frequency and possible gifting rules. This not only increases the flexibility of billing, but also brings more reasonable cost control to users.

[0076] The present invention improves the adaptability of SMS services and solves the technical problems in related technologies of being unable to parse civil aviation SMS instructions and unable to perform separate statistical billing on aviation information agents, resulting in low adaptability of SMS services. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 A schematic diagram of the system composition of the SMS processing method of the present invention;

[0079] Figure 2 This is a flow chart of an embodiment of a method for processing short messages according to the present invention;

[0080] Figure 3 for Figure 2 Detailed flow chart of step S20;

[0081] Figure 4 for Figure 2 Detailed flow chart of step S30;

[0082] Figure 5 This is a schematic diagram of the functional modules of an embodiment of a short message processing device of the present invention;

[0083] Figure 6 The figure is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0085] To make the objectives, technical solutions and advantages of the present invention more clear, embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0086] In a first aspect, an embodiment of the present invention provides a method for processing short messages.

[0087] Reference Figure 1 , Figure 1 Schematic diagram of the system composition of the SMS processing method of the present invention. Figure 1 As shown, the SMS instruction is received from the SMS instruction sender, and then the user's permissions are verified. Once the verification is passed, the SMS content is generated based on the SMS instruction and sent to the operator's gateway. After the generated SMS content is sent, regardless of whether the SMS content is successfully sent, the SMS content will be stored, but SMS billing will only be performed for SMS content that is successfully sent. The SMS instruction sender is a user of the civil aviation black screen system, and is generally a channel sales agent who sends SMS using the black screen instruction.

[0088] In one embodiment, referring to Figure 2 , Figure 2 This is a flow chart of an embodiment of the method for processing short messages of the present invention. Figure 2 As shown, the SMS processing method includes:

[0089] Step S10: Verify user rights based on the received SMS message.

[0090] In some specific embodiments, step S10 includes:

[0091] Step S101, pre-processing and grouping the acquired SMS instructions to obtain multiple groups of pre-processed sub-SMS instructions;

[0092] In some specific embodiments, step S101 includes:

[0093] Converting the host Chinese encoding of the SMS instruction into the national standard encoding, and deleting special characters in the SMS instruction to obtain the pre-processed SMS instruction;

[0094] grouping the preprocessed SMS instructions based on the type of information contained in the preprocessed SMS instructions to obtain multiple groups of preprocessed sub-SMS instructions;

[0095] The SMS instruction includes: passenger order record information, passenger identity information, flight information, mobile phone number information to be sent, and flight change information.

[0096] In this embodiment, the SMS instruction sent by the user is obtained, where the SMS instruction includes: passenger order record information (PNR information), passenger identity information (NAD information), flight information (TVL information), mobile phone number information to be sent (SMS information) and flight change information (OPT information).

[0097] The host Chinese encoding (USAS) of the obtained SMS instruction is converted into the national standard encoding (GB18030-2022), and special characters in the SMS instruction, such as the character "\r", are deleted to obtain a pretreated SMS instruction, so as to group the pretreated SMS instruction.

[0098] Specifically, when grouping the pretreated SMS instruction, the content type of the group is determined according to the information type contained in the pretreated SMS instruction. The content type corresponding to each group name is as follows:

[0099] PNR: stores the order number date and ticketing operation account information;

[0100] NAD: stores the passenger information of the order, which can be multiple;

[0101] TVL: flight information, including flight date, flight number, departure and arrival date, and flight status;

[0102] SMS: user mobile phone information to be sent;

[0103] OPT: flight change information.

[0104] The SMS instruction is in the format of EDI (standard format of electronic data exchange) data. For example, the SMS instruction is shown in Table 1.

[0105] Table 1

[0106]

[0107]

[0108] As shown in Table 1, UNH represents the beginning of the SMS instruction. After grouping the pretreated SMS instruction, a plurality of pretreated sub-SMS instructions are obtained, including passenger order record information (PNR information), passenger identity information (NAD information), flight information (TVL information), mobile phone number information to be sent (SMS information), and flight change information (OPT information).

[0109] Among them, the passenger order record information (PNR information) is:

[0110] "PNR+MZQ5P+WNZ120+040701++++N", which means that weather does not need to be sent, the PNR number is MZQ5P, the responsible group office is WNZ120, and the creation date is July 1, 2004. It should be noted that if the passenger order record information contains weather to be sent, the passenger order record information (PNR information) is: "PNR+MZQ5P+WNZ120+040701++++Y".

[0111] The passenger identity information (NAD information) is "NAD+1+ZHANGSAN 张三CHD / ", which means: the number of passengers is 1, the passenger's English name is: ZHANGSAN, and the passenger's Chinese name is: Zhang San. It should be noted that the CHD suffix is ​​directly deleted. If there are multiple passengers, the passenger names are separated by commas.

[0112] Flight information (TVL information) is:

[0113] "TVL+WNZ+CAN+CZ+3528++040701+2045+040701+2230+Y+HK+1++++Y+N+N+N+N+N" means: departure airport code is WNZ, arrival airport code is CAN, airline code is CZ, flight number is 3528, flight number suffix: None, departure date is 040701, departure time is 2045, arrival date is 040701, arrival time is 2230, cabin class is Y, status code is HK, number of seats is 1, modification indicator is Y, irregular flight indicator is N, ASR reserved seat indicator is N, codeshare indicator is N, arrival status unknown indicator is N, and open segment indicator is N.

[0114] The mobile phone number information (SMS information) to be sent is "SMS+19999999999+1+D", which means: mobile phone number 19999999999, passenger sequence is 1, SMS template language sending type is D, and the SMS template language is sent in Chinese; it should be noted that if the SMS template language sending type is I, the SMS template language is converted to English and sent. If the passenger sequence is 0, the user is the leader of a group of travelers, and the team list needs to be sent to the user separately.

[0115] The flight change information (OPT information) is "OPT+SCH", which means: this SMS instruction is a flight change SMS instruction. If this group does not appear, it is a normal flight SMS instruction.

[0116] Furthermore, Table 1 also includes: ticket issuance information (TKT information), contact information (CTC information) and agent information (CTA information).

[0117] Among them, the ticketing information (TKT information) is "TKT+TL+040701+1745", which means: the ticketing type is TL, the ticketing deadline date is July 1, 2004, and the ticketing deadline is 17:45.

[0118] The contact information (CTC information) is "CTC+19999999999", which means the user's mobile phone number 199999999999.

[0119] The agent information (CTA information) is "CTA+WNZ+T WNZ120 / T 023-1111111 / XXX XXX XXXX AIRBOOKING OFFICE / XX XXX XXX", which means: the agent's contact information, the location is "WNZ", the agent's office number is WNZ120, the contact number is 023-1111111, the agent's branch name is "XXX XXX XXXX AIRBOOKING OFFICE", and the agent's name is "XX XXX XXX".

[0120] Step S102: Verify the user authority based on the preset group name and the multiple groups of pre-processed sub-SMS instructions.

[0121] In some specific embodiments, step S102 includes:

[0122] Determining a target sub-SMS instruction from a plurality of groups of pre-processed sub-SMS instructions based on a preset group name;

[0123] Verify whether the user type corresponding to the target sub-SMS instruction is a free user, a postpaid user, or a prepaid user, and whether the number of free SMS messages or the balance of the prepaid user is greater than zero;

[0124] If so, it is determined that the user authority verification is passed.

[0125] In this embodiment, the preset group name is PNR, and the target sub-SMS instruction with the same group name as the preset group name PNR is matched from multiple groups of pre-processed sub-SMS instructions, that is, the target sub-SMS instruction is determined to be the passenger order record information (PNR information). Based on the PNR number and the responsible group office number in the passenger order record information (PNR information), the user type stored in the database is queried by the system, and based on the user type, it is determined whether the user has the authority to send SMS content, that is, whether the user type is a free user, a postpaid user, or a prepaid user, and whether the number of free SMS messages or the balance of the prepaid user is greater than zero. If so, it is determined that the user has the authority to send SMS content, that is, the user authority verification is passed; otherwise, it is determined that the user authority verification fails, that is, the user does not have the authority to send SMS content, and the SMS content of the user is not sent.

[0126] Step S20: When the user authority verification is passed, the SMS content is generated based on the SMS instruction;

[0127] In this embodiment, in order to realize the flexibility and expansibility of the short message service and reduce the coupling degree between different short message types, a templating design method is adopted to generate short message content. The short message generation system is based on short message templates and is divided into top-level templates and sub-templates. This design can flexibly select and combine short message templates according to different short message instruction attributes. The top-level templates include: team member short message template, flight change short message template and normal flight short message template. The sub-templates are used to fill in the specific content of the top-level templates, and the sub-templates include: voyage sub-template and weather sub-template. Among them, the voyage sub-template is divided into two types to adapt to different needs, which are multi-segment voyage sub-template and single-segment voyage sub-template. The multi-segment voyage sub-template is suitable for complex itineraries containing multiple segments, and the single-segment voyage sub-template is suitable for simple itineraries with a single segment. The weather sub-template is used to enhance the practicality of short message content. Each short message template supports both Chinese and English to meet the language preferences of different users. In the short message content generation process, the system will select the most suitable short message template for content filling according to the parameters and attributes of the short message instruction. Through this templating design, the short message generation system not only improves the development and maintenance efficiency, but also ensures the diversity and personalization of short message content, meeting the needs of different users.

[0128] Specifically, when the user permission verification is passed, the information contained in the short message instruction is used to obtain the list of to-be-sent mobile phone information (SMS information), and if the list of to-be-sent mobile phone information (SMS information) is not empty, the language sending type (Chinese or English) of each user's short message template is determined based on each to-be-sent mobile phone information (SMS information) in the list of to-be-sent mobile phone information (SMS information) in turn. Further, it is also determined whether each user is a team leader based on each to-be-sent mobile phone information (SMS information) in the list of to-be-sent mobile phone information (SMS information) in turn, and a team member list is generated using the team member short message template to send the team list to the team leader separately to inform the team leader of the team member situation.

[0129] Then, based on the flight change information, the flight information and the passenger order record information, a short message template is selected and filled in to generate short message content.

[0130] In some specific embodiments, with reference to Figure 3 , Figure 3 for Figure 2 the detailed flowchart of step S20. As shown in Figure 3 , the step of generating short message content based on the short message instruction includes:

[0131] Step S201, determining a first short message template according to whether the short message instruction contains flight change information;

[0132] In some embodiments, step S201 comprises:

[0133] determining whether the flight is changed according to whether the short message instruction contains flight change information;

[0134] if the flight is changed, determining the changed flight short message template as the first short message template;

[0135] if the flight is not changed, determining the normal flight short message template as the first short message template.

[0136] In this embodiment, it is determined whether the short message instruction contains flight change information (OPT information), such as "OPT+SCH". If the short message instruction contains "OPT+SCH", it is determined that the flight is changed, and the changed flight short message template is determined as the first short message template.

[0137] If the short message instruction does not contain "OPT+SCH", it is determined that the flight is not changed, and the normal flight short message template is determined as the first short message template.

[0138] Step S202, determining the second short message template according to the flight information contained in the short message instruction;

[0139] In some embodiments, step S202 comprises:

[0140] determining whether the flight is a multi-segment flight according to the flight information contained in the short message instruction;

[0141] if the flight is a multi-segment flight, determining the multi-segment flight sub-template as the second short message template;

[0142] if the flight is not a multi-segment flight, determining the single-segment flight sub-template as the second short message template.

[0143] In this embodiment, it is determined whether the short message instruction contains multiple flight information (TVL information). If at least two flight information (TVL information) are contained, it is determined that the flight is a multi-segment flight, and the multi-segment flight sub-template is determined as the second short message template. If only one flight information (TVL information) is contained, it is determined that the flight is not a multi-segment flight, i.e. the flight is a single-segment flight, and the single-segment flight sub-template is determined as the second short message template.

[0144] Step S203, determining the third short message template according to the passenger order record information contained in the short message instruction;

[0145] In some embodiments, step S203 comprises:

[0146] determining whether weather needs to be sent according to the passenger order record information contained in the short message instruction;

[0147] If the weather needs to be sent, the weather data is queried and the weather sub-template is determined as the third short message template;

[0148] If the weather does not need to be sent, the third short message template is empty.

[0149] In this embodiment, according to the passenger order record information (PNR information) contained in the short message instruction, if the PNR information is “PNR+MZQ5P+WNZ120+040701++++N”, it is determined that the user needs to send the weather, the weather data is queried and the weather sub-template is determined as the third short message template; if the PNR information is “PNR+MZQ5P+WNZ120+040701++++Y”, it is determined that the user does not need to send the weather, and the third short message template is empty.

[0150] In step S204, the first short message template, the second short message template and the third short message template are filled to generate the short message content.

[0151] In this embodiment, after the first short message template, the second short message template and the third short message template are determined, if the first short message template is the changed flight short message template, the second short message template is the single-segment journey sub-template, and the third short message template is the weather sub-template, the changed flight information, the journey information and the weather data are filled into the placeholders of the first short message template, the second short message template and the third short message template, so as to generate the short message content.

[0152] It is easily conceivable that if the first short message template, the second short message template and the third short message template are other template types, the corresponding information is filled into the placeholders of each template, so as to generate the short message content.

[0153] Optionally, in an embodiment, before step S30, it further includes:

[0154] detecting whether the generated short message content is successfully sent to the operator gateway;

[0155] when the sending result returned by the operator is sending success, it is determined that the generated short message content is sent to the operator gateway;

[0156] when the sending result returned by the operator is sending timeout, it is determined that the generated short message content fails to be sent.

[0157] In this embodiment, after generating the SMS content, the generated SMS content and information of the user who needs to send the SMS content are put into a queue for sending, and when sending the SMS content, the SMS content is read from the queue for sending, and the generated SMS content is sent to the operator gateway according to the format of the operator SMS interface. Since the sending of the SMS content is in the form of an asynchronous queue, whether the sending of the SMS content is successful or not, the SMS content, the user who needs to send the SMS content, the time when the SMS content is sent, and the sending state of the SMS content are stored for checking with the sender of the SMS instruction, wherein the sending state of whether the sending of the SMS content is successful or not is indicated by a flag bit.

[0158] Further, after determining that the sending of the SMS is successful, the deduction of the user account is completed asynchronously. If it is determined that the sending of the SMS fails, the sending of the SMS content is recorded as timeout, and the user account is not deducted.

[0159] In step S30, after determining that the generated SMS content is sent to the operator gateway, the user account is deducted based on the user information corresponding to the SMS instruction.

[0160] In some specific embodiments, with reference to Figure 4 , Figure 4 For Figure 2 the detailed flowchart of step S30. As shown in Figure 4 step S30, the following steps are included:

[0161] In step S301, when it is determined that the user type is not a free user based on the user information corresponding to the SMS instruction, it is detected whether the number of free SMS in the user account is zero.

[0162] In step S302, if the number of free SMS is not zero, it is detected whether the character length of the sent SMS content exceeds a first preset number of characters.

[0163] In step S303, if the character length does not exceed the first preset number of characters, the number of free SMS in the user account is reduced by one.

[0164] In step S304, if the character length exceeds the first preset number of characters, one SMS is sent for each second preset number of characters, and the total number of sent SMS is counted, wherein the first preset number of characters is greater than the second preset number of characters.

[0165] In step S305, the total number of sent SMS is compared with the number of free SMS.

[0166] In step S306, if the total number of sent SMS is greater than the number of free SMS, the difference between the total number of sent SMS and the number of free SMS is calculated, and the user account is deducted according to the difference and the cost of a single SMS.

[0167] Step S307, if the total number of sent short messages is less than or equal to the number of short message gifts, the number of short message gifts in the user account is reduced by the total number of sent short messages.

[0168] In this embodiment, the user of the civil aviation short message processing is an agent for selling civil aviation tickets, so the agent sending short messages by using the instruction needs to be charged. Specifically, according to the PNR number and the office number of the responsibility group in the passenger order record information (PNR information), the system queries the user type saved in the database, and when it is detected that the user type is not a free user, it is detected whether the number of short message gifts in the user account is zero.

[0169] If the number of short message gifts in the user account is not zero, it is detected whether the character length of the content of the sent short message exceeds the first preset number of characters.

[0170] If the character length of the content of the sent short message does not exceed the first preset number of characters, the number of short message gifts in the user account is reduced by one. It is easy to think that since the number of short message gifts in the user account is not zero, it means that there is at least one short message gift in the user account, so if the character length of the content of the sent short message does not exceed the first preset number of characters, the number of short message gifts in the user account is directly reduced by one, and then the number of short message gifts in the user account is updated for subsequent comparison and charge.

[0171] If the character length of the content of the sent short message exceeds the first preset number of characters, the second preset number of characters is taken as one sent short message, and the total number of sent short messages is counted. Specifically, taking the first preset number of characters as 70 characters and the second preset number of characters as 67 characters as an example, if the character length of the content of the sent short message exceeds 70 characters, it is counted as one sent short message every 67 characters, and the result is rounded up. It is easy to think that if the last character is not full 67 characters, it is counted as 67 characters, that is, if the character length of the content of the sent short message is 100 characters, it is counted as two sent short messages.

[0172] Further, the total number of sent short messages is compared with the number of short message gifts. If the total number of sent short messages is less than or equal to the number of short message gifts, the number of short message gifts in the user account is reduced by the total number of sent short messages to obtain a new number of short message gifts. Further, the number of short message gifts in the user account is updated based on the new number of short message gifts for subsequent comparison and charge.

[0173] If the total number of sent short messages is greater than the number of short message gifts, the difference between the total number of sent short messages and the number of short message gifts is calculated, and then the difference is multiplied by the cost of one short message to obtain the cost of the user account to be deducted.

[0174] This flexible billing method can provide differentiated deduction services to upstream users based on user type, SMS usage frequency, and possible gifting rules. It not only increases billing flexibility, but also brings more reasonable cost control to users.

[0175] In this embodiment, user authority verification is performed based on the obtained SMS instruction. When the user authority verification is passed, SMS content is generated based on the SMS instruction. That is, customized reminder SMS content for various flights is generated based on the SMS instruction sent by the user. This not only ensures that passengers can receive accurate flight information, but also meets their specific needs for services such as flight reminders.

[0176] After the generated SMS content is determined and sent to the operator's gateway, the user's account is deducted based on the user information corresponding to the SMS instruction. This provides differentiated deduction services for upstream users based on user type, SMS usage frequency, and possible gifting rules. This not only increases billing flexibility but also provides users with more reasonable cost control. This embodiment improves the adaptability of SMS services and solves the technical problem of the inability to parse civil aviation SMS instructions and perform separate statistical billing for aviation information agents in related technologies, resulting in low adaptability of SMS services.

[0177] In a second aspect, an embodiment of the present invention further provides a short message processing device.

[0178] In one embodiment, referring to Figure 5 , Figure 5 This is a functional module diagram of an embodiment of a short message processing device of the present invention. Figure 5 As shown, the short message processing device includes:

[0179] The authority verification module 10 is configured to perform user authority verification based on the obtained SMS instruction;

[0180] The SMS generation module 20 is configured to generate SMS content based on the SMS instruction when the user authority verification is passed;

[0181] The information deduction module 30 is configured to deduct fees from the user account based on the user information corresponding to the SMS instruction after the generated SMS content is determined to be sent to the operator gateway.

[0182] Optionally, in one embodiment, the authority verification module 10 is specifically configured to:

[0183] Preprocessing and grouping the acquired SMS instructions to obtain multiple groups of preprocessed sub-SMS instructions;

[0184] User authority is verified based on the preset group name and the multiple groups of pre-processed sub-SMS instructions.

[0185] Optionally, in an embodiment, the permission verification module 10 is specifically configured to:

[0186] convert host text encoding of the short message instruction into GBK encoding, and delete special characters in the short message instruction to obtain the preprocessed short message instruction;

[0187] group the preprocessed short message instruction based on information types contained in the preprocessed short message instruction to obtain multiple groups of preprocessed sub-short message instructions;

[0188] The short message instruction includes passenger order record information, passenger identity information, flight information, to-be-sent mobile phone number information, and flight change information.

[0189] Optionally, in an embodiment, the permission verification module 10 is specifically configured to:

[0190] determine a target sub-short message instruction from the multiple groups of preprocessed sub-short message instructions based on a preset group name;

[0191] verify whether a user type corresponding to the target sub-short message instruction is a free user, a postpaid user, or a prepaid user, and whether a number of free short messages or a balance of the prepaid user is greater than zero;

[0192] If yes, it is determined that the user permission verification is passed.

[0193] Optionally, in an embodiment, the short message generation module 20 is specifically configured to:

[0194] determine a first short message template according to whether the short message instruction contains flight change information;

[0195] determine a second short message template according to flight information contained in the short message instruction;

[0196] determine a third short message template according to passenger order record information contained in the short message instruction;

[0197] fill the first short message template, the second short message template, and the third short message template to generate short message content.

[0198] Optionally, in an embodiment, the short message generation module 20 is specifically configured to:

[0199] determine whether a flight is changed according to whether the short message instruction contains flight change information;

[0200] if the flight is changed, determine that a changed flight short message template is a first short message template;

[0201] If the flight is not changed, the normal flight SMS template is determined as the first SMS template.

[0202] Optionally, in an embodiment, the SMS generating module 20 is specifically configured to:

[0203] determine whether the flight is a multi-segment flight according to the flight information contained in the SMS instruction;

[0204] if the flight is a multi-segment flight, determine a multi-segment flight sub-template as the second SMS template;

[0205] if the flight is not a multi-segment flight, determine a single-segment flight sub-template as the second SMS template.

[0206] Optionally, in an embodiment, the SMS generating module 20 is specifically configured to:

[0207] determine whether weather needs to be sent according to the passenger order record information contained in the SMS instruction;

[0208] if weather needs to be sent, query weather data and determine a weather sub-template as the third SMS template;

[0209] if weather does not need to be sent, the third SMS template is empty.

[0210] Optionally, in an embodiment, the SMS processing further includes a detection module configured to:

[0211] detect whether the generated SMS content is successfully sent to the operator gateway;

[0212] when the sending result returned by the operator is sending success, it is determined that the generated SMS content is sent to the operator gateway;

[0213] when the sending result returned by the operator is sending timeout, it is determined that the generated SMS content fails to be sent.

[0214] Optionally, in an embodiment, the information deduction module 30 is configured to:

[0215] when it is determined that the user type is not a free user based on the user information corresponding to the SMS instruction, detect whether the number of SMS gifts in the user account is zero;

[0216] if not, detect whether the character length of the sent SMS content exceeds the first preset number of characters;

[0217] if not, the number of SMS gifts in the user account is reduced by one;

[0218] If the first preset number of characters is exceeded, then a second preset number of characters is taken as one to send a short message, and the total number of sent short messages is counted, wherein the first preset number is greater than the second preset number;

[0219] The total number of sent short messages is compared with the number of short message gifts;

[0220] If the total number of sent short messages is greater than the number of short message gifts, then the difference between the total number of sent short messages and the number of short message gifts is calculated, and the user account is charged according to the difference and the cost of a single short message;

[0221] If the total number of sent short messages is less than or equal to the number of short message gifts, then the number of short message gifts in the user account is reduced by the total number of sent short messages.

[0222] The functions of the modules in the short message processing device correspond to the steps in the short message processing method, and the functions and implementation processes are not repeated here.

[0223] In a third aspect, the embodiments of the present application also provide an electronic device, as shown in the structure Figure 6 The processor is configured to read and execute a computer program stored in the memory to implement the short message processing method.

[0224] In a fourth aspect, the embodiments of the present application also provide a computer storage medium, which stores computer executable instructions, and the computer executable instructions implement the short message processing method when executed.

[0225] In a fifth aspect, the embodiments of the present application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the processes of the short message processing method and achieve the same technical effects. To avoid repetition, the details are not repeated here.

[0226] Finally, it should be noted that in some of the processes described in the embodiments of the present application, a plurality of operations or steps appear in a specific order, but it should be understood that these operations or steps can be executed or performed in parallel or in a different order from that in the embodiments of the present application. The serial number of the operation is only used to distinguish different operations, and the serial number itself does not represent any execution order. In addition, these processes can include more or fewer operations, and the operations or steps can be executed in sequence or in parallel, and the operations or steps can be combined.

[0227] The above merely describes the preferred embodiments of the present application and is not used to limit the present application. Although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions described in the foregoing embodiments or equivalently replace some technical features thereof, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for processing short messages, characterized in that: The method comprises: Converting the host Chinese encoding of the SMS instruction into a national standard encoding and deleting special characters in the SMS instruction to obtain a pre-processed SMS instruction; grouping the pre-processed SMS instructions based on the type of information contained in the pre-processed SMS instructions to obtain multiple groups of pre-processed sub-SMS instructions; wherein the SMS instructions include: passenger order record information, passenger identity information, flight information, mobile phone number information to be sent, and flight change information; Determining a target sub-SMS instruction from a plurality of pre-processed sub-SMS instructions based on a preset group name; verifying whether the user type corresponding to the target sub-SMS instruction is a free user, a postpaid user, or a prepaid user, and whether the number of free SMS messages or the balance of the prepaid user is greater than zero; if so, determining that the user authority verification is passed; When the user authority verification is passed, a first SMS template is determined based on whether the SMS instruction contains flight change information; a second SMS template is determined based on the flight information contained in the SMS instruction; a third SMS template is determined based on the passenger order record information contained in the SMS instruction; the first SMS template, the second SMS template, and the third SMS template are filled in to generate SMS content; After the generated SMS content is determined to be sent to the operator gateway, the user account is deducted based on the user information corresponding to the SMS instruction.

2. The method for processing short messages according to claim 1, wherein: The determining of the first SMS template according to whether the SMS instruction includes flight change information includes: Determining whether the flight is changed based on whether the SMS instruction contains flight change information; If the flight is changed, the flight change SMS template is determined to be the first SMS template; If the flight has not been changed, the normal flight SMS template is determined as the first SMS template.

3. The method for processing short messages according to claim 1, wherein: The step of determining a second SMS template based on the flight information included in the SMS instruction includes: Determining whether the flight is a multi-segment flight based on the flight information contained in the SMS instruction; If it is a multi-segment flight, the multi-segment flight sub-template is determined as the second SMS template; If it is not a multi-segment flight, the single-segment flight sub-template is determined as the second SMS template.

4. The method for processing short messages according to claim 1, wherein: The determining of the third SMS template based on the passenger order record information contained in the SMS instruction includes: Determining whether weather information needs to be sent based on the passenger order record information contained in the SMS instruction; If weather needs to be sent, query the weather data and determine that the weather sub-template is the third SMS template; If weather information does not need to be sent, the third SMS template will be empty.

5. The method for processing short messages according to claim 1, wherein: After the generated SMS content is sent to the operator gateway, before the user account is deducted based on the user information corresponding to the SMS instruction, the method includes: Check whether the generated SMS content is successfully sent to the operator gateway; When the operator returns a successful result, the generated SMS content is sent to the operator's gateway; When the sending result returned by the operator is sending timeout, it is determined that the generated SMS content has failed to be sent.

6. The method for processing short messages according to claim 1, wherein: The step of deducting fees from the user account based on the user information corresponding to the SMS instruction includes: When it is determined based on the user information corresponding to the SMS instruction that the user type is not a free user, detecting whether the number of free SMS messages in the user account is zero; If it is not zero, detecting whether the character length of the sent SMS content exceeds a first preset number of characters; If the number of characters does not exceed the first preset number, the number of free SMS messages in the user account is reduced by one; If the number of characters exceeds the first preset number, a second preset number of characters is used as one text message, and the total number of text messages sent is counted, wherein the first preset number is greater than the second preset number; Compare the total number of SMS messages sent with the number of free SMS messages; If the total number of text messages sent is greater than the number of free text messages, the difference between the total number of text messages sent and the number of free text messages will be calculated, and the user's account will be charged based on the difference and the cost of a single text message; If the total number of text messages sent is less than or equal to the number of free text messages, the number of free text messages in the user account will be reduced by the total number of text messages sent.

7. A short message processing device, characterized in that: The device comprises: The authority verification module is configured to convert the host Chinese encoding of the SMS instruction into the national standard encoding, and delete the special characters in the SMS instruction to obtain the pre-processed SMS instruction; group the pre-processed SMS instructions based on the type of information contained in the pre-processed SMS instruction to obtain multiple groups of pre-processed sub-SMS instructions; wherein the SMS instruction includes: passenger order record information, passenger identity information, flight information, to-be-sent mobile phone number information and flight change information; determine the target sub-SMS instruction from the multiple groups of pre-processed sub-SMS instructions based on a preset group name; verify whether the user type corresponding to the target sub-SMS instruction is a free user, a postpaid user or a prepaid user, and whether the number of free SMS messages or the balance of the prepaid user is greater than zero; if so, determine that the user authority verification is passed; The SMS generation module is configured to, when user authority verification is passed, determine a first SMS template based on whether the SMS instruction contains flight change information; determine a second SMS template based on the flight information contained in the SMS instruction; determine a third SMS template based on the passenger order record information contained in the SMS instruction; and fill in the first SMS template, the second SMS template, and the third SMS template to generate SMS content; The information deduction module is configured to deduct fees from the user account based on the user information corresponding to the SMS instruction after the generated SMS content is determined to be sent to the operator gateway.

8. The short message processing device according to claim 7, characterized in that: The information fee deduction module is configured to: When it is determined based on the user information corresponding to the SMS instruction that the user type is not a free user, detecting whether the number of free SMS messages in the user account is zero; If it is not zero, detecting whether the character length of the sent SMS content exceeds a first preset number of characters; If the number of characters does not exceed the first preset number, the number of free SMS messages in the user account is reduced by one; If the number of characters exceeds the first preset number, a second preset number of characters is used as one text message, and the total number of text messages sent is counted, wherein the first preset number is greater than the second preset number; Compare the total number of SMS messages sent with the number of free SMS messages; If the total number of text messages sent is greater than the number of free text messages, the difference between the total number of text messages sent and the number of free text messages will be calculated, and the user's account will be charged based on the difference and the cost of a single text message; If the total number of text messages sent is less than or equal to the number of free text messages, the number of free text messages in the user account will be reduced by the total number of text messages sent.

9. An electronic device, characterized in that: include: memory and processor; The processor is configured to read and execute the computer program stored in the memory to implement the steps of the SMS processing method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the steps of the text message processing method according to any one of claims 1 to 6 are implemented.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the text message processing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Handset short message function for real-time dynamic of airport arrival flight

    CN101951578A

  • Charging management and control method and system based on aviation passenger communication and mobile terminal

    CN109802840A