CN113326056B - Data processing method, data processing device, storage medium and processor - Google Patents

Data processing method, data processing device, storage medium and processor Download PDF

Info

Publication number
CN113326056B
CN113326056B CN202110717701.7A CN202110717701A CN113326056B CN 113326056 B CN113326056 B CN 113326056B CN 202110717701 A CN202110717701 A CN 202110717701A CN 113326056 B CN113326056 B CN 113326056B
Authority
CN
China
Prior art keywords
wireless communication
communication module
server
data
equipment
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
CN202110717701.7A
Other languages
Chinese (zh)
Other versions
CN113326056A (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.)
Shanghai Zhijing Information Technology Co ltd
Original Assignee
Shanghai Zhijing 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 Shanghai Zhijing Information Technology Co ltd filed Critical Shanghai Zhijing Information Technology Co ltd
Priority to CN202110717701.7A priority Critical patent/CN113326056B/en
Publication of CN113326056A publication Critical patent/CN113326056A/en
Application granted granted Critical
Publication of CN113326056B publication Critical patent/CN113326056B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

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)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a data processing method, a data processing device, a processor and a storage medium. The method comprises the following steps: detecting the current network state of the wireless communication module, wherein the current network state comprises the network residing state of a first server and the connection state of the first server, and the first server is any one of different types of servers; if the network residing state is network residing, the connection state is connection, and the first equipment sends an equipment information acquisition request to the first equipment, wherein the first equipment is any one of different types of equipment; receiving equipment information returned by the first equipment according to the equipment information acquisition request; sending the device information and the module information of the wireless communication module to the first server, enabling the wireless communication module to enter a working state, and realizing data interaction between the edge device and the cloud end by adopting a south-north data synchronous transparent transmission program (a south interface standard protocol and a north interface standard protocol) in the working state.

Description

