WO2017166756A1 - 文本截断、上传方法、装置和电子设备 - Google Patents

文本截断、上传方法、装置和电子设备 Download PDF

Info

Publication number
WO2017166756A1
WO2017166756A1 PCT/CN2016/100282 CN2016100282W WO2017166756A1 WO 2017166756 A1 WO2017166756 A1 WO 2017166756A1 CN 2016100282 W CN2016100282 W CN 2016100282W WO 2017166756 A1 WO2017166756 A1 WO 2017166756A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
truncated
bytes
preset number
uploaded
Prior art date
Application number
PCT/CN2016/100282
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 WO2017166756A1 publication Critical patent/WO2017166756A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a text truncation, uploading method, device, and electronic device.
  • the current solution is to cut the local text into several smaller files and upload them separately.
  • the file can be segmented into 5000 bytes, and the local file is truncated into several smaller files, but the Chinese characters occupy 2 bytes, foreign characters. It takes 1 byte. If it is simple to segment every 5000 bytes, when the Chinese characters occupy the 5000th and 5001th bytes, the truncation in this case will generate garbled characters, which will cause the uploaded text information to be lost.
  • the technical problem to be solved by the present application is to use a fixed preset truncation byte number when truncating text.
  • garbled characters will result in loss of text information.
  • the embodiment of the present application provides a text truncation method, including: determining whether the number of bytes occupied by the text to be truncated is greater than a preset number of truncated bytes; and the number of bytes occupied by the to-be-cut text is greater than the pre- When truncating the number of bytes, converting the text to be truncated into a byte array in the Chinese character encoding character set; intercepting the preset truncated byte number + 1 byte in the converted byte array; The byte array is then converted back to text form; the converted text is truncated from the last text as truncated text.
  • the method further includes: using the remaining text after the truncation as the new text to be truncated, and returning to the determining to occupy the text to be truncated Whether the number of bytes is greater than the number of preset truncated bytes.
  • the embodiment of the present application further provides a text uploading method, including: acquiring a text to be uploaded; using the text truncation method, truncating the to-be-uploaded text into a plurality of truncated texts; and uploading the truncated plurality of truncated texts respectively To the server.
  • the preset number of truncated bytes is set according to a current network condition.
  • the step of cutting the text to be uploaded into a plurality of truncated texts and uploading the truncated pieces of the truncated text to the server respectively is performed synchronously.
  • the embodiment of the present application further provides a text truncating device, including: a judging unit, configured to determine whether the number of bytes occupied by the text to be truncated is greater than a preset number of truncated bytes; and the first converting unit is used for The determining unit determines that the number of bytes occupied by the text to be truncated is greater than the preset number of truncated bytes, and converts the text to be truncated into a byte array in the Chinese character encoding character set; the first intercepting unit is used in the converted The byte array is intercepted by the preset number of truncated bytes + 1 byte; the second conversion unit is configured to convert the truncated byte array back to the text form; and the second intercepting unit is configured to convert back The text intercepts the last text as truncated text.
  • a judging unit configured to determine whether the number of bytes occupied by the text to be truncated
  • the text truncating device further includes: a saving unit, configured to use the remaining text after the truncation as a new text to be truncated, and return to the determining unit to determine whether the number of bytes occupied by the text to be truncated is greater than a preset truncation The number of bytes.
  • a saving unit configured to use the remaining text after the truncation as a new text to be truncated, and return to the determining unit to determine whether the number of bytes occupied by the text to be truncated is greater than a preset truncation The number of bytes.
  • the embodiment of the present application further provides a text uploading, comprising: an obtaining unit, configured to acquire text to be uploaded; a text truncating unit, and using the text truncating device to send the text to be uploaded
  • the truncation is a number of truncated texts
  • the uploading unit is configured to upload the truncated pieces of the truncated text to the server separately.
  • the preset number of truncated bytes is set according to a current network condition.
  • the text truncation unit truncates the to-be-uploaded text into a plurality of truncated texts, and the uploading unit respectively uploads the truncated pieces of truncated text to the server for synchronous execution.
  • An embodiment of the present application further provides an electronic device including at least one processor; and a memory communicably coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor The instruction is executed by the at least one processor to enable the at least one processor to: determine whether the number of bytes occupied by the text to be truncated is greater than a preset number of truncated bytes; when the word to be truncated is occupied by the word When the number of sections is greater than the preset number of truncated bytes, the text to be truncated is converted into a byte array in the Chinese character encoding character set; and the preset truncated bytes are truncated in the converted byte array + 1 word Section; converts the truncated byte array back to text form; truncates the converted text to the last text as truncated text.
  • the text remaining after the truncation is used as a new text to be truncated, and returned to the byte occupied by the text to be truncated. Whether the number is greater than the preset number of truncated bytes.
  • An embodiment of the present application further provides an electronic device including at least one processor; and a memory communicably coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor The instruction is executed by the at least one processor, so that the at least one processor can: acquire text to be uploaded; use the text truncation method to cut off the text to be uploaded into a number of truncated texts; The plurality of truncated texts are uploaded to the server respectively.
  • the preset number of truncated bytes is set according to current network conditions.
  • the step of cutting the text to be uploaded into a plurality of truncated texts and uploading the truncated pieces of the truncated text to the server respectively is performed synchronously.
  • the embodiment of the present application further provides a non-volatile computer storage medium storing the computer-executable instructions of the computer-executable instructions, when executed by the electronic device, enabling the electronic device to: determine the text to be truncated Whether the number of bytes occupied is greater than the preset truncation byte a number; when the number of bytes occupied by the to-be-cut text is greater than the preset number of truncated bytes, converting the text to be truncated into a byte array in the Chinese character encoding character set; intercepting the converted byte array The preset number of truncated bytes is +1 byte; the truncated byte array is converted back to text form; the converted text is truncated from the last text as truncated text.
  • the text remaining after the truncation is used as a new text to be truncated, and returned to the byte occupied by the text to be truncated. Whether the number is greater than the preset number of truncated bytes.
  • the embodiment of the present application further provides a non-volatile computer storage medium, the storage medium storing the computer-executable instructions of the computer-executable instructions, when executed by the electronic device, enabling the electronic device to: acquire the text to be uploaded Using the text truncation method described above, the text to be uploaded is truncated into a number of truncated texts; and the truncated texts are respectively uploaded to the server.
  • the preset number of truncated bytes is set according to current network conditions.
  • the step of cutting the text to be uploaded into a plurality of truncated texts and uploading the truncated pieces of the truncated text to the server respectively is performed synchronously.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer When the computer is caused to perform any of the above methods.
  • the text truncation method, apparatus, and electronic device and storage medium provided by the embodiments of the present application can quickly and efficiently cut a text into small texts occupying a number of characters equal to or slightly smaller than a preset number of truncated bytes, and Garbled.
  • the text uploading method and device, the electronic device and the storage medium provided by the embodiments of the present application are respectively uploaded to the server by cutting off the text to be uploaded into a plurality of small texts, thereby avoiding the situation that the uploading of large text is easily interrupted when the network is unstable, and the situation is alleviated.
  • the burden on the server is reduced.
  • FIG. 1 shows a flow chart of a text truncation method according to an embodiment of the present application
  • FIG. 2 shows a flow chart of a text uploading method according to an embodiment of the present application
  • FIG. 3 shows a schematic diagram of a text truncating device according to an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a text uploading apparatus according to an embodiment of the present application
  • FIG. 5 is a schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application.
  • FIG. 6 is a block diagram showing the hardware structure of another electronic device according to an embodiment of the present application.
  • connection should be understood broadly.
  • it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; Connected, can also be indirectly connected through an intermediate medium, or can be internal communication between two components, either a wireless connection or a wired connection.
  • the specific meanings of the above terms in the present application can be understood in the specific circumstances for those skilled in the art.
  • the embodiment of the present application provides a text truncation method. As shown in FIG. 1 , the method includes the following steps:
  • step S11 determining whether the number of bytes occupied by the text to be truncated is greater than a preset number of truncated bytes, and when the number of bytes occupied by the text to be truncated is less than or equal to the number of preset truncated bytes, no truncation is required, and the truncation ends;
  • the process proceeds to step S12.
  • the text includes Chinese characters and foreign characters, wherein Chinese characters occupy 2 bytes, and foreign characters occupy 1 byte.
  • the characters in the Chinese character coded character set may be, for example, Chinese or foreign characters conforming to the GB2312 standard.
  • the preset truncated byte number + 1 byte is intercepted in the converted byte array. For example, if the preset number of truncated bytes is 5000, then 5001 bytes are truncated.
  • the converted text is truncated from the last text as truncated text.
  • the last text is a foreign character that occupies 1 byte. At this time, the last text is truncated. After the word, the resulting truncated text occupies 5000 bytes;
  • the last character is a character that should be combined with the 5002th byte to form a Chinese character.
  • the obtained truncated text occupies 5000 bytes;
  • the last character is a Chinese character that occupies 2 bytes.
  • the resulting truncated text occupies 4999 bytes.
  • the truncation does not generate garbled characters, and the truncated text can be guaranteed to be equal to or slightly smaller than the preset truncated bytes.
  • step S16 the remaining text is taken as the new text to be truncated, and the process returns to step S11, so as to continue to determine whether the number of bytes occupied by the new text to be truncated is greater than the preset number of truncated bytes, and when it is greater, continue to follow step S12. -S16 performs truncation until the number of bytes occupied by the text to be truncated is less than or equal to the preset number of truncated bytes.
  • a text can be quickly and efficiently truncated into a small number of small characters occupying a number of characters substantially equal to the preset number of truncated bytes without garbled characters.
  • the embodiment of the present application further provides a text uploading method. As shown in FIG. 2, the method includes the following steps:
  • the text includes Chinese characters and English characters, wherein Chinese characters occupy 2 bytes, and English characters occupy 1 byte.
  • the text to be uploaded may be truncated into a number of small texts using the text truncation method described above.
  • the preset number of truncated bytes may be preset by the user terminal, or may be set by the user according to the current network condition. For example, when the network condition is good, the preset truncated bytes may be set larger. When the network condition is poor, you can set the preset number of truncated bytes to be smaller.
  • steps S22 and S23 can be performed simultaneously, completing one After the truncation of the truncated text, the truncated text is uploaded, without waiting for the truncation to complete before uploading.
  • the embodiment of the present application further provides a text truncating device.
  • the device includes:
  • the determining unit 31 is configured to determine whether the number of bytes occupied by the text to be truncated is greater than a preset number of truncated bytes. When the number of bytes occupied by the text to be truncated is less than or equal to the preset number of truncated bytes, no truncation is required.
  • the text includes Chinese characters and foreign characters, wherein Chinese characters occupy 2 bytes, and foreign characters occupy 1 byte.
  • the first converting unit 32 is configured to convert the to-be-intercepted text into a byte array in the Chinese character encoding character set when the determining unit 31 determines that the number of bytes occupied by the text to be truncated is greater than the preset number of truncated bytes.
  • the characters in the Chinese character coded character set may be, for example, Chinese or foreign characters conforming to the GB2312 standard.
  • the first intercepting unit 33 is configured to intercept the preset truncated byte number + 1 byte in the converted byte array. For example, if the preset number of truncated bytes is 5000, then 5001 bytes are truncated.
  • the second converting unit 34 is configured to convert the truncated byte array back to the text form.
  • the second intercepting unit 35 is configured to intercept the converted text as the truncated text.
  • a text can be quickly and efficiently truncated into a small number of small characters occupying a number of characters substantially equal to the preset number of truncated bytes without garbled characters.
  • the text truncating device may further include:
  • the saving unit 36 is configured to use the text remaining after the truncation as the new text to be truncated, and return to the determining unit 31 to determine whether the number of bytes occupied by the text to be truncated is greater than the preset number of truncated bytes.
  • the truncated text can be continuously truncated until the number of bytes occupied by the text to be truncated is less than or equal to the preset number of truncated bytes, so that a text can be quickly and efficiently truncated to a number of occupied characters substantially equal to the preset truncation. Small text in bytes without garbled characters.
  • the embodiment of the present application further provides a text uploading device. As shown in FIG. 4, the device includes:
  • the obtaining unit 41 is configured to obtain text to be uploaded.
  • the text includes Chinese characters and English characters, wherein Chinese characters occupy 2 bytes, and English characters occupy 1 byte.
  • the text truncating unit 42 is configured to cut off the text to be uploaded into a number of truncated texts.
  • the text to be uploaded may be truncated into a number of small texts using the text truncation device described above.
  • the preset number of truncated bytes may be preset by the user terminal, or may be set by the user according to the current network condition. For example, when the network condition is good, the preset truncated bytes may be set larger. When the network condition is poor, you can set the preset number of truncated bytes to be smaller.
  • the uploading unit 43 is configured to upload the truncated pieces of truncated text to the server respectively.
  • the truncated text is uploaded to the server in sequence.
  • the text truncation unit 42 truncates the text to be uploaded into a number of truncated texts, and the uploading unit 43 uploads the truncated pieces of the truncated text to the server for synchronous execution, and starts to upload the truncated text after completing the truncation of a truncated text. Without having to wait for the truncation to complete before uploading.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 5, including at least one processor 810; and a memory 800 communicably connected to the at least one processor 810; wherein the memory 800 is stored
  • An instruction executed by the at least one processor 810 the instruction being executed by the at least one processor 810 to enable the at least one processor 810 to: determine whether the number of bytes occupied by the text to be truncated is greater than a preset truncation a number of bytes; when the number of bytes occupied by the to-be-cut text is greater than the preset number of truncated bytes, the text to be truncated is converted into a byte array in the Chinese character encoding character set; in the converted byte array Intercepting the preset number of truncated bytes + 1 byte; converting the truncated byte array back to text form; and intercepting the converted text as the truncated text.
  • the electronic device also includes an input device 830 and
  • the text remaining after the truncation is used as a new text to be truncated, and returned to the byte occupied by the text to be truncated. Whether the number is greater than the preset number of truncated bytes.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 6, including at least one processor 910; and a memory 900 communicably connected to the at least one processor 910; wherein the memory 900 is stored
  • An instruction executed by the at least one processor 910 the instructions being executed by the at least one processor 910 to enable the at least one processor 910 to: acquire text to be uploaded; using the text truncation method described above,
  • the file to be uploaded is truncated into a number of truncated texts; the truncated texts are respectively uploaded to the server.
  • the electronic device also includes an input device 930 and an output device 940 that are electrically coupled to the memory 900 and the processor, the electrical connections preferably being connected by a bus.
  • the preset number of truncated bytes is set according to current network conditions.
  • the step of cutting the text to be uploaded into a plurality of truncated texts and uploading the truncated pieces of the truncated text to the server respectively is performed synchronously.
  • the embodiment of the present application further provides a non-volatile computer storage medium storing the computer-executable instructions of the computer-executable instructions, when executed by the electronic device, enabling the electronic device to: determine the text to be truncated Whether the number of occupied bytes is greater than a preset number of truncated bytes; when the number of bytes occupied by the to-be-cut text is greater than the preset number of truncated bytes, the text to be truncated is converted into a byte in the Chinese character encoding character set Array; intercepting the preset truncated byte number + 1 byte in the converted byte array; converting the intercepted byte array back to text form; truncating the converted text to the last character as truncation text.
  • the text remaining after the truncation is used as a new text to be truncated, and returned to the byte occupied by the text to be truncated. Whether the number is greater than the preset number of truncated bytes.
  • the embodiment of the present application further provides a non-volatile computer storage medium, the storage medium storing the computer-executable instructions of the computer-executable instructions, when executed by the electronic device, enabling the electronic device to: acquire the text to be uploaded Using the text truncation method described above, the text to be uploaded is truncated into a number of truncated texts; and the truncated texts are respectively uploaded to the server.
  • the preset number of truncated bytes is set according to current network conditions.
  • the text to be uploaded is truncated into a number of truncated texts and the truncated text
  • the steps of uploading some truncated text to the server are performed synchronously.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer When the computer is caused to perform any of the above methods.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种文本截断、上传方法、装置和电子设备,涉及计算机技术领域,其中所述文本截断方法包括:判断待截断文本占用的字节数是否大于预设截断字节数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。由此,可以快速、高效地将一个文本截断为若干占用字符数等于或略小于预设截断字节数的小文本,且不会产生乱码。

