CN111131376A - Image segmentation transmission method, system, terminal and server under extreme network environment - Google Patents

Image segmentation transmission method, system, terminal and server under extreme network environment Download PDF

Info

Publication number
CN111131376A
CN111131376A CN201911008576.1A CN201911008576A CN111131376A CN 111131376 A CN111131376 A CN 111131376A CN 201911008576 A CN201911008576 A CN 201911008576A CN 111131376 A CN111131376 A CN 111131376A
Authority
CN
China
Prior art keywords
picture
character strings
splitting
segmented
character string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911008576.1A
Other languages
Chinese (zh)
Inventor
贾俊强
苟亮
马占军
王平
薛高倩
买合布拜
马倩
迪力尼亚·迪力夏提
朱帕尔·努尔兰
文云
王晓玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Information and Telecommunication Branch of State Grid Xinjiang Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Information and Telecommunication Branch of State Grid Xinjiang Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Information and Telecommunication Branch of State Grid Xinjiang Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201911008576.1A priority Critical patent/CN111131376A/en
Publication of CN111131376A publication Critical patent/CN111131376A/en
Pending legal-status Critical Current

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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • 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]

Landscapes

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

Abstract

The invention relates to the technical field of picture transmission, in particular to a picture segmentation transmission method, a system, a terminal and a server under an extreme network environment, which comprises the following steps: converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture; presetting segmentation character string splitting length, sequentially splitting a long character string into a plurality of segments of segmentation character strings, and generating splitting sequence identifiers according to the splitting sequence of the segmentation character strings; establishing a network request, and uploading a picture identifier, a splitting sequence identifier and all the segmented character strings to a server according to the splitting sequence of the segmented character strings; the server judges whether all the segmented character strings are acquired or not, and restores the long character strings; and decoding and converting the long character string into the original picture. According to the invention, the picture file is transcoded and then split, and then the network requests to send the request and the request is restored in the server, so that the success rate and the transmission stability of picture uploading can be effectively ensured under an extreme network environment, and better network experience is brought to users.

Description