Data processing method, data processing device, storage medium and processor
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, a data processing apparatus, a storage medium, and a processor.
Background
In an IoT application, a wireless communication module is usually used to implement uplink and downlink of data between an edge and a cloud, and the module has multiple models provided by multiple companies to support multiple systems and protocols to implement data transmission, but IoT devices need to call command sets provided by the models to complete data transmission when integrating and using the module. Because the command sets of different types of communication modules are different, command calls and command responses matched when different communication modules are integrated by hardware are different in practical application, and when products need to be developed in series, the code requirements on related communication parts of IoT equipment firmware brought by matching different communication modules and communication protocols are different, so that the development difficulty is high.
Disclosure of Invention
The invention aims to provide a data processing method, a data processing device, a storage medium and a processor.
In order to achieve the above object, a first aspect of the present invention provides a data processing method applied to a wireless communication module, where the wireless communication module implements data interaction with different types of devices through a southbound interface standard protocol and implements data interaction with different types of servers through a northbound interface standard protocol, and the method includes:
detecting a current network state of the wireless communication module, wherein the current network state comprises a network residing state of a first server and a connection state of the first server, and the first server is any one of the servers of different types;
if the network residing state is network residing and the connection state is connection, sending the current network state to the first server and sending an equipment information acquisition request to first equipment, wherein the first equipment is any one of the different types of equipment;
receiving equipment information returned by the first equipment according to the equipment information acquisition request;
and sending the equipment information and the module information of the wireless communication module to the first server, wherein the wireless communication module enters a working state.
Optionally, after the wireless communication module enters the working state, the method further includes: receiving a software online upgrading event issued by a first server, wherein the online upgrading event comprises a storage address of a first data packet; forwarding the software online upgrade event to the first device; receiving a data packet acquisition instruction returned by the first device according to the software online upgrading event, wherein the data packet acquisition instruction carries a storage address of the first data packet; acquiring the first data packet according to the storage address of the first data packet; and sending the first data packet to the first equipment so that the first equipment adopts the first data packet to upgrade the software.
Optionally, after the wireless communication module enters the working state, the method further includes: receiving a firmware online upgrading event issued by a first server, wherein the firmware online upgrading event comprises a storage address of a second data packet; acquiring the second data packet according to the storage address of the second data packet; and upgrading the firmware of the wireless communication module by adopting the second data packet.
Optionally, after the wireless communication module enters the working state, the method further includes: receiving first data uploaded by the first equipment according to the southbound interface standard protocol; analyzing the first data according to the southbound interface standard protocol to obtain analyzed data; encapsulating the analytic data according to a northbound interface standard protocol; and sending the encapsulated analysis data.
Optionally, the method further comprises: sending a first request to the first device according to the current product serial number of the wireless communication module; the receiving first data uploaded by the first device according to the southbound interface standard protocol includes: receiving the first data uploaded by the first device, wherein the format of the first data is consistent with that of the southbound interface standard protocol, and the first data carries the first product serial number; if the first product serial number is the same as the current product serial number, executing the step of analyzing the first data by adopting the southbound interface standard protocol, and accumulating the current product serial number by 1, wherein the current product serial number is accumulated from 1 to 255 circularly; and if the first product serial number is different from the current product serial number, executing the step of sending a first request to the first device according to the current product serial number of the wireless communication module until the first product serial number is the same as the current product serial number or the number of times of sending the first request is greater than a first preset number of times, and stopping sending the first request.
Optionally, after the wireless communication module enters the operating state, the method further includes: subscribing a service theme to the first server according to service requirements; after subscribing the content of the service theme, splicing the content of the service theme according to a format agreed by the wireless communication module and the first equipment; and sending the spliced contents of the service theme to the first equipment.
Optionally, after the wireless communication module enters the working state, the method further includes: receiving a second request sent by the first device, wherein the second request carries a third product serial number; assigning the third product serial number to a current product serial number of the wireless communication module; responding to the second request, and after the response is completed, accumulating the current product serial number by 1, wherein the current product serial number is accumulated from 1 to 255 in a circulating way.
The second aspect of the present invention provides a data processing apparatus, applied to a wireless communication module, the wireless communication module implements data interaction with different types of devices through a southbound interface standard protocol, and implements data interaction with different types of servers through a northbound interface standard protocol, the apparatus comprising:
a detection module, configured to detect a current network state of the wireless communication module, where the current network state includes a network camping state of a first server and a connection state of the first server, and the first server is any one of the servers of different types;
a data sending module, configured to send the current network state to the first server and send a device information acquisition request to a first device if the network residing state is network residing and the connection state is connection, where the first device is any one of the devices of different types;
the data receiving module is used for receiving the equipment information returned by the first equipment according to the equipment information acquisition request;
the data sending module is further configured to send the device information and the module information of the wireless communication module to the first server, and the wireless communication module enters a working state.
A third aspect of the invention provides a machine-readable storage medium having stored thereon instructions which, when executed by a processor, cause the processor to be configured to perform the above-described data processing method.
A fourth aspect of the invention provides a processor configured to perform the data processing method described above.
Through the technical scheme, the data interaction with different types of equipment is realized through the unified southward interface standard protocol defined in the wireless communication module, and the data interaction with different types of servers is realized through the defined unified northward interface standard protocol, so that the different types of equipment can perform data interaction with the different types of servers through the wireless communication module by using the standard protocol, and the repeated labor of developing communication programs is avoided.
Additional features and advantages of embodiments of the present invention will be described in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
fig. 1 schematically shows an application scenario of a data processing method according to an embodiment of the present invention;
FIG. 2 schematically shows a flow diagram of a data processing method according to an embodiment of the invention;
FIG. 3 schematically illustrates a timing flow diagram for an online upgrade of software according to an embodiment of the present invention;
FIG. 4 schematically illustrates a timing flow diagram for an online upgrade of firmware according to an embodiment of the present invention;
FIG. 5 schematically shows a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 6 schematically shows an internal structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
The data processing method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 and the wireless communication module 103 communicate with each other through a network, and the wireless communication module 103 and the server 104 communicate with each other through the network. The terminal 102 and the wireless communication module 103 realize data interaction through a southbound interface standard protocol, and the wireless communication module 103 and the server 104 realize data interaction through a northbound interface standard protocol. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the wireless communication module 103 may be a CAT1 module, a ZIGBEE, 2G, NB, bluetooth, loRa, and 5G module, and the like, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Fig. 2 schematically shows a flow diagram of a data processing method according to an embodiment of the invention. As shown in fig. 2, in an embodiment of the present invention, a data processing method is provided, which is applied to the wireless communication module 103, and includes the following steps:
step 201, detecting the current network state of the wireless communication module.
In this embodiment, the wireless communication module implements data interaction with different types of devices through the southbound interface standard protocol, and implements data interaction with different types of servers through the northbound interface standard protocol, and the current network state includes a network resident state of the first server and a connection state of the first server, where the first server is any one of the different types of servers.
Step 202, if the network residing state is the network residing state and the connection state is the connection state, sending the current network state to the first server, and sending the device information acquisition request to the first device.
In this particular embodiment, the first device is any one of different types of devices.
Step 203, receiving the device information returned by the first device according to the device information acquisition request.
And step 204, sending the equipment information and the module information of the wireless communication module to the first server, and enabling the wireless communication module to enter a working state.
Specifically, the wireless communication module may be a CAT1 module, ZIGBEE, 2G, NB, bluetooth, loRa, and 5G module, or the like. The device is a device which can establish communication connection with the server through a wireless communication module, in practical situations, the types of the devices are various, and different types of devices can execute the communication
The current network state refers to a network state of the wireless communication module at the current moment, and the network state at least comprises a network residing state of the first server and a connection state of the first server. The network status may also include a connection status for the software online upgrade.
After the wireless communication module is powered on, the network-resident state of the wireless communication module and the connection state of the wireless communication module and the first server are detected. In the detection process of the network residing state and the connection state, the network residing state is determined first, and if network residing is not detected, the network residing condition of the wireless communication module is checked in a circulating mode. If not on the net
And if the duration exceeds the preset duration, restarting the wireless communication module. If the network residence is successful, whether the wireless communication module is connected with the first server is checked, whether the wireless communication module is connected with the first server can be determined by checking whether the key of the first server is successfully configured, if the key of the first server is successfully configured, the connection is indicated, if the key of the first server is not successfully configured, the connection is not indicated, if the key of the first server is not successfully configured, the key information of the first server can be requested through a specified server, and the communication connection with the first server is established through the key information.
And when the current network state comprises the network-resident state and the connected state, sending the current network state to the first server. And sending a request for acquiring the device information of the first device, namely a device information acquisition request, to the server, and after receiving the request, the device uploads the device information of the first device. Wherein the first device is any one of different types of devices. The device information includes a hardware version number, a software version number, and the like of the device. The module information of the wireless communication module includes a hardware version number, a software version number, and the like.
The wireless communication module sends the module information and the device information of the first device to the first server. When the wireless communication module enters a normal working state, the wireless communication module can process the publishing and subscribing of various MQTT messages, process various requests of equipment, process the software online upgrade of the equipment, process the firmware upgrade of the wireless communication module, process the log report of the communication module or the equipment, and reconnect the MQTT after disconnection, etc.
According to the data processing method, the south interface standard protocol for realizing data interaction with different types of equipment and the north interface standard protocol for realizing data interaction with different types of servers are designed on the wireless communication module, so that the development difficulty of the communication protocol of the wireless communication module in the Internet of things system is simplified, and various equipment and servers can realize communication by adopting the standard communication protocol corresponding to the wireless communication module.
In one embodiment, after the wireless communication module enters the working state, the method further includes: receiving a software online upgrading event issued by a first server, wherein the online upgrading event comprises a storage address of a first data packet; forwarding the software online upgrade event to the first device; receiving a data packet acquisition instruction returned by the first device according to the software online upgrading event, wherein the data packet acquisition instruction carries a storage address of the first data packet; acquiring a first data packet according to the storage address of the first data packet; and sending the first data packet to the first equipment so that the first equipment adopts the first data packet to upgrade the software.
Specifically, after the wireless communication module enters the working state, a request of the device or the service may be executed, and if a software online upgrade event issued by the first server is received, the event is forwarded to the first device. After receiving the online upgrade event, the first device sends a data packet acquisition instruction for acquiring a first data packet to the wireless communication module, the wireless communication module acquires the data packet according to an address contained in the data acquisition instruction and sends the acquired data packet to the first device, and the first device adopts the data packet to perform software upgrade.
In a specific embodiment, the first data packet may be obtained by using a fragment obtaining manner, that is, the first data packet is divided into a plurality of data slices, one data slice is obtained each time, and all the data slices of the first data packet are obtained to obtain the first data packet.
In a specific embodiment, the first data packet is verified, and when the verification result is that the first data packet is completely acquired, the device feeds back a transmission completion message to the wireless communication module, and the wireless communication module sends the transmission completion message to the server.
In a specific example, as shown in fig. 3, fig. 3 is a timing flowchart of software online upgrade, where fig. 3 includes a first server, a second server, a wireless communication module, and a first device. The software online upgrade comprises the following steps:
a1: the first server issues a SOTA upgrade event (software online upgrade event) to the wireless communication module.
A2: the wireless communication module transmits an upgrade event to the first device. And when the first equipment responds to the message to the wireless communication module, informing the wireless communication module to connect the second server according to the server address provided in the SOTA upgrading event.
A3: the first device cyclically takes the fragmented data packets through the wireless communication module until all fragmented data packets are taken, and checks the data packets. The wireless communication module sends a data packet acquisition request to the first server, the first server establishes connection with the second server according to an address in the data packet acquisition request, and acquires the first data packet from the second server until the whole first data packet is acquired.
A4: the first equipment issues a message that the transmission of the first data packet is finished through the wireless communication module, and informs the first server whether the equipment successfully acquires the SOTA upgrading data packet (the first data packet);
a5: if the device is successfully obtained, the SOTA of the device is upgraded, and after the upgrading is completed, the device is restarted in a software restarting mode. The equipment is started and enters a program for updating and upgrading a firmware program, SOTA upgrading is carried out on the equipment, and the equipment jumps to an application program to run.
In one embodiment, after the wireless communication module enters the working state, the method further includes: receiving a firmware online upgrading event issued by a first server, wherein the firmware online upgrading event comprises a storage address of a second data packet; acquiring a second data packet according to the storage address of the second data packet; and upgrading the firmware of the wireless communication module by adopting the second data packet.
Specifically, the firmware online upgrade event (FOTA upgrade event) refers to an upgrade event of firmware on the wireless communication module. The upgrading event comprises a storage address of a firmware upgrading packet (a second data packet), communication connection between the wireless communication module and a third server where the storage address is located is established according to the storage address, and after the communication connection is established, the second data packet is used for upgrading the firmware from a third service according to the second data packet.
In a specific embodiment, as shown in fig. 4, fig. 4 is a timing flowchart of firmware online upgrade, where fig. 4 includes a first server, a third server, a wireless communication module, and a first device. The firmware online upgrade comprises the following steps:
b1: the first server issues a FOTA upgrade event.
B2: the wireless communication module subscribes to the FOTA upgrade event. The upgrade package (second data package) specified in the FOTA upgrade event is acquired by the server address provided in the FOTA upgrade event.
B3: the second server returns the second data packet.
B4: the wireless communication module group issues an upgrade response message to inform the first server whether the second data packet is successfully fetched or not;
b5: if the second data packet is successfully acquired, the wireless communication module performs FOTA upgrade, and after the upgrade is completed, the communication module is restarted in a software restarting mode.
In one embodiment, after the wireless communication module enters the working state, the method further includes: receiving first data uploaded by first equipment according to a southbound interface standard protocol; analyzing the first data according to a southbound interface standard protocol to obtain analyzed data; and encapsulating the analytic data according to the northbound interface standard protocol, and sending the encapsulated analytic data.
Specifically, the first data may be data that is actively uploaded to the server by the first device through the wireless communication module, or may be data that is uploaded according to an instruction issued by the first server through the wireless communication module. The first data may be data related to a service, or may be device information of the first device, and the like, which is not limited herein. The first data sent to the wireless communication module is data processed according to a preset protocol, and after the wireless communication module receives the first data, the first data is analyzed through the appointed protocol to obtain analyzed data. In order to upload data to the first server, the analyzed data is subjected to data processing according to a protocol agreed by the server and the wireless communication module to obtain encapsulated analyzed data, the data is uploaded to the first server, and the first server analyzes the encapsulated analyzed data according to the agreed protocol after receiving the data. The first device processes data by adopting a universal southbound interface protocol, then uploads the data to the wireless communication module, the wireless communication module analyzes the data, splices the data according to a northbound interface standard protocol and sends the data to the first server, the data uploaded by the device are rapidly identified by the wireless communication module, and the data are uploaded to the server, so that the device data are transparently transmitted to the server. The communication module is non-inductive to service data, and communication and service are decoupled.
In one embodiment, after the wireless communication module enters the working state, the method further comprises: subscribing a service theme to a first server according to service requirements; after subscribing the content of the service theme, splicing the content of the service theme according to a format appointed by the wireless communication module and the first equipment; and sending the content of the spliced service theme to the first equipment.
Specifically, the first data sent by the first device may be a service topic (a service topic subscribed according to service requirements) or service content. If the service theme is the service theme, the wireless communication module sends the service theme to the first server after receiving the service theme, the first server feeds back corresponding content according to the service theme, and the wireless communication module splices the content by adopting a format agreed by the wireless communication module and the first equipment after receiving the content of the service theme; and sending the content of the spliced service theme to the first equipment. The wireless communication module is insensitive to service data, and communication and service are decoupled. Namely, the conversion format is converted according to the agreement of both sides and is transmitted to the MCU.
In a specific embodiment, the first device issues an MQTT message to the wireless communication module through a serial port according to a specified protocol data stream instruction; the wireless communication module analyzes the theme and the content which the equipment wants to publish through a protocol agreed by the wireless communication module and the first equipment, and publishes the theme and the content which the first equipment wants to publish to the first server according to a connection format agreed by the two parties. Meanwhile, the wireless communication module is insensitive to service data, and communication and service are decoupled. Namely, only the format conversion and the issuing are required according to the convention of both sides.
In a specific embodiment, the wireless communication module is powered on and started up, and after the wireless communication module is connected to a first server, the wireless communication module subscribes a theme in a specified range according to specified requirements; after subscribing the theme related to the first server, the wireless communication module assembles a new format according to the format requirements agreed by the wireless communication module and the first device, and then transmits the new format to the first device through the serial port. Meanwhile, the communication module is insensitive to service data, and communication and service are decoupled. Namely, the conversion format is converted according to the agreement of both parties and the converted format is issued to the equipment.
In one embodiment, the data processing method further includes: sending a first request to the first device according to the current product serial number of the wireless communication module; receiving first data uploaded by first equipment according to a southbound interface standard protocol, wherein the first data comprises: receiving first data uploaded by first equipment, wherein the format of the first data is consistent with that of the southbound interface standard protocol, and the first data carries a first product serial number; if the first product serial number is the same as the current product serial number, executing a step of analyzing the first data by adopting a southbound interface standard protocol, and accumulating the current product serial number by 1, wherein the current product serial number is circularly accumulated from 1 to 255; and if the first product serial number is different from the current product serial number, executing the step of sending a first request to the first equipment according to the current product serial number of the wireless communication module until the first product serial number is the same as the current product serial number or the number of times of sending the first request is greater than a first preset number of times, and stopping sending the first request.
Specifically, a Serial Number (SN) is tag data for a service request. The current product serial number is tag data for identifying a current request (first request) of the wireless communication module, and the first product serial number is tag data for identifying a service request of the first data. If the first product serial number is the same as the current product serial number, the service request of the current request and the first data is the same, the wireless communication module analyzes the first data and updates the current product serial number, so that the updated current product serial number is 1 larger than the current product serial number before updating, the updating range of the current product serial number is 1-255, and if the current product serial number is equal to 256 or 0, the current product serial number is equal to 1. Otherwise, if the current product serial number is not the same as the first product serial number, the first request is sent to the first equipment again, the current product serial number is not changed, and if the sending times of the first request is equal to that of the first request
In a specific embodiment, in the serial port communication process between the wireless communication module and the equipment, all interactive data frames contain product serial numbers, the wireless communication module and the equipment are agreed, and the SN range is from 1 to 255 for cyclic accumulation; the wireless communication MODULE sends a request to the device based on the current product serial number (SN-MODULE) and receives a response from the device. If the device does not respond, the request is sent at most 3 times or 5 times (first preset times) in total, and the request is abandoned to be sent to the device; if the response of the device is received, judging whether the SN of the response is equal to the SN-MODEL, namely, whether the responded data frame is the data of the current request instruction for the wireless communication MODULE; if yes, processing the corresponding business agreed by both parties, and making SN-MODEL equal to 1 when the SN-MODEL is accumulated to be 1 and the SN-MODEL is equal to 256 or 0; if not, the process is ended directly.
In one embodiment, after the wireless communication module enters the working state, the method further includes: receiving a second request sent by the first equipment, wherein the second request carries a third product serial number; assigning the third product serial number to the current product serial number of the wireless communication module; in response to the second request, and after the response is complete, the current product serial number is incremented by 1, wherein the current product serial number is incremented cyclically from 1 to 255.
Specifically, the second request refers to a request sent by the first device to the wireless communication module, where the request may be a request actively sent by the first device to the wireless communication module, or a request sent according to information sent by the wireless communication module. The type of the request may be a data acquisition request, a topic subscription request, or other service requests, which is not specifically limited herein. The third product serial number is a product serial number carried by the first device when the first device sends the message to the wireless communication module, and the first device carries the product serial number each time the first device sends the message to the wireless communication module. And if the message is a request message, assigning the product serial number of the request to the current product serial number of the wireless communication module. To ensure that the current product serial number is consistent with the serial number of the requested product of the first device. And upon completion of the response to the request, modifying the current product serial number such that the modified current product serial number is greater than the unmodified current product serial number by 1. The current product serial number is circularly accumulated from 1 to 255, which means that if the current product serial number is accumulated to 256, the current product serial number is modified to 1 and is accumulated again.
In an embodiment, the wireless communication module may implement a server disconnection reconnection mechanism, and the specific steps of the mechanism are as follows:
1) It is determined whether the first server is already connected. If the connection is already made, the time is delayed by 1 second, and the next judgment is made.
2) If the first server is not connected, whether the first server is changed from the connection state to disconnection is judged. If yes, delaying for 2 seconds, and then connecting the first server. If not, directly connecting the first server;
3) After the action of connecting the first server is finished, delaying for 1 second, and judging whether the action is successfully connected with the first server. If so, go back to step 1). If not, directly connecting the first server, returning to the step 3, and delaying for 1 second to judge whether the connection action is successful.
In one embodiment, the wireless communication module may implement an automatic timing function, and the implementation of the function includes the following specific steps:
1) After the wireless communication module is started, the timestamp is set to be 0, and in case that the equipment inquires the network time, the abnormal random timestamp is responded;
2) Judging whether the wireless communication module is in a network parking state, and restarting the wireless communication module if the wireless communication module is in the network parking state within a first preset time (3 minutes, 5 minutes and the like);
3) If the wireless communication module is successfully parked in the network, acquiring network time and updating the timestamp;
4) And when the wireless communication module is continuously powered on, and the second preset time (24 hours) is accumulated in a circulating mode every time, the network time is obtained again, the timestamp is updated once and is issued to the equipment, so that the condition that the time is inaccurate due to uncertain factors of the wireless communication module and the local timestamp of the equipment is avoided.
In a specific embodiment, the external interface of the wireless communication module comprises a serial port communicating with the device MCU, a key requesting to connect with the cloud MQTT server through a designated TCP server, a subscription theme and a release theme through the cloud MQTT server, a device MCU upgrade package requesting to forward to the device MCU through the designated TCP server for SOTA upgrade, an FOTA upgrade of the communication module through an upgrade package requesting to be performed by the designated HTTP server, a log report of the communication module through the UDP server, and a log report of the device MCU. The communication mode supported by the wireless communication module supports protocols such as HTTP, MQTT, TCP, UDP and the like. The wireless communication module can be upgraded by FOTA, the IoT equipment firmware SOTA can be upgraded by the wireless communication module, and connection information such as HTTP, MQTT, TCP, UDP and the like used when the wireless communication module communicates with a cloud (server) can be flexibly configured and stored. The wireless communication module has a data encryption transmission function. The wireless communication module has a reconnection mechanism of network disconnection and abnormal connection, is noninductive to service data, decouples communication and service, and has the function of automatically correcting time and the function of supporting shadow to synchronize downlink data.
A set of data synchronization transparent transmission program in the north-south direction is developed in the wireless communication module, so that the communication development aspect of IoT equipment on data cloud becomes simpler and more uniform, and due to the fact that the module is provided with a cloud end and a side end bridge, data of different service scenes of the side end and the cloud ends of different environments can be interacted through flexible configuration, so that in the face of various IoT equipment to be developed in various application scenes, data synchronization can be achieved with different cloud ends (configurable) through communication modules of different models (after customization) only by using the same interface program. Not only is the repeated labor of developing communication programs avoided, but also the high stability, the high consistency and the high security of the communication are ensured, the research and development efficiency is greatly improved, and the thickness of a supply chain is increased.
Complicated and complicated communication involving use commands is packaged in the wireless communication module, the first device uses a simple protocol to perform data interaction with a cloud (server) through the customized wireless communication module, and the IoT device does not need to know information such as an access mode, an account password and a network state of the cloud and manage tasks such as network reconnection, time correction and data retransmission in mobile communication, so that transparent transmission of data is realized.
In one embodiment, as shown in fig. 5, there is provided a data processing apparatus including a detection module, a data transmission module, and a data reception module, wherein:
the detection module 301 is configured to detect a current network state of the wireless communication module, where the current network state includes a network residing state of a first server and a connection state of the first server, and the first server is any one of different types of servers, where the wireless communication module implements data interaction with different types of devices through a southbound interface standard protocol and implements data interaction with different types of servers through a northbound interface standard protocol;
a data sending module 302, configured to send the current network state to a first server and send a device information acquisition request to a first device if the network residing state is network residing and the connection state is connection, where the first device is any one of different types of devices;
a data receiving module 303, configured to receive device information returned by the first device according to the device information obtaining request;
the data sending module 302 is further configured to send the device information and the module information of the wireless communication module to the first server, and the wireless communication module enters a working state.
In one embodiment, the data receiving module 303 is further configured to receive an online upgrade event of the software issued by the first server, where the online upgrade event includes a storage address of the first data packet;
the data sending module 302 is further configured to forward the software online upgrade event to the first device;
the data receiving module 303 is further configured to receive a data packet obtaining instruction returned by the first device according to the software online upgrade event, where the data packet obtaining instruction carries a storage address of the first data packet;
the data acquisition module is used for acquiring the first data packet according to the storage address of the first data packet;
the data sending module 302 is further configured to send the first data packet to the first device, so that the first device uses the first data packet to upgrade the software.
In one embodiment, the data receiving module is further configured to receive a firmware online upgrade event issued by the first server, where the firmware online upgrade event includes a storage address of the second data packet;
the data acquisition module is used for acquiring the second data packet according to the storage address of the second data packet;
and the firmware upgrading module is used for upgrading the firmware of the wireless communication module by adopting the second data packet.
In one embodiment, the data receiving module is further configured to receive first data uploaded by the first device according to a southbound interface standard protocol;
the data analysis module is used for analyzing the first data according to the southbound interface standard protocol to obtain analysis data;
the data splicing module is used for packaging and analyzing data according to a standard protocol of a northbound interface;
the data sending module 302 is further configured to send the encapsulated analysis data.
In an embodiment, the data sending module 302 is further configured to subscribe to a service topic from the first server according to a service requirement;
the theme splicing module is used for splicing the contents of the service theme according to the format agreed by the wireless communication module and the first equipment after subscribing the contents of the service theme;
a data sending module 302, configured to send the content of the spliced service theme to the first device.
In one embodiment, the data sending module 302 is further configured to send a first request to the first device according to the current product serial number of the wireless communication module;
the data receiving module 303 is further configured to: receiving first data uploaded by first equipment, wherein the format of the first data is consistent with that of a southbound interface standard protocol, and the first data carries a first product serial number;
the data analysis module is used for executing the step of analyzing the first data by adopting a southbound interface standard protocol if the first product serial number is the same as the current product serial number, and the current product serial number is accumulated by 1, wherein the current product serial number is accumulated from 1 to 255 in a circulating way;
the data sending module 302 is further configured to, if the first product serial number is different from the current product serial number, execute a step of sending a first request to the first device according to the current product serial number of the wireless communication module until the first product serial number is the same as the current product serial number, or the number of times of sending the first request is greater than a first preset number of times, and stop sending the first request.
In an embodiment, the data receiving module 303 is further configured to receive a second request sent by the first device, where the second request carries a third product serial number;
the assignment module is used for assigning the third product serial number to the current product serial number of the wireless communication module;
and the request response module is used for responding to the second request, and accumulating the current product serial number by 1 after the response is completed, wherein the current product serial number is accumulated circularly from 1 to 255.
The data processing device comprises a processor and a memory, the detection module, the data sending module, the data receiving module and the like are stored in the memory as program units, and the processor executes the program modules stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more than one kernel can be set, and the data processing method is realized by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), including at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, the program implementing the above-described data processing method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes the data processing method during running.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer apparatus includes a processor a01, a network interface a02, a memory (not shown in the figure), and a database (not shown in the figure) connected through a system bus. Wherein the processor a01 of the computer device is arranged to provide computing and control capabilities. The memory of the computer apparatus includes an internal memory a03 and a nonvolatile storage medium a04. The nonvolatile storage medium a04 stores an operating system B01, a computer program B02, and a database (not shown). The internal memory a03 provides an environment for running the operating system B01 and the computer program B02 in the nonvolatile storage medium a04. The database of the computer equipment is used for storing the data in the data processing method. The network interface a02 of the computer apparatus is used for communicating with an external terminal through a network connection. The computer program B02 is executed by the processor a01 to implement a data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the data processing method is realized when the processor executes the program.
The present application also provides a computer program product adapted to perform a program for initializing the steps of the above-mentioned data processing method when executed on a data processing device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (10)

