WO2013127108A1 - 存储短消息的方法及装置 - Google Patents

存储短消息的方法及装置 Download PDF

Info

Publication number
WO2013127108A1
WO2013127108A1 PCT/CN2012/072742 CN2012072742W WO2013127108A1 WO 2013127108 A1 WO2013127108 A1 WO 2013127108A1 CN 2012072742 W CN2012072742 W CN 2012072742W WO 2013127108 A1 WO2013127108 A1 WO 2013127108A1
Authority
WO
WIPO (PCT)
Prior art keywords
short message
validity period
time information
stored
field
Prior art date
Application number
PCT/CN2012/072742
Other languages
English (en)
French (fr)
Inventor
陈建国
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013127108A1 publication Critical patent/WO2013127108A1/zh

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/60Subscription-based services using application servers or record carriers, e.g. SIM application toolkits

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for storing short messages.
  • BACKGROUND OF THE INVENTION With the continuous development of technology, more and more electronic products are used in people's daily lives, and mobile phones are a necessity in daily life, and their functions are also endless.
  • the sending time stamp field is not defined for the transmitted short message data encoding. Further, when the normal mobile terminal stores the transmitted short message, the general equipment vendors complete the sending time through a custom method. storage.
  • the device vendor can directly expand The protocol field encodes the transmission time into it.
  • the 3GPP specification only stores 176 bytes for the short message stored in the SIM/USIM card.
  • the method of extending the field by CDMA cannot pack all the data into a 176-byte method.
  • the data is stored in a SIM or USIM card.
  • a method for storing a short message including: adding time information to a short message to be stored; storing a short message joining the time information to a SIM/USIM card of the terminal.
  • the method further includes: extracting the time information, where the time information includes one of: an editing time of the short message, and a sending time of the short message The current system time of the terminal, the report time of the short message, and the status report time of the short message.
  • adding the time information to the short message to be stored includes: if the short message to be stored includes a validity period field, and the validity period format of the validity period field is an absolute validity period or an enhanced validity period, converting the validity period format by an encoding process The validity period or the validity period field is discarded, wherein the validity period field is a TP-VP field specified by the 3GPP short message protocol; and the extracted time information is added to the short message tail after processing the validity period field.
  • adding the time information to the short message to be stored includes: encoding 7 bytes occupied by the absolute validity period or the enhanced validity period according to the 3GPP short message protocol, and converting to a relative validity period occupying 1 byte; The time information is added to the released 6 bytes.
  • the adding the time information to the short message to be stored further includes: if the validity period format of the short message validity period field to be stored is a relative validity period or the short message to be stored does not include a validity period field, the time information is Directly joining the tail of the short message, where the validity period field is a TP-VP field specified by the 3GPP short message protocol.
  • an apparatus for storing a short message which is applied to a mobile terminal, includes: adding a module, configured to add time information to a short message to be stored; and a storage module configured to join the The short message of the time information is stored to the SIM/USIM card of the terminal.
  • the device further includes: an extracting module, configured to extract the time information, where the time information includes one of: an editing time of the short message, a sending time of the short message, the terminal The current system time, the transmission report time of the short message, and the status report time of the short message.
  • an extracting module configured to extract the time information, where the time information includes one of: an editing time of the short message, a sending time of the short message, the terminal The current system time, the transmission report time of the short message, and the status report time of the short message.
  • the adding module includes: a processing unit, configured to: when the short message to be stored includes a validity period field, and the validity period format of the validity period field is an absolute validity period or an enhanced validity period, the valid period format is encoded Converting to a relative validity period or a discarding validity period field, where the validity period field is a TP-VP field specified by the 3GPP short message protocol; the first adding unit is configured to add the extracted time information to the validity period field The short message tail after processing.
  • a processing unit configured to: when the short message to be stored includes a validity period field, and the validity period format of the validity period field is an absolute validity period or an enhanced validity period, the valid period format is encoded Converting to a relative validity period or a discarding validity period field, where the validity period field is a TP-VP field specified by the 3GPP short message protocol; the first adding unit is configured to add the extracted time information to the validity period field The short message tail after processing.
  • the adding module further includes: a second joining unit, configured to: when the validity period format of the short message validity period field to be stored is a relative validity period or the to-be-stored short message does not include a validity period field, The time information is directly added to the tail of the short message, where the validity period field is a TP-VP field specified by the 3GPP short message protocol.
  • the method of adding time information to the short message to be stored; storing the short message adding the time information to the SIM/USIM card of the terminal solves the short-term storage of the user in the SIM/USIM card in the related art.
  • FIG. 1 is a flowchart of a method for storing a short message according to an embodiment of the present invention
  • FIG. 2 is a flow chart of adding a time stamp to a short message and storing the SIM/USIM card according to a preferred embodiment of the present invention
  • Figure 3 is a flow chart of copying a short message to a SIM/USIM card according to a preferred embodiment of the present invention
  • Figure 4 is a block diagram of a mechanism for storing a short message according to an embodiment of the present invention
  • FIG. 5 is a second block diagram of a mechanism for storing a short message according to an embodiment of the present invention
  • FIG. 6 is a third block diagram of an apparatus for storing a short message according to an embodiment of the present invention.
  • Step S102 adding time information to the short message to be stored
  • Step S104 storing the short message adding the time information to The SIM/USIM card of the terminal.
  • the method of the present invention is to add time information to the short message to be stored, and to store the short message that adds the time information to the SIM/USIM card of the terminal, which solves the related problem that the user is in the SIM/USIM card.
  • the total byte length for short message storage specified by the protocol is limited, resulting in failure
  • the problem of adding time information in the short message data packet, and then storing the short message and its time information together in the card without changing the total length of the short message storage specified by the protocol, is convenient for short message management. Improve the user experience.
  • time information which is generally named in the following order: year, month, day, hour, minute, second. For example, 12.02.15.12.20.15, then the time is expressed as February 15, 2012, 12:20:15.
  • the time information may be multiple, and may be an editing time or a sending time. Specifically, the time may be any one of the following: an editing time of the short message, a sending time of the short message, a current system time of the terminal, and a short message. Send report time, status report time of short message.
  • the above time information can be from the draft box, the outbox, the outbox, etc.
  • the system time of the current mobile terminal can be directly extracted, and the short message in the sent box can be directly extracted.
  • the system time of the current mobile terminal can also organize the time field by sending data in a Submit Report or a Status Report.
  • the time information is defined in the above order according to the relevant provisions of the 3GPP protocol.
  • the EF-SMS field 6F3C has the following provisions, as shown in Table 1. From Table 1, we can conclude that the longest data for each short message in the SIM/USIM card is 176 bytes, except for the status flag, the remaining 175 bytes are available for storage.
  • Data has a data length of up to 140 bytes and is used to store the portion of the content sent by the short message, that is, the editing capacity of the user to edit the content of the short message.
  • TP-MT TP-Message-T M 2b Parameter describes the message type. (This parameter describes I yps- Indicator describes the type of message)
  • TP-RD TP-Reject-Dup M b Parameter indicating whether or not the SC shall licates (repeated reject an SMS-SUBMIT for an SM still held in the same) the SC which has the same TP-MR and the same
  • TP-DA as a previously submitted SM from the same OA (This parameter indicates whether the SMS center refuses to send when the currently sent SMS and the previously sent SMS have the same message tag and destination address parameters)
  • TP-VP TP-Validity-Per M 2b Parameter indicating whether or not the TP -VP F iod-Format (The field is present. (This parameter indicates whether there is a validity period format in the subsequent content) Validity field)
  • TP-UD TP-User-Data- O b Parameter indicating that the TP-UD field HI Header-Indicat contains a Header. (This parameter identifies the user data field or (user data header has user header information)
  • TP-Status-Rep O b Parameter indicating if the MS is requesting a ort-Request (the status report. (This parameter identifies whether this short message reports the request to the network request status).
  • TP-DC TP-Data-Codin M o Parameter identifying the coding scheme within S g-Scheme (data the TP-User-Data. (this parameter identifies the coding scheme of the TP UD user number coding scheme))
  • TP-VP TP-Validity-Per O oil Parameter identifying the time from where the iod (valid) o message is no longer valid. (This parameter identifies the effective forwarding time of this SMS in the SMS center. After this time, the SMS is invalid)
  • the maximum data length plus the length of the short message center number satisfies the requirement of the maximum length of 176 bytes of the 6F3C field in the SIM/USIM card specification.
  • the TP-VP (TP Validity Period) field (that is, the validity period field) has a maximum storage length of 7 bytes, and according to the 3GPP 23.040 short message protocol, the relative validity period can be used here, that is, it can be Expressed in 1 byte, 6 bytes can be saved here, as shown in Table 3.
  • Table 3 TP Validity Period
  • the embodiment of the present invention provides a method for converting the validity period of the validity period field, that is, a time stamp field is followed by the TP-UD, and the structure of the time stamp can be as shown in Table 4.
  • Table 4
  • step S102 can be divided into two cases, and the following two cases are respectively Description:
  • the first case In the case that the short message contains a validity period field, and the validity period format of the validity period field is an absolute validity period or an enhanced validity period, the validity period format of the validity period field is processed.
  • Short according to 3GPP The message protocol stipulates that the absolute validity period or the enhanced validity period is 7 bytes.
  • the encoding process can be performed according to the 3GPP short message protocol. For the specific encoding method, refer to the following protocol:
  • TP VPF TP Validity Period Format
  • the TP Validity Period Format is a 2 bit field, located within bit no 3 and 4 of the first octet of SMS SUBMIT, and to be given the following values: (the valid period format identifier occupies 2 bit size space, is in the first of sending SMS PDU The 3rd and 4th digits of the byte have the following value range) bit4 (4th bit) bit3 (3rd bit)
  • any unsupported value may be rejected by the SC by returning the "TP- VPF not supported" TP-FCS value in the SMS Submit Report for RP-Error.
  • SMS center does not support a certain type of validity period, this type of validity period SMS Will be rejected, in the error type field of the report sent by the network will be filled in the "Validity not supported” error number
  • the absolute validity period or enhanced validity period can be converted to occupy 1 byte.
  • the relative validity period; and the time information is added to the released 6 bytes, that is, the time stamp is added to the short message.
  • the validity period field is a TP-VP field specified by the 3GPP short message protocol.
  • the embodiment of the invention provides that the time information is added to the tail of the short message. In the process of subsequently reading the entire content of the short message, the method of adding the tail can quickly obtain the time information.
  • the validity period of the short message validity period field to be stored is a relative validity period, or the short message to be stored does not include a validity period field (that is, 7 bytes of the TP-VP field are in an idle state), Add time information directly to the end of the short message.
  • the subsequent TP-VP field occupies only 1 byte or does not occupy bytes.
  • the extracted time Semi octets format can be compiled into a 6-byte time information appended to the encoded short message.
  • step S104 when a short message needs to be read, the short message is decoded.
  • the short message is decoded for the mobile terminal that does not support the present embodiment, when the data in the SIM/USI or M card is read, it is decoded according to the standard protocol, and is not decoded when decoding to the TP-UD (ie, the time information is not added except Obtained, the rest are available), does not affect the normal operation and process of its mobile terminal, and achieves good compatibility.
  • the present invention will be further described in detail below in conjunction with the preferred embodiments and the accompanying drawings.
  • the preferred embodiment provides a process for the user to add a timestamp to the short message and store it in the SIM/USIM card. As shown in FIG.
  • Step S202 the user selects the editing.
  • a short message and determine whether to store the short message directly. If yes, step S208 is performed, otherwise step S204 is performed.
  • Step S204 determining whether to send the short message. If yes, step S206 is performed, and if not, step S208 is performed.
  • the short message may be a short message that has been sent by the user before, or may be a short message in the user draft box. Of course, the short message that the user is currently editing is to be sent.
  • Step S206 sending the edited short message.
  • Step S208 the user selects to store the short message on the display interface.
  • Step S210 adding the extracted time information, where the time information may be the editing time of the short message or the sending time of the short message.
  • Step S212 encoding the short message.
  • Protocol encoding is performed on short messages that need to be stored in the SIM/USIM card, wherein the protocol is a 3GPP protocol.
  • the validity period field code is for TP-VPF
  • for the short message including the validity period field and the validity period format is the absolute validity period and the enhanced validity period
  • the relative validity period encoding method Bit3 is 1, 0
  • Step S214 storing the encoded short message into the SIM/USIM card.
  • the APDU command is sent according to the normal short message flow, and the short message is stored in the SIM/USIM card.
  • FIG. 3 shows a process of copying a short message that has been edited to a SIM/USIM card, and the process includes the steps.
  • Step S302 The user selects, on the human-computer interaction interface, an operation of copying a short message that has been edited in the mobile terminal to be copied to the card.
  • Step S304 adding time information.
  • the editing time is stored in the mobile terminal. At this time, the editing time in the mobile terminal can be used as the time information stored in the card in the short message. If there is a short message without editing time, The current system time is taken as the editing time and stored in the card.
  • Step S306 performing an encoding operation on the short message.
  • the short message with the valid period field being a relative value or having no valid period field is directly encoded with a time stamp, that is, the time information is directly added to the short message, because the joining time information accounts for 6 bytes, and the spare bytes are at least 6 bytes.
  • the storage space is sufficient, so don't worry about the encoded data exceeding the maximum number of bytes.
  • For short messages whose validity period is absolute value and enhancement value first re-encode the validity period field, modify the validity period to a relative value to release 6 bytes for storing time information, or delete the validity period field to directly release the storage space of the validity period field. Then, the timestamp field is appended at the end of the data packet to complete the encoding processing of the validity period field.
  • Step S308 storing the short message into the SIM/USIM card.
  • an embodiment of the present invention further provides an apparatus for storing a short message, which is applied to a mobile terminal, as shown in FIG.
  • the device comprises: an adding module 10, configured to add in a short message to be stored Incoming time information; the storage module 20, coupled with the joining module 10, is configured to store the short message of the joining time information to the SIM/USIM card of the terminal.
  • the extraction module 30 can also be added to be coupled to the add-on module 10, as shown in FIG.
  • the extraction module 30 is configured to extract time information, where the time information includes one of the following: an edit time of the short message, a send time of the short message, a current system time of the terminal, a report time of the short message, and a status of the short message. report time.
  • the adding module 10 may also be as shown in FIG.
  • the processing unit 102 configured to: when the short message to be stored includes a validity period field, and the validity period format of the validity period field is an absolute validity period or an enhanced validity period, Converting the validity period format into a relative validity period or a discarding validity period field, wherein the validity period field is a TP-VP field specified by the 3GPP short message protocol;
  • the first adding unit 104 is coupled with the processing unit 102, and is set to the extracted time The information is added to the short message tail after processing the validity period field;
  • the second adding unit 106 is configured to set, in the case that the validity period format of the short message validity period field to be stored is the relative validity period or the short message to be stored does not include the validity period field, The time information is directly added to the tail of the short message, where the validity period field is the TP-VP field specified by the 3GPP short message protocol.
  • the embodiment of the invention provides a short message processing method and device for a mobile phone mobile terminal.
  • the method includes: after the terminal sends a short message or edits a short message, the user selects to save the short message in the SIM/USIM.
  • the short message is packaged into a storage format according to the 3GPP standard protocol, a timestamp field is added at the end of the short message data packet, and the transmission time is stored, so that the user can trace the data and time-based management of the short message on the card.
  • the present invention by using the time information in the short message to be stored in the embodiment of the present invention; storing the short message added to the time information to the SIM of the terminal /USIM card method, which solves the problem that when the user stores the short message in the SIM/USIM card in the related art, the total byte length for the short message storage specified by the protocol is limited, and the time cannot be increased in the short message data packet.
  • the problem of information, and then without storing the total length of the short message storage specified by the protocol, the short message and its time information are stored together in the card, which facilitates short message management and improves the user experience.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or Multiple of these modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
  • the above are only the preferred embodiments of the present invention, and are not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

本发明公开了一种存储短消息的方法及装置,该方法包括:在待存储的短消息中加入时间信息;将加入时间信息的短消息存储至终端的SIM/USIM卡。通过运用本发明,解决了相关技术中用户在SIM/USIM卡中存储短消息时,由于协议所规范的用于短消息存储的总字节长度受限,导致无法在短消息数据包增加时间信息的问题,进而在不改变协议所规范的用于短消息存储的总长度的情况下,将短消息及其时间信息一并存储到卡中,便于短消息管理,提高了用户体验。

Description

存储短消息的方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种存储短消息的方法及装置。 背景技术 随着科技的不断发展, 越来越多电子产品运用到人们的日常生活中, 手机作为日 常生活中的必需品, 其功能也层出不穷。 当前全球移动通信 3GPP协议中, 对于发送的短消息数据编码并没有定义发送时 间戳字段, 进而, 在通常的手机终端存储所发送短消息时, 一般的设备商均通过自定 义方法完成发送时间的存储。 然而, 对于用户将发送或待发送的短消息存储于存储卡 的情况, 在 CDMA系统中, 由于 3GPP2规范对于短消息存于 UIM卡的长度有 255字 节之多, 设备商均可以通过直接扩展协议字段将发送时间编码于其中, 而对于 GSM 系统, 3GPP规范对于短消息存于 SIM/USIM卡的长度只有 176字节, 按 CDMA扩展 出字段的方法无法将所有数据打包成一个 176字节的数据存于 SIM或者 USIM卡中。 发明内容 本发明提供了一种存储短消息的方法及装置, 以至少解决相关技术中用户在
SIMAJSIM卡中存储短消息时, 由于协议所规范的用于短消息存储的总字节长度受限, 导致无法在短消息数据包增加时间信息的问题。 根据本发明的一个方面, 提供了一种存储短消息的方法, 包括: 在待存储的短消 息中加入时间信息; 将加入所述时间信息的短消息存储至终端的 SIM/USIM卡。 优选地, 在待存储的短消息中加入时间信息之前, 还包括: 提取所述时间信息, 其中, 所述时间信息包括以下之一: 所述短消息的编辑时间, 所述短消息的发送时间, 所述终端的当前系统时间,所述短消息的发送报告时间,所述短消息的状态报告时间。 优选地, 在待存储的短消息中加入时间信息包括: 如果所述待存储的短消息包含 有效期字段, 且有效期字段的有效期格式为绝对有效期或增强有效期, 则将所述有效 期格式经过编码处理转换为相对有效期或抛弃有效期字段, 其中, 所述有效期字段为 3GPP短消息协议规定的 TP-VP字段; 将已提取的所述时间信息加入到对所述有效期 字段进行处理后的短消息尾部。 优选地, 在待存储的短消息中加入时间信息包括: 将绝对有效期或增强有效期占 用的 7个字节按照所述 3GPP短消息协议进行编码处理, 转换为占用 1个字节的相对 有效期; 将所述时间信息加入到释放的 6个字节中。 优选地, 在待存储的短消息中加入时间信息还包括: 如果所述待存储的短消息有 效期字段的有效期格式为相对有效期或所述待存储短消息不包含有效期字段, 则将所 述时间信息直接加入所述短消息的尾部, 其中, 所述有效期字段为 3GPP短消息协议 规定的 TP-VP字段。 优选地, 在将加入所述时间信息的短消息存储至终端的 SIM/USIM卡之后, 还包 括: 当所述 SIM/USIM卡应用于不支持对存储的所述时间信息解码的终端时, 则仅对 存储的所述短消息进行解码。 根据本发明的另一方面, 提供了一种存储短消息的装置, 应用于移动终端中, 包 括: 加入模块, 设置为在待存储的短消息中加入时间信息; 存储模块, 设置为将加入 所述时间信息的短消息存储至终端的 SIM/USIM卡。 优选地, 所述装置还包括: 提取模块, 设置为提取所述时间信息, 其中, 所述时 间信息包括以下之一: 所述短消息的编辑时间, 所述短消息的发送时间, 所述终端的 当前系统时间, 所述短消息的发送报告时间, 所述短消息的状态报告时间。 优选地, 所述加入模块包括: 处理单元, 设置为在所述待存储的短消息包含有效 期字段, 且有效期字段的有效期格式为绝对有效期或增强有效期的情况下, 将所述有 效期格式经过编码处理转换为相对有效期或抛弃有效期字段, 其中, 所述有效期字段 为 3GPP短消息协议规定的 TP-VP字段; 第一加入单元, 设置为将已提取的所述时间 信息加入到对所述有效期字段进行处理后的短消息尾部。 优选地, 所述加入模块还包括: 第二加入单元, 设置为在所述待存储的短消息有 效期字段的有效期格式为相对有效期或所述待存储短消息不包含有效期字段的情况 下, 将所述时间信息直接加入所述短消息的尾部, 其中, 所述有效期字段为 3GPP短 消息协议规定的 TP-VP字段。 通过本发明, 采用在待存储的短消息中加入时间信息; 将加入所述时间信息的短 消息存储至终端的 SIM/USIM卡的方法, 解决了相关技术中用户在 SIM/USIM卡中存 储短消息时, 由于协议所规范的用于短消息存储的总字节长度受限, 导致无法在短消 息数据包增加时间信息的问题, 进而在不改变协议所规范的用于短消息存储的总长度 的情况下, 将短消息及其时间信息一并存储到卡中, 便于短消息管理, 提高了用户体 验。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例提供的存储短消息的方法的流程图; 图 2是根据本发明优选实施例一的对短消息追加时间戳并存入 SIM/USIM卡的流 程图; 图 3是根据本发明优选实施例二的将曾编辑过的短消息拷贝到 SIM/USIM卡的流 程图; 图 4是根据本发明实施例提供的存储短消息的装置的机构框图一; 图 5是根据本发明实施例提供的存储短消息的装置的机构框图二; 以及 图 6是根据本发明实施例提供的存储短消息的装置的机构框图三。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 基于相关技术中用户在 SIM/USIM卡中存储短消息时, 由于协议所规范的用于短 消息存储的总字节长度受限, 导致无法在短消息数据包增加时间信息的问题, 本发明 提供了一种存储短消息的方法, 其流程如图 1所示, 包括步骤 S102至步骤 S104: 步骤 S102, 在待存储的短消息中加入时间信息; 步骤 S104, 将加入时间信息的短消息存储至终端的 SIM/USIM卡。 通过本发明实施例, 采用在待存储的短消息中加入时间信息; 将加入所述时间信 息的短消息存储至终端的 SIM/USIM卡的方法, 解决了相关技术中用户在 SIM/USIM 卡中存储短消息时, 由于协议所规范的用于短消息存储的总字节长度受限, 导致无法 在短消息数据包增加时间信息的问题, 进而在不改变协议所规范的用于短消息存储的 总长度的情况下, 将短消息及其时间信息一并存储到卡中, 便于短消息管理, 提高了 用户体验。 在待存储的短消息中加入时间信息之前, 还需要提取时间信息, 该时间信息一般 按如下顺序命名: 年、 月、 日、 时、 分、 秒。 例如, 12.02.15.12.20.15, 则该时间表示 为 2012年 2月 15日, 12时 20分 15秒。 其中, 时间信息有多种, 可以为编辑时间, 也可以为发送时间, 具体的, 可以包括以下任意之一: 短消息的编辑时间, 短消息的 发送时间, 终端的当前系统时间, 短消息的发送报告时间, 短消息的状态报告时间。 上述时间信息可以来自于草稿箱、发件箱、 已发件箱等, 对于草稿箱中的短消息, 可以直接提取当前移动终端的系统时间, 对于所发件箱中的短消息, 可以直接提取当 前移动终端的系统时间, 也可以通过发送报告 (Submit Report)或者状态报告 (Status Report)中的数据来组织时间字段。 下面, 我们根据 3GPP协议的相关规定, 对为何按 上述顺序定义时间信息进行进一步说明。 按照 3GPP 31.102协议中对 EF-SMS字段 6F3C有如下规定, 见表 1。 通过表 1, 我们可以得出 SIM/USIM卡中每条短消息的最长数据是 176个字节, 除去状态标志位 外, 剩余 175字节可用于存储。
Figure imgf000005_0001
Access Conditions: (使用前提)
READ PIN (读取: PIN码权限)
UPDATE PIN (更改: PIN码权限)
DEACTIVATE ADM (去激活: 管理员权限)
ACTIVATE ADM (激活: 管理员权限)
Bytes Description (描述) M/0 Length ( 长
度)
1 Status (短信状态) M 1 byte
2 to 176 Remainder (剩余字节) M 175 bytes 根据 3GPP 23.040协议,短消息发送的数据格式如表 2所示,其中 TP-UD ( TP User
Data) 的数据长度最大为 140字节, 用于存放短消息发送的内容的部分, 即用户平时 编辑短消息内容的编辑容量。 表 2
Abbr. Reference (标 Description (描述)
pi) P2)
识)
TP-MT TP-Message-T M 2b Parameter describing the message type. (此参数描 I yps- Indicator 述了消息的类型)
(消息类型标
识)
TP-RD TP-Reject-Dup M b Parameter indicating whether or not the SC shall licates (重复拒 accept an SMS-SUBMIT for an SM still held in 绝) the SC which has the same TP-MR and the same
TP-DA as a previously submitted SM from the same OA (此参数指示了当前发送的短信和前一次 发送的短信有同样的消息标记和目的地址参数的 时候, 短信中心是否拒绝发送)
TP-VP TP-Validity-Per M 2b Parameter indicating whether or not the TP -VP F iod-Format (有 field is present. (此参数指示了后续内容中是否有 效期格式) 有效期字段)
TP-RP TP-Reply-Path M b Parameter indicating the request for Reply Path.
(回复路径) (此参数标识本短信向网络请求了回复路径)
TP-UD TP-User-Data- O b Parameter indicating that the TP-UD field HI Header-Indicat contains a Header. (此参数标识了用户数据字段 or (用户数据头 是否有用户数据头信息)
指示)
TP-Status-Rep O b Parameter indicating if the MS is requesting a ort-Request (状 status report. (此参数标识了此短信是否向网络请 态报告请求) 求了状态报告)
TP-MR TP-Message-R M I Parameter identifying the SMS-SUBMIT. (此参数 eference (消息 用于区分所发送的每条短信)
标记)
TP-DA TP-Destination M 2-1 Address of the destination SME. (目的终端地址)
-Address (目的 2o
地址)
TP-PID TP-Protocol-Id M o Parameter identifying the above layer protocol, if entifier (协议标 any. (此参数标记了上层协议类型)
识)
TP-DC TP-Data-Codin M o Parameter identifying the coding scheme within S g-Scheme (数据 the TP-User-Data. (此参数标识了 TP UD用户数 编码方案) 据的编码方案)
TP-VP TP-Validity-Per O oil Parameter identifying the time from where the iod (有效期) o message is no longer valid. (此参数标识了此短信 在短信中心的有效转发时间, 此时间过后短信无 效)
TP-UD TP-User-Data- M I Parameter indicating the length of the
Figure imgf000007_0001
通过上表可知, 最大数据长度加上短消息中心号码的长度满足 SIM/USIM卡规范 中对 6F3C字段最大长度 176字节的要求。 在表 2中, TP-VP ( TP Validity Period) 字段 (即有效期字段) 最大存储长度为 7 字节, 而根据 3GPP23.040短消息协议, 此处可以用相对有效期来表示, 也就是说这里 可以用 1字节来表示, 此处可以节约 6字节, 如表 3所示。 表 3
Figure imgf000007_0002
因此, 本发明实施例提供一种有效期字段的有效期格式转变的方法, 即在 TP-UD 后面跟一个时间戳字段, 该时间戳的结构可以如表 4所示。 表 4
Figure imgf000007_0003
基于上述 3GPP协议的规定可以看出, 在 176个字节中, 只有 7个字节用于存放 有效期, 因此, 对于步骤 S 102的执行过程, 可以分为两种情况, 下面分别对两种情况 进行说明: 第一种情况: 该情况为短消息中包含有效期字段, 且有效期字段的有效期格式为 绝对有效期或增强有效期, 则对该有效期字段的有效期格式进行处理。 根据 3GPP短 消息协议的规定, 绝对有效期或增强有效期都占用的 7个字节, 此时, 可以按照 3GPP 短消息协议进行编码处理, 具体编码方法可参照如下协议:
TP Validity Period Format (TP VPF) (有效期格式)
The TP Validity Period Format is a 2 bit field, located within bit no 3 and 4 of the first octet of SMS SUBMIT, and to be given the following values: (有效期格式标识占用 2bit 大小空间, 处于发送短信 PDU的第一个字节的第 3, 4位, 有如下取值范围) bit4(第 4位) bit3(第 3位)
0 0 TP VP field not present (无有效期字段)
1 0 TP VP field present - relative format (有效期字段为相对有效期) 0 1 TP-VP field present - enhanced format (有效期字段为增强有效期)
1 1 TP VP field present - absolute format (有效期字段为绝对有效期)
Any unsupported value may be rejected by the SC by returning the "TP- VPF not supported" TP-FCS value in the SMS Submit Report for RP-Error. (短信中心如果不支持 某种类型的有效期, 此类型有效期的短信将被拒绝, 在网络返回的发送报告的错误类 型字段中将会填入"有效期不支持 "错误号) 按照上述协议经过编码处理, 就可以将绝对有效期或增强有效期转换为占用 1个 字节的相对有效期; 并将时间信息加入到释放的 6个字节中, 即将时间戳加入到短消 息中。 在实施过程中, 还可以选择抛弃有效期字段的处理方式, 则此时有效期字段的内 容被抛弃, 释放了 7个字节的空间。 其中, 上述有效期字段为 3GPP短消息协议规定 的 TP-VP字段。 本发明实施例提供的是将时间信息加入到短消息的尾部, 在后续需要对短消息的 全部内容进行读取的过程中, 加入尾部的方法可以快速获得时间信息。 当然, 在短消 息内容有空闲的情况下, 本领域技术人员完全可以将时间信息加入到短消息中, 此处 不再赘述。 第二种情况: 如果待存储的短消息有效期字段的有效期格式为相对有效期, 或者 待存储短消息不包含有效期字段 (即 TP-VP字段的 7个字节处于空闲状态), 则可以 将时间信息直接加入短消息的尾部。 对于不同情况下, 可以应用不同的处理方式, 灵 活的解决了相关技术中的无法加入时间戳的问题。 在通过上述任一种方法进行处理后,后续的 TP-VP字段就只占用 1个字节或者不 占用字节了。 在整条短消息打包完成后 (即 TP-UD打包完成), 便可以将提取的时间 Semi octets格式编译成一个 6字节的时间信息追加到经过编码处理的短消息的
在步骤 S104完成后, 当需要读取短消息的情况下, 则对短消息进行解码。对于不 支持本实施例的移动终端,在读取 SIM/USI,M卡中的数据的时候,根据标准协议解码, 解码到 TP-UD的时候即不再往下解码(即除了加入时间信息不可获得, 其余都可以获 得), 不影响其移动终端的正常操作和流程, 很好地做到了兼容性。 下面结合优选实施例及附图对本发明做进一步详细说明。 优选实施例一 本优选实施例提供了一种用户对短消息追加时间戳并存入 SIM/USIM卡的流程, 如图 2所示, 该流程包括步骤 S202至步骤 S214: 步骤 S202, 用户选择编辑一条短消息, 并判断是否直接存储短消息。 如果是, 则 执行步骤 S208, 否则执行步骤 S204。 步骤 S204, 判断是否发送该短消息。 如果发送, 则执行步骤 S206, 如果不发送, 则执行步骤 S208。 其中, 该短消息可以是用户之前已发送的短消息, 也可以是用户草 稿箱中的短消息, 当然也可以是用户当前正在编辑待发送的短消息。 步骤 S206, 发送已编辑的短消息。 步骤 S208, 用户在显示界面选择将短消息进行存储。 此存储过程在上述步骤的执 行后, 用户可以选择直接将短消息存入 SIM/USIM卡的草稿箱, 也可以选择在发送后 存入 SIM/USIM卡发件箱。 步骤 S210, 加入提取的时间信息, 其中, 时间信息可以为短消息的编辑时间或者 短消息的发送时间。 步骤 S212, 对短消息进行编码处理。对需要存储到 SIM/USIM卡的短消息进行协 议编码, 其中, 该协议为 3GPP协议。 上述步骤中,有效期字段编码针对的是 TP-VPF,对包含有效期字段且有效期格式 为绝对有效期和增强有效期的短消息,选择相对有效期编码方法(Bit4, Bit3分别为 1, 0), 或者选择抛弃有效期字段的编码方法 (Bit4, Bit3 分别为 0, 0)。 这样, 后续的 TP-VP字段就只占用一个字节或者不占用字节了。 对于不包含有效期字段或者有效期 字段为相对有效期的短消息,此处不作编码转换处理,直接追加时间信息到数据尾部, 不用担心编码后的数据超出最大字节数限制。 步骤 S214, 将编码后的短消息存储到 SIM/USIM卡中。 此步骤执行时, 按正常短 消息流程发送 APDU命令, 并将短消息存入 SIM/USIM卡中。 优选实施例二 图 3示出的是将曾编辑过的短消息拷贝到 SIM/USIM卡的流程, 该流程包括步骤
S302至步骤 S308: 步骤 S302,用户在人机交互界面上选择拷贝移动终端中已有的一条曾经编辑的短 消息进行复制到卡的操作。 步骤 S304, 加入时间信息。 当前业界流行做法中都将编辑时间存入到移动终端中 了, 则此时, 可以移动终端中的编辑时间作为短消息存入卡中的时间信息, 如果存在 无编辑时间的短消息, 则直接取当前系统时间作为编辑时间存入卡中。 步骤 S306, 对短消息进行编码操作。 其中, 对有效期字段为相对值或者没有有效期字段的短消息直接进行时间戳的追 加编码, 即直接将时间信息加入到短消息中, 因加入时间信息占 6个字节, 而空余的 字节至少为 6个字节,存储空间够用,所以不用担心编码后数据超出最大字节数限制。 对有效期为绝对值和增强值的短消息, 先重新编码有效期字段, 将有效期修改为 相对值以释放用于存储时间信息的 6个字节, 或者删除上述有效期字段以直接释放有 效期字段的存储空间, 再在数据包最后追加时间戳字段, 完成对有效期字段的编码处 理工作。 步骤 S308, 存储短消息至 SIM/USIM卡中。 根据本发明的另一方面, 本发明实施例还提供了一种存储短消息的装置, 应用于 移动终端中, 如图 4所示。 该装置包括: 加入模块 10, 设置为在待存储的短消息中加 入时间信息; 存储模块 20, 与加入模块 10耦合, 设置为将加入时间信息的短消息存 储至终端的 SIM/USIM卡。 为进一步优化上述装置, 还可以增加提取模块 30, 与加入模块 10耦合, 如图 5 所示。 其中, 提取模块 30, 设置为提取时间信息, 其中, 时间信息包括以下之一: 短 消息的编辑时间, 短消息的发送时间, 终端的当前系统时间, 短消息的发送报告时间, 短消息的状态报告时间。 在实施过程中, 加入模块 10还可以如图 6所示, 包括: 处理单元 102, 设置为在 待存储的短消息包含有效期字段, 且有效期字段的有效期格式为绝对有效期或增强有 效期的情况下, 将有效期格式经过编码处理转换为相对有效期或抛弃有效期字段, 其 中, 有效期字段为 3GPP短消息协议规定的 TP- VP字段; 第一加入单元 104, 与处理 单元 102耦合, 设置为将已提取的时间信息加入到对有效期字段进行处理后的短消息 尾部; 第二加入单元 106, 设置为在待存储的短消息有效期字段的有效期格式为相对 有效期或待存储短消息不包含有效期字段的情况下, 将时间信息直接加入短消息的尾 部, 其中, 有效期字段为 3GPP短消息协议规定的 TP-VP字段。 本发明实施例提供了一种手机移动终端的短消息处理方法及装置, 该方法包括: 终端在发送完某条短消息或者编辑完某条短消息后, 用户选择将短消息保存在 SIM/USIM卡中, 按照 3GPP标准协议将短消息打包成存储格式, 在短消息数据包的 结尾增加时间戳字段, 将发送时间存储下来, 以便用户对卡上短消息的资料追溯及基 于时间的管理。 从以上的描述中, 可以看出, 本发明实现了如下技术效果: 通过本发明实施例, 采用在待存储的短消息中加入时间信息; 将加入所述时间信 息的短消息存储至终端的 SIM/USIM卡的方法, 解决了相关技术中用户在 SIM/USIM 卡中存储短消息时, 由于协议所规范的用于短消息存储的总字节长度受限, 导致无法 在短消息数据包增加时间信息的问题, 进而在不改变协议所规范的用于短消息存储的 总长度的情况下, 将短消息及其时间信息一并存储到卡中, 便于短消息管理, 提高了 用户体验。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技术人 员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的任何 修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种存储短消息的方法, 包括:
在待存储的短消息中加入时间信息;
将加入所述时间信息的短消息存储至终端的 SIM/USIM卡。
2. 根据权利要求 1所述的方法, 其中, 在待存储的短消息中加入时间信息之前, 还包括:
提取所述时间信息, 其中, 所述时间信息包括以下之一:
所述短消息的编辑时间, 所述短消息的发送时间, 所述终端的当前系统时 间, 所述短消息的发送报告时间, 所述短消息的状态报告时间。
3. 根据权利要求 1所述的方法, 其中, 在待存储的短消息中加入时间信息包括: 如果所述待存储的短消息包含有效期字段, 且有效期字段的有效期格式为 绝对有效期或增强有效期, 则将所述有效期格式经过编码处理转换为相对有效 期或抛弃有效期字段, 其中, 所述有效期字段为 3GPP短信协议规定的 TP-VP 字段;
将已提取的所述时间信息加入到对所述有效期字段进行处理后的短消息尾 部。
4. 根据权利要求 3所述的方法, 其中, 在待存储的短消息中加入时间信息包括: 将绝对有效期或增强有效期占用的 7个字节按照所述 3GPP短信协议进行 编码处理, 转换为占用 1个字节的相对有效期;
将所述时间信息加入到释放的 6个字节中。
5. 根据权利要求 1所述的方法,其中,在待存储的短消息中加入时间信息还包括: 如果所述待存储的短消息有效期字段的有效期格式为相对有效期或所述待 存储短消息不包含有效期字段,则将所述时间信息直接加入所述短消息的尾部, 其中, 所述有效期字段为 3GPP短信协议规定的 TP-VP字段。
6. 根据权利要求 1至 5中任一项所述的方法, 其中, 在将加入所述时间信息的短 消息存储至终端的 SIM/USIM卡之后, 还包括: 当所述 SIM/USIM卡应用于不支持对存储的所述时间信息解码的终端时, 则仅对存储的所述短消息进行解码。
7. 一种存储短消息的装置, 应用于移动终端中, 包括:
加入模块, 设置为在待存储的短消息中加入时间信息;
存储模块, 设置为将加入所述时间信息的短消息存储至终端的 SIM/USIM 卡。
8. 根据权利要求 7所述的装置, 其中, 所述装置还包括: 提取模块, 设置为提取所述时间信息, 其中, 所述时间信息包括以下之一: 所述短消息的编辑时间, 所述短消息的发送时间, 所述终端的当前系统时 间, 所述短消息的发送报告时间, 所述短消息的状态报告时间。
9. 根据权利要求 8所述的装置, 其中, 所述加入模块包括:
处理单元, 设置为在所述待存储的短消息包含有效期字段, 且有效期字段 的有效期格式为绝对有效期或增强有效期的情况下, 将所述有效期格式经过编 码处理转换为相对有效期或抛弃有效期字段, 其中, 所述有效期字段为 3GPP 短信协议规定的 TP-VP字段;
第一加入单元, 设置为将已提取的所述时间信息加入到对所述有效期字段 进行处理后的短消息尾部。
10. 根据权利要求 8所述的装置, 其中, 所述加入模块还包括:
第二加入单元, 设置为在所述待存储的短消息有效期字段的有效期格式为 相对有效期或所述待存储短消息不包含有效期字段的情况下, 将所述时间信息 直接加入所述短消息的尾部, 其中, 所述有效期字段为 3GPP短信协议规定的 TP-VP字段。
PCT/CN2012/072742 2012-02-27 2012-03-21 存储短消息的方法及装置 WO2013127108A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210045920.6 2012-02-27
CN201210045920.6A CN103297936B (zh) 2012-02-27 2012-02-27 存储短消息的方法及装置