Image segmentation transmission method, system, terminal and server under extreme network environment
Technical Field
The invention relates to the technical field of picture transmission, in particular to a picture segmentation transmission method, a system, a terminal and a server under an extreme network environment.
Background
With the continuous development of information technology and the continuous enhancement of social demand, the development of information industry is changing day by day, and there are higher requirements on the quality, high speed and accuracy of communication transmission, the explosion development of mobile application enables people to work and upload field pictures at any time and any place through mobile software, which all need wireless network to perform communication transmission, more working scenes need to be completed by uploading pictures, and when the communication signal is poor, unexpected interruption occurs, the network security policy does not allow the use of file stream mode transmission, and the data request length is limited, the uploading of files such as pictures and the like is limited, or the picture with larger volume cannot be successfully uploaded.
Disclosure of Invention
The invention provides a picture segmentation transmission method in an extreme network environment, overcomes the defects of the prior art, and can effectively solve the problems that the picture is difficult to upload and is difficult to succeed when the network is poor or the data request length is limited in the prior art.
One of the technical schemes of the invention is realized by the following measures: a picture segmentation transmission method under an extreme network environment comprises the following steps:
converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture;
presetting segmentation character string splitting length, sequentially splitting a long character string into a plurality of segments of segmentation character strings according to the splitting length, and generating splitting sequence identification according to the splitting sequence of the segmentation character strings;
establishing a network request, and uploading a picture identifier, a splitting sequence identifier and all the segmented character strings to a server according to the splitting sequence of the segmented character strings;
the server judges whether all the segmented character strings are acquired or not, and if so, all the segmented character strings are spliced according to the splitting sequence identification to restore the long character string;
and decoding and converting the long character string into the original picture.
The following is further optimization or/and improvement of the technical scheme of the invention:
the server determines whether to acquire all the segmented character strings, and specifically includes:
after receiving each network request, the server judges whether the splitting sequence identification is consistent with the number of the received segmented character strings;
and in response to the coincidence, the server judges that the current network request is the last request, namely all the segmented character strings are acquired, and in response to the coincidence, the segmented character strings are stored.
When the network request is established and the picture identifier, the splitting order identifier and all the segmented character strings are uploaded to the server according to the splitting order of the segmented character strings, the network request specifically comprises the following steps:
establishing a cyclic network request, wherein the number of the cyclic times is the same as the number of the segmented character strings;
according to the splitting sequence of the segmented character strings, uploading picture identification, splitting sequence identification and corresponding segmented character strings to a server in each network request;
and if the uploading fails, the current data is uploaded again, and if the uploading succeeds, the new data is continuously uploaded.
The pictures are converted into long character strings through the Base64 coding mode.
The long character string is converted into the original picture by the Base64 coding mode
The second technical scheme of the invention is realized by the following measures: a picture segmentation transmission system under an extreme network environment comprises a server and a terminal;
the terminal is used for converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture; splitting the long character string to generate a splitting sequence identifier; uploading all the segmented character strings, the picture identifications and the splitting sequence identifications to a server;
and the server is used for judging whether all the segmented character strings are acquired or not, splicing all the segmented character strings according to the splitting sequence identifier in response to the acquisition, restoring the long character string, and decoding and converting the long character string into the original picture.
The third technical scheme of the invention is realized by the following measures: a terminal comprises a picture conversion unit, a long character string splitting unit and a segmented character string uploading unit;
the picture conversion unit is used for converting picture codes into long character strings and generating a unique picture identifier corresponding to the picture;
the long character string splitting unit is used for presetting a splitting length of the segmented character string, sequentially splitting the long character string into a plurality of segments of segmented character strings according to the splitting length, and generating splitting sequence identifiers according to the splitting sequence of the segmented character strings;
and the segmented character string uploading unit is used for establishing a network request and uploading the picture identifier, the splitting sequence identifier and all the segmented character strings to the server according to the splitting sequence of the segmented character strings.
The fourth technical scheme of the invention is realized by the following measures: a server comprises a receiving unit, a splicing unit and a restoring unit;
the receiving unit is used for receiving the picture identification, the splitting sequence identification and the segmentation character strings and judging whether all the segmentation character strings are acquired or not;
the splicing unit is used for splicing all the segmented character strings according to the splitting sequence identification after the segmented character strings are received, and restoring the long character strings;
and the restoring unit is used for decoding and converting the long character string into an original picture.
According to the invention, the picture file is transcoded and then split, and then the network requests to send the request and the request is restored in the server, so that the success rate and the transmission stability of picture uploading can be effectively ensured under an extreme network environment, and better network experience is brought to users.
Drawings
FIG. 1 is a flow chart of example 1 of the present invention.
Fig. 2 is a flowchart of acquiring all segmented character strings by a server in embodiment 1 of the present invention.
Fig. 3 is a flowchart of transmitting a picture identifier, a split order identifier, and all segmented character strings in embodiment 1 of the present invention.
Fig. 4 is a block diagram of the system configuration of embodiment 2 of the present invention.
Fig. 5 is a block diagram of a terminal structure according to embodiment 3 of the present invention.
Fig. 6 is a block diagram of a server according to embodiment 4 of the present invention.
Detailed Description
The present invention is not limited by the following examples, and specific embodiments may be determined according to the technical solutions and practical situations of the present invention.
The invention is further described with reference to the following examples and figures:
example 1: as shown in fig. 1, the method for transmitting the picture segmentation under the extreme network environment includes the following steps:
s1, converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture;
s2, presetting segmentation character string splitting length, sequentially splitting a long character string into a plurality of segments of segmentation character strings according to the splitting length, and generating splitting sequence identification according to the splitting sequence of the segmentation character strings;
s3, establishing a network request, and uploading the picture identifier, the splitting sequence identifier and all the segmented character strings to a server according to the splitting sequence of the segmented character strings;
s4, the server judges whether to obtain all the segmented character strings, and if so, the server splices all the segmented character strings according to the split sequence identifier to restore the long character string;
and S5, decoding and converting the long character string into an original picture.
In the above S1, the HTML of the picture is first converted into the IMG object, then the Base64 encoding method of JavaScript is used to convert the binary IMG object of the picture into the long character string str OfBase64 foreimg, and a picture identifier IdOfIMG is generated. In S2, the length of the long string strOfBase64 foremg is calculated first, and then the string is split according to the preset splitting length L of the segmented string, the total number of the split long strings is defined as countofstrforemg, and each segmented string is defined as a splitting sequence identifier str (n) according to the splitting sequence.
According to the invention, the picture file is transcoded and then split, and then the network requests to send the request and the request is restored in the server, so that the success rate and the transmission stability of picture uploading can be effectively ensured under an extreme network environment, and better network experience is brought to users.
The following is further optimization or/and improvement of the technical scheme of the invention:
as shown in fig. 1 and 2, when the server determines whether to acquire all the segmented character strings, the method specifically includes:
s41, after the server receives a network request, the server judges whether the splitting sequence identification STR (n) is consistent with the received number countOfStrForIMG of the segmented character strings;
and S41, in response to the coincidence, the server judges that the current network request is the last request, namely all the segmented character strings are acquired, and in response to the coincidence, the segmented character strings are stored.
As shown in fig. 1 and 3, when the network request is established, and the picture identifier, the split sequence identifier, and all the segmented character strings are uploaded to the server according to the split sequence of the segmented character strings, the network request specifically includes:
s31, establishing a cyclic network request, wherein the cycle number is the same as the number countOfStrForIMG of the segmented character strings;
s32, according to the splitting sequence of the segmented character strings, uploading the picture identification, the splitting sequence identification STR (n) and the corresponding segmented character strings to the server in each network request;
and S33, if the uploading fails, the current data is uploaded again, and if the uploading is successful, the new data is continuously uploaded.
As shown in FIG. 1, the pictures are converted into long character strings through a Base64 coding mode.
As shown in fig. 1, the long character string is converted into the original picture through a Base64 coding mode.
Example 2: as shown in fig. 1 and 4, the picture splitting transmission system in the extreme network environment includes a server and a terminal;
the terminal is used for converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture; splitting the long character string to generate a splitting sequence identifier; uploading all the segmented character strings, the picture identifications and the splitting sequence identifications to a server;
and the server is used for judging whether all the segmented character strings are acquired or not, splicing all the segmented character strings according to the splitting sequence identifier in response to the acquisition, restoring the long character string, and decoding and converting the long character string into the original picture.
Example 3: as shown in fig. 1 and 5, the terminal includes a picture conversion unit, a long character string splitting unit, and a segmented character string uploading unit;
the picture conversion unit is used for converting picture codes into long character strings and generating a unique picture identifier corresponding to the picture;
the long character string splitting unit is used for presetting a splitting length of the segmented character string, sequentially splitting the long character string into a plurality of segments of segmented character strings according to the splitting length, and generating splitting sequence identifiers according to the splitting sequence of the segmented character strings;
and the segmented character string uploading unit is used for establishing a network request and uploading the picture identifier, the splitting sequence identifier and all the segmented character strings to the server according to the splitting sequence of the segmented character strings.
Example 4: as shown in fig. 1 and 6, the server includes a receiving unit, a splicing unit and a restoring unit;
the receiving unit is used for receiving the picture identification, the splitting sequence identification and the segmentation character strings and judging whether all the segmentation character strings are acquired or not;
the splicing unit is used for splicing all the segmented character strings according to the splitting sequence identification after the segmented character strings are received, and restoring the long character strings;
and the restoring unit is used for decoding and converting the long character string into an original picture.
The above technical features constitute the best embodiment of the present invention, which has strong adaptability and best implementation effect, and unnecessary technical features can be increased or decreased according to actual needs to meet the requirements of different situations.