1. A data processing method applied to a wireless communication module, wherein the wireless communication module implements data interaction with different types of devices through a southbound interface standard protocol and implements data interaction with different types of servers through a northbound interface standard protocol, and the method comprises:
detecting a current network state of the wireless communication module, wherein the current network state comprises a network residing state of a first server and a connection state of the first server, and the first server is any one of the servers of different types; if the network non-stay is detected, circularly checking the network stay condition of the wireless communication module; if the duration of the non-network-residing state exceeds the preset duration, restarting the wireless communication module; if the network residence is successful, checking whether the wireless communication module is connected with the first server, determining whether the wireless communication module is connected with the first server by checking whether the key of the first server is successfully configured, and if the key of the first server is successfully configured, indicating that the wireless communication module is connected; if the key of the first server is not successfully configured, indicating that the connection is not performed; when the wireless communication module is not connected with the first server, the appointed server asks for the key information of the first server, and communication connection with the first server is established through the key information;
if the network residing state is network residing and the connection state is connection, sending the current network state to the first server and sending an equipment information acquisition request to first equipment, wherein the first equipment is any one of the different types of equipment;
receiving equipment information returned by the first equipment according to the equipment information acquisition request;
and sending the equipment information and the module information of the wireless communication module to the first server, wherein the wireless communication module enters a working state.
2. The method of claim 1, wherein after the wireless communication module enters the active state, the method further comprises:
receiving a software online upgrading event issued by the first server, wherein the online upgrading event comprises a storage address of a first data packet;
forwarding the software online upgrade event to the first device;
receiving a data packet acquisition instruction returned by the first device according to the software online upgrading event, wherein the data packet acquisition instruction carries a storage address of the first data packet;
acquiring the first data packet according to the storage address of the first data packet;
and sending the first data packet to the first equipment so that the first equipment adopts the first data packet to upgrade the software.
3. The method of claim 1, wherein after the wireless communication module enters the active state, the method further comprises:
receiving a firmware online upgrade event issued by the first server, wherein the firmware online upgrade event comprises a storage address of a second data packet;
acquiring the second data packet according to the storage address of the second data packet;
and upgrading the firmware of the wireless communication module by adopting the second data packet.
4. The method of claim 1, wherein after the wireless communication module enters the active state, the method further comprises:
receiving first data uploaded by the first equipment according to the southbound interface standard protocol;
analyzing the first data according to the southbound interface standard protocol to obtain analyzed data;
encapsulating the analytic data according to a northbound interface standard protocol;
and sending the packaged analysis data.
5. The method of claim 4, further comprising:
sending a first request to the first device according to the current product serial number of the wireless communication module;
the receiving first data uploaded by the first device according to the southbound interface standard protocol includes: receiving the first data uploaded by the first device, wherein the format of the first data is consistent with that of the southbound interface standard protocol, and the first data carries a first product serial number;
if the first product serial number is the same as the current product serial number, executing a step of analyzing the first data by adopting the southbound interface standard protocol, and accumulating the current product serial number by 1, wherein the current product serial number is accumulated circularly from 1 to 255;
and if the first product serial number is different from the current product serial number, executing the step of sending a first request to the first device according to the current product serial number of the wireless communication module until the first product serial number is the same as the current product serial number or the number of times of sending the first request is greater than a first preset number, and stopping sending the first request.
6. The method according to claim 1 or 4, wherein after the wireless communication module enters the active state, the method further comprises:
subscribing a service theme to the first server according to service requirements;
after subscribing the content of the service theme, splicing the content of the service theme according to a format agreed by the wireless communication module and the first equipment;
and sending the spliced contents of the service theme to the first equipment.
7. The method of claim 1, wherein after the wireless communication module enters the active state, the method further comprises:
receiving a second request sent by the first device, wherein the second request carries a third product serial number;
assigning the third product serial number to a current product serial number of the wireless communication module;
responding to the second request, and after the response is completed, accumulating the current product serial number by 1, wherein the current product serial number is accumulated from 1 to 255 in a circulating way.
8. A data processing apparatus applied to a wireless communication module, the wireless communication module implementing data interaction with different types of devices through a southbound interface standard protocol and implementing data interaction with different types of servers through a northbound interface standard protocol, the apparatus comprising:
a detection module, configured to detect a current network state of the wireless communication module, where the current network state includes a network camping state of a first server and a connection state of the first server, and the first server is any one of the servers of different types; if the network is not parked, circularly checking the network parking condition of the wireless communication module; if the duration of the non-network-residing state exceeds the preset duration, restarting the wireless communication module; if the network residence is successful, checking whether the wireless communication module is connected with the first server, determining whether the wireless communication module is connected with the first server by checking whether the key of the first server is successfully configured, and if the key of the first server is successfully configured, indicating that the wireless communication module is connected; if the key of the first server is not successfully configured, indicating that the first server is not connected; when the wireless communication module is not connected with the first server, the appointed server asks for the key information of the first server, and communication connection with the first server is established through the key information;
a data sending module, configured to send the current network state to the first server and send a device information acquisition request to a first device if the network residing state is network residing and the connection state is connection, where the first device is any one of the devices of different types;
the data receiving module is used for receiving the equipment information returned by the first equipment according to the equipment information acquisition request;
the data sending module is further configured to send the device information and the module information of the wireless communication module to the first server, and the wireless communication module enters a working state.
9. A machine-readable storage medium having instructions stored thereon, which when executed by a processor, cause the processor to be configured to perform a data processing method according to any one of claims 1 to 7.
10. A processor configured to perform the data processing method of any one of claims 1 to 7.
CN202110717701.7A 2021-06-28 2021-06-28 Data processing method, data processing device, storage medium and processor Active CN113326056B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110717701.7A CN113326056B (en) 2021-06-28 2021-06-28 Data processing method, data processing device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110717701.7A CN113326056B (en) 2021-06-28 2021-06-28 Data processing method, data processing device, storage medium and processor