Description

文本截断、上传方法、装置和电子设备
交叉引用
本申请为在2016年04月01日提交中国专利局、申请号为201610202824.6、发明名称为“文本截断、上传方法和装置”的中国专利申请的继续申请,本申请要求在2016年04月01日提交中国专利局、申请号为201610202824.6、发明名称为“文本截断、上传方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,具体涉及一种文本截断、上传方法、装置和电子设备。
背景技术
在互联网时代,人们习惯将本地上编辑的文本上传到服务器上备份,以避免文本丢失。然而,当本地上的文本字节数太多的时候,当将文本上传到服务器的时候会花费更多的上传时间,但是网络可能会出现不稳定的情况,特别是对于移动终端利用移动网络上传文本的时候,这种网络不稳定的情况会更加严重,如果中间上传中断,还需要重新进行上传,这样会加重服务器的负担。
目前的一种解决办法是将本地文本截断为若干较小文件后分别上传,例如可以以5000字节分段,将本地文件截断为若干较小文件,但是中文字符占用2个字节,外文字符占用1个字节,如果简单以每5000字节分段,当中文字符占用第5000和第5001字节时,这种情况下截断会产生乱码,从而会使上传文本信息丢失。
发明内容
本申请要解决的技术问题在于在截断文本时采用固定预设截断字节数 进行截断时会产生乱码,会使文本信息丢失。
为此,本申请实施例提供了一种文本截断方法,包括:判断待截断文本占用的字节数是否大于预设截断字节数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。
优选地,所述方法在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
本申请实施例还提供了一种文本上传方法,包括:获取待上传文本;利用上述的文本截断方法,将所述待上传文本截断为若干截断文本;将截断后的所述若干截断文本分别上传至服务器。
优选地,所述预设截断字节数根据当前网络状况设定。
优选地,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
相应地,本申请实施例还提供了一种文本截断装置,包括:判断单元,用于判断待截断文本占用的字节数是否大于预设截断字节数;第一转换单元,用于当所述判断单元判断待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;第一截取单元,用于在所转换的字节数组中截取所述预设截断字节数+1个字节;第二转换单元,用于将所截取的字节数组再转换回文本形式;第二截取单元,用于将转换回的文本截取掉最后一个文字作为截断文本。
优选地,所述文本截断装置还包括:保存单元,用于将截断后剩余的文本作为新的待截断文本,并返回至所述判断单元判断待截断文本占用的字节数是否大于预设截断字节数。
本申请实施例还提供了一种文本上传置,包括:获取单元,用于获取待上传文本;文本截断单元,利用上述文本截断装置,将所述待上传文本 截断为若干截断文本;上传单元,用于将截断后的所述若干截断文本分别上传至服务器。
优选地,所述预设截断字节数根据当前网络状况设定。
优选地,所述文本截断单元将所述待上传文本截断为若干截断文本和所述上传单元将截断后的若干截断文本分别上传至服务器同步执行,
本申请实施例还提供了一种电子设备,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:判断待截断文本占用的字节数是否大于预设截断字节数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。
优先地,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
本申请实施例还提供了一种电子设备,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取待上传文本;利用上述的文本截断方法,将所述待上传文本截断为若干截断文本;将截断后的所述若干截断文本分别上传至服务器。
优先地,所述预设截断字节数根据当前网络状况设定。
优先地,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:判断待截断文本占用的字节数是否大于预设截断字节 数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。
优先地,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:获取待上传文本;利用上述的文本截断方法,将所述待上传文本截断为若干截断文本;将截断后的所述若干截断文本分别上传至服务器。
优先地,所述预设截断字节数根据当前网络状况设定。
优先地,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一方法。
本申请实施例所提供的文本截断方法、装置和电子设备及存储介质,可以快速、高效地将一个文本截断为若干占用字符数等于或略小于预设截断字节数的小文本,且不会产生乱码。
本申请实施例所提供的文本上传方法、装置和电子设备及存储介质,通过将待上传文本截断为若干小文本分别上传至服务器,避免了网络不稳定时上传大文本易中断的情形,减轻了服务器的负担。
附图说明
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下 面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了根据本申请实施例的文本截断方法的流程图;
图2示出了根据本申请实施例的文本上传方法的流程图;
图3示出了根据本申请实施例的文本截断装置的示意图;
图4示出了根据本申请实施例的文本上传装置的示意图;
图5示出了根据本申请实施例的一个电子设备的硬件结构示意图;
图6示出了根据本申请实施例的另一个电子设备的硬件结构示意图。
具体实施方式
下面将结合附图对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术 语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,还可以是两个元件内部的连通,可以是无线连接,也可以是有线连接。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。
此外,下面所描述的本申请不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
本申请实施例提供了一种文本截断方法,如图1所示,该方法包括如下步骤:
S11.判断待截断文本占用的字节数是否大于预设截断字节数,当待截断文本占用的字节数小于或等于预设截断字节数时,则无需进行截断,截断结束;当待截断文本占用的字节数大于预设截断字节数时,则进入步骤S12。在这里,该文本包括中文字符和外文字符,其中中文字符占用2个字节,外文字符占用1个字节。
S12.将待截断文本转换为汉字编码字符集内的字节数组。在这里,汉字编码字符集内的字符例如可以是符合GB2312标准的中文或外文字符。
S13.在所转换的字节数组中截取预设截断字节数+1个字节。例如,预设截断字节数为5000,则截取5001个字节。
S14.将所截取的字节数组再转换回文本形式。
S15.将转换回的文本截取掉最后一个文字作为截断文本。
S16.将截断后剩余的文本作为新的待截断文本,并返回至步骤S11。
下面将详细说明本申请实施例的文本截断方法的原理。还是以预设截断字节数为5000为例,当从所转换的汉字编码字符集内的字节数组中截取5001个字节时,并将其再转换回文本形式后,最后一个文字存在如下三种情况:
1)最后一个文字是占用1个字节的外文字符,这时截取掉最后一个文 字后,所得到的截断文本占用5000个字节;
2)最后一个文字是本应与第5002个字节共同组成一个汉字的字符,这时截取掉最后一个文字后,所得到的截断文本占用5000个字节;
3)最后一个文字是占用2个字节的中文字符,这时截取掉最后一个文字后,所得到的截断文本占用4999个字节;
由此,可以保证截断不会产生乱码,且能保证截断文本等于或略小于预设截断字节数。
在步骤S16中,将剩余文本作为新的待截断文本,并返回至步骤S11,从而继续判断新的待截断文本占用的字节数是否大于预设截断字节数,当大于时继续按照步骤S12-S16进行截断,直至待截断文本占用的字节数小于或等于预设截断字节数。
通过上述方法步骤,可以快速、高效地将一个文本截断为若干占用字符数基本上等于预设截断字节数的小文本,且不会产生乱码。
本申请实施例还提供了一种文本上传方法,如图2所示,该方法包括如下步骤:
S21.获取待上传文本。在这里,该文本包括中文字符和英文字符,其中中文字符占用2个字节,英文字符占用1个字节。
S22.将待上传文本截断为若干截断文本。例如,可以采用上文中所述的文本截断方法,将待上传文本截断为若干小文本。在这里,预设截断字节数可以是用户终端出厂预设的,也可以由用户根据当前网络状况设定,例如,当网络状况较好时,可以将预设截断字节数设置得较大,当网络状况较差时,可以将预设截断字节数设置得较小。
S23.将截断后的若干截断文本分别上传至服务器。优选地,截断文本按序分别上传至服务器。
通过上述方法步骤,通过将待上传文本截断为若干小文本分别上传至服务器,避免了网络不稳定时上传大文本易中断的情形,减轻了服务器的负担。
为了进一步提升效率,上述步骤S22和S23可以同步执行,既完成一 个截断文本的截断后就开始上传该截断文本,而无需等待截断完成后再进行上传。
相应地,本申请实施例还提供了一种文本截断装置,如图3所示,该装置包括:
判断单元31,用于判断待截断文本占用的字节数是否大于预设截断字节数,当待截断文本占用的字节数小于或等于预设截断字节数时,则无需进行截断。在这里,该文本包括中文字符和外文字符,其中中文字符占用2个字节,外文字符占用1个字节。
第一转换单元32,用于当判断单元31判断待截断文本占用的字节数大于预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组。在这里,汉字编码字符集内的字符例如可以是符合GB2312标准的中文或外文字符。
第一截取单元33,用于在所转换的字节数组中截取预设截断字节数+1个字节。例如,预设截断字节数为5000,则截取5001个字节。
第二转换单元34,用于将所截取的字节数组再转换回文本形式。
第二截取单元35,用于将转换回的文本截取掉最后一个文字作为截断文本。
通过上述各个单元,可以快速、高效地将一个文本截断为若干占用字符数基本上等于预设截断字节数的小文本,且不会产生乱码。
优选地,上述文本截断装置还可以包括:
保存单元36,用于将截断后剩余的文本作为新的待截断文本,并返回至判断单元31判断待截断文本占用的字节数是否大于预设截断字节数。
由此可以继续对待截断文本进行截断,直至待截断文本占用的字节数小于或等于预设截断字节数,从而可以快速、高效地将一个文本截断为若干占用字符数基本上等于预设截断字节数的小文本,且不会产生乱码。
本申请实施例还提供了一种文本上传装置,如图4所示,该装置包括:
获取单元41,用于获取待上传文本。在这里,该文本包括中文字符和英文字符,其中中文字符占用2个字节,英文字符占用1个字节。
文本截断单元42,用于将待上传文本截断为若干截断文本。例如,可以采用上文中所述的文本截断装置,将待上传文本截断为若干小文本。在这里,预设截断字节数可以是用户终端出厂预设的,也可以由用户根据当前网络状况设定,例如,当网络状况较好时,可以将预设截断字节数设置得较大,当网络状况较差时,可以将预设截断字节数设置得较小。
上传单元43,用于将截断后的若干截断文本分别上传至服务器。优选地,截断文本按序分别上传至服务器。
通过上述各个单元,通过将待上传文本截断为若干小文本分别上传至服务器,避免了网络不稳定时上传大文本易中断的情形,减轻了服务器的负担。
为了进一步提升效率,文本截断单元42将待上传文本截断为若干截断文本和上传单元43将截断后的若干截断文本分别上传至服务器同步执行,既完成一个截断文本的截断后就开始上传该截断文本,而无需等待截断完成后再进行上传。
本申请实施例还提供了一种电子设备,如图5所示,包括至少一个处理器810;以及,与所述至少一个处理器810通信连接的存储器800;其中,所述存储器800存储有可被所述至少一个处理器810执行的指令,所述指令被所述至少一个处理器810执行,以使所述至少一个处理器810能够:判断待截断文本占用的字节数是否大于预设截断字节数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。所述电子设备还包括与所述存储器800和所述处理器电连接的输入装置830和输出装置840,所述电连接优选为通过总线连接。
优先地,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
本申请实施例还提供了一种电子设备,如图6所示,包括至少一个处理器910;以及,与所述至少一个处理器910通信连接的存储器900;其中,所述存储器900存储有可被所述至少一个处理器910执行的指令,所述指令被所述至少一个处理器910执行,以使所述至少一个处理器910能够:获取待上传文本;利用上述的文本截断方法,将所述待上传文本截断为若干截断文本;将截断后的所述若干截断文本分别上传至服务器。所述电子设备还包括与所述存储器900和所述处理器电连接的输入装置930和输出装置940,所述电连接优选为通过总线连接。
优先地,所述预设截断字节数根据当前网络状况设定。
优先地,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:判断待截断文本占用的字节数是否大于预设截断字节数;当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;在所转换的字节数组中截取所述预设截断字节数+1个字节;将所截取的字节数组再转换回文本形式;将转换回的文本截取掉最后一个文字作为截断文本。
优先地,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:获取待上传文本;利用上述的文本截断方法,将所述待上传文本截断为若干截断文本;将截断后的所述若干截断文本分别上传至服务器。
优先地,所述预设截断字节数根据当前网络状况设定。
优先地,所述将所述待上传文本截断为若干截断文本和所述将截断后 的若干截断文本分别上传至服务器的步骤同步执行。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一方法。
本领域内的技术人员还应理解,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的,应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
虽然结合附图描述了本申请的实施方式,但是本领域技术人员可以在不脱离本申请的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。

