CN112637151A - Data message transmission method, terminal device, server and storage medium - Google Patents
Data message transmission method, terminal device, server and storage medium Download PDFInfo
- Publication number
- CN112637151A CN112637151A CN202011453255.5A CN202011453255A CN112637151A CN 112637151 A CN112637151 A CN 112637151A CN 202011453255 A CN202011453255 A CN 202011453255A CN 112637151 A CN112637151 A CN 112637151A
- Authority
- CN
- China
- Prior art keywords
- data message
- identifier
- operation information
- specific time
- server
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application is applicable to the field of communication, and provides a data message transmission method, terminal equipment, a server and a storage medium, wherein the transmission method comprises the following steps: when the application operation information is obtained, determining a specific time identifier of the application operation information and a device identifier of the terminal device; generating a data message based on the specific time identifier, the device identifier, and the application operation information; the specific time identifier and the equipment identifier in the data message are used for uniquely identifying the data message; and uploading the data message to a server. Compared with the prior art, the method and the device have the advantages that the combination of the specific time identification and the equipment identification can be used as the unique identification of the data message to replace a lengthy GUID, the uniqueness of all the data messages received by the server is ensured, the transmission speed of the data message is improved, the consumed flow of the data message is reduced, and the storage space of the server for receiving the data message is saved.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a data message transmission method, a terminal device, a server, and a storage medium.
Background
With the development of communication technology, people put higher and higher demands on the efficiency of communication. In an application scenario in which a terminal device collects application operation information data and sends the application operation information data to a server, the server needs to ensure the uniqueness of each piece of application operation information data sent by the terminal device.
In the prior art, a Globally Unique Identifier (GUID) is generally added to each frame of data message sent by the terminal device to the server, and is used for indicating that the uniqueness of the data message is ensured. However, the GUID has a length of 36 bits, and the message is long, and when the amount of processed data is large, the transmission speed from the terminal device to the server is slow, the consumed traffic is large, and a large storage space is also occupied in the server database.
Disclosure of Invention
The embodiment of the application provides a data message transmission method, terminal equipment, a server and a storage medium, which can improve a communication protocol between the terminal equipment and the server, replace a GUID in each data message for data interaction between the terminal equipment and the server with a specific timestamp and an equipment identifier of the terminal equipment, and solve the problems of slow transmission speed, high flow consumption and large storage space occupation caused by long data messages in the prior art.
In a first aspect, an embodiment of the present application provides a method for transmitting a data message, including: when the application operation information is obtained, determining a specific time identifier of the application operation information and a device identifier of the terminal device; generating a data message based on the specific time identifier, the device identifier, and the application operation information; the specific time identifier and the equipment identifier in the data message are used for uniquely identifying the data message; and uploading the data message to a server.
In a second aspect, an embodiment of the present application provides another data message transmission method, including: receiving data messages uploaded by each terminal device; the data message comprises a specific time identifier and a device identifier; and responding to the query operation, and acquiring the target message corresponding to the query operation according to the specific time identifier and the equipment identifier corresponding to each data message.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the transmission method of any of the above first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a server, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the transmission method of any of the above second aspects when executing the computer program.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program that, when executed by a processor, implements the transmission method of any one of the first or second aspects described above.
In a sixth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the transmission method according to any one of the first aspect or the second aspect.
It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: compared with the prior art, the transmission method provided by the application can use the combination of the specific time identifier and the equipment identifier as the unique identifier of the data message, replaces the lengthy GUID in the prior art, ensures that all the data messages received by the server have uniqueness, improves the transmission speed of the data message, reduces the consumed flow of the data message, and saves the storage space of the server for receiving the data message.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a transmission method according to a first embodiment of the present application;
fig. 2 is a flowchart of an implementation of a transmission method according to a second embodiment of the present application;
fig. 3 is a flowchart of an implementation of a transmission method according to a third embodiment of the present application;
fig. 4 is a flowchart of an implementation of a transmission method according to a fourth embodiment of the present application;
fig. 5 is a flowchart of an implementation of a transmission method according to a fifth embodiment of the present application;
fig. 6 is a flowchart of an implementation of a transmission method according to a sixth embodiment of the present application;
FIG. 7 is a schematic diagram of an application scenario provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In the embodiment of the present application, the main execution body of the flow is a terminal device. The terminal devices include but are not limited to: the device such as a computer, a smart phone and a tablet computer can execute the transmission method provided by the application. Preferably, the terminal device is a computer, and the terminal device is capable of running an application program, acquiring application operation information of the application program running this time, and recording system time at a certain time. Fig. 1 shows a flowchart of an implementation of a transmission method according to a first embodiment of the present application, which is detailed as follows:
in S101, when acquiring the application operation information, a specific time identifier of the application operation information and a device identifier of the terminal device are determined.
In this embodiment, when the terminal device runs an application, the terminal device records operation content of the application during the running period of the application, and generates the application operation information based on the operation content, so as to upload the application operation information to the server subsequently; when the operation content of the application program during the running period is recorded, the specific time identification of the application operation information is also recorded and is associated with the application operation information. When the application operation information needs to be uploaded to the server to inform the server of the running condition of the terminal device, that is, when the application operation information is uploaded to the server in response to a request, the terminal device obtains the application operation information and determines the specific time identifier of the application operation information and the device identifier of the terminal device.
In this embodiment, the device identifier of the terminal device may be any device identifier that uniquely identifies the terminal device, for example, a unique number of the terminal device in the device list of the server; preferably, the device identifier of the terminal device is a Media Access Control Address (MAC Address).
In one possible implementation, the specific time identification includes a generation time stamp of the application operation information; the generation timestamp refers to the current system time recorded by the terminal device when the application operation information is generated. The determining the specific time identifier of the application operation information and the device identifier of the terminal device when obtaining the application operation information may specifically be: when the application operation information is acquired, determining the generation timestamp of the application operation information and the MAC address of the terminal equipment; the generated timestamp is identified as the particular time stamp.
In S102, a data message is generated based on the specific time identifier, the device identifier, and the application operation information.
In this embodiment, the specific time identifier and the device identifier in the data message are used to uniquely identify the data message; specifically, the data message corresponds to a unique combination of the specific time identifier and the device identifier. The data message is used for being subsequently sent to the server so as to inform the server of the operation condition of the terminal equipment.
In a possible implementation manner, the generating a data message based on the specific time identifier, the device identifier, and the application operation information may specifically be: and encapsulating the specific time identification, the equipment identification and the application operation information into the data message.
In S103, the data message is uploaded to a server.
In this embodiment, the data message is uploaded to the server to inform the server of the operation status of the terminal device. The server stores the data message to a server database so that the server determines the operation condition of the terminal device by inquiring the data message in the server database. At this time, the server may monitor the operation condition of each terminal device in communication connection with the server, so as to count the operation of each application program, or determine the abnormal operation condition of each application program in each terminal device, so as to subsequently handle the problem caused by the abnormal operation condition.
It should be understood that the operation condition of the terminal device mentioned in the present embodiment refers to the operation content during each operation of each application program in the terminal device.
In a possible implementation manner, the uploading the data message to a server may specifically be: and storing a plurality of data messages to the terminal equipment, and uploading the plurality of data messages stored by the terminal equipment to the server together if the terminal equipment stops running all application programs which can generate the application operation information. It should be understood that the execution condition for uploading the plurality of data messages stored in the terminal device to the server together may be other conditions, for example, an upload timestamp corresponding to a preset upload period is reached, that is, the plurality of data messages stored in the terminal device are uploaded to the server together according to the preset upload period. It should be understood that after uploading a plurality of data messages stored by the terminal device to the server together, the terminal device may clear the data messages that have been uploaded and are also stored.
In another possible implementation manner, the uploading the data message to a server may specifically be: whenever a data message is generated, the data message is uploaded to the server and stored.
In this embodiment, the combination of the specific time identifier and the device identifier may be used as the unique identifier of the data message, instead of the lengthy GUID in the prior art, so that the uniqueness of all the data messages received by the server is ensured, the transmission speed of the data message is improved, the consumed traffic of the data message is reduced, the storage space of the server receiving the data message is saved, and especially when a large amount of data messages need to be transmitted, the importance of the transmission speed of the data message is more prominently improved.
Fig. 2 shows a flowchart of an implementation of a transmission method according to a second embodiment of the present application. Referring to fig. 2, with respect to the embodiment shown in fig. 1, the method S102 provided in this embodiment includes S1021 to S1023, which are detailed as follows:
further, the generating a data message based on the specific time identifier, the device identifier, and the application operation information includes:
in this embodiment, the data message includes a data message header and a data message body.
In S1021, a data message header of the data message is generated according to the specific time identifier and the device identifier.
In this embodiment, the generating the data message header of the data message according to the specific time identifier and the device identifier may specifically be: and encapsulating the specific time identification and the equipment identification into the data message header.
In one possible implementation, the data message header is as follows:
generating timestamps | MAC address | Message ID | Message type | … | Message length |
4 |
6 bytes | 4 bytes | 1 byte | … | 4 bytes |
The data message header includes, among other things, a generation timestamp, a MAC address, a message identification number (ID), a message type, a message length, and some data not mentioned. It should be understood that when the specific time identifier only includes the generation timestamp and the device identifier is the MAC address, the total of 10 bytes of the specific time identifier and the device identifier is much less than 36 bytes of the GUID mentioned in the background, which further illustrates the beneficial effect of the transmission method provided by the present embodiment.
In S1022, a data message body of the data message is generated according to the application operation information.
In this embodiment, the generating the data message body of the data message according to the application operation information may specifically be: and encapsulating the application operation information into the data message body.
In one possible implementation, the data message body is as follows:
wherein the data message body comprises software type, software version, language type, product type, operating system and some application operation information which is not mentioned.
In S1023, the data message header and the data message body are encapsulated to obtain the data message.
In this embodiment, the encapsulating the data message header and the data message body to obtain the data message may specifically be: and splicing the data message header and the data message body to obtain the data message. In one possible implementation, the data message body is encrypted before the data message header is concatenated with the data message body.
In this embodiment, the data message includes a data message header and a data message body, and first, the data message header is used as a unique identifier of the data message, and the data message body is used as a main content of the data message to facilitate querying; secondly, the data message body is convenient to encrypt, and the data message body is independently encrypted, so that the transmission safety of the data message can be improved, and the main content of the data message is prevented from being leaked.
Fig. 3 shows a flowchart of an implementation of a transmission method according to a third embodiment of the present application. Referring to fig. 3, with respect to the embodiment shown in fig. 1, the transmission method S101 provided in this embodiment includes S301, which is described in detail as follows:
further, the determining the specific time identifier of the application operation information includes:
in S301, a start time stamp of the application program corresponding to the application operation information is obtained, and the specific time identifier is obtained based on the start time stamp.
In this embodiment, the specific time identifier includes the start time stamp; the obtaining of the start timestamp of the application program corresponding to the application operation information and the obtaining of the specific time identifier based on the start timestamp may specifically be: acquiring system time recorded when the application program is started, and identifying the system time as the starting timestamp; and packaging the starting time stamp into the specific time identification.
It should be understood that, compared to a possible implementation manner described in the first embodiment, the transmission method provided in this embodiment replaces the generation timestamp with the start timestamp. Preferably, the specific time stamp includes only the start time stamp to minimize the occupied bytes of the specific time stamp.
In this embodiment, the terminal device can only start one application program at the same time, so that the application operation information generated after the application program runs can use the device identifier and the start timestamp of the terminal device as unique identifiers to ensure the uniqueness of the data message.
Further, the method S101 provided in this embodiment further includes S302, which is described in detail as follows:
when the application operation information is obtained, determining the specific time identifier and the device identifier of the application operation information, further comprising:
in S302, a stop timestamp of the application program corresponding to the application operation information is acquired.
In this embodiment, the stop timestamp is used in combination with the start timestamp to calculate the running time of the application.
In a possible implementation manner, the obtaining of the stop timestamp of the application program corresponding to the application operation information may specifically be: the system time recorded when the application program stops running is acquired and identified as the stop time stamp.
In another possible implementation manner, the obtaining of the stop timestamp of the application program corresponding to the application operation information may specifically be: acquiring a termination timestamp corresponding to the application operation information, and identifying the termination timestamp as the stop timestamp; and updating the termination timestamp at a preset time interval (for example, 5 seconds), stopping updating the termination timestamp if the application program is detected to stop running, and taking the termination timestamp as the termination timestamp corresponding to the application operation information.
Further, the method S102 provided in this embodiment further includes S303, which is specifically detailed as follows:
the generating a data message based on the specific time identifier, the device identifier, and the application operation information includes:
in S303, the data message is generated according to the specific time identifier, the device identifier, the stop timestamp, and the application operation information.
In this embodiment, compared to the transmission method provided in the first embodiment, the data message in this embodiment includes the stop timestamp.
In one possible implementation, the data message includes a data message header and a data message body. The generating the data message according to the specific time identifier, the device identifier, the stop timestamp, and the application operation information may specifically be: generating a data message header of the data message according to the starting timestamp and the equipment identifier; generating a data message body of the data message according to the application operation information and the stop timestamp; and encapsulating the data message header and the data message body to obtain the data message.
In this embodiment, the data message includes the start timestamp and the stop timestamp, so as to determine the running duration of the application program corresponding to the application operation information according to the start timestamp and the stop timestamp.
Fig. 4 shows a flowchart of an implementation of a transmission method according to a fourth embodiment of the present application. Referring to fig. 4, with respect to the embodiment shown in fig. 1, the transmission method S101 provided in this embodiment includes S401 to S402, which are detailed as follows:
further, the determining the specific time identifier of the application operation information includes:
in S401, a device access timestamp of the operating device corresponding to the application operating information is obtained.
In this embodiment, the terminal device needs to access the operating device in order to run the application program corresponding to the application operation information, and the system time recorded when the operating device is accessed is the device access timestamp.
In S402, the specific time identification is generated based on the device access timestamp.
In this embodiment, the specific time identifier includes the device access timestamp, but the specific time identifier does not only include the device access timestamp, and if the specific time identifier includes only the device access timestamp, uniqueness of the data message cannot be guaranteed, so that the specific time identifier further includes the generation timestamp described in the first embodiment or the start timestamp described in the second embodiment.
In this embodiment, the generating the specific time identifier based on the device access timestamp specifically may be: the device access timestamp is encapsulated into the specific time identification.
In this embodiment, compared to a possible implementation manner mentioned in the first embodiment, or the second embodiment, or the third embodiment, in the transmission method provided in this embodiment, the device access timestamp is additionally added to the specific time identifier, so as to determine the operating device corresponding to the data message based on the device access timestamp, that is, to ensure the uniqueness of the operating device corresponding to the data message.
Fig. 5 shows a flowchart of an implementation of the method provided in the fifth embodiment of the present application. Referring to fig. 5, with respect to the embodiment shown in fig. 4, the method S401 provided in this embodiment further includes S501 to S502 before, which are detailed as follows:
further, before the obtaining of the device access timestamp of the operating device corresponding to the application operating information, the method further includes:
in S501, if a device access signal fed back by any port is received, the device access timestamp is configured for the operating device accessing the port.
In this embodiment, the device access timestamp is a system time recorded when the device access signal fed back by any port is received. The configuring, if the device access signal fed back by any port is received, the device access timestamp for the operating device accessing the port may specifically be: when receiving the device access signal fed back by any port, recording the current system time, and identifying the device access time stamp of the operating device accessing the port.
It should be understood that, in this embodiment, during the running period of the application program, the terminal device needs to be externally connected to the operating device to complete the operation of the application program during the running period, so as to subsequently generate the application operation information of the application program during the running period.
In S502, operation device information corresponding to the operation device is generated based on the device access timestamp, and the operation device information and the device identifier are sent to the server.
In this embodiment, the terminal device can only respond to an access request of one operating device at the same time, so that the operating device can be uniquely identified by the combination of the device access timestamp and the device identifier. In order to inform the server of the operating device information of the operating device for possible subsequent query of the operating device information according to the device access timestamp and the device identifier, the operating device information and the device identifier need to be sent to the server in advance.
In this embodiment, the generating operation device information corresponding to the operation device based on the device access timestamp, and sending the operation device information and the device identifier to the server may specifically be: encapsulating the device access timestamp into the operating device information; and the operating equipment information and the equipment identification of the terminal equipment are related and packaged and sent to the server.
In one possible implementation, the operating device information is as follows:
the operating device information includes, among others, a device model, a configuration table version, a communication type, a module ID, an add-device time stamp, and other operating device information not mentioned.
In this embodiment, before the application operation information is acquired, the operation device information and the device identifier are sent to the server, so that the subsequent possible server queries the operation device information according to the device access timestamp and the device identifier, and the operation device information and the device identifier need to be sent to the server in advance.
Fig. 6 shows a flowchart of an implementation of a method provided in a sixth embodiment of the present application, in this embodiment, an execution subject of the flowchart is a server, and the server is capable of receiving and storing data messages uploaded by various terminal devices; the details are as follows:
in S601, a data message uploaded by each terminal device is received.
In this embodiment, the data message includes a specific time identifier and a device identifier, and specific descriptions about the specific time identifier and the device identifier may refer to the related descriptions in the first embodiment, which are not repeated herein. For the specific implementation of receiving the data message uploaded by each terminal device, reference may be made to the related description in S103, which is not described herein again. It should be noted that the server stores all the received data messages in the server database.
It should be understood that each terminal device described in this embodiment may be the terminal device described in any of the above embodiments.
In S602, in response to a query operation, a target message corresponding to the query operation is obtained according to the specific time identifier and the device identifier corresponding to each data message.
In this embodiment, all the data messages received in S601, that is, all the data messages in the server database, use the combination of the specific time identifier and the device identifier of the data message as the unique identifier. In a possible implementation manner, in response to the query operation, the target message corresponding to the query operation is obtained according to the specific time identifier and the device identifier corresponding to each data message, which is specifically described in detail as follows:
taking a data message as an example for illustration, in response to a query operation, taking a combination of a specific time identifier and a device identifier corresponding to the data message as a query index, querying a unique data message associated with the combination of the specific time identifier and the device identifier in the server database, and identifying the unique data message as a target message corresponding to the query operation.
In this embodiment, the server queries a unique target message according to the combination of the specific time identifier and the device identifier, so as to ensure that all data messages received by the server have uniqueness.
Fig. 7 shows a schematic view of an application scenario provided in an embodiment of the present application. Referring to fig. 7, in the application scenario, the server receives data messages uploaded by a plurality of terminal devices (i.e., N terminal devices such as the illustrated terminal device 1 and the illustrated terminal device N), where the terminal device 1 is responsible for monitoring a plurality of operation devices (i.e., N operation devices such as the illustrated operation device 1 and the illustrated operation device N), that is, one server is in communication connection with the plurality of terminal devices, and one terminal device is connected with the plurality of operation devices.
Illustratively, in the application scenario, the terminal device 1 runs an application program, the operation content of the application program during the running period of the application program is to change the device running parameter of the operating device 1, and then the terminal device 1 generates application operation information according to the operation content of the application program during the running period of the application program, where the application operation information includes a pre-change value and a post-change value of the device running parameter. Then, in order for the terminal device 1 to respond to the request for uploading the application operation information to the server, the terminal device generates a data message related to the application operation information based on the transmission method provided in the embodiment of the present application, and uploads the data message to the server. Specifically, the terminal device obtains the application operation information, and determines a start timestamp of the application operation information and an MAC address of the terminal device; packaging the starting timestamp and the MAC address to a data message header of the data message, and packaging the application operation information to a data message body of the data message; the data message is uploaded to the server, and the server can respond to a data message query operation which may occur, where the data message query operation specifically may be to query a unique data message according to the start timestamp and the MAC address.
Further, if the server wants to respond to a possible operation of querying the operating device corresponding to the data message, that is, determining the operating device whose device operation parameter is changed based on the application operation information in the data message, the following condition needs to be satisfied: recording a device access time stamp of the operating device 1 accessing to the terminal device 1 during the terminal device 1 running the application program; when the start-up timestamp and the MAC address are encapsulated into the data message header of the data message, the device access timestamp is also encapsulated into the data message header. Then, when the server queries the operating device corresponding to the data message, the unique operating device, that is, the operating device 1, may be determined based on the device access timestamp and the MAC address in the data message.
Fig. 8 shows a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 8, the terminal device 8 of this embodiment includes: at least one processor 80 (only one processor is shown in fig. 8), a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, the processor 80 implementing the steps of the first, second, third, fourth, and fifth embodiments of the above-described method embodiments when executing the computer program 82.
The terminal device 8 may be a desktop computer, a notebook, a palm computer, or other computing devices. The terminal device may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of the terminal device 8, and does not constitute a limitation of the terminal device 8, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 80 may be a Central Processing Unit (CPU), and the Processor 80 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may in some embodiments be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. In other embodiments, the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the terminal device 8. The memory 81 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 81 may also be used to temporarily store data that has been output or is to be output.
Fig. 9 shows a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 9, the server 9 of this embodiment includes: at least one processor 90 (only one processor is shown in fig. 9), a memory 91 and a computer program 92 stored in said memory 91 and executable on said at least one processor 90, said processor 90 implementing the steps of the sixth of the above-described method embodiments when executing said computer program 92.
The server 9 may be a computing device such as a cloud server. The terminal device may include, but is not limited to, a processor 90, a memory 91. Those skilled in the art will appreciate that fig. 9 is only an example of the server 9, and does not constitute a limitation to the server 9, and may include more or less components than those shown, or combine some components, or different components, such as an input/output device, a network access device, etc., and the specific description of the processor 90 and the memory 91 may refer to the description of the processor 80 and the memory 81.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments may be implemented.
Embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the first, second, third, fourth, and fifth embodiments of the foregoing method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A transmission method of data messages is applied to terminal equipment, and is characterized in that the transmission method comprises the following steps:
when the application operation information is obtained, determining a specific time identifier of the application operation information and a device identifier of the terminal device;
generating a data message based on the specific time identifier, the device identifier, and the application operation information; the specific time identification and the equipment identification in the data message are used for uniquely identifying the data message;
and uploading the data message to a server.
2. The transmission method of claim 1, wherein the data message comprises a data message header and a data message body; the generating a data message based on the specific time identifier, the device identifier, and the application operation information includes:
generating a data message header of the data message according to the specific time identifier and the equipment identifier;
generating a data message body of the data message according to the application operation information;
and encapsulating the data message header and the data message body to obtain the data message.
3. The transmission method of claim 1, wherein the determining the specific time identification of the application operation information comprises:
and acquiring a starting time stamp of the application program corresponding to the application operation information, and obtaining the specific time identifier based on the starting time stamp.
4. The transmission method according to claim 3, wherein determining the specific time identifier and the device identifier of the application operation information when obtaining the application operation information further comprises:
acquiring a stop timestamp of an application program corresponding to the application operation information; the stop timestamp is used for calculating the running time of the application program by combining the start timestamp;
the generating a data message based on the specific time identifier, the device identifier, and the application operation information includes:
and generating the data message according to the specific time identifier, the equipment identifier, the stop timestamp and the application operation information.
5. The transmission method of claim 1, wherein the determining the specific time identification of the application operation information comprises:
acquiring a device access time stamp of the operating device corresponding to the application operating information;
generating the specific time identification based on the device access timestamp.
6. The transmission method according to claim 5, wherein before obtaining the device access timestamp of the operating device corresponding to the application operation information, the method further includes:
if an equipment access signal fed back by any port is received, configuring an equipment access timestamp for operating equipment accessed to the port;
and generating operating equipment information corresponding to the operating equipment based on the equipment access timestamp, and sending the operating equipment information and the equipment identifier to the server.
7. A transmission method of data messages is applied to a server, and is characterized in that the transmission method comprises the following steps:
receiving data messages uploaded by each terminal device; the data message comprises a specific time identifier and a device identifier;
and responding to the query operation, and acquiring the target message corresponding to the query operation according to the specific time identifier and the equipment identifier corresponding to each data message.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
9. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of claim 8 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 7 or the method of claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011453255.5A CN112637151B (en) | 2020-12-11 | 2020-12-11 | Data message transmission method, terminal device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011453255.5A CN112637151B (en) | 2020-12-11 | 2020-12-11 | Data message transmission method, terminal device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112637151A true CN112637151A (en) | 2021-04-09 |
CN112637151B CN112637151B (en) | 2023-05-05 |
Family
ID=75309797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011453255.5A Active CN112637151B (en) | 2020-12-11 | 2020-12-11 | Data message transmission method, terminal device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112637151B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1881402A1 (en) * | 2006-07-21 | 2008-01-23 | Nextair Corporation | Compression of data transmitted between server and mobile device |
CN107580358A (en) * | 2017-09-13 | 2018-01-12 | 东莞市腾盛软件科技有限公司 | Method for network access and Related product |
CN108287668A (en) * | 2018-01-25 | 2018-07-17 | 深圳市智物联网络有限公司 | Processing method and processing device, computer installation and the readable storage medium storing program for executing of device data |
CN108449256A (en) * | 2018-02-10 | 2018-08-24 | 深圳壹账通智能科技有限公司 | Processing method, device, computer equipment and the storage medium of message push |
CN108989383A (en) * | 2018-05-31 | 2018-12-11 | 阿里巴巴集团控股有限公司 | Data processing method and client |
CN109417682A (en) * | 2016-07-05 | 2019-03-01 | 华为技术有限公司 | The method, apparatus and system of business processing |
CN110856126A (en) * | 2019-10-24 | 2020-02-28 | 深圳市梦网科技发展有限公司 | Information reporting and receiving method, terminal equipment and storage medium |
CN111046393A (en) * | 2019-12-14 | 2020-04-21 | 深圳市优必选科技股份有限公司 | Vulnerability information uploading method and device, terminal equipment and storage medium |
CN111327687A (en) * | 2020-01-21 | 2020-06-23 | 香港乐蜜有限公司 | Data transmission method and device, electronic equipment and storage medium |
-
2020
- 2020-12-11 CN CN202011453255.5A patent/CN112637151B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1881402A1 (en) * | 2006-07-21 | 2008-01-23 | Nextair Corporation | Compression of data transmitted between server and mobile device |
CN109417682A (en) * | 2016-07-05 | 2019-03-01 | 华为技术有限公司 | The method, apparatus and system of business processing |
CN107580358A (en) * | 2017-09-13 | 2018-01-12 | 东莞市腾盛软件科技有限公司 | Method for network access and Related product |
CN108287668A (en) * | 2018-01-25 | 2018-07-17 | 深圳市智物联网络有限公司 | Processing method and processing device, computer installation and the readable storage medium storing program for executing of device data |
CN108449256A (en) * | 2018-02-10 | 2018-08-24 | 深圳壹账通智能科技有限公司 | Processing method, device, computer equipment and the storage medium of message push |
CN108989383A (en) * | 2018-05-31 | 2018-12-11 | 阿里巴巴集团控股有限公司 | Data processing method and client |
CN110856126A (en) * | 2019-10-24 | 2020-02-28 | 深圳市梦网科技发展有限公司 | Information reporting and receiving method, terminal equipment and storage medium |
CN111046393A (en) * | 2019-12-14 | 2020-04-21 | 深圳市优必选科技股份有限公司 | Vulnerability information uploading method and device, terminal equipment and storage medium |
CN111327687A (en) * | 2020-01-21 | 2020-06-23 | 香港乐蜜有限公司 | Data transmission method and device, electronic equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
CN114915652B (en) * | 2022-03-30 | 2024-03-15 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112637151B (en) | 2023-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11122128B2 (en) | Method and device for customer resource acquisition, terminal device and storage medium | |
WO2021008413A1 (en) | Fault prompting method for internet of things device, and related apparatus | |
CN113746692A (en) | Network flow statistical method, electronic equipment and storage medium | |
WO2020248375A1 (en) | Method and system for synchronizing data between databases, computer device and storage medium | |
CN110661717A (en) | Current limiting method and device and electronic equipment | |
CN111510326A (en) | Master-slave equipment configuration information synchronization method, system, terminal equipment and storage medium | |
CN110830567A (en) | Data transmission method and device | |
CN110572365A (en) | multi-protocol server management method, system, terminal device and storage medium | |
CN112422485B (en) | Communication method and device of transmission control protocol | |
CN112637151A (en) | Data message transmission method, terminal device, server and storage medium | |
US11082411B2 (en) | RDMA-based data transmission method, network interface card, server and medium | |
CN115914283B (en) | Method and device for sending shaft hoof temperature information, terminal equipment and storage medium | |
CN112052267B (en) | Data query method, equipment, server and storage medium | |
CN114827967A (en) | Software updating method, Bluetooth device and storage medium | |
CN112800130A (en) | Data uplink method, system, device, equipment and storage medium | |
CN113032054A (en) | Service execution method, device, storage medium and electronic device | |
CN108777601B (en) | Clock synchronization method, device and network equipment | |
CN108805741B (en) | Fusion method, device and system of power quality data | |
CN115210694A (en) | Data transmission method and device | |
CN113138862A (en) | Message processing method, server, device, system and storage medium | |
CN110908886A (en) | Data sending method and device, electronic equipment and storage medium | |
CN110858201A (en) | Data processing method and system, processor and storage medium | |
CN117493258B (en) | Information acquisition system, method, device and storage medium of baseboard management controller | |
CN113076380B (en) | Data synchronization method, device, system, equipment and storage medium | |
CN110968397B (en) | Analysis method and device for virtual machine capacity management |
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 |