Claims (8)

1. A picture segmentation transmission method under an extreme network environment is characterized by comprising the following steps:
converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture;
presetting segmentation character string splitting length, sequentially splitting a long character string into a plurality of segments of segmentation character strings according to the splitting length, and generating splitting sequence identification according to the splitting sequence of the segmentation character strings;
establishing a network request, and uploading a picture identifier, a splitting sequence identifier and all the segmented character strings to a server according to the splitting sequence of the segmented character strings;
the server judges whether all the segmented character strings are acquired or not, and if so, all the segmented character strings are spliced according to the splitting sequence identification to restore the long character string;
and decoding and converting the long character string into the original picture.
2. The method for transmitting picture segmentation under extreme network environment according to claim 1, wherein the server determines whether to obtain all segmented character strings, specifically comprising:
after receiving each network request, the server judges whether the splitting sequence identification is consistent with the number of the received segmented character strings;
and in response to the coincidence, the server judges that the current network request is the last request, namely all the segmented character strings are acquired, and in response to the coincidence, the segmented character strings are stored.
3. The method for transmitting picture segmentation under extreme network environment according to claim 1, wherein the establishing of the network request, according to the splitting order of the segmented character strings, uploads the picture identifier, the splitting order identifier, and all the segmented character strings to the server specifically includes:
establishing a cyclic network request, wherein the number of the cyclic times is the same as the number of the segmented character strings;
according to the splitting sequence of the segmented character strings, uploading picture identification, splitting sequence identification and corresponding segmented character strings to a server in each network request;
and if the uploading fails, the current data is uploaded again, and if the uploading succeeds, the new data is continuously uploaded.
4. The method for transmitting picture segmentation under extreme network environment as claimed in claim 1, wherein the picture is converted into a long character string by Base64 coding.
5. The picture segmentation transmission method in the extreme network environment according to claim 1, 2, 3 or 4, wherein the long character string is converted into the original picture through a Base64 coding mode.
6. A picture segmentation transmission system under an extreme network environment is characterized by comprising a server and a terminal;
the terminal is used for converting the picture code into a long character string and generating a unique picture identifier corresponding to the picture; splitting the long character string to generate a splitting sequence identifier; uploading all the segmented character strings, the picture identifications and the splitting sequence identifications to a server;
and the server is used for judging whether all the segmented character strings are acquired or not, splicing all the segmented character strings according to the splitting sequence identifier in response to the acquisition, restoring the long character string, and decoding and converting the long character string into the original picture.
7. A terminal is characterized by comprising a picture conversion unit, a long character string splitting unit and a segmented character string uploading unit;
the picture conversion unit is used for converting picture codes into long character strings and generating a unique picture identifier corresponding to the picture;
the long character string splitting unit is used for presetting a splitting length of the segmented character string, sequentially splitting the long character string into a plurality of segments of segmented character strings according to the splitting length, and generating splitting sequence identifiers according to the splitting sequence of the segmented character strings;
and the segmented character string uploading unit is used for establishing a network request and uploading the picture identifier, the splitting sequence identifier and all the segmented character strings to the server according to the splitting sequence of the segmented character strings.
8. A server is characterized by comprising a receiving unit, a splicing unit and a restoring unit;
the receiving unit is used for receiving the picture identification, the splitting sequence identification and the segmentation character strings and judging whether all the segmentation character strings are acquired or not;
the splicing unit is used for splicing all the segmented character strings according to the splitting sequence identification after the segmented character strings are received, and restoring the long character strings;
and the restoring unit is used for decoding and converting the long character string into an original picture.
CN201911008576.1A 2019-10-22 2019-10-22 Image segmentation transmission method, system, terminal and server under extreme network environment Pending CN111131376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911008576.1A CN111131376A (en) 2019-10-22 2019-10-22 Image segmentation transmission method, system, terminal and server under extreme network environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911008576.1A CN111131376A (en) 2019-10-22 2019-10-22 Image segmentation transmission method, system, terminal and server under extreme network environment