Publications (2)

Publication Number Publication Date
CN113326056A CN113326056A (en) 2021-08-31
CN113326056B true CN113326056B (en) 2022-10-21

Family

ID=77424953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110717701.7A Active CN113326056B (en) 2021-06-28 2021-06-28 Data processing method, data processing device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN113326056B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946618B (en) * 2021-12-21 2022-03-04 深圳市思迅软件股份有限公司 Cloud data interaction method and system, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721218A (en) * 2016-03-04 2016-06-29 深圳采集云数据科技有限公司 Medical guiding system embedded firmware upgrade system
WO2017161639A1 (en) * 2016-03-25 2017-09-28 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for selecting calling access domain, ims terminal, and home subscription server

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442401B (en) * 2007-11-19 2012-01-04 华为技术有限公司 Method and apparatus for sending and receiving data, and data transmission system
WO2012065010A1 (en) * 2010-11-11 2012-05-18 Qualcomm Incorporated Systems and methods for improving circuit switched fallback performance
US9734659B2 (en) * 2014-08-06 2017-08-15 Mido Play Inc. Single platform system for multiple jurisdiction lotteries and social media
CN105867952A (en) * 2015-01-20 2016-08-17 中国科学院上海高等研究院 Software upgrading method and system
US9967214B2 (en) * 2015-05-22 2018-05-08 Qualcomm Incorporated Direct client-to-client internet relay chat for softap clients
CN106936592B (en) * 2017-05-11 2020-05-22 成都信息工程大学 Three-party authentication key agreement method based on extended chaos algorithm
CN107172051A (en) * 2017-05-23 2017-09-15 南京邮电大学 A kind of method that internet of things equipment finds and managed
CN109246639B (en) * 2018-09-18 2021-08-06 快快利华(北京)网络科技有限公司 Data gateway system and communication method thereof
CN109445328B (en) * 2018-10-22 2021-07-16 北京广利核系统工程有限公司 Method and device for preventing replay attack of instrument control system of nuclear power station
CN109922053A (en) * 2019-02-22 2019-06-21 北京三快在线科技有限公司 Data transmission method, device, electronic equipment and readable storage medium storing program for executing
CN112394966A (en) * 2019-08-19 2021-02-23 云丁网络技术(北京)有限公司 Equipment upgrading method and device, computer readable medium and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721218A (en) * 2016-03-04 2016-06-29 深圳采集云数据科技有限公司 Medical guiding system embedded firmware upgrade system
WO2017161639A1 (en) * 2016-03-25 2017-09-28 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for selecting calling access domain, ims terminal, and home subscription server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
构建大型电力企业会计集中核算体系初探;赵振洪等;《广西电业》;20090930(第09期);全文 *
标准模型下网关口令认证密钥交换协议的通用框架;魏福山等;《计算机学报》;20120915(第09期);全文 *

Also Published As

Publication number Publication date
CN113326056A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN110300050B (en) Message pushing method and device, computer equipment and storage medium
EP2806357A1 (en) Method and communication device for updating a web application
CN111970315A (en) Method, device and system for pushing message
CN113630372A (en) Cloud edge coordination system for edge computing
WO2017167121A1 (en) Method and device for determining and applying association relationship between application programs
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
CN111447170B (en) Data processing method and system, computer system and computer readable medium
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN113326056B (en) Data processing method, data processing device, storage medium and processor
CN111490947A (en) Data packet transmitting method, data packet receiving method, system, device and medium
US20150296014A1 (en) Picture download method and apparatus
CN116055524A (en) Interaction method, processor and device for Internet platform and Internet of things equipment
CN116088901A (en) Firmware upgrading method and device, electronic equipment and computer storage medium
CN113556389B (en) RPC type cloud edge communication method, system and storage medium
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN113485952A (en) Data batch transmission method and device
CN112532664A (en) Data upgrading method and device
CN109842498B (en) Client configuration method, server, client and electronic equipment
CN116226045A (en) File data aggregation method, file data aggregation device and query system
CN113472850B (en) Link data acquisition method, device, system, electronic equipment and storage medium
CN106899652B (en) Method and device for pushing service processing result
CN112416641B (en) Method for detecting restarting of controlled end node in master-slave architecture and master control end node
CN112866083A (en) Message sending method, electronic equipment and communication system
CN112698948A (en) Method and device for acquiring product resources, storage medium and electronic device
CN113098936A (en) Method, device and equipment for pushing message to mobile terminal

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
GR01 Patent grant
GR01 Patent grant