Disclosure of Invention
The embodiment of the invention provides a data processing method and device for transfer equipment, which improve the data processing efficiency, remarkably enhance the data processing flexibility and optimize the whole transmission system of the Internet of things.
In a first aspect, an embodiment of the present invention provides a method for processing data of a transit device, where the method includes:
the method comprises the steps that a transfer device receives feedback data sent by a server, the feedback data respond to service data uploaded by an Internet of things terminal device and forwarded by the transfer device, and the feedback data comprise a correspondingly received Internet of things terminal device identifier;
the transfer equipment stores the feedback data to different cache queues according to the feedback parameters recorded in the feedback data;
when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things.
Optionally, the feedback parameters include feedback data types, and the relay device stores the feedback data in different buffer queues according to the feedback parameters recorded in the feedback data, including:
respectively storing the feedback data of different feedback data types to different buffer queues;
correspondingly, the determining the corresponding buffer queue according to the sending parameter includes:
and determining the data type identified in the sending parameters, and determining the buffer queue with the same data type according to the data type.
Optionally, the storing the feedback data to different buffer queues includes:
and determining a time delay identifier recorded in the feedback parameter, if the time delay identifier meets a set condition, awakening the Internet of things terminal equipment corresponding to the feedback data, and sending the feedback data to the Internet of things terminal equipment.
Optionally, each cache queue corresponds to a respective delay level, and when service data uploaded by the internet of things terminal device is not detected within a preset time, feedback data in the corresponding cache queue is acquired according to the delay level and sent to the corresponding internet of things terminal device.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus for transit equipment, including:
the data receiving module is used for receiving feedback data sent by the server by the transfer equipment, wherein the feedback data is in response to service data uploaded by the internet of things terminal equipment forwarded by the transfer equipment and comprises a correspondingly received internet of things terminal equipment identifier;
the data storage module is used for storing the feedback data to different cache queues by the transfer equipment according to the feedback parameters recorded in the feedback data;
and the data processing module is used for determining the sending parameters of the service data when the transfer equipment receives the service data uploaded by the terminal equipment of the internet of things, determining the corresponding cache queue according to the sending parameters, inquiring whether the determined cache queue contains feedback data corresponding to the terminal equipment of the internet of things, and if so, sending the feedback data to the terminal equipment of the internet of things.
Optionally, the data storage module is specifically configured to:
respectively storing the feedback data of different feedback data types to different buffer queues;
and determining the data type identified in the sending parameters, and determining the buffer queue with the same data type according to the data type.
Optionally, the data storage module is specifically configured to:
and determining a time delay identifier recorded in the feedback parameter, if the time delay identifier meets a set condition, awakening the Internet of things terminal equipment corresponding to the feedback data, and sending the feedback data to the Internet of things terminal equipment.
Optionally, the data processing module is further configured to:
each cache queue corresponds to a respective time delay grade, and when the fact that the internet of things terminal equipment uploads service data is not detected within a preset time, feedback data in the corresponding cache queue are obtained according to the time delay grade and sent to the corresponding internet of things terminal equipment.
In a third aspect, an embodiment of the present invention further provides a data processing device for a relay device, where the data processing device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method of the transfer device according to the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform the transit device data processing method according to the embodiment of the present invention.
In the embodiment of the invention, feedback data sent by a server is received through a transfer device; the transfer equipment stores the feedback data to different cache queues according to the feedback parameters recorded in the feedback data; when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things. According to the scheme, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole transmission system of the Internet of things is optimized.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
Fig. 1 is a flowchart of a method for processing data of a transit device according to an embodiment of the present invention, where the method is applicable to data processing of an internet of things device and executed by the transit device. The scheme of one embodiment of the application specifically comprises the following steps:
step S101, the transfer equipment receives feedback data sent by a server, the feedback data respond to service data uploaded by the Internet of things terminal equipment forwarded by the transfer equipment, and the feedback data contain the corresponding received Internet of things terminal equipment identification.
The internet of things terminal equipment forwards the service data to the server through the transfer equipment, and the server correspondingly generates feedback data and sends the feedback data to the transfer equipment. I.e. the feedback data is response data of the service data.
The feedback data comprises the corresponding received terminal equipment identification of the internet of things, namely the relay equipment can correspondingly distribute the feedback data according to the terminal equipment identification of the internet of things.
Step S102, the transfer device stores the feedback data to different buffer queues according to the feedback parameters recorded in the feedback data.
The feedback parameter may be a specific type of the feedback data, that is, the feedback parameter is put into a buffer queue of a corresponding type according to a difference of the type of the feedback data. The data types in this embodiment include: data query type, data update type, data instruction processing type.
Step S103, when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining a sending parameter of the service data, determining a corresponding cache queue according to the sending parameter, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things.
Wherein, the sending parameter includes a data type corresponding to the service data. In one embodiment, when service data uploaded by the terminal equipment of the internet of things is received, the data type of the service data is determined through the sending parameters, whether feedback data of the terminal equipment of the internet of things exist or not is inquired in a storage queue with the consistent data type, and if the feedback data exist, the feedback data are sent to the terminal equipment of the internet of things.
Therefore, the feedback data sent by the server is received through the transfer equipment; the transfer equipment stores the feedback data to different cache queues according to the feedback parameters recorded in the feedback data; when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things. According to the scheme, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole transmission system of the Internet of things is optimized.
Fig. 2 is a flowchart of another method for processing data of a transit device according to an embodiment of the present invention. On the basis of the above technical solution, the feedback parameters include feedback data types, and the relay device stores the feedback data in different buffer queues according to the feedback parameters recorded in the feedback data, including:
respectively storing the feedback data of different feedback data types to different buffer queues;
correspondingly, the determining the corresponding buffer queue according to the sending parameter includes:
and determining the data type identified in the sending parameters, and determining the buffer queue with the same data type according to the data type. The method specifically comprises the following steps:
step S201, the relay device receives feedback data sent by the server, where the feedback data is in response to service data uploaded by the internet of things terminal device forwarded by the relay device, and the feedback data includes an identifier of the internet of things terminal device received correspondingly.
Step S202, respectively storing the feedback data of different feedback data types to different buffer queues, determining the data type identified in the sending parameter, and determining the buffer queues of the same data type according to the data type.
In an embodiment, as described above, the process of storing the queues is further limited, the feedback data of different feedback data types are respectively stored in different buffer queues, the data type identified in the sending parameter is determined, and the buffer queues of the same data type are determined according to the data type. According to the data processing method and device, when the terminal equipment of the Internet of things is in the awakening state according to the data of the same data type, the terminal equipment of the Internet of things is judged to be in the awakening state because the terminal equipment of the Internet of things uploads the service data, and the feedback data are sent to the terminal equipment of the Internet of things to be processed.
Step S203, when the transfer equipment receives the service data uploaded by the terminal equipment of the Internet of things, determining the sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things.
According to the data processing method, the feedback data of different feedback data types are respectively stored in different cache queues, the data types identified in the sending parameters are determined, the cache queues of the same data types are determined according to the data types, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole transmission system of the internet of things is optimized.
Fig. 3 is a flowchart of another data processing method of a transit device according to an embodiment of the present invention. On the basis of the above technical solution, the storing the feedback data to different buffer queues includes:
and determining a time delay identifier recorded in the feedback parameter, if the time delay identifier meets a set condition, awakening the Internet of things terminal equipment corresponding to the feedback data, and sending the feedback data to the Internet of things terminal equipment. The method specifically comprises the following steps:
step S301, the relay device receives feedback data sent by the server, the feedback data is in response to service data uploaded by the Internet of things terminal device forwarded by the relay device, and the feedback data contains a corresponding received Internet of things terminal device identifier.
Step S302, the transfer device determines a delay identifier recorded in the feedback parameter according to the feedback parameter recorded in the feedback data, and if the delay identifier meets a set condition, wakes up the internet of things terminal device corresponding to the feedback data, and sends the feedback data to the internet of things terminal device.
In another embodiment, the scheme is further optimized. And the transfer equipment determines a time delay identifier recorded in the feedback parameter according to the feedback parameter recorded in the feedback data, and awakens the Internet of things terminal equipment corresponding to the feedback data if the time delay identifier meets a set condition, and sends the feedback data to the Internet of things terminal equipment. Specifically, before storing the feedback data, the relay device determines whether the feedback data is timely response data, if so, determines that the expiration meets a set condition, and optionally, if the recorded time delay identifier is 1, the time delay identifier represents timely corresponding data, and if so, the time delay identifier represents data which can be stored in a queue, and if not, the time delay identifier represents 0, the data can be stored in a queue.
Step S303, when the transfer device receives service data uploaded by the terminal device of the Internet of things, determining a sending parameter of the service data, determining a corresponding cache queue according to the sending parameter, inquiring whether feedback data corresponding to the terminal device of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal device of the Internet of things.
According to the method, the relay equipment determines the time delay identification recorded in the feedback parameter according to the feedback parameter recorded in the feedback data, if the time delay identification meets the set condition, the internet of things terminal equipment corresponding to the feedback data is awakened, the feedback data is sent to the internet of things terminal equipment, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole internet of things transmission system is optimized.
Fig. 4 is a flowchart of another data processing method of a transit device according to an embodiment of the present invention. On the basis of the technical scheme, each cache queue corresponds to a respective time delay grade, and when the internet of things terminal equipment does not upload service data within the preset time, feedback data in the corresponding cache queue is acquired according to the time delay grade and sent to the corresponding internet of things terminal equipment. The method specifically comprises the following steps:
step S401, the relay device receives feedback data sent by the server, the feedback data responds to service data uploaded by the Internet of things terminal device forwarded by the relay device, and the feedback data contains a corresponding received Internet of things terminal device identifier.
Step S402, the transfer device determines a time delay identifier recorded in the feedback parameter according to the feedback parameter recorded in the feedback data, and if the time delay identifier meets a set condition, awakens the Internet of things terminal device corresponding to the feedback data and sends the feedback data to the Internet of things terminal device.
Step S403, when the transit device receives service data uploaded by the terminal device of the internet of things, determining a sending parameter of the service data, determining a corresponding cache queue according to the sending parameter, querying whether feedback data corresponding to the terminal device of the internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal device of the internet of things.
Step S404, each cache queue corresponds to a respective time delay grade, and when the fact that the terminal equipment of the Internet of things uploads service data is not detected within a preset time, feedback data in the corresponding cache queue are obtained and sent to the corresponding terminal equipment of the Internet of things according to the time delay grade.
In one embodiment, the transit device data processing mechanism is further optimized. Each cache queue corresponds to a respective time delay grade, and when the fact that the internet of things terminal equipment uploads service data is not detected within a preset time, feedback data in the corresponding cache queue are obtained according to the time delay grade and sent to the corresponding internet of things terminal equipment. Specifically, the preset duration may be 10 hours, the delay level may be divided into three levels, the first level is low in delay requirement, the second level is in delay requirement, and the third level is high in delay requirement, and then the feedback data of the internet of things terminal device which does not detect that the internet of things terminal device uploads the service data is sent from the third level in sequence within the preset duration.
According to the method, each cache queue corresponds to a respective time delay grade, when the internet of things terminal equipment uploading service data is not detected within the preset time, the feedback data in the corresponding cache queue is acquired according to the time delay grade and sent to the corresponding internet of things terminal equipment, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole internet of things transmission system is optimized.
Fig. 5 is a block diagram of a data processing apparatus of a relay device according to an embodiment of the present invention, where the apparatus is configured to execute a data processing method of the relay device according to the data receiving end embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 5, the apparatus specifically includes: adata receiving module 101, adata storage module 102 and adata processing module 103, wherein,
thedata receiving module 101 is configured to receive, by the relay device, feedback data sent by the server, where the feedback data is in response to service data uploaded by the internet of things terminal device and forwarded by the relay device, and the feedback data includes a corresponding received identifier of the internet of things terminal device;
adata storage module 102, configured to store, by the transit device, the feedback data to different buffer queues according to the feedback parameters recorded in the feedback data;
thedata processing module 103 is configured to determine a sending parameter of the service data when the transit device receives the service data uploaded by the internet of things terminal device, determine a corresponding cache queue according to the sending parameter, query whether feedback data corresponding to the internet of things terminal device exists in the determined cache queue, and send the feedback data to the internet of things terminal device if the feedback data exists.
According to the scheme, the feedback data sent by the server is received through the transfer equipment; the transfer equipment stores the feedback data to different cache queues according to the feedback parameters recorded in the feedback data; when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things. According to the scheme, the data processing efficiency is improved, the data processing flexibility is obviously enhanced, and the whole transmission system of the Internet of things is optimized.
In a possible embodiment, the data storage module is specifically configured to:
respectively storing the feedback data of different feedback data types to different buffer queues;
and determining the data type identified in the sending parameters, and determining the buffer queue with the same data type according to the data type.
In a possible embodiment, the data storage module is specifically configured to:
and determining a time delay identifier recorded in the feedback parameter, if the time delay identifier meets a set condition, awakening the Internet of things terminal equipment corresponding to the feedback data, and sending the feedback data to the Internet of things terminal equipment.
In one possible embodiment, the data processing module is further configured to:
each cache queue corresponds to a respective time delay grade, and when the fact that the internet of things terminal equipment uploads service data is not detected within a preset time, feedback data in the corresponding cache queue are obtained according to the time delay grade and sent to the corresponding internet of things terminal equipment.
Fig. 6 is a schematic structural diagram of a data processing apparatus of a relay device according to an embodiment of the present invention, as shown in fig. 6, the data processing apparatus includes aprocessor 201, amemory 202, aninput device 203, and anoutput device 204; the number of theprocessors 201 in the device may be one or more, and oneprocessor 201 is taken as an example in fig. 6; theprocessor 201, thememory 202, theinput device 203 and theoutput device 204 in the apparatus may be connected by a bus or other means, for example in fig. 6. Thememory 202 is used as a computer-readable storage medium and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data processing method of the transfer apparatus in the embodiment of the present invention. Theprocessor 201 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in thememory 202, that is, the relay device data processing method described above is realized. Theinput device 203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the apparatus. Theoutput device 204 may include a display device such as a display screen.
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for processing data of a transfer device, where the method includes:
the method comprises the steps that a transfer device receives feedback data sent by a server, the feedback data respond to service data uploaded by an Internet of things terminal device and forwarded by the transfer device, and the feedback data comprise a correspondingly received Internet of things terminal device identifier;
the transfer equipment stores the feedback data to different cache queues according to the feedback parameters recorded in the feedback data;
when the transfer equipment receives service data uploaded by the terminal equipment of the Internet of things, determining sending parameters of the service data, determining a corresponding cache queue according to the sending parameters, inquiring whether feedback data corresponding to the terminal equipment of the Internet of things exists in the determined cache queue, and if so, sending the feedback data to the terminal equipment of the Internet of things.
In a possible embodiment, the backhaul parameter includes a feedback data type, and the forwarding device stores the feedback data in different buffer queues according to the backhaul parameter recorded in the feedback data, including:
respectively storing the feedback data of different feedback data types to different buffer queues;
correspondingly, the determining the corresponding buffer queue according to the sending parameter includes:
and determining the data type identified in the sending parameters, and determining the buffer queue with the same data type according to the data type.
In one possible embodiment, the storing the feedback data to different buffer queues includes:
and determining a time delay identifier recorded in the feedback parameter, if the time delay identifier meets a set condition, awakening the Internet of things terminal equipment corresponding to the feedback data, and sending the feedback data to the Internet of things terminal equipment.
In one possible embodiment, each cache queue corresponds to a respective delay level, and when service data uploaded by the internet of things terminal device is not detected within a preset time, feedback data in the corresponding cache queue is acquired according to the delay level and sent to the corresponding internet of things terminal device.
From the above description of the embodiments, it is obvious for those skilled in the art that the embodiments of the present invention can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better implementation in many cases. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to make a computer device (which may be a personal computer, a service, or a network device) perform the methods described in the embodiments of the present invention.
It should be noted that, in the embodiment of the data processing apparatus of the transit device, each unit and each module included in the data processing apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will appreciate that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.