Publications (1)

Publication Number Publication Date
CN111131376A true CN111131376A (en) 2020-05-08

Family

ID=70495406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911008576.1A Pending CN111131376A (en) 2019-10-22 2019-10-22 Image segmentation transmission method, system, terminal and server under extreme network environment

Country Status (1)

Country Link
CN (1) CN111131376A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861475A (en) * 2020-11-03 2021-05-28 深圳市和讯华谷信息技术有限公司 Encoding and decoding processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599940A (en) * 2016-11-25 2017-04-26 东软集团股份有限公司 Picture character identification method and apparatus thereof
EP3306938A1 (en) * 2016-10-05 2018-04-11 Thomson Licensing Method and apparatus for binary-tree split mode coding
CN109274719A (en) * 2018-08-23 2019-01-25 深圳点猫科技有限公司 A kind of picture breaker point continuous transmission method and electronic equipment based on educational system
CN110263147A (en) * 2019-06-05 2019-09-20 阿里巴巴集团控股有限公司 The generation method and device of pushed information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3306938A1 (en) * 2016-10-05 2018-04-11 Thomson Licensing Method and apparatus for binary-tree split mode coding
CN106599940A (en) * 2016-11-25 2017-04-26 东软集团股份有限公司 Picture character identification method and apparatus thereof
CN109274719A (en) * 2018-08-23 2019-01-25 深圳点猫科技有限公司 A kind of picture breaker point continuous transmission method and electronic equipment based on educational system
CN110263147A (en) * 2019-06-05 2019-09-20 阿里巴巴集团控股有限公司 The generation method and device of pushed information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861475A (en) * 2020-11-03 2021-05-28 深圳市和讯华谷信息技术有限公司 Encoding and decoding processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101610268A (en) A kind of implementation method of keyword filtration and equipment
CN111245748A (en) File transmission method, device, system, electronic equipment and storage medium
US20090154448A1 (en) Terminal equipment of communication system and method thereof
CN103152606B (en) Video file processing method and device, system
US8473428B2 (en) Generation and use of specific probability tables for arithmetic coding in data compression systems
CN114938408B (en) Data transmission method, system, equipment and medium of cloud mobile phone
CN111163335B (en) Video processing method and device for distributed server
CN111131376A (en) Image segmentation transmission method, system, terminal and server under extreme network environment
CN106209942B (en) Data compression transmission method and system, terminal and server thereof
CN111405293B (en) Video transmission method and device
CN116193160A (en) Digital watermark embedding method, device, equipment and medium
CN114039969A (en) Data transmission method and device
CN113315736B (en) Data synchronization method and device between business processes
CN1262832A (en) Method and device for coding, transmitting and decoding digital data
CN112114760A (en) Image processing method and device
CN107306385B (en) Video transmission and verification method based on short message
CN111030985A (en) Data packet sending method and device
CN110011979A (en) Net hot standby implementation method and device more
CN118170770B (en) Data verification method and system
CN103138872B (en) In a kind of mobile communcations system, the data transmission system of application program is unified method
CN103929447A (en) Method for analyzing HTTP chunked code data
CN113542871B (en) Decoding method and device, electronic equipment and computer readable storage medium
CN113613002A (en) Image processing method and device
CN101299852A (en) Data transmission method and system
CN111193696B (en) Data transmitting method, data receiving method, data transmitting device, data receiving device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication