The content of the invention
For overcome the deficiencies in the prior art, an object of the present invention is to provide a kind of data transmission method, with solution
The problem of certainly available data transmission increases power consumption of terminal and network flow consumption.
The second object of the present invention is to provide a kind of electronic equipment, with solve available data transmission increase power consumption of terminal with
The problem of network flow consumption.
The third object of the present invention is to provide a kind of data transmission method, to solve available data transmission increase terminal work(
The problem of consumption and network flow consumption.
The fourth object of the present invention is to provide a kind of data transmission system, to solve available data transmission increase terminal work(
The problem of consumption and network flow consumption.
An object of the present invention adopts the following technical scheme that realization:
A kind of data transmission method, including:
Protocol code is obtained, wherein, the protocol code is by data message is classified and is encoded code information;
Data message according to corresponding to coding rule parses the protocol code;
Export the data message.
Further, also include before the acquisition protocol code:
Obtain the coding rule and store.
Further, it is described to obtain the coding rule and also include after storing:
Obtain the fresh information of the coding rule.
Further, the fresh information for obtaining the coding rule includes:
Receive more new command and corresponding coding rule;
According to more new command increase, coding rule is deleted or modified.
Further, it is described to obtain the coding rule and also include after storing:
Detection instruction is sent to detect whether the coding rule has renewal;
If the coding rule has renewal, the automatic coding rule downloaded after renewal.
Further, the protocol code is the protocol code Jing Guo secondary encryption.
The second object of the present invention adopts the following technical scheme that realization:
A kind of electronic equipment, including:Processor;
Memory;And program, wherein described program is stored in the memory, and is configured to by processor
Perform, described program includes being used to perform above-mentioned method.
The invention further relates to a kind of computer-readable recording medium, is stored thereon with computer program, the computer journey
Sequence is executed by processor above-mentioned method.
The third object of the present invention adopts the following technical scheme that realization:
A kind of data transmission method, including:
Data message is classified and encodes to obtain protocol code by server, and sends the protocol code;
Terminal receives protocol code, the data message according to corresponding to coding rule parses the protocol code;
Terminal output data information.
The fourth object of the present invention adopts the following technical scheme that realization:
A kind of data transmission system, including:Server and terminal;
The server is used to data message be classified and encode to obtain protocol code, and sends the agreement generation
Code;
The terminal is used to receive the protocol code, the data according to corresponding to coding rule parses the protocol code
Information and output data information.
Compared with prior art, the beneficial effects of the present invention are:It is long-range to obtain protocol code, taken due to protocol code
Seldom data volume, it thereby may be ensured that terminal receives data in a short time, terminal parses agreement generation according to coding rule
Data message corresponding to code, it is more many soon than remote switch or offline transmission data, so as to reduce power consumption of terminal and network
The consumption of flow, and save transmission time.
Embodiment
Below, with reference to accompanying drawing and embodiment, the present invention is described further, it is necessary to which explanation is, not
Under the premise of afoul, new implementation can be formed between various embodiments described below or between each technical characteristic in any combination
Example.
As shown in figure 1, data transmission method provided in an embodiment of the present invention, including:
Step S101:Obtain protocol code;Wherein, the protocol code is by data message is classified and is encoded generation
Code information.
Specifically, server by data messages such as word to be sent, picture, audio or video information according to default volume
Code rule is converted into protocol code, the protocol code that terminal the reception server is sent.
Step S102:Data message according to corresponding to coding rule parses the protocol code.
Specifically, server and terminal storage have identical coding rule, server will be to be sent according to coding rule
Data message is converted into protocol code, and the protocol code of reception is parsed corresponding data message by terminal according to coding rule.
Wherein, coding rule can be rule of the user after server end is classified and is defined, such as literal definition be A
Class, picture are defined as B classes, and audio is defined as C classes, and video is defined as D classes;Define each label generation respectively under every kind of classification again
The particular content of table, such as text information is divided into A1, A2...An etc. according to preset rules, by pictorial information according to default rule
Then it is divided into B1, B2...Bn etc., audio-frequency information is divided into C1, C2...Cn etc. according to preset rules, by video information according to default
Rule is divided into D1, D2...Dn etc..Before server sends protocol code, the coding rule defined is sent to terminal, terminal
Coding rule is stored in local data base, when data message to be sent is converted to agreement by server according to coding rule
Code and when being sent to terminal, terminal can parse corresponding data message according to coding rule.
Step S103:Export the data message.
Specifically, terminal parses the data message corresponding to protocol code, by showing that driving shows in bistable liquid crystal
Show data message corresponding to display in equipment.
The data message that server is sent is transmitted by protocol code, and protocol code takes seldom data volume, so as to
To ensure to complete to receive in a short time, terminal parses data message corresponding to protocol code by local system, than distal end
Transmitting data information is many soon, thereby may be ensured that output data information quickly, and reduces power consumption of terminal and network traffics
Consumption.
As preferred embodiment, the content not timing that user sends according to server updates coding rule, and will more
Coding rule after new is sent to terminal, and terminal obtains the fresh information of coding rule.
Specifically include:Receive more new command and corresponding coding rule;According to more new command increase, it is deleted or modified
Coding rule.For example, server sends increase instruction and coding rule to be increased, terminal adds coding rule to be increased
In local data base;Server, which is sent, deletes instruction and coding rule to be deleted, and terminal is by coding rule to be deleted from originally
Deleted in ground database;Server transmission modification instructs, original coding to be modified is regular and amended coding rule, eventually
Original coding rule is correspondingly revised as amended coding rule by end, so as to ensure the accuracy of code analysis.
As preferred embodiment, terminal periodically sends detection instruction to server, to detect whether coding rule has
Renewal;If coding rule has renewal, the automatic coding rule downloaded after renewal, so as to ensure the coding rule of terminal storage
Accuracy, ensure the reliability of data transfer.
As preferred embodiment, protocol code is the protocol code Jing Guo secondary encryption, in transmitting procedure
Protocol code is intercepted by third party, and third party can not obtain particular content, so as to ensure the secrecy of Content of Communication well
Property, stability and security.
As shown in Fig. 2 electronic equipment provided in an embodiment of the present invention, including:Processor 11, memory 1 and program, its
Program is stored in memory 12, and is configured to be performed by processor 11, and program includes being used to perform above-mentioned side
Method.
The method in electronic equipment and previous embodiment in the present embodiment is based on two sides under same inventive concept
Face, above method implementation process is being described in detail, so those skilled in the art can be according to described above clear
Understand to Chu the implementation process of the electronic equipment in the present embodiment, it is succinct for specification, just repeat no more herein.
As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can
Realized by the mode of software plus required general hardware platform.Based on such understanding, technical scheme essence
On the part that is contributed in other words to prior art can be embodied in the form of software product.The invention further relates to one kind
Computer-readable recording medium, such as ROM/RAM, magnetic disc, CD, are stored thereon with computer program, and computer program is located
Manage device and perform above-mentioned method.
As shown in figure 3, the data transmission method that another embodiment of the present invention provides, including:
Data message is classified and encodes to obtain protocol code by server, and sends the protocol code;
Terminal receives protocol code, the data message according to corresponding to coding rule parses the protocol code;
Terminal output data information.
The method in method and previous embodiment in the present embodiment be based on two under same inventive concept aspects,
Above system is described in detail, so this implementation can be well understood according to described above in those skilled in the art
Method in example, it is succinct for specification, just repeat no more herein.
As shown in figure 4, data transmission system provided in an embodiment of the present invention, including:Server 21 and terminal 22;
Server 21 is used to data message be classified and encode to obtain protocol code, and sends the protocol code;
Terminal 22 is used to receive the protocol code, and data are believed according to corresponding to coding rule parses the protocol code
Cease simultaneously output data information.
The method in system and previous embodiment in the present embodiment be based on two under same inventive concept aspects,
Above system is described in detail, so this implementation can be well understood according to described above in those skilled in the art
Method in example, it is succinct for specification, just repeat no more herein.
Data transmission method, system, electronic equipment and storage medium provided by the invention remotely obtain protocol code, due to
Seldom data volume that protocol code takes, it thereby may be ensured that terminal receives data in a short time, terminal is advised according to coding
The data message corresponding to protocol code is then parsed, it is more many soon than remote switch or offline transmission data, so as to reduce
The consumption of power consumption of terminal and network traffics, and save transmission time.
Above-mentioned embodiment is only the preferred embodiment of the present invention, it is impossible to the scope of protection of the invention is limited with this,
The change and replacement for any unsubstantiality that those skilled in the art is done on the basis of the present invention belong to institute of the present invention
Claimed scope.