CN106250173B - A method of message Remote Installation and unloading advertisement based on MQTT - Google Patents

A method of message Remote Installation and unloading advertisement based on MQTT Download PDF

Info

Publication number
CN106250173B
CN106250173B CN201610567110.5A CN201610567110A CN106250173B CN 106250173 B CN106250173 B CN 106250173B CN 201610567110 A CN201610567110 A CN 201610567110A CN 106250173 B CN106250173 B CN 106250173B
Authority
CN
China
Prior art keywords
message
unloading
advertisement
mqtt
remote installation
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.)
Active
Application number
CN201610567110.5A
Other languages
Chinese (zh)
Other versions
CN106250173A (en
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.)
Changzhou first information technology Co., Ltd.
Original Assignee
Changzhou First Information Technology 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 Changzhou First Information Technology Co Ltd filed Critical Changzhou First Information Technology Co Ltd
Priority to CN201610567110.5A priority Critical patent/CN106250173B/en
Publication of CN106250173A publication Critical patent/CN106250173A/en
Application granted granted Critical
Publication of CN106250173B publication Critical patent/CN106250173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The method of the message Remote Installation and unloading advertisement that the invention discloses a kind of based on MQTT, comprising the following steps: when terminal starts, subscribe to message subject;User issues Remote Installation and unloading message, and message passes through des encryption, and the message of installation includes that advertisement apk title and advertisement apk download address, the message of unloading only need advertised name;Terminal receives the Remote Installation and unloading message of user's publication according to theme is subscribed to;Terminal carries out DES decryption;Terminal obtains advertisement apk title and advertisement apk download address.The mqtt agreement that the present invention uses is used under the environment such as weak signal, low broadband to work and also can guarantee and receive complete, and message passes through des encryption, and safety is guaranteed, be mqtt agreement and DES safety certification to be used on digital signage be a kind of extraordinary method;Method of the invention uploads and unloading energy batch operation, if as packet name, can also cover previous file.

Description

