CN111599145A - Device for realizing information alarm by enterprise WeChat - Google Patents

Device for realizing information alarm by enterprise WeChat Download PDF

Info

Publication number
CN111599145A
CN111599145A CN202010283873.3A CN202010283873A CN111599145A CN 111599145 A CN111599145 A CN 111599145A CN 202010283873 A CN202010283873 A CN 202010283873A CN 111599145 A CN111599145 A CN 111599145A
Authority
CN
China
Prior art keywords
chip microcomputer
data
server
enterprise wechat
received
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
CN202010283873.3A
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.)
Ningbo Iron and Steel Co Ltd
Original Assignee
Ningbo Iron and Steel 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 Ningbo Iron and Steel Co Ltd filed Critical Ningbo Iron and Steel Co Ltd
Priority to CN202010283873.3A priority Critical patent/CN111599145A/en
Publication of CN111599145A publication Critical patent/CN111599145A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B25/00Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems
    • G08B25/01Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium
    • G08B25/08Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium using communication transmission lines
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B25/00Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems
    • G08B25/01Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium
    • G08B25/10Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium using wireless transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/58Message adaptation for wireless communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a device for realizing information alarm by enterprise WeChat, which comprises an extension single chip microcomputer, a host single chip microcomputer and a self-owned server, wherein the extension single chip microcomputer is used for receiving parameters detected by a sensor, judging whether the received equipment parameters or environment parameters exceed preset values or not, and transmitting data to the host single chip microcomputer through a first wireless transmission module when the received equipment parameters or environment parameters exceed the preset values; after the host single chip microcomputer receives the data from the extension single chip microcomputer, the data are transmitted to the self-owned server through the second wireless transmission module by adopting a pushing method; the self-owned server is used for sending information to the enterprise WeChat server. The invention can conveniently receive alarm information and reduce cost.

Description

Device for realizing information alarm by enterprise WeChat
Technical Field
The invention relates to the technical field of remote alarm, in particular to a device for realizing information alarm by enterprise WeChat.
Background
Various alarms in the current market have one scheme that the alarm is realized by a telephone or a mobile phone short message, and the mode is not good from the technical and cost considerations; still another kind is to use cell-phone APP to receive alarm information, and this kind of mode is low cost, and the technique is outstanding, but considers that different producers all release respective APP, and is very difficult in the user popularization.
Disclosure of Invention
The invention aims to provide a device for realizing information alarm by enterprise WeChat, which can conveniently receive alarm information and reduce the cost.
The technical scheme adopted by the invention for solving the technical problems is as follows: the device for realizing information alarm by enterprise WeChat comprises an extension single-chip microcomputer, a host single-chip microcomputer and a self-owned server, wherein the extension single-chip microcomputer is used for receiving parameters detected by a sensor, judging whether the received equipment parameters or environment parameters exceed preset values or not, and transmitting data to the host single-chip microcomputer through a first wireless transmission module when the received equipment parameters or environment parameters exceed the preset values; after the host single chip microcomputer receives the data from the extension single chip microcomputer, the data are transmitted to the self-owned server through the second wireless transmission module by adopting a pushing method; the self-owned server is used for sending information to the enterprise WeChat server.
When the extension single chip microcomputer judges whether the received equipment parameters or the environment parameters exceed the preset values, the change of the values of the ports connected with the sensors is continuously judged in a program, or a function of reading the measured values by the single-bus digital sensor is called and the values are stored in a variable, whether the values exceed the preset values is judged, the values exceeding the preset values are converted into character strings and then printed into a cache, and the character strings in the cache are sent to the serial port of the first wireless transmission module by calling a serial port sending program.
The host single chip microcomputer judges whether the data from the extension single chip microcomputer is received in the serial port cache of the host single chip microcomputer in a program, if the data is received, the data is sent to a self server through a second wireless transmission module by a pushing method, if the data is not received, the signal intensity is detected and displayed, whether a connection signal is returned by the second wireless transmission module is detected, if the connection is detected to be disconnected, the initialization is carried out again, and then the circulation of waiting whether the data from the extension single chip microcomputer is received in the serial port cache of the host single chip microcomputer is carried out.
The method comprises the steps that the self-owned server calls an interface for obtaining the access _ token by using a GET method simulated by the CURL, received data are converted into an array after a return value of the enterprise WeChat server is obtained, then a character string with the index of the array being the access _ token is spliced into a pushed address, whether data transmitted by a host single chip microcomputer is a field needing alarming or not is automatically judged, if the data are fields needing alarming, the received contents are spliced into a JSON data segment by using the pushing method simulated by the CURL, and information is forwarded to the enterprise WeChat server.
And the self-owned server forwards the information to the enterprise WeChat server and then is connected with the database, and data items containing the current time and the content pushed by the host single chip microcomputer are added into a data table of the database.
The first wireless transmission module is a LORA module, and the second wireless transmission module is a GSM module.
Advantageous effects
Due to the adoption of the technical scheme, compared with the prior art, the invention has the following advantages and positive effects: compared with an alarm using a telephone and a short message as an alarm means, the alarm device has the characteristic of low cost, and compared with the mode of realizing the alarm by using respective mobile phone APP, a user can receive the alarm information in a WeChat without downloading the APP, so that the alarm device is more convenient. In addition, the invention can definitely manage the personnel receiving the alarm information, and is more suitable for enterprise application.
Drawings
Fig. 1 is a schematic structural view of the present invention.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The WeChat public numbers are divided into three types, namely a service number, a subscription number and an enterprise number. In 2016, 4 months, Tencent brings out the number of the enterprise independently, and a brand-new version is called enterprise WeChat. In the WeChat address book, if the WeChat of an enterprise is applied, the WeChat address book will be displayed in the form of an enterprise number at the top of the address book, and is particularly marked as a group call: my business. Any one of the enterprise numbers is opened and there will be messages (if any) for the application built in the enterprise WeChat. That is to say, the messages of the application of the enterprise wechat can be received in time in the wechat without distinction.
The enterprise name of the enterprise can be modified once (can be modified for multiple times after verification) under the condition that the enterprise is not verified on the management page of the enterprise WeChat, the enterprise ID in the enterprise information is a keyword which can be called by an API, and a user obtains the access _ token connected with the enterprise WeChat. The address book of each enterprise WeChat can be added with 200 contact persons (the number of the contact persons is not limited after verification) under the condition of no official verification, and the 200 contact persons can be divided into different departments, and the departments can be divided into different sub-departments.
The enterprise Wechat has the existing applications for enterprise office or management, such as card punching, examination and approval, and the like, and can also be self-built, three keywords of AgentId, Secret and visible range are called in the API in the self-built application, and the application name can be edited at any time. The visibility range can be set in a program or in a management page of the enterprise WeChat. The information alarm is realized by enterprise WeChat, namely the information is sent to the self-built application, and the contact in the visible range receives the alarm information in the WeChat or the enterprise WeChat under the condition of correct setting. The invention provides free and open APIs (application programming interfaces) by which information can be sent to the application of the enterprise WeChat.
The embodiment of the invention relates to a device for realizing information alarm by enterprise WeChat, which comprises an extension single chip microcomputer, a host single chip microcomputer and a self-contained server, wherein the extension single chip microcomputer is used for receiving parameters detected by a sensor, judging whether the received equipment parameters or environment parameters exceed a preset value or not, and transmitting data to the host single chip microcomputer through a first wireless transmission module when the received equipment parameters or environment parameters exceed the preset value; after the host single chip microcomputer receives the data from the extension single chip microcomputer, the data are transmitted to the self-owned server through the second wireless transmission module by adopting a pushing method; the self-owned server is used for sending information to the enterprise WeChat server.
In this embodiment, the extension single-chip microcomputer and the host single-chip microcomputer both adopt STC8F2K16S2, which has two serial ports, and 1602 liquid crystal display is added for displaying information. The networking communication module adopts a wireless module using LORA technology and the networking communication module adopts a GSM module of SIM800L series.
The extension single-chip microcomputer and the host single-chip microcomputer are the same on a hardware circuit, different internal programs are different, an interface circuit of the extension single-chip microcomputer can collect switching value information, and can also be connected with a digital sensor of a single bus or a sensor of an IIC interface, in the program of the extension single-chip microcomputer, the clock frequency is defined to be 11.0592MHZ in a CONFIG. H file provided by an STC official library, then the baud rate of a serial port is modified to be 9600bps in a serial port initialization program, then a liquid crystal display is initialized 1602 at the beginning of a main () function, and the serial port initialization program is called. Then continuously judging the change of a certain port value in the circulation of WHILE (1), or calling a function of reading a measured value by a single-bus digital sensor or an IIC sensor, storing the value into a variable, judging whether the variable exceeds a set value or not, defining a constant of a character string type in a program, wherein the format is 'name & abc & value & 123', the format is a special pushing format, converting the numerical value exceeding the set value into a character string by an itoa function, printing the character string in a cache by a sprintf function, sending the character string in the cache to a serial port of a LORA module by calling a serial port sending program by using a serial port 1, and sending the information in a wireless mode by the LORA module after receiving the serial port information.
Meanwhile, the host single chip receives a wireless signal through the LORA module, and receives information into the cache through the serial port 1. After a host single chip computer initializes a liquid crystal display program and a serial port like an extension single chip computer, a GPRS network of a GSM module is initialized in a mode of sending an AT instruction to a serial port 2, after the GPRS network is established by the GSM module and HTTP is initialized, a POST method is firstly used for sending test data to an own server, whether data from the extension single chip computer is received in a serial port 1 cache or not is waited in circulation, if the data is received, the POST method is used for sending the data to the own server through the GSM module, if the data is not received, an AT + CSQ instruction is sent, signal intensity is detected and displayed, whether the GSM module returns to DEACT (whether GPRS is connected or not) is detected, if the GPRS is detected to be disconnected, the GPRS network and the HTTP are reinitialized, and then the circulation of waiting for whether a message is received or not is detected in the serial port 1.
The self-owned server is an information transfer station of the whole device, and finally sends the information to the enterprise WeChat server. The PHP program flow of the self-owned server is as follows: firstly, calling an interface for acquiring an access _ token by using a GET method simulated by CURL, converting received data into an array by using a json _ decode function after a return value of an enterprise WeChat server is acquired, and then splicing a character string with the index of the array as access _ token into an address of POST (hyper text to text, hypertext, western, qq, com, cgi-bin, message, send? $ arr [ 'access _ token' ], this address is used to call the send message interface. If the POST address exists, the program judges whether the data from the POST of the singlechip is a field needing alarming, if so, the received content is spliced into a JSON data segment by a springf function by using a POST method simulated by the CURL, the JSON data segment is the content needing sending by the POST, and the POST address is the address' https:// qyapi. $ arr [ 'access _ token' ]. By this point, the owning server has completed the task of forwarding the information to the enterprise WeChat Server. Then, the alarm information is connected to a database, and then a data item containing the current time and the content from the single chip microcomputer POST is added to the data table, so that an alarm information is added to the database.
After receiving the alarm information, the enterprise WeChat server can push the alarm information to the application in the enterprise WeChat, and the enterprise number of the common WeChat can receive the application message at the same time, so that the enterprise WeChat does not need to be downloaded, and the alarm information can be received through the common WeChat, thereby achieving the purpose of receiving the alarm information by the WeChat.
When the device of the invention is used for monitoring whether the environmental temperature of the EMS server is normal or not, an enterprise WeChat alarm is arranged beside the EMS server, an 18B20 temperature sensor is arranged in the EMS server, and when the environmental temperature is higher than the set temperature of 29 ℃, alarm information is sent to an application of 'EMS server environmental temperature alarm' in an enterprise number of 'Ningbo Steel company Limited operation improvement department'. And finally, the information reaches the WeChat of the EMS operation and maintenance personnel, and the operation and maintenance personnel are reminded to check whether the air conditioner works normally or not in time.
Compared with an alarm using a telephone and a short message as an alarm means, the alarm device has the characteristic of low cost, and compared with the mode of realizing the alarm by using respective mobile phone APP, a user can receive alarm information in a WeChat without downloading the APP, so that the alarm device is more convenient. In addition, the invention can definitely manage the personnel receiving the alarm information, and is more suitable for enterprise application.

Claims (6)

1. The device for realizing information alarm by enterprise WeChat comprises an extension single-chip microcomputer, a host single-chip microcomputer and a self-owned server, and is characterized in that the extension single-chip microcomputer is used for receiving parameters detected by a sensor, judging whether the received equipment parameters or environment parameters exceed preset values or not, and transmitting data to the host single-chip microcomputer through a first wireless transmission module when the received equipment parameters or environment parameters exceed the preset values; after the host single chip microcomputer receives the data from the extension single chip microcomputer, the data are transmitted to the self-owned server through the second wireless transmission module by adopting a pushing method; the self-owned server is used for sending information to the enterprise WeChat server.
2. The device for implementing information alarm by enterprise WeChat according to claim 1, wherein when said extension SCM determines whether the received device parameter or environment parameter exceeds the preset value, it continuously determines the change of the port value connected with said sensor in the program, or calls the function of the single bus digital sensor to read the measured value and stores the value in a variable, determines whether the value exceeds the preset value, and converts the value exceeding the preset value into a character string and prints it in the buffer memory, and the character string in the buffer memory is sent to the serial port of the first wireless transmission module by calling the serial port sending program.
3. The device for realizing information alarm by enterprise WeChat according to claim 1, characterized in that the host single-chip microcomputer judges whether the data from the extension single-chip microcomputer is received in its own serial port cache in a program, if the data is received, the data is transmitted to its own server through the second wireless transmission module by a push method, if the data is not received, the signal intensity is detected and displayed, and whether the second wireless transmission module returns a connection signal is detected, if the connection is detected to be disconnected, the initialization is performed again, and then the process enters a cycle of waiting whether the data from the extension single-chip microcomputer is received in its own serial port cache.
4. The device for realizing information alarm by enterprise WeChat according to claim 1, characterized in that the self-owned server calls an interface for acquiring access _ token by using a CURL simulated GET method, converts the received data into an array after acquiring the return value of the enterprise WeChat server, splices the character string with the index of the array as access _ token into a pushed address, automatically judges whether the data transmitted by the host singlechip is a field needing alarm, splices the received content into a JSON data segment if the data is the field needing alarm by using the CURL simulated pushing method, and forwards the information to the enterprise WeChat server.
5. The device for realizing information alarm by enterprise WeChat according to claim 1, wherein the self-owned server is connected with the database after forwarding the information to the enterprise WeChat server, and adds a data item containing the current time and the content pushed by the host single chip microcomputer in a data table of the database.
6. The apparatus of claim 1, wherein the first wireless transmission module is a LORA module and the second wireless transmission module is a GSM module.
CN202010283873.3A 2020-04-13 2020-04-13 Device for realizing information alarm by enterprise WeChat Pending CN111599145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010283873.3A CN111599145A (en) 2020-04-13 2020-04-13 Device for realizing information alarm by enterprise WeChat

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010283873.3A CN111599145A (en) 2020-04-13 2020-04-13 Device for realizing information alarm by enterprise WeChat

Publications (1)

Publication Number Publication Date
CN111599145A true CN111599145A (en) 2020-08-28

Family

ID=72192163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010283873.3A Pending CN111599145A (en) 2020-04-13 2020-04-13 Device for realizing information alarm by enterprise WeChat

Country Status (1)

Country Link
CN (1) CN111599145A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001111662A (en) * 1999-10-04 2001-04-20 Hochiki Corp Phone for disaster prevention system
CN105807742A (en) * 2016-03-10 2016-07-27 京东方科技集团股份有限公司 Production equipment monitoring method and system
CN208271365U (en) * 2018-06-22 2018-12-21 韩继微 A kind of interior environment high temperature remote automatic alarm system
CN109215280A (en) * 2018-09-20 2019-01-15 深圳市中电数通智慧安全科技股份有限公司 A kind of electrical fire integrated control system
JP2020021123A (en) * 2018-07-30 2020-02-06 英二 平沢 Thermal image community watch system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001111662A (en) * 1999-10-04 2001-04-20 Hochiki Corp Phone for disaster prevention system
CN105807742A (en) * 2016-03-10 2016-07-27 京东方科技集团股份有限公司 Production equipment monitoring method and system
CN208271365U (en) * 2018-06-22 2018-12-21 韩继微 A kind of interior environment high temperature remote automatic alarm system
JP2020021123A (en) * 2018-07-30 2020-02-06 英二 平沢 Thermal image community watch system
CN109215280A (en) * 2018-09-20 2019-01-15 深圳市中电数通智慧安全科技股份有限公司 A kind of electrical fire integrated control system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LYALLCHAN: "命令行发送消息到微信企业号", 《网页HTTPS://WWW.JIANSHU.COM/P/985E99A515E0》 *

Similar Documents

Publication Publication Date Title
CN104507165B (en) Intelligent prompt method, system and device
CN106385483B (en) Telephone number processing method, mobile terminal and cloud server
CN103250402A (en) Voice-screen ARS service system, method for providing same, and computer-eadable recording medium
CN105898085B (en) Harass recognition methods and the device of communications account
US10033850B2 (en) Method for real time displaying information and mobile communication terminal
CN101727646A (en) Alarm system and method thereof of network bank
CN110414208A (en) Login validation method, calculates equipment and medium at device
CN1964533A (en) Mobile communication terminal and link management method of the same
CN110263581A (en) Contract signs method, system, terminal device and storage medium
CN106470145A (en) The method and apparatus of instant messaging
CN111325901A (en) Method and device for identifying mobile phone
CN106911866B (en) Method and device for voice customer service to synchronously acquire intelligent terminal information
CN102447788A (en) Method and device for reading multimedia message through mobile phone browser
CN111599145A (en) Device for realizing information alarm by enterprise WeChat
CN110442416B (en) Method, electronic device and computer-readable medium for presenting information
CN105554318B (en) Percept of call completed test device and method
CN101212787A (en) Personalized information publishing method and system
CN101227321A (en) Apparatus, system and method of complaining
CN104601616B (en) A kind of methods, devices and systems logging in Wireless Application Protocol website
CN109600738A (en) Updating method of user information, device, equipment and storage medium
CN113783828B (en) Service system monitoring method and device
CN201319613Y (en) Digital photo frame device
KR100668532B1 (en) Wireless electric bulletin board managing system and method
WO2004021666A1 (en) Procedure for operating an advertising and information system
KR100693183B1 (en) Moblie terminal with function of personal information automatic transportation and method thereof

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: 20200828

RJ01 Rejection of invention patent application after publication