CN113098978B - Data transmission method, device and medium - Google Patents

Data transmission method, device and medium Download PDF

Info

Publication number
CN113098978B
CN113098978B CN202110431136.8A CN202110431136A CN113098978B CN 113098978 B CN113098978 B CN 113098978B CN 202110431136 A CN202110431136 A CN 202110431136A CN 113098978 B CN113098978 B CN 113098978B
Authority
CN
China
Prior art keywords
data
target
sent
user terminal
rule
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
CN202110431136.8A
Other languages
Chinese (zh)
Other versions
CN113098978A (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 Weimeng Enterprise Development Co ltd
Original Assignee
Shanghai Weimeng Enterprise Development 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 Weimeng Enterprise Development Co ltd filed Critical Shanghai Weimeng Enterprise Development Co ltd
Priority to CN202110431136.8A priority Critical patent/CN113098978B/en
Publication of CN113098978A publication Critical patent/CN113098978A/en
Application granted granted Critical
Publication of CN113098978B publication Critical patent/CN113098978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Abstract

The application discloses a data transmission method, a data transmission device and a data transmission medium, wherein the method comprises the steps of determining corresponding target subscription rules according to preset corresponding relations between user terminals and the subscription rules, and acquiring target original data of the target user terminals after receiving target data to be sent of the target user terminals and under the condition that the target data to be sent is not matched with target push data contained in the target subscription rules, so that the target data to be sent can be recovered, and complete target data to be sent can be sent to the target user terminals. Because the corresponding relation between each user and each subscription rule is preset, whether the data to be sent is matched with the target push data or not can be judged before the data to be sent is sent to the users, so that the lost data is recovered or the wrong data is modified, and the accuracy of the data in the data transmission process is improved.

Description

Data transmission method, device and medium
Technical Field
The present application relates to the field of information technology, and in particular, to a data transmission method, apparatus, and medium.
Background
With the development of science and technology, communication among cluster nodes, acquisition of big data and subsequent processing become essential links in production gradually, so that each user has strong dependence on the accuracy of acquired data.
At present, the method of data transmission is mainly to transmit data through a Message Queue (MQ). In the process of MQ communication, namely data transmission, the message is only sent to MQ, so that the user can not sense what message is needed, whether the message is delivered or not, and whether the data sent by the MQ has wrong delivery or missing delivery or not can be judged, and the accuracy of the data is reduced in the data transmission process.
Therefore, how to improve the accuracy of data in the data transmission process is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a data transmission method which is used for improving the accuracy of data in the data transmission process. The application aims to further provide a data transmission device and a medium.
In order to solve the above technical problem, the present application provides a data transmission method, including:
determining a target subscription rule corresponding to the target user terminal according to a preset corresponding relation between each user terminal and each subscription rule;
receiving target data to be sent for representing and sending to a target user terminal;
under the condition that the target data to be sent is not matched with the target push data contained in the target subscription rule, acquiring target original data corresponding to the target data to be sent;
restoring the target data to be sent according to the target original data, the target subscription rule and the target push data;
and sending the target data to be sent or the target data to be sent after recovery processing to the target user terminal.
Preferably, the sending the target to-be-sent data subjected to the recovery processing to the target user terminal specifically includes:
and sending the target data to be sent after recovery processing to the target user terminal according to a data sending rule contained in the target subscription rule.
Preferably, after the sending the target to-be-sent data after the recovery processing to the target user terminal, the method further includes:
under the condition that the target data to be sent fails to be sent, resending the target data to be sent according to a retry rule contained in the target subscription rule;
under the condition that the resending times of the target data to be sent exceed preset retry times contained in the retry rule, marking the target data to be sent as dead data;
and under the condition of receiving a signal which is sent by the target user terminal and represents receivable data, activating the catastrophe data so as to send the activated catastrophe data to the target user terminal.
Preferably, after receiving the target data to be sent for representing the data to be sent to the target user terminal, the method further includes:
and storing the target data to be sent and the data corresponding to the target original data one by one.
Preferably, after receiving the target data to be sent of the target user terminal, the method further includes:
carrying out partition processing on the target data to be sent;
and the target data to be sent corresponding to the same event are divided into the same data area.
Preferably, before sending the recovered target data to be sent to the target user terminal, the method further includes:
and performing duplicate removal processing on the target data to be sent and/or the target data to be sent after recovery processing.
Preferably, after performing deduplication processing on the target data to be sent and/or the target data to be sent after the recovery processing, the method further includes:
and adding corresponding subscription content in the target data to be sent or the target data to be sent after recovery processing according to the target subscription rule.
In order to solve the above technical problem, the present application further provides a data transmission device, based on the data transmission method, including:
the determining module is used for determining a target subscription rule corresponding to the target user terminal according to the preset corresponding relation between each user terminal and each subscription rule;
the first receiving module is used for receiving target data to be sent for representing and sending the target data to the target user terminal;
an obtaining module, configured to obtain target original data corresponding to the target to-be-sent data when the target to-be-sent data does not match target pushed data included in the target subscription rule;
the recovery module is used for recovering the target to-be-sent data according to the target original data, the target subscription rule and the target pushed data;
and the first sending module is used for sending the target data to be sent or the target data to be sent after recovery processing to the target user terminal.
In order to solve the above technical problem, the present application further provides a data transmission device, including:
a memory for storing a computer program;
a processor for implementing the steps of the data transmission method as described above when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data transmission method as described above.
According to the data transmission method provided by the application, the corresponding target subscription rule is determined according to the preset corresponding relation between each user terminal and each subscription rule, and after the target data to be sent of the target user terminal are received, under the condition that the target data to be sent is not matched with the target push data contained in the target subscription rule, the target original data of the target user terminal are obtained, so that the target data to be sent can be recovered, and therefore the complete target data to be sent can be sent to the target user terminal. Because the corresponding relation between each user and each subscription rule is preset and the subscription rule contains the target push data, whether the data to be sent is matched with the target push data or not can be judged before the data to be sent is sent to the user, if the data to be sent is not matched with the target push data, the lost data can be recovered or the wrong data can be modified, so that the data cannot be lost or wrong in the data transmission process, and the accuracy of the data in the data transmission process is improved.
In addition, the data transmission device and the medium provided by the application correspond to the data transmission method, and the effects are the same as those of the data transmission method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments 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 that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present application;
fig. 2 is a flowchart of a data transmission method in an application scenario according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another data transmission device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a data transmission method for improving the accuracy of data in the data transmission process. The core of the application is also to provide a data transmission device and medium.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the present application. As shown in fig. 1, the method includes:
s10: and determining a target subscription rule corresponding to the target user terminal according to the preset corresponding relation between each user terminal and each subscription rule.
S11: and receiving target data to be sent for representing and sending to a target user terminal.
In this embodiment, the target data to be sent is specifically data to be sent after normalization processing. It can be understood that, in order to ensure the comprehensiveness of data pushed to a user, in a specific implementation, data is often obtained from a large number of third-party platforms, and formats of data between different platforms may have differences, so as to avoid errors in pushing data in a subsequent pushing process and reduce a transmission workload, and after receiving target data to be sent, all data is normalized so as to make all data formats the same.
S12: and judging whether the target data to be sent is matched with the target push data contained in the target subscription rule, if not, entering S13, and if so, entering S16.
It should be noted that the target pushed data is different from the target data to be sent, the target pushed data is the full data that the middleware judges to be sent to the service side according to the specific service scene and the subscription rule, and the target data to be sent is the data to be sent that is generated by the middleware after receiving the data of the data sender and is processed, and belongs to real-time data.
In specific implementation, whether the target data to be sent is matched with the target subscription rule and the target push data or not can be judged through two different methods. For example, a distribution control component may be constructed, and whether the target data to be sent is wrong or lost is judged in real time in the process of pushing the data to be sent by the distribution control component; and an account checking recovery component can be further constructed, and before the target data to be sent is pushed or after the target data to be sent is obtained, whether the target data to be sent is wrong or lost or not is actively judged through the account checking recovery component. It should be noted that, in order to further improve the accuracy of the data in the data transmission process, in the specific implementation, a manner of combining multiple methods may be adopted for the determination. When the two methods of the account checking recovery component and the distribution control component are used for judging, in order to increase the accuracy of judgment, the account checking recovery component can be selected to judge according to the period.
S13: and acquiring target original data corresponding to the target data to be sent.
S14: and restoring target data to be sent according to the target original data, the target subscription rule and the target push data.
It should be noted that, the specific steps of restoring the target to-be-sent data according to the target original data, the target subscription rule, and the target pushed data are as follows: and recovering target data to be sent from the original data according to the target subscription rule and the target push data, so that the recovered target data to be sent is matched with the target demand data.
S15: and sending the target data to be sent after recovery processing to a target user terminal.
S16: and sending target data to be sent to the target user terminal.
It can be understood that, in a specific implementation, each user has a corresponding relationship with each user terminal, and the target data to be sent or the target data to be sent after the recovery processing is sent to the target user terminal, that is, it represents that the target data to be sent or the target data to be sent after the recovery processing is pushed to the target user corresponding to the target user terminal.
Specifically, in implementation, according to the constructed distribution control component, the target data to be sent or the target data to be sent after recovery processing may be pushed to the target user terminal through a HyperText Transfer Protocol (HTTP) interface or a Remote Procedure Call Protocol (RPC) interface.
According to the data transmission method provided by the embodiment of the application, the corresponding target subscription rule is determined according to the preset corresponding relation between each user terminal and each subscription rule, and after the target to-be-sent data of the target user terminal is received, the target original data of the target user terminal is obtained under the condition that the target to-be-sent data is not matched with the target push data contained in the target subscription rule, so that the target to-be-sent data can be recovered, and the recovered target to-be-sent data is sent to the target user terminal. Because the corresponding relation between each user and each subscription rule is preset, and the subscription rule contains the target push data, whether the data to be sent and sent by the current node are matched with the target push data or not can be judged before the data to be sent is sent to the user, if the data to be sent and sent are not matched with the target push data, the lost data can be recovered or the error data can be modified, so that the data can not be lost or mistaken in the data transmission process, and the accuracy of the data in the data transmission process is improved.
On the basis of the foregoing embodiment, S15 specifically is:
and sending the target data to be sent after recovery processing to the target user terminal according to the data sending rule contained in the target subscription rule.
It can be understood that the target data to be sent after the recovery processing can be sent according to the data sending rule included in the target subscription rule and the data push mode selected by the user. Wherein the data sending rules or data push modes may include sequential push, out-of-order push, delayed push, and so on. It should be noted that the sequential pushing specifically refers to pushing target data to be sent according to the sequence of event development, and the unordered pushing specifically refers to pushing the target data to be sent to the subscriber according to the sequence of the sender messages received by the system described in this example, and does not sequentially correct the received data to be sent according to the sequence of event development. For example, the sequence of events development is: A. b, C, D, the sequence of the received target push data is A, C, D, and the event message subscribed by the user is A, C, D, then the sequential push is: firstly, pushing A to the user, then pushing C to the user, and finally pushing D to the user, wherein the unordered pushing can be as follows: firstly pushing A to the user, then pushing D to the user, and finally pushing C to the user.
According to the data transmission method provided by the embodiment of the application, the target data to be sent is sent to the target user terminal according to the data sending rule contained in the target subscription rule, so that the target data to be sent can be pushed in a pushing mode selected by a user, and the use experience of the user is improved.
On the basis of the above embodiment, after S15, the method further includes:
and under the condition that the target data to be sent fails to be sent, resending the target data to be sent according to a retry rule contained in the target subscription rule.
And under the condition that the resending times of the target data to be sent exceed the preset retry times contained in the retry rule, marking the target data to be sent as dead data.
And under the condition of receiving a signal which is sent by the target user terminal and represents receivable data, activating the dead data so as to send the activated dead data to the target user terminal.
It should be noted that the retry rule may specifically include a preset number of retries and a preset retransmission period. It can be understood that, in the embodiment of the present application, the target data to be sent may be resent to the target user terminal according to the preset resending period, and the resending times are recorded, and when the resending times reach the preset retry times, the target data to be sent is marked as dead data. In particular implementations, tagged dead data may be temporarily cached in the constructed distribution control component, or dead data may be cached in a database.
According to the data transmission method provided by the embodiment of the application, the target data to be transmitted can be retransmitted according to the retry rule contained in the target subscription rule, and when the number of retransmission times is excessive (exceeds the preset number of times), the target data to be transmitted which is unsuccessfully transmitted can be reserved, so that when the receiving device or the system of the target user terminal fails, the unsuccessfully transmitted data can be reserved, and the unsuccessfully transmitted data can be reactivated when the receiving device or the system of the target user terminal is recovered to be normal, so that the use experience of a user is further improved, and the integrity of the data is ensured.
On the basis of the above embodiment, after S10, the method further includes: and storing target data to be sent and data corresponding to the target original data one by one.
It should be noted that hash partitioning can be performed based on the partitioning-table middleware sharding-jdbc, and data corresponding to the target original data one to one and the target data to be sent are stored in a plurality of databases.
It can be understood that after receiving the target data to be sent of the target user terminal, the data corresponding to the target original data and the target data to be sent are stored in the database, so that it can be quickly determined whether the target data to be sent matches the target pushed data included in the target subscription rule.
On the basis of the above embodiment, after S10, the method further includes: and carrying out partition processing on target data to be sent, wherein the target data to be sent corresponding to the same event are divided into the same data area.
In a specific implementation, a slot manager may be constructed based on a distributed application coordination service (ZooKeeper), the slot manager performs partition processing on target data to be sent, which is received from kafka or other message middleware and sent by a third party, and different data areas are allocated to slave nodes in a cluster for data transmission. It should be noted that the number of slots in the slot manager (default 30 slots) may be extended as required, and the data partition may be obtained by partitioning the 30 slots according to the number of cluster nodes in this example.
According to the data transmission method provided by the embodiment of the application, after the target data to be transmitted are subjected to partition processing, different data areas can be allocated to different nodes for data processing and pushing, so that a plurality of terminals can process the same batch of original data acquired from a third-party platform at the same time, and the data transmission speed is further improved.
On the basis of the above embodiment, before S15, the method further includes: and performing duplicate removal processing on the target data to be sent and/or the target data to be sent after recovery processing.
In specific implementation, a message record interception processing component may be constructed, and multiple interceptors with different functions perform deduplication processing on target data to be sent and/or target data to be sent after recovery processing. It should be noted that, before S16, the target data to be sent may be subjected to deduplication processing, and before S15, the target data to be sent after the recovery processing may also be subjected to deduplication processing.
Further, in order to improve the user experience, as a preferred embodiment, after performing deduplication processing on target data to be sent, the method further includes: and adding corresponding subscription content in the target data to be sent or the target data to be sent after recovery processing according to the target subscription rule so as to provide special service processing for the target user terminal. The subscription content is specifically data content which corresponds to user requirements and needs to be added.
It can be understood that, by performing deduplication processing on the target data to be sent and/or the target data to be sent after recovery processing, it is possible to avoid repeatedly sending the same data, and further improve accuracy of data transmission and user experience.
In order to make the technical solutions provided by the present application more clear for those skilled in the art, a specific application scenario is further provided herein for description, where the scenario involves a third party, a terminal cluster, and a client, and fig. 2 is a flowchart of a data transmission method in the application scenario provided in the embodiment of the present application. As shown in fig. 2, the following is a specific application, which will be modified according to the specific implementation of the present example:
s20: the terminal cluster node receives the message sent by the third party from the message middleware (such as kafka).
S21: converting a message into a message to be sent, partitioning the message by using an identity identifier in the message, dividing the message with the same identity identifier into the same region, pushing the message to be sent to a redis queue corresponding to each message partition based on a terminal cluster node, and prolonging the validity period of the corresponding redis queue every 1 minute, wherein the message in the same region is pushed to the same redis queue, the redis queue corresponds to a cluster node, one node corresponds to one region, and one node processes data in one region.
S22: and acquiring a message to be sent from the redis queue according to the message region corresponding to the node.
S23: and recovering the message to be sent under the condition of judging that the message to be sent has the phenomena of missing sending and wrong sending according to the subscription rule.
S24: and pushing a message to be sent to the client according to a data sending rule of the subscription rule.
S25: and under the condition that the client fails to receive, re-pushing the message to be sent to the client according to the retransmission rule of the subscription rule, and recording the retry times.
S26: and under the condition that the retry times exceed the preset times in the retransmission rule, marking the messages to be transmitted which are not pushed successfully as dead data.
S27: and under the condition of receiving a signal sent by the client, activating the dead data, and sending the activated dead data to the client.
S28: and under the condition that the terminal cluster nodes are changed, clearing the existing redis queues through the main node, and pushing the non-pushed messages to the redis queues corresponding to the message partitions again.
The above steps are a specific application scenario, and corresponding steps may be added in other application scenarios, which are not limited herein.
In the foregoing embodiments, detailed descriptions are given to data transmission methods, and the present application also provides embodiments corresponding to the data transmission device. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one is from the perspective of the function module, and the other is from the perspective of the hardware.
Fig. 3 is a schematic structural diagram of a data transmission device according to an embodiment of the present application. As shown in fig. 3, the apparatus includes, based on the angle of the function module:
a determining module 10, configured to determine a target subscription rule corresponding to a target user terminal according to a preset correspondence between each user terminal and each subscription rule.
A first receiving module 11, configured to receive target data to be sent, where the target data is used to represent that the target data is sent to a target user terminal.
The obtaining module 12 is configured to obtain target original data corresponding to the target data to be sent when the target data to be sent does not match the target pushed data included in the target subscription rule.
And the restoring module 13 is configured to restore the target to-be-sent data according to the target original data, the target subscription rule, and the target pushed data.
The first sending module 14 is configured to send the target data to be sent or the target data to be sent after the recovery processing to the target user terminal.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
As a preferred embodiment, the method further comprises the following steps:
and the second sending module is used for sending the target data to be sent after the recovery processing to the target user terminal according to the data sending rule contained in the target subscription rule.
Further comprising:
and the retransmission module is used for retransmitting the target data to be transmitted according to a retry rule contained in the target subscription rule under the condition that the target data to be transmitted fails to be transmitted.
And the marking module is used for marking the target data to be sent as dead data under the condition that the resending times of the target data to be sent exceed the preset retry times contained in the retry rule.
And the activation module is used for activating the dead data under the condition of receiving the signal which is sent by the target user terminal and represents the receivable data so as to send the activated dead data to the target user terminal.
Further comprising:
and the storage module is used for storing the target data to be sent and the data corresponding to the target original data one by one.
Further comprising:
the first processing module is used for carrying out partition processing on the original data; the data to be sent corresponding to the same event are divided into the same data area.
Further comprising:
and the second processing module is used for performing duplicate removal processing on the target data to be sent and/or the target data to be sent after recovery processing.
Further comprising:
and the adding module is used for adding corresponding subscription content in the target data to be sent or the target data to be sent after recovery processing according to the target subscription rule.
The data transmission device provided in the embodiment of the application determines the corresponding target subscription rule according to the preset corresponding relationship between each user terminal and each subscription rule, and after receiving the target to-be-sent data of the target user terminal, acquires the target original data of the target user terminal under the condition that the target to-be-sent data is not matched with the target pushed data contained in the target subscription rule, so as to recover the target to-be-sent data, and thus sends the recovered target to-be-sent data to the target user terminal. Because the corresponding relation between each user and each subscription rule is preset, and the subscription rule contains target push data required by the user, before the data to be sent is sent to the user, whether the data to be sent and sent of the current node are matched with the target push data can be judged, if not, the lost data can be recovered or the error data can be modified, so that the data cannot be lost or error in the data transmission process, and the accuracy of the data in the data transmission process is improved.
Fig. 4 is a schematic structural diagram of another data transmission device according to an embodiment of the present application. As shown in fig. 4, the apparatus includes, from the perspective of the hardware configuration:
a memory 20 for storing a computer program;
a processor 21, configured to implement the steps of the data transmission method in the above embodiments when executing the computer program.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after the computer program 201 is loaded and executed by the processor 21, the relevant steps of the data transmission method disclosed in any of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, windows, unix, linux, and the like. Data 203 may include, but is not limited to, data involved in a data transmission method, and the like.
In some embodiments, the data transmission device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 4 does not constitute a limitation of the data transfer device and may include more or fewer components than those shown.
The data transmission device provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: and after receiving target data to be sent of the target user terminal, under the condition that the target data to be sent is not matched with target push data contained in the target subscription rule, acquiring target original data of the target user terminal so as to restore the target data to be sent, and sending the restored target data to be sent to the target user terminal. Because the corresponding relation between each user and each subscription rule is preset, and the subscription rule contains target push data required by the user, before the data to be sent is sent to the user, whether the data to be sent and sent of the current node are matched with the target push data can be judged, if not, the lost data can be recovered or the error data can be modified, so that the data cannot be lost or error in the data transmission process, and the accuracy of the data in the data transmission process is improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer-readable storage medium provided by the embodiment of the application stores a computer program, and when the computer program is executed by a processor, the computer program can realize the following method: and after receiving target data to be sent of the target user terminal, under the condition that the target data to be sent is not matched with target push data contained in the target subscription rule, acquiring target original data of the target user terminal so as to restore the target data to be sent, and sending the restored target data to be sent to the target user terminal. Because the corresponding relation between each user and each subscription rule is preset, and the subscription rule contains target push data required by the user, before the data to be sent is sent to the user, whether the data to be sent and sent of the current node are matched with the target push data can be judged, if not, the lost data can be recovered or the error data can be modified, so that the data cannot be lost or error in the data transmission process, and the accuracy of the data in the data transmission process is improved.
A data transmission method, an apparatus and a medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of data transmission, comprising:
determining a target subscription rule corresponding to a target user terminal according to a preset corresponding relation between each user terminal and each subscription rule;
receiving target data to be sent for representing and sending to the target user terminal;
under the condition that the target data to be sent is not matched with the target push data contained in the target subscription rule, acquiring target original data corresponding to the target data to be sent;
restoring the target data to be sent according to the target original data, the target subscription rule and the target push data;
sending the target data to be sent or the target data to be sent after recovery processing to the target user terminal;
the recovering of the target to-be-sent data according to the target original data, the target subscription rule and the target to-be-sent data specifically includes: and recovering target data to be sent from original data according to the target subscription rule and the target push data, so that the recovered target data to be sent is matched with target demand data.
2. The data transmission method according to claim 1, wherein the sending the target data to be sent after the recovery processing to the target user terminal specifically includes:
and sending the target data to be sent after recovery processing to the target user terminal according to a data sending rule contained in the target subscription rule.
3. The data transmission method according to claim 1 or 2, wherein after the target data to be sent after the recovery processing is sent to the target user terminal, the method further comprises:
under the condition that the target data to be sent fails to be sent, resending the target data to be sent according to a retry rule contained in the target subscription rule;
under the condition that the resending times of the target data to be sent exceed the preset retry times contained in the retry rule, marking the target data to be sent as dead data;
and under the condition of receiving a signal which is sent by the target user terminal and represents receivable data, activating the catastrophe data so as to send the activated catastrophe data to the target user terminal.
4. The data transmission method according to claim 1, wherein after receiving the target data to be transmitted for characterizing the transmission to the target user terminal, the method further comprises:
and storing the target data to be sent and the data corresponding to the target original data one by one.
5. The data transmission method according to claim 1 or 4, wherein after receiving the data to be sent for representing the target sent to the target user terminal, the method further comprises:
carrying out partition processing on the target data to be sent;
and the target data to be sent corresponding to the same event are divided into the same data area.
6. The data transmission method according to claim 1, wherein before sending the recovered target data to be sent to the target user terminal, the method further comprises:
and performing deduplication processing on the target data to be sent and/or the target data to be sent after recovery processing.
7. The data transmission method according to claim 6, wherein after performing deduplication processing on the target data to be transmitted and/or the target data to be transmitted after recovery processing, the method further includes:
and adding corresponding subscription content in the target data to be sent or the target data to be sent after recovery processing according to the target subscription rule.
8. A data transmission apparatus, according to the data transmission method of any one of claims 1 to 7, comprising:
the determining module is used for determining a target subscription rule corresponding to the target user terminal according to the preset corresponding relation between each user terminal and each subscription rule;
the first receiving module is used for receiving target data to be sent for representing the data sent to the target user terminal;
an obtaining module, configured to obtain target original data corresponding to the target to-be-sent data when the target to-be-sent data does not match target pushed data included in the target subscription rule;
the recovery module is used for recovering the target to-be-sent data according to the target original data, the target subscription rule and the target pushed data;
a first sending module, configured to send the target data to be sent or the target data to be sent after recovery processing to the target user terminal;
wherein, the recovery module is specifically configured to: and recovering target data to be sent from original data according to the target subscription rule and the target push data, so that the recovered target data to be sent is matched with target demand data.
9. A data transmission apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data transmission method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data transmission method according to one of claims 1 to 7.
CN202110431136.8A 2021-04-21 2021-04-21 Data transmission method, device and medium Active CN113098978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110431136.8A CN113098978B (en) 2021-04-21 2021-04-21 Data transmission method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110431136.8A CN113098978B (en) 2021-04-21 2021-04-21 Data transmission method, device and medium

Publications (2)

Publication Number Publication Date
CN113098978A CN113098978A (en) 2021-07-09
CN113098978B true CN113098978B (en) 2023-04-07

Family

ID=76679088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110431136.8A Active CN113098978B (en) 2021-04-21 2021-04-21 Data transmission method, device and medium

Country Status (1)

Country Link
CN (1) CN113098978B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739917A (en) * 2018-12-29 2019-05-10 宁波中数云创信息技术有限公司 A kind of integration method of magnanimity isomeric data
CN112671933A (en) * 2021-02-23 2021-04-16 浙江中控技术股份有限公司 Data processing method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7886180B2 (en) * 2004-05-14 2011-02-08 International Business Machines Corporation Recovery in a distributed stateful publish-subscribe system
US20150127679A1 (en) * 2013-11-04 2015-05-07 aMind Solutions, LLC System and method for identifying and synchronizing data from multiple backend enterprise computer systems to multiple types of mobile devices
US9886513B2 (en) * 2015-05-25 2018-02-06 International Business Machines Corporation Publish-subscribe system with reduced data storage and transmission requirements
CN105488223B (en) * 2015-12-28 2020-04-28 中国民航信息网络股份有限公司 Method and system for analyzing and subscribing business data events
CN110096511B (en) * 2019-04-30 2024-02-20 深圳前海微众银行股份有限公司 Data consistency verification method, device, equipment and medium based on private chain
CN112311825B (en) * 2019-07-29 2023-05-19 浙江宇视科技有限公司 Message pushing method and device, pushing server and readable storage medium
CN111859127A (en) * 2020-07-13 2020-10-30 海尔优家智能科技(北京)有限公司 Subscription method and device of consumption data and storage medium
CN112417015A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Data distribution method and device, storage medium and electronic device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739917A (en) * 2018-12-29 2019-05-10 宁波中数云创信息技术有限公司 A kind of integration method of magnanimity isomeric data
CN112671933A (en) * 2021-02-23 2021-04-16 浙江中控技术股份有限公司 Data processing method and system

Also Published As

Publication number Publication date
CN113098978A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN112104519B (en) Delayed message delivery method and device, storage medium and computer equipment
CN109547511B (en) WEB message real-time pushing method, server, client and system
CN109451032B (en) Message transmission system
CN108737218B (en) Automatic verification method and device for message push arrival rate
CN112433885B (en) Block chain consensus processing method and device, electronic equipment and storage medium
CN112367345A (en) Data processing method, server device and computer readable storage medium
CN112925642A (en) Delayed message processing method, device, equipment and storage medium
CN111541555A (en) Group chat optimization method and related product
CN113468025A (en) Data warning method, system, device and storage medium
CN109684128B (en) Cluster overall fault recovery method of message middleware, server and storage medium
CN110650164B (en) File uploading method and device, terminal and computer storage medium
CN113098978B (en) Data transmission method, device and medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN109905459B (en) Data transmission method and device
CN111090818B (en) Resource management method, resource management system, server and computer storage medium
CN116760698A (en) Service processing method, device, computer equipment and storage medium
CN110557453B (en) Data distribution method, device, equipment and storage medium
CN111930548B (en) Fault simulation system for multi-cluster distributed service
CN110971535B (en) Communication congestion control method, device, equipment and storage medium
CN110134547B (en) Middleware-based repeated data deleting method and related device
CN115766696A (en) File uploading method and device, electronic equipment and storage medium
CN112367382A (en) File uploading method, device, equipment and storage medium
CN108880994B (en) Method and device for retransmitting mails
CN107506491B (en) OSD data distribution method and device of distributed file system
CN110837431A (en) Service control method, service control device, computer equipment and computer-readable storage medium

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