CN111314203B - Communication method, device, medium and electronic equipment - Google Patents

Communication method, device, medium and electronic equipment Download PDF

Info

Publication number
CN111314203B
CN111314203B CN201911142400.5A CN201911142400A CN111314203B CN 111314203 B CN111314203 B CN 111314203B CN 201911142400 A CN201911142400 A CN 201911142400A CN 111314203 B CN111314203 B CN 111314203B
Authority
CN
China
Prior art keywords
message
format
event data
message format
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.)
Active
Application number
CN201911142400.5A
Other languages
Chinese (zh)
Other versions
CN111314203A (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911142400.5A priority Critical patent/CN111314203B/en
Publication of CN111314203A publication Critical patent/CN111314203A/en
Application granted granted Critical
Publication of CN111314203B publication Critical patent/CN111314203B/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
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

Abstract

The invention provides a communication method, a communication device, a communication medium and electronic equipment, wherein the communication method comprises the following steps: analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data; and judging whether the message format of the message in the first analyzed event data is a standard message format, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format. The invention analyzes the message in the event data sent by the first server for publishing the message into the message in accordance with the standard message format through the analysis of the service message analyzer and the message format analyzer, thereby not only improving the universality of the communication method, but also multiplexing the analysis process of the service message analyzer to the message.

Description

Communication method, device, medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a communication method, apparatus, medium, and electronic device.
Background
The web hook is a user-defined HTTP (hypertext transfer Protocol) callback. Web hooks are typically activated by some event, such as pushing a code to a source or commenting on a blog. When this event occurs, the original web site will send an HTTP request to a URL (Uniform Resource Locator) configured for the web hook. Network hooks are often used to activate build operations of a persistent integration system, or network hooks are used to track alarm alerts for a management system. Since web hooks use HTTP, they can be seamlessly integrated into web services without adding new infrastructure.
In the prior art, an original website is called a publisher service, and a network hook service is called a consumer service. Common publisher services correspond to any of the following applications: applications such as Gitlab, github, slack, trello, asana, jira, etc. Common applications corresponding to consumer services are any of the following: weChat, spike, google calendar, apple calendar, and the like.
As shown in fig. 1, a schematic diagram of a communication method in the prior art is shown. As shown in fig. 1, a user configures an event callback link in a service a and a service B, and when a subscribed event occurs in the service a and the service B, an HTTP callback request is initiated and a message is sent to a consuming service.
The communication method shown in fig. 1 has the following problems:
problem 1: the consumer service needs to repeatedly develop message resolvers of the A and B services, and if new message services need to be added, the new service message resolvers need to be repeatedly developed. The current solution is to use SDK (Software Development Kit), but since it is a consumer service SDK, the change is frequent, which may cause unstable service risk.
Problem 2: the message service has the functions of duplicate removal, frequency limitation and the like, and the functions need to be repeatedly developed, so the development cost is high, and a large amount of manpower and material resources are consumed.
Therefore, in long-term research and development, the inventors have conducted a great deal of research and study on a communication method, and have proposed a communication method to solve one of the above-described technical problems.
Disclosure of Invention
An object of the present invention is to provide a communication method, apparatus, medium, and electronic device, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present invention, in a first aspect, the present invention provides a communication method, including:
receiving event data sent by a first server used for issuing a message, wherein the event data carries a uniform resource locator corresponding to a second server used for receiving the message;
analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data;
judging whether the message format of the message in the first analyzed event data is a standard message format, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
and sending the second analyzed event data to the second server according to the uniform resource locator.
According to a second aspect, there is provided a communication apparatus including:
a receiving unit, configured to receive event data sent by a first server for issuing a message, where the event data carries a uniform resource locator corresponding to a second server for receiving the message;
the processing unit is used for analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data; and
judging whether the message format of the message in the first analyzed event data is a standard message format or not, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
and the sending unit is used for sending the second analyzed event data to the second server according to the uniform resource locator.
According to a third aspect, the invention provides a computer readable storage medium, on which a computer program is stored, which program, when executed by a processor, implements a communication method as defined in any one of the above.
According to a fourth aspect of the present invention, there is provided an electronic apparatus comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the communication method as described in any one of the above.
Compared with the prior art, the scheme of the embodiment of the invention at least has the following beneficial effects: the embodiment of the invention provides a communication method, a communication device, a communication medium and electronic equipment, and analyzes the message in the event data sent by a first server for issuing the message into the message in accordance with the standard message format through the analysis of a service message analyzer and a message format analyzer respectively, so that the universality of the communication method is improved, and the analysis process of the message by the service message analyzer is multiplexed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of a communication method in the prior art;
FIG. 2 shows a flow diagram of a communication method according to an embodiment of the invention;
fig. 3 is a schematic diagram of a communication system in a specific application scenario according to an embodiment of the present invention;
FIG. 4 shows a schematic structural diagram of a communication device according to an embodiment of the invention;
fig. 5 shows a schematic diagram of an electronic device connection structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
It should be understood that, although the terms first, second, third, etc. may be used to describe \8230;, these \8230;, should not be limited to these terms in embodiments of the present invention. These terms are used only to distinguish between \8230; \8230. For example, without departing from the scope of embodiments of the present invention, a first of the methods may be used as a first of the methods for manufacturing a semiconductor device, and the method may be used as a second of the methods for manufacturing a semiconductor device, wherein the first of the methods may be used as a second of the methods for manufacturing a semiconductor device, and the second of the methods may be used as a second of the methods for manufacturing a semiconductor device.
The words "if", as used herein may be interpreted as "at \8230; \8230whenor" when 8230; \8230when or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an 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 article or apparatus. Without further limitation, an element defined by the phrases "comprising one of \8230;" does not exclude the presence of additional like elements in an article or device comprising the element.
Alternative embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 1, according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a communication method, specifically including the following method steps:
s102: receiving event data sent by a first server used for issuing a message, wherein the event data carries a uniform resource locator corresponding to a second server used for receiving the message;
s104: analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data;
s106: judging whether the message format of the message in the first analyzed event data is a standard message format or not, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
optionally, parsing the message format through a message format parser matched with the message format type includes the following steps:
if the message format type is the instant communication message format, analyzing the instant communication message format through a message format analyzer matched with the instant communication message format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is the calendar message format, analyzing the calendar message format through a message format analyzer matched with the calendar message format; alternatively, the first and second electrodes may be,
if the message format type is the mail format, analyzing the mail format through a message format analyzer matched with the mail format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is the simple information aggregation format, analyzing the simple information aggregation format through a message format analyzer matched with the simple information aggregation format; alternatively, the first and second electrodes may be,
and if the message format type is the preset robot message format, analyzing the robot message format through a message format analyzer matched with the preset robot message format.
Optionally, before performing S106 to determine whether a message format of a message in the first post-resolution event data is a standard message format, the method further includes the following steps:
and performing duplicate removal processing and/or processing of controlling the calling frequency on the event data after the first analysis to obtain corresponding event data.
Optionally, the processing of performing deduplication processing on the first parsed event data and/or controlling the call frequency includes the following steps:
carrying out duplicate removal processing on the event data after the first analysis;
optionally, the performing deduplication processing on the first analyzed event data includes the following steps:
reading each message digest algorithm value corresponding to each message in the first analyzed event data;
judging whether the current message digest algorithm value exists in the memory database, and if so, ignoring format standardization analysis processing on the message corresponding to the current message digest algorithm value; otherwise, carrying out format standardization analysis processing on the message corresponding to the current message digest algorithm value; therefore, the process of carrying out duplicate removal processing on the event data after the first analysis is multiplexed, and the communication efficiency is improved.
In this step, if the current message digest algorithm value already exists in the in-memory database, it indicates that the message corresponding to the current message digest algorithm value already exists in the in-memory database, and then the further parsing process is terminated.
In practical applications, the logic used for performing the deduplication processing on the first analyzed event data is described as follows:
a1, generating an MD5 (Message Digest Algorithm MD 5) for each Message body;
the above MD5 is explained as follows:
MD5 is a hash function widely used in the field of computer security to provide integrity protection for messages; the purpose of MD5 is to allow large volumes of information to be "compressed" into a secure format before signing the private key with digital signature software.
The MD5 algorithm has the following characteristics:
characteristic 1, compressibility, data of any length, the calculated length of MD5 value is fixed.
And 2, the method is easy to calculate, namely the MD5 value is easy to calculate from the original data.
And 3, characteristic 3, modification resistance, namely that the MD5 values obtained by modifying the original data by 1 byte are greatly different.
Characteristic 4, strong collision resistance, knowing the original data and its MD5 value, it is very difficult to find a data with the same MD5 value.
a2, if the MD5 value already exists in the memory database, stopping the flow;
a3, if the MD5 value does not exist, caching the MD5 into a memory database, and setting the validity period of preset duration; it should be noted that, in different specific application scenarios, the validity periods of the preset duration are different and may be adjusted, and here, the validity period of the preset duration is not specifically limited;
and/or the presence of a gas in the gas,
processing the event data after the first analysis by controlling the calling frequency;
optionally, the processing of controlling the calling frequency of the first analyzed event data includes the following steps:
reading a frequency control threshold; in this step, for different specific application scenarios, a frequency control threshold may be set, for example, in a specific application scenario, if the frequency control threshold in the application scenario is set to 50, fifty messages sent by a first server that receives a same message for publishing in one minute are regarded as being attacked by a same publishing server, and then the messages sent by the first server are regarded as spam messages, and the format standardization analysis processing on the messages corresponding to the current service invocation frequency is omitted; therefore, the process of carrying out format standardization analysis processing on the message corresponding to the current service calling frequency can be simplified, and the communication efficiency is improved.
Judging whether the current service calling frequency of the current message exceeds a frequency control threshold, and if the current service calling frequency of the current message exceeds the frequency control threshold, ignoring format standardization analysis processing on the message corresponding to the current service calling frequency; otherwise, carrying out format standardization analysis processing on the message corresponding to the current service calling frequency.
In practical application, the following description is made on the logic adopted in the processing procedure of controlling the calling frequency of the first analyzed event data, specifically as follows:
b1, judging whether the current service calling frequency exceeds a frequency control threshold value;
b2, if the flow rate exceeds the preset value, stopping the flow;
and b3, if not, entering a subsequent processing flow.
Optionally, after step S104 is executed to parse the event data according to the service message parser matched to the type of the first server, so as to obtain first parsed event data, the method further includes the following steps:
if the message format of the message in the first analyzed event data is judged to be the standard message format, ignoring format standardization analysis processing on the message format of the message, and sending the first analyzed event data to a second server according to the uniform resource locator; therefore, the process of carrying out format standardization analysis on the message format of the message in the event data after the first analysis is simplified, and the communication efficiency is improved.
In practical applications, before the step of sending the first parsed event data to the second server according to the uniform resource locator is performed, the method further comprises the steps of:
and performing duplicate removal processing and/or processing for controlling the calling frequency on the event data after the first analysis to obtain corresponding event data.
Optionally, the processing of performing deduplication processing and/or controlling a call frequency on the first analyzed event data includes the following steps:
carrying out duplicate removal processing on the event data after the first analysis;
optionally, the performing deduplication processing on the first analyzed event data includes the following steps:
reading each message digest algorithm value corresponding to each message in the first analyzed event data;
judging whether the current message digest algorithm value already exists in the memory database, and if so, neglecting to perform format standardization analysis processing on the message corresponding to the current message digest algorithm value; otherwise, carrying out format standardization analysis processing on the message corresponding to the current message digest algorithm value;
for the description of the process of performing deduplication processing on the first post-analysis event data, reference is made to the foregoing related description, which is not described again here.
And/or the presence of a gas in the gas,
processing the event data after the first analysis by controlling the calling frequency;
optionally, the processing of controlling the calling frequency of the first analyzed event data includes the following steps:
reading a frequency control threshold;
judging whether the current service calling frequency of the current message exceeds a frequency control threshold, and if the current service calling frequency of the current message exceeds the frequency control threshold, ignoring format standardization analysis processing on the message corresponding to the current service calling frequency; otherwise, carrying out format standardization analysis processing on the message corresponding to the current service calling frequency.
For a description of the processing procedure of controlling the calling frequency of the first analyzed event data, refer to the related description above, and are not described herein again.
Fig. 3 is a schematic diagram of a communication system in a specific application scenario according to an embodiment of the present invention.
The communication method provided by the embodiment of the present disclosure can construct a message adaptation platform as shown in fig. 3, which parses the message of the publisher service, and then adapts to a standard or locally general message format after passing through the repetition and controlling frequency. As with the communication system shown in fig. 3, the consumer service need only parse received messages through a standard message format parser, and no attention is required as to which type of message format parser of the publisher service is.
The operation of the communication system as shown in fig. 3 is as follows:
step 1: a publisher service that configures a Webhook URL (Uniform Resource Locator) of a consumer service to subscribe to events provided by the publisher service;
wherein, the URL format is as follows,
http://adaptor.com/api/serviceAhook=http://im.com;
in this step, the following is explained for Webhook:
webhooks: the front end does not actively send the request and is completely pushed by the back end. For example, user a sends a friend circle, and the backend pushes the message to clients of all other friends of the user, where the application scenario is a typical application scenario of Webhooks.
And 2, step: the publisher service generates an event subscribed by the consumer service, initiates an HTTP request, and transmits event data defined by a publisher, wherein the URL is an address registered by the consumer service;
and step 3: the message adaptation platform is used for obtaining the event data analyzed by the publisher service message analyzer corresponding to the publisher service by using the publisher service message format analyzer after receiving the event data;
and 4, step 4: the message adaptation platform performs deduplication by using the following logic:
c1, generating an MD5 by each message body;
c2, if the MD5 value already exists in the memory database, stopping the flow;
c3, if the MD5 value does not exist, caching the MD5 into a memory database, and setting an effective period of a certain time;
in this step, for the description of MD5 and related description, please refer to the foregoing description, which is not repeated herein.
Step 5, the message adaptation platform carries out calling frequency control by using the following logic:
d1, judging whether the current service calling frequency exceeds a frequency control threshold value;
d2, if the flow rate exceeds the preset value, stopping the flow;
and d3, if not, entering the next step.
In this step, please refer to the foregoing description for the related description of the procedure of performing the call frequency control, which is not described herein again.
Step 6: a message adaptation platform for selecting a proper message type resolver,
e1, if the message format is standard, directly proceeding to the next step
And e2, if the message format is not the standard message format, selecting a corresponding message analyzer, and analyzing the data of the publisher service into the standard message format or analyzing the data of the publisher service into the universal message format.
A common standard message format, or generic message format, is as follows:
the message formats include a calendar message format, a simple information aggregation format, a nailing robot message format and a WeChat robot message format, which are listed only in common standard message formats or common message formats, and other message formats, and are not described herein again.
And 7, taking out the hook parameter in the URL, initiating a request to the consumer service, and carrying data in a standard format.
In this step, the method for extracting the hook parameter in the URL is a conventional method, which is not described herein again, and the extracted hook parameter is also a conventional parameter.
Under a specific application scene, an API function entry point needing to be modified is contacted through hook, and the address of the API function entry point is changed to point to a new self-defined function; the object of the API function service is an application program.
According to the communication method provided by the embodiment of the disclosure, the message in the event data sent by the first server for issuing the message is analyzed into the message in accordance with the standard message format through the analysis of the service message analyzer and the message format analyzer, so that the universality of the communication method is improved, and the analysis process of the service message analyzer on the message is multiplexed.
Example 2
The embodiment of the present disclosure is adapted to embodiment 1, is used for implementing the method steps as described in embodiment 1, and has the same technical effects as embodiment 1 based on the same explanations of names and meanings as embodiment 1, and is not repeated herein. Referring to fig. 4, according to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides a communication apparatus, including a receiving unit 402, a processing unit 404, and a sending unit 406, which are as follows:
a receiving unit 402, configured to receive event data sent by a first server for issuing a message, where the event data carries a uniform resource locator corresponding to a second server for receiving the message;
a processing unit 404, configured to parse the event data according to a service message parser matched with the type of the first server, to obtain first parsed event data; and
judging whether the message format of the message in the first analyzed event data is a standard message format or not, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
a sending unit 406, configured to send the second parsed event data to the second server according to the uniform resource locator.
Optionally, the processing unit 404 is further configured to: before judging whether the message format of the message in the first analyzed event data is the standard message format or not, carrying out duplicate removal processing and/or processing for controlling the calling frequency on the first analyzed event data to obtain corresponding event data.
Optionally, the processing unit 404 is specifically configured to:
performing a deduplication process on the first parsed event data, and/or,
and processing the event data after the first analysis by controlling the calling frequency.
Optionally, the processing unit 404 is specifically configured to:
reading each message digest algorithm value corresponding to each message in the first analyzed event data;
judging whether the current message digest algorithm value exists in the memory database, and if so, ignoring format standardization analysis processing on the message corresponding to the current message digest algorithm value; otherwise, carrying out format standardization analysis processing on the message corresponding to the current message digest algorithm value.
Optionally, the processing unit 404 is specifically configured to:
reading a frequency control threshold;
judging whether the current service calling frequency of the current message exceeds a frequency control threshold, and if the current service calling frequency of the current message exceeds the frequency control threshold, ignoring format standardization analysis processing on the message corresponding to the current service calling frequency; otherwise, carrying out format standardization analysis processing on the message corresponding to the current service calling frequency.
Optionally, the processing unit 404 is further specifically configured to:
if the message format type is the instant communication message format, analyzing the instant communication message format through a message format analyzer matched with the instant communication message format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is the calendar message format, analyzing the calendar message format through a message format analyzer matched with the calendar message format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is the mail format, analyzing the mail format through a message format analyzer matched with the mail format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is the simple information aggregation format, analyzing the simple information aggregation format through a message format analyzer matched with the simple information aggregation format; alternatively, the first and second liquid crystal display panels may be,
and if the message format type is the preset robot message format, analyzing the robot message format through a message format analyzer matched with the preset robot message format.
Optionally, the processing unit 404 is further configured to: and after analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data, if the message format of the message in the first analyzed event data is judged to be a standard message format, ignoring format standardization analysis processing on the message format of the message, and sending the first analyzed event data to a second server according to the uniform resource locator.
According to the communication device provided by the embodiment of the disclosure, the message in the event data sent by the first server for issuing the message is analyzed into the message in accordance with the standard message format through the analysis of the service message analyzer and the message format analyzer, so that the universality of the communication method is improved, and the analysis process of the service message analyzer on the message is multiplexed.
Example 3
As shown in fig. 5, an embodiment of the present disclosure provides an electronic device, where the electronic device is used for performing a communication method of communication, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to: the message in the event data sent by the first server for publishing the message is parsed into the message in accordance with the standard message format through the parsing of the service message parser and the message format parser, so that the universality of the communication method is improved, and the parsing process of the message by the service message parser is multiplexed.
Example 4
Embodiments of the present disclosure provide a non-volatile computer storage medium having stored thereon computer-executable instructions that may perform a communication method in any of the above method embodiments.
Example 5
Referring now to FIG. 5, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device may include a processing device (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage device 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the message in the event data sent by the first server for publishing the message is parsed into the message in accordance with the standard message format through the parsing of the service message parser and the message format parser, so that the universality of the communication method is improved, and the parsing process of the message by the service message parser is multiplexed.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the message in the event data sent by the first server for issuing the message is analyzed into the message in accordance with the standard message format through the analysis of the service message analyzer and the message format analyzer, so that the universality of the communication method is improved, and the analysis process of the service message analyzer on the message is multiplexed.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.

Claims (8)

1. A method of communication, comprising:
receiving event data sent by a first server used for issuing a message, wherein the event data carries a uniform resource locator corresponding to a second server used for receiving the message;
analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data;
judging whether the message format of the message in the first analyzed event data is a standard message format, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
sending the second analyzed event data to the second server according to the uniform resource locator; wherein, the first and the second end of the pipe are connected with each other,
prior to the determining whether the message format of the message in the first post-resolution event data is a standard message format, the method further comprises:
and performing duplicate removal processing and/or processing of controlling the calling frequency on the first analyzed event data to obtain corresponding event data.
2. The method of claim 1, wherein the de-duplicating the first parsed event data comprises:
reading each message digest algorithm value corresponding to each message in the first analyzed event data;
judging whether the current message digest algorithm value exists in a memory database, and if so, ignoring format standardization analysis processing on the message corresponding to the current message digest algorithm value; otherwise, carrying out format standardization analysis processing on the message corresponding to the current message digest algorithm value.
3. The method of claim 1, wherein the processing of the first parsed event data to control the frequency of calls comprises:
reading a frequency control threshold;
judging whether the current service calling frequency of the current message exceeds the frequency control threshold, and if the current service calling frequency of the current message exceeds the frequency control threshold, ignoring format standardization analysis processing on the message corresponding to the current service calling frequency; otherwise, carrying out format standardization analysis processing on the message corresponding to the current service calling frequency.
4. The method of claim 1, wherein the parsing the message format through a message format parser that matches the message format type comprises:
if the message format type is an instant communication message format, analyzing the instant communication message format through a message format analyzer matched with the instant communication message format; alternatively, the first and second liquid crystal display panels may be,
if the message format type is a calendar message format, analyzing the calendar message format through a message format analyzer matched with the calendar message format; alternatively, the first and second electrodes may be,
if the message format type is a mail format, analyzing the mail format through a message format analyzer matched with the mail format; alternatively, the first and second electrodes may be,
if the message format type is a simple information aggregation format, analyzing the simple information aggregation format through a message format analyzer matched with the simple information aggregation format; alternatively, the first and second electrodes may be,
and if the message format type is a preset robot message format, analyzing the robot message format through a message format analyzer matched with the preset robot message format.
5. The method of claim 1, wherein after the parsing the event data according to the service message parser matching the type of the first server to obtain first parsed event data, the method further comprises:
and if the message format of the message in the first analyzed event data is judged to be the standard message format, ignoring format standardization analysis processing on the message format of the message, and sending the first analyzed event data to the second server according to the uniform resource locator.
6. A communications apparatus, comprising:
a receiving unit, configured to receive event data sent by a first server for issuing a message, where the event data carries a uniform resource locator corresponding to a second server for receiving the message;
the processing unit is used for analyzing the event data according to a service message analyzer matched with the type of the first server to obtain first analyzed event data; and
judging whether the message format of the message in the first analyzed event data is a standard message format or not, if not, analyzing the message format of the message through a message format analyzer matched with the message format type of the message to obtain second analyzed event data carrying the message in accordance with the standard message format;
a sending unit, configured to send the second parsed event data to the second server according to the uniform resource locator, wherein,
the processing unit is further to: before judging whether the message format of the message in the first analyzed event data is the standard message format or not, carrying out duplicate removal processing and/or processing for controlling the calling frequency on the first analyzed event data to obtain corresponding event data.
7. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 5.
CN201911142400.5A 2019-11-20 2019-11-20 Communication method, device, medium and electronic equipment Active CN111314203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911142400.5A CN111314203B (en) 2019-11-20 2019-11-20 Communication method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911142400.5A CN111314203B (en) 2019-11-20 2019-11-20 Communication method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111314203A CN111314203A (en) 2020-06-19
CN111314203B true CN111314203B (en) 2022-11-29

Family

ID=71160099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911142400.5A Active CN111314203B (en) 2019-11-20 2019-11-20 Communication method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111314203B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560038A (en) * 2020-12-24 2021-03-26 深信服科技股份有限公司 Data analysis method, device and equipment and computer readable storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ATE294480T1 (en) * 1999-06-11 2005-05-15 Microsoft Corp GENERAL API FOR DEVICE REMOTE CONTROL
US7080381B2 (en) * 2001-05-31 2006-07-18 International Business Machines Corporation Message bridging system and method for singular server to singular or multiple event reception engines
US20040002958A1 (en) * 2002-06-26 2004-01-01 Praveen Seshadri System and method for providing notification(s)
US7694287B2 (en) * 2005-06-29 2010-04-06 Visa U.S.A. Schema-based dynamic parse/build engine for parsing multi-format messages
US7836439B2 (en) * 2006-02-03 2010-11-16 Research In Motion Limited System and method for extending a component-based application platform with custom services
CN103596135A (en) * 2012-08-16 2014-02-19 中国电信股份有限公司 Method of realizing message pushing and general message platform
CN103839138A (en) * 2014-03-08 2014-06-04 成都文昊科技有限公司 System for supporting interaction of multiple heterogeneous systems
CN106130868B (en) * 2016-06-02 2020-09-08 腾讯科技(深圳)有限公司 Callback message processing method, queue management system, storage medium and server
CN107294842A (en) * 2017-06-22 2017-10-24 壹家易(上海)网络科技有限公司 Message service system, messenger service platform, message service method and medium
US10503568B2 (en) * 2017-09-27 2019-12-10 Oracle International Corporation Asynchronous handling of service requests
CN109753323A (en) * 2017-11-02 2019-05-14 北京国双科技有限公司 A kind of external service call method and device

Also Published As

Publication number Publication date
CN111314203A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN109510754B (en) Online document generation method, device and system and electronic equipment
CN109688051B (en) Session list display method and device and electronic equipment
CN110471709B (en) Method, device, medium and electronic equipment for accelerating webpage opening speed
CN109039876B (en) Mail processing method and device
US11868707B2 (en) Information interaction method and apparatus, server, system, and storage medium
WO2020135431A1 (en) Message urgent reminding method and apparatus, and electronic device
CN111930709A (en) Data storage method and device, electronic equipment and computer readable medium
CN112491859A (en) Domain name certificate detection method and device, electronic equipment and computer readable medium
CN111314203B (en) Communication method, device, medium and electronic equipment
CN109902726B (en) Resume information processing method and device
CN112269770B (en) Document sharing method, device and system and electronic equipment
CN110519373B (en) Method and device for pushing information
CN109933508B (en) Method and apparatus for transmitting information
CN111083145A (en) Message sending method and device and electronic equipment
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN115766628A (en) Message combination method, device, equipment and storage medium
CN111382039A (en) Method, device, electronic equipment and storage medium for reporting user behavior event
CN112910855B (en) Sample message processing method and device
CN114417318A (en) Third-party page jumping method and device and electronic equipment
CN109842549B (en) Instant messaging interaction method and device and electronic equipment
CN114995690A (en) Document creation method, device, equipment and storage medium
CN111193717A (en) FTP black and white list control method and device and electronic equipment
CN112162682A (en) Content display method and device, electronic equipment and computer readable storage medium
CN113722193A (en) Method and device for detecting page abnormity
CN110266580B (en) Card message security guarantee method, device, medium and electronic equipment

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.