Publications (1)

Publication Number Publication Date
WO2013127108A1 true WO2013127108A1 (zh) 2013-09-06

Family

ID=49081561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072742 WO2013127108A1 (zh) 2012-02-27 2012-03-21 存储短消息的方法及装置

Country Status (2)

Country Link
CN (1) CN103297936B (zh)
WO (1) WO2013127108A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9396354B1 (en) 2014-05-28 2016-07-19 Snapchat, Inc. Apparatus and method for automated privacy protection in distributed images
US9537811B2 (en) * 2014-10-02 2017-01-03 Snap Inc. Ephemeral gallery of ephemeral messages
US9113301B1 (en) 2014-06-13 2015-08-18 Snapchat, Inc. Geo-location based event gallery
US10824654B2 (en) 2014-09-18 2020-11-03 Snap Inc. Geolocation-based pictographs
US10284508B1 (en) 2014-10-02 2019-05-07 Snap Inc. Ephemeral gallery of ephemeral messages with opt-in permanence
US9385983B1 (en) 2014-12-19 2016-07-05 Snapchat, Inc. Gallery of messages from individuals with a shared interest
US10311916B2 (en) 2014-12-19 2019-06-04 Snap Inc. Gallery of videos set to an audio time line
KR102035405B1 (ko) 2015-03-18 2019-10-22 스냅 인코포레이티드 지오-펜스 인가 프로비저닝
US10135949B1 (en) 2015-05-05 2018-11-20 Snap Inc. Systems and methods for story and sub-story navigation
US10354425B2 (en) 2015-12-18 2019-07-16 Snap Inc. Method and system for providing context relevant media augmentation
US10582277B2 (en) 2017-03-27 2020-03-03 Snap Inc. Generating a stitched data stream

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949892A (zh) * 2006-10-28 2007-04-18 华为技术有限公司 一种短消息处理中心及方法
CN101072407A (zh) * 2006-05-11 2007-11-14 三星电子株式会社 用于移动通信终端中的时间设置方法与装置
CN101711017A (zh) * 2009-12-04 2010-05-19 太仓市同维电子有限公司 按日期分段显示短信列表的无线宽带客户终端的实现方法
CN101771973A (zh) * 2008-12-29 2010-07-07 中国移动通信集团公司 数据短信的处理方法、设备及系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026121A (zh) * 2009-09-21 2011-04-20 华为技术有限公司 短消息时间转换的方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072407A (zh) * 2006-05-11 2007-11-14 三星电子株式会社 用于移动通信终端中的时间设置方法与装置
CN1949892A (zh) * 2006-10-28 2007-04-18 华为技术有限公司 一种短消息处理中心及方法
CN101771973A (zh) * 2008-12-29 2010-07-07 中国移动通信集团公司 数据短信的处理方法、设备及系统
CN101711017A (zh) * 2009-12-04 2010-05-19 太仓市同维电子有限公司 按日期分段显示短信列表的无线宽带客户终端的实现方法

Also Published As

Publication number Publication date
CN103297936B (zh) 2018-12-04
CN103297936A (zh) 2013-09-11

Similar Documents

Publication Publication Date Title
WO2013127108A1 (zh) 存储短消息的方法及装置
KR100617237B1 (ko) 단문 서비스(sms)를 이용한 멀티미디어 이벤트 발생 방법
US20070198731A1 (en) System and method for processing multimedia messages
US20080037582A1 (en) System and method for message converting
US20120278433A1 (en) Method for transmitting and receiving multimedia information and terminal
CN101621763B (zh) 一种在手机终端显示发送方中文名称的方法和相应的装置
JP2021180510A (ja) 通信装置、通信方法、及びプログラム
US20120278448A1 (en) Method and System for Accessing Microblog, and Method and System for Sending Pictures on Microblog Website
EP2648430B1 (en) Method of receipting for electronic mail, and mobile terminal
WO2012027932A1 (zh) 短信编码解码方法、装置以及终端
WO2014187397A1 (zh) 多媒体消息的发布方法及装置
WO2011116558A1 (zh) 短消息处理方法及终端
CN106817689B (zh) 一种高可靠性的数据订阅及发布方法及系统
US7792520B2 (en) Method of transmitting multimedia message in various service environments
WO2013182079A1 (zh) 一种对短消息进行编码转换的方法及装置
CN101141702B (zh) 一种黑名单簿的短消息上报处理方法及其系统
WO2006066450A1 (fr) Procede d'adaptation destine a la transmission d'un message multimedia entre des terminaux
JP2002051117A (ja) 移動体無線通信端末で情報の記憶を最適化する方法、およびその方法を実装するための端末
CN100407811C (zh) 短消息限制存储的实现方法与系统
CN102598735B (zh) 建立应用会话的方法、设备和相应通知
CN100518231C (zh) 一种利用多媒体短信接收传真的方法
CN103079179A (zh) 一种传输消息的方法及装置
CN101583103A (zh) 一种文本模式短消息的发送或接收方法和装置
CN111263344A (zh) 基于nfc消息传输连接无线局域网的方法、系统及投影设备
CN114172897B (zh) 一种PC端和Android端文件传输方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12869657

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12869657

Country of ref document: EP

Kind code of ref document: A1