Claims (21)

  1. 一种文本截断方法,其特征在于,包括:
    判断待截断文本占用的字节数是否大于预设截断字节数;
    当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;
    在所转换的字节数组中截取所述预设截断字节数+1个字节;
    将所截取的字节数组再转换回文本形式;
    将转换回的文本截取掉最后一个文字作为截断文本。
  2. 根据权利要求1所述的文本截断方法,其特征在于,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还包括:
    将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
  3. 一种文本上传方法,其特征在于,包括:
    获取待上传文本;
    利用权利要求1或2所述的文本截断方法,将所述待上传文本截断为若干截断文本;
    将截断后的所述若干截断文本分别上传至服务器。
  4. 根据权利要求3所述的文本上传方法,其特征在于,所述预设截断字节数根据当前网络状况设定。
  5. 根据权利要求3或4所述的文本上传方法,其特征在于,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
  6. 一种文本截断装置,其特征在于,包括:
    判断单元,用于判断待截断文本占用的字节数是否大于预设截断字节数;
    第一转换单元,用于当所述判断单元判断待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;
    第一截取单元,用于在所转换的字节数组中截取所述预设截断字节数+1个字节;
    第二转换单元,用于将所截取的字节数组再转换回文本形式;
    第二截取单元,用于将转换回的文本截取掉最后一个文字作为截断文本。
  7. 根据权利要求6所述的文本截断装置,其特征在于,还包括:
    保存单元,用于将截断后剩余的文本作为新的待截断文本,并返回至所述判断单元判断待截断文本占用的字节数是否大于预设截断字节数。
  8. 一种文本上传装置,其特征在于,包括:
    获取单元,用于获取待上传文本;
    文本截断单元,利用权利要求6或7所述的文本截断装置,将所述待上传文本截断为若干截断文本;
    上传单元,用于将截断后的所述若干截断文本分别上传至服务器。
  9. 根据权利要求8所述的文本上传传置,其特征在于,所述预设截断字节数根据当前网络状况设定。
  10. 根据权利要求8或9所述的文本上传装置,其特征在于,所述文本截断单元将所述待上传文本截断为若干截断文本和所述上传单元将截断后的若干截断文本分别上传至服务器同步执行。
  11. 一种电子设备,其特征在于,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    判断待截断文本占用的字节数是否大于预设截断字节数;
    当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截断文本转换为汉字编码字符集内的字节数组;
    在所转换的字节数组中截取所述预设截断字节数+1个字节;
    将所截取的字节数组再转换回文本形式;
    将转换回的文本截取掉最后一个文字作为截断文本。
  12. 根据权利要求11所述的电子设备,其特征在于,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,使所述至少一个处理器还能够:
    将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
  13. 一种电子设备,其特征在于,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    获取待上传文本;
    利用权利要求1或2所述的文本截断方法,将所述待上传文本截断为若干截断文本;
    将截断后的所述若干截断文本分别上传至服务器。
  14. 根据权利要求13所述的电子设备,其特征在于,所述预设截断字节数根据当前网络状况设定。
  15. 根据权利要求13或14所述的电子设备,其特征在于,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
  16. 一种非易失性计算机存储介质,其特征在于:所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:
    判断待截断文本占用的字节数是否大于预设截断字节数;
    当所述待截断文本占用的字节数大于所述预设截断字节数时,将待截 断文本转换为汉字编码字符集内的字节数组;
    在所转换的字节数组中截取所述预设截断字节数+1个字节;
    将所截取的字节数组再转换回文本形式;
    将转换回的文本截取掉最后一个文字作为截断文本。
  17. 根据权利要求16所述的存储介质,其特征在于,在所述将转换回的文本截取掉最后一个文字作为截断文本之后,还使得电子设备还能够:
    将截断后剩余的文本作为新的待截断文本,并返回至所述判断待截断文本占用的字节数是否大于预设截断字节数的步骤。
  18. 一种非易失性计算机存储介质,其特征在于:所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:
    获取待上传文本;
    利用权利要求1或2所述的文本截断方法,将所述待上传文本截断为若干截断文本;
    将截断后的所述若干截断文本分别上传至服务器。
  19. 根据权利要求18所述的存储介质,其特征在于,所述预设截断字节数根据当前网络状况设定。
  20. 根据权利要求18或19所述的存储介质,其特征在于,所述将所述待上传文本截断为若干截断文本和所述将截断后的若干截断文本分别上传至服务器的步骤同步执行。
  21. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行上述任一权利要求所述的方法。