A method of message Remote Installation and unloading advertisement based on MQTT
Technical field
The present invention relates to internet communications, and in particular to the side of a kind of message Remote Installation based on MQTT and unloading advertisement Method.
Background technique
Current internet communication technology needs installing terminal to network, and then goes downloading that application to be installed is needed to pacify again again Fill terminal.The operation cost and difficulty of terminal are virtually increased in this way, if having multiple terminals, needing to network, it is more to download It is secondary, it results in waste of resources, and unload and need into the operating platform of terminal, unloading manually again after the software of unloading is found, is made It is huge at workload.
MQTT communications protocol be for a large amount of computing capabilitys it is limited, and work in low broadband, the long-range biography of insecure network The agreement of sensor or communication control design, it has the property that
1) publish/subscribe massage pattern is used, one-to-many news release is provided, releases application program coupling;
2) message of load contents shielding is transmitted;
3) network connection is provided using TCP/IP;
4) there are three types of news release service quality:
" at most primary ", news release is completely dependent on bottom TCP/IP network.Information drop-out or repetition can occur.This level-one It not can be used for following situation, environmental sensor data, losing a read record, it doesn't matter, because also having second of hair shortly after It send.
" at least once ", it is ensured that message reaches, but message repeats to occur.
" only once ", it is ensured that message reaches primary.This rank can be used for following situation, in charge system, message It repeats or loses to will lead to incorrect result.
Small-sized transmission, expense very little (head of regular length is 2 bytes), agreement exchange minimizes, to reduce network flow Amount;According to the characteristic of mqtt, mqtt agreement is selected to intercut message be an ideal method.
DES (Data Encryption Standard) is grouping symmetric cryptographic algorithm.DES uses 64 groupings Length and 56 key lengths, 64 inputs are obtained 64 output by a series of transformation by it.Decryption then uses Identical step and identical key.The key length of DES is 64, due to the n-th * 8 (n=1,2 ... 8) be check bit, Therefore real
The length that border participates in encryption is 56, and key space contains 2^56 key.
DES algorithm works out plaintext using multiple combination replacement algorithm and transposition algorithm, the interaction of dispersion and entanglement At the very high ciphertext of Cipher Strength, its encryption and decryption are same algorithms.
DES algorithm is a kind of product ciphers, and the letters such as displacement, replacement, the addition of mould two are mainly used on algorithm structure Number, is calculated and is worked by way of round function iteration.
DES algorithm also will use data replacement technique, mainly there is initial permutation IP and inverse two type of initial permutation IP^-1 Type.DES algorithm is that all formats of original plaintext and all data are all upset rearrangement using the purpose of in-place computation.And It takes turns in encryption function, i.e., data is all upset to rearrangement, while in terms of data format, original 32 bit data format expands It transforms into as 48 bit data formats, in order to meet requirement of the S box group to data length and data format specifications.
One group of data information is difficult the process and make for therefrom deriving that it is calculated after a series of nonlinear transformation Nonlinear combination;But if this group of data information uses linear transformation, calculate be easy for it is more.In DES algorithm In, the calculating process for belonging to nonlinear transformation only has S box, remaining data calculate and transformation be all belong to linear transformation, so The key of DES algorithm security is the security intensity of S box.In addition, S box and displacement IP cooperate, very strong robust is formd Divide attack and resist linear attacking ability, wherein resisting differential attacking ability is more stronger.
Summary of the invention
The present invention is in view of the above-mentioned problems, provide the method for a kind of the message Remote Installation based on MQTT and unloading advertisement.
The technical solution adopted by the present invention is that: a method of message Remote Installation and unloading advertisement based on MQTT, packet
Include following steps:
S1 when terminal starts, subscribes to message subject;
S2, user issue Remote Installation and unloading message, and message passes through des encryption, and the message of installation includes advertisement apk Title and advertisement apk download address, the message of unloading only need advertisement apk title;
S3, terminal receive the Remote Installation or unloading message that user issues according to theme is subscribed to;
S4, terminal receives Remote Installation or unloading message, and carries out DES decryption;
S5, terminal obtain advertisement apk title and advertisement apk download address according to Remote Installation and unloading message, if it is Unloading message only obtains advertisement apk title.
Further, the step S1 further include:
S11 connects MQTT:
Generate connection string: the IP address of specified Message Agent host and the port numbers of MQTT distribution;
Connection attribute is set, the interval time of mark, subscription type, transmission alive messages including client computer;Creation MQTT client objects;
S12, subscribe to theme to agency: subscription is by MQTT object handles, including two array parameters, i.e. subscription theme Array, service quality array.
Further, the step S2 further include:
S21 gives out information to digital signage: the api function publish directly provided using MQTT, it is desirable to provide main The parameters such as topic, message, service quality;
S22 receives the message from agency: to make to create a readjustment processing letter using the message for receiving subscription Number, and registered in MQTTMQTT client objects;
With M qttSimple Callback interface creation simple interface object, and realize connection Lost, Tri- methods of delivery Complete and message Arrived;
When the connection with agency surprisingly terminates, connection Lost method is just called;If this occurs, Then the method attempts to reconnect to agency;It, can throw exception if connection Lost method can not reconnect The message that notice client computer reconnects failure message Arrived method notice system subscription theme arrived client; Whether delivery Complete method indicates to send and complete;
S23 needs des encryption before news release.
Further, the step S3 further include: receive message decryption: after digital signage subscribes to message, agency's publication The theme that digital signage is subscribed to, digital signage receive the message of publication and decryption.
Further, the step S4 further include: correlative code is encrypted and is decrypted.
Advantages of the present invention:
The mqtt agreement that the present invention uses, which is used under the environment such as weak signal, low broadband to work, also can guarantee that reception is complete, and And message passes through des encryption, safety is guaranteed, be mqtt agreement and DES safety certification to be used in be one on digital signage The extraordinary method of kind;Method of the invention uploads and unloading energy batch operation, if as packet name, can also cover previous text Part.
Other than objects, features and advantages described above, there are also other objects, features and advantages by the present invention.
Below with reference to figure, the present invention is described in further detail.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present invention, schematic reality of the invention It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.
Fig. 1 is the method flow diagram of the message Remote Installation of the invention based on MQTT and unloading advertisement.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
With reference to Fig. 1, the method for a kind of message Remote Installation based on MQTT as shown in Figure 1 and unloading advertisement, including with Lower step:
S1 when terminal (digital signage) starts, subscribes to message subject;
S2, user issue Remote Installation and unloading message, and message passes through des encryption, and the message of installation includes advertisement apk Title and advertisement apk download address, the message of unloading only need advertisement apk title;
S3, terminal receive the Remote Installation or unloading message that user issues according to theme is subscribed to;
S4, terminal receives Remote Installation or unloading message, and carries out DES decryption;
S5, terminal obtain advertisement apk title and advertisement apk download address according to Remote Installation and unloading message, if it is Unloading message only obtains advertisement apk title.The step S1 further include:
S11 connects MQTT: generating connection string: the IP address of specified Message Agent host and the port of MQTT distribution Number;Connection attribute is set, the interval time of mark, subscription type, transmission alive messages including client computer;Create MQTT client Machine object;
S12, subscribe to theme to agency: subscription is by MQTT object handles, including two array parameters, i.e. subscription theme Array, service quality array.
The step S2 further include:
S21 gives out information to digital signage: the api function publish directly provided using MQTT, it is desirable to provide main The parameters such as topic, message, service quality;
S22 receives the message from agency: to make to create a readjustment processing letter using the message for receiving subscription Number, and in MQTT client registers;
With MqttSimple Callback interface creation simple interface object, and realize connection Lost, Tri- methods of delivery Complete and message Arrived;When the connection with agency surprisingly terminates, just call Connection Lost method;If this occurs, then the method attempts to reconnect to agency;If Connection Lost method can not reconnect, then can throw exception come notify client computer reconnect failure;
The message that message Arrived method notice system subscribes to theme arrived client;
Whether delivery Complete method indicates to send and complete;
S23 needs des encryption before news release.
The step S3 further include: receive message decryption: after digital signage subscribes to message, agency's publication digital signage is subscribed to Theme, digital signage receives the message of publication and decryption.
The step S4 further include: correlative code is encrypted and is decrypted.
The present invention passes through MQTT agreement, PUSH message to terminal, after terminal receives message decryption, according to protocol contents The value of action if it is installation then go on server to download according to the value of apkUrl to distinguish installation or unloading advertisement Installation kit then goes the advertisement on discharging terminal if it is unloading according to apkName.
The method of message Remote Installation based on MQTT and unloading advertisement of the invention, when terminal (digital signage) starts,
Subscribe to message subject such as: cloudring/client/terminal/terminalId/#, wherein terminalId For the occurrence of terminal;
User issues Remote Installation and unloading message, and message passes through des encryption, and the message of installation includes advertisement apk title With advertisement apk download address, the message of unloading only needs advertised name;
Terminal receives the Remote Installation and unloading message of user's publication according to theme is subscribed to;
Terminal receives Remote Installation and unloading message, and carries out DES decryption;
Terminal obtains advertisement apk title and advertisement apk download address according to Remote Installation and unloading message, if it is unloading Message only obtains advertisement apk title;
It is transmitted by then passing through mqtt agreement, can guarantee to receive in weak signal, low broadband environment, it is objective in this way The experience at family can be more perfect.
Now many digital signage, the wifi signal of itself is not strong, if it is http agreement is walked, then suspension may occur The case where or link it is obstructed cause message sink less than either it is imperfect, will lead to the experience effect of advertisement in this way Difference, the mqtt agreement that the present invention uses, which is used under the environment such as weak signal, low broadband to work, also can guarantee that reception is complete, and message By des encryption, safety is guaranteed, be mqtt agreement and DES safety certification is used on digital signage be it is a kind of very Good method;Method of the invention uploads and unloading energy batch operation, if as packet name, can also cover previous file.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (5)

1. a kind of method of message Remote Installation based on MQTT and unloading advertisement, which is characterized in that
The following steps are included:
S1 when terminal starts, subscribes to message subject;
S2, user issue Remote Installation and unloading message, and message passes through des encryption, and the message of installation includes advertisement apk title With advertisement apk download address, the message of unloading only needs advertisement apk title;
S3, terminal receive the Remote Installation or unloading message that user issues according to theme is subscribed to;
S4, terminal receives Remote Installation or unloading message, and carries out DES decryption;
S5, terminal obtains advertisement apk title and advertisement apk download address according to Remote Installation and unloading message, if it is unloading Message only obtains advertisement apk title.
2. the method for the message Remote Installation according to claim 1 based on MQTT and unloading advertisement, which is characterized in that institute State step S1 further include:
S11 connects MQTT: generating connection string: the IP address of specified Message Agent host and the port numbers of MQTT distribution; Connection attribute is set, the interval time of mark, subscription type, transmission alive messages including client computer;Create MQTT client computer Object;
S12, subscribe to theme to agency: subscription is to be handled by MQTT client objects, including two array parameters, i.e. subscription are led Inscribe array, service quality array.
3. the method for the message Remote Installation according to claim 1 based on MQTT and unloading advertisement, which is characterized in that institute State step S2 further include:
S21 gives out information to digital signage: the api function publish directly provided using MQTT, it is desirable to provide theme disappears Breath, service quality;
S22 receives the message from agency: to make to create a readjustment processing function using the message for receiving subscription, and And it is registered in MQTT client objects;The object of simple interface is created with Mqtt Simple Callback interface, and is realized Connection Lost, delivery Complete and tri- methods of message Arrived;When the connection with agency is unexpected When termination, connection Lost method is just called;If this occurs, then the method attempts to reconnect to agency; If connection Lost method can not reconnect, can throw exception come notify client computer reconnect failure; The message that message Arrived method notice system subscribes to theme arrived client;
Whether delivery Complete method indicates to send and complete;S23 needs des encryption before news release.
4. the method for the message Remote Installation according to claim 1 based on MQTT and unloading advertisement, which is characterized in that institute State step S3 further include: receive message decryption: after digital signage subscribes to message, the theme that agency's publication digital signage is subscribed to, number Word label receives the message of publication and decryption.
5. the method for the message Remote Installation according to claim 1 based on MQTT and unloading advertisement, which is characterized in that institute State step S4 further include: encrypt and decrypt to correlative code.
CN201610567110.5A 2016-07-15 2016-07-15 A method of message Remote Installation and unloading advertisement based on MQTT Active CN106250173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610567110.5A CN106250173B (en) 2016-07-15 2016-07-15 A method of message Remote Installation and unloading advertisement based on MQTT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610567110.5A CN106250173B (en) 2016-07-15 2016-07-15 A method of message Remote Installation and unloading advertisement based on MQTT