PCT/CN2016/100282 2016-04-01 2016-09-27 文本截断、上传方法、装置和电子设备 WO2017166756A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610202824.6 2016-04-01
CN201610202824.6A CN105897875A (zh) 2016-04-01 2016-04-01 文本截断、上传方法和装置

Publications (1)

Publication Number Publication Date
WO2017166756A1 true WO2017166756A1 (zh) 2017-10-05

Family

ID=57011847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100282 WO2017166756A1 (zh) 2016-04-01 2016-09-27 文本截断、上传方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN105897875A (zh)
WO (1) WO2017166756A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400998A (zh) * 2020-03-09 2020-07-10 北京字节跳动网络技术有限公司 一种文本的显示方法、装置、电子设备及可读存储介质
CN112861045A (zh) * 2021-02-20 2021-05-28 北京金山云网络技术有限公司 文案的显示方法和装置、存储介质、电子装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897875A (zh) * 2016-04-01 2016-08-24 乐视控股(北京)有限公司 文本截断、上传方法和装置
CN110598205B (zh) * 2019-08-12 2021-08-17 大箴(杭州)科技有限公司 一种截断文本的拼接方法、装置及计算机存储介质
CN116069420A (zh) * 2021-11-04 2023-05-05 北京字跳网络技术有限公司 一种文本显示方法、装置、设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063362A (zh) * 2013-07-18 2014-09-24 腾讯科技(深圳)有限公司 一种字符串截断方法及装置
CN105897875A (zh) * 2016-04-01 2016-08-24 乐视控股(北京)有限公司 文本截断、上传方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090089383A1 (en) * 2007-09-30 2009-04-02 Tsuen Wan Ngan System and method for detecting content similarity within emails documents employing selective truncation
CN103488617A (zh) * 2012-06-11 2014-01-01 北京新媒传信科技有限公司 一种数据截取的方法和装置
CN104424337B (zh) * 2013-09-11 2018-03-06 北大方正集团有限公司 文档分割系统和文档分割方法
CN105915586A (zh) * 2016-04-01 2016-08-31 乐视控股(北京)有限公司 文本上传、同步方法和装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063362A (zh) * 2013-07-18 2014-09-24 腾讯科技(深圳)有限公司 一种字符串截断方法及装置
CN105897875A (zh) * 2016-04-01 2016-08-24 乐视控股(北京)有限公司 文本截断、上传方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400998A (zh) * 2020-03-09 2020-07-10 北京字节跳动网络技术有限公司 一种文本的显示方法、装置、电子设备及可读存储介质
CN111400998B (zh) * 2020-03-09 2023-09-26 北京字节跳动网络技术有限公司 一种文本的显示方法、装置、电子设备及可读存储介质
CN112861045A (zh) * 2021-02-20 2021-05-28 北京金山云网络技术有限公司 文案的显示方法和装置、存储介质、电子装置

Also Published As

Publication number Publication date
CN105897875A (zh) 2016-08-24

Similar Documents

Publication Publication Date Title
WO2017166756A1 (zh) 文本截断、上传方法、装置和电子设备
US11582284B2 (en) Optimization of publication of an application to a web browser
US10423660B1 (en) System for detecting non-synchronization between audio and subtitle
KR101767719B1 (ko) 정보표시방법과 장치, 프로그램 및 저장매체
US20230118489A1 (en) Network-Assisted Consensus Protocol
US11374995B2 (en) Multimedia file processing
WO2014123564A1 (en) Cloud-based streaming data receiver and persister
WO2016155635A1 (zh) 一种数据处理方法和设备
US11675744B2 (en) Performing a code conversion in a smaller target encoding space
CN112948340A (zh) 数据同步方法、装置、电子设备及可读存储介质
JP7448672B2 (ja) 情報処理方法、システム、装置、電子機器及び記憶媒体
US8996645B2 (en) Transmitting data by means of storage area network
WO2018049933A1 (zh) 数据迁移方法及相关产品
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
CN114675965B (zh) 联邦学习方法、装置、设备和介质
US9442720B2 (en) Adding on-the-fly comments to code
EP3163469B1 (en) Method and device for realizing ip disk file storage
JP2022091686A (ja) データ注釈方法、装置、電子機器および記憶媒体
WO2018014761A1 (zh) 数据处理方法及装置
US10992785B2 (en) Managing edits of content items
US20150249749A1 (en) Terminal apparatus, information processing system, and information transmission method
US20180314710A1 (en) Flattened document database with compression and concurrency
US11366613B2 (en) Method and apparatus for writing data
JP2015115652A (ja) 情報処理装置、情報処理方法及びプログラム
US11036468B2 (en) Human-computer interface for navigating a presentation file

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16896526

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896526

Country of ref document: EP

Kind code of ref document: A1