Publications (2)

Publication Number Publication Date
CN106250173A CN106250173A (en) 2016-12-21
CN106250173B true CN106250173B (en) 2019-05-07

Family

ID=57613517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610567110.5A Active CN106250173B (en) 2016-07-15 2016-07-15 A method of message Remote Installation and unloading advertisement based on MQTT

Country Status (1)

Country Link
CN (1) CN106250173B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190173951A1 (en) * 2017-12-01 2019-06-06 GM Global Technology Operations LLC Vehicle communication using publish-subscribe messaging protocol
CN108134801B (en) * 2018-01-23 2020-09-01 重庆邮电大学 MQTT protocol intelligent home identification method based on message filtering algorithm
CN109088723B (en) * 2018-10-26 2021-08-06 四川长虹电器股份有限公司 Remote control method based on MQTT protocol
US11095460B2 (en) 2019-07-05 2021-08-17 Advanced New Technologies Co., Ltd. Certificate application operations
CN110445614B (en) * 2019-07-05 2021-05-25 创新先进技术有限公司 Certificate application method and device, terminal equipment, gateway equipment and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376589A (en) * 2015-10-27 2016-03-02 上海斐讯数据通信技术有限公司 Intelligent TV message push device and method based on MQTT
CN105722040A (en) * 2014-12-03 2016-06-29 华为技术有限公司 Service message transmission method, apparatus and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8997115B2 (en) * 2007-08-31 2015-03-31 International Business Machines Corporation Method for data delivery in a network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105722040A (en) * 2014-12-03 2016-06-29 华为技术有限公司 Service message transmission method, apparatus and system
CN105376589A (en) * 2015-10-27 2016-03-02 上海斐讯数据通信技术有限公司 Intelligent TV message push device and method based on MQTT

Also Published As

Publication number Publication date
CN106250173A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106210084B (en) A kind of message inserting method based on MQTT
CN106250173B (en) A method of message Remote Installation and unloading advertisement based on MQTT
CN106850195B (en) Group key negotiation and communication method in instant communication
CN106131025A (en) A kind of message transmission method in digital signage based on MQTT
GB2533279B (en) Secure media player
CN104602238A (en) Wireless network connecting method, device and system
CN104158816A (en) Authentication method and device as well as server
Bali et al. Lightweight authentication for MQTT to improve the security of IoT communication
CN110061967A (en) Business datum providing method, device, equipment and computer readable storage medium
Chen et al. Blockchain meets covert communication: A survey
EP3614292A1 (en) File transfer system comprising an upload, storage and download device
CN110311892A (en) A kind of data capture method and server
CN101667999A (en) Method and system for transmitting peer-to-peer broadcast stream, data signature device and client
CN113300999B (en) Information processing method, electronic device, and readable storage medium
CN114499836A (en) Key management method, key management device, computer equipment and readable storage medium
CN107508781A (en) Exchange method, system and server architecture based on Web proxy server
US11411741B2 (en) Secure data transmission method
Alsalami et al. Utilizing public blockchains for censorship-circumvention and IoT communication
CN106131024A (en) A kind of advertisement is to the accurate method of designated equipment
Schulz et al. d 2 Deleting Diaspora: Practical attacks for profile discovery and deletion
CN104243291A (en) Instant messaging method and system thereof capable of guaranteeing safety of user communication content
CN114765546B (en) End-to-end hard encryption method, system, encryption equipment and key management server
WO2015156145A1 (en) Re-encryption method, re-encryption system, and re-encryption device
CN112637230A (en) Instant messaging method and system
CN110855628A (en) Data transmission method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171102

Address after: 213002 Room 302, unit 1, Xintiandi garden, Tianning District, Jiangsu, Changzhou

Applicant after: Xie Feng

Address before: 518000 Guangdong, Shenzhen, Longhua, big waves on the upper side of the new Baiyun Mountain village, Yongfeng new industrial park A district on the third floor of

Applicant before: SHENZHEN FIGIGANTIC ELECTRONIC CO., LTD.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180209

Address after: 213161 Wujin District, Changzhou City, Jiangsu Province, Changwu Middle Road, No. 18 Changzhou science and Education City, Chuang Yan port 5-504

Applicant after: Changzhou first information technology Co., Ltd.

Address before: 213002 Room 302, unit 1, Xintiandi garden, Tianning District, Jiangsu, Changzhou

Applicant before: Xie Feng

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant