CN113379501A - Message pushing method and device, electronic equipment and storage medium - Google Patents

Message pushing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113379501A
CN113379501A CN202110684715.3A CN202110684715A CN113379501A CN 113379501 A CN113379501 A CN 113379501A CN 202110684715 A CN202110684715 A CN 202110684715A CN 113379501 A CN113379501 A CN 113379501A
Authority
CN
China
Prior art keywords
message
target
script
pushed
pushing
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.)
Pending
Application number
CN202110684715.3A
Other languages
Chinese (zh)
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.)
Guangdong 3vjia Information Technology Co Ltd
Original Assignee
Guangdong 3vjia Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong 3vjia Information Technology Co Ltd filed Critical Guangdong 3vjia Information Technology Co Ltd
Priority to CN202110684715.3A priority Critical patent/CN113379501A/en
Publication of CN113379501A publication Critical patent/CN113379501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code

Abstract

The embodiment of the invention provides a message pushing method, a message pushing device, electronic equipment and a storage medium, wherein the method comprises the following steps: under the condition of receiving a target message, determining a target message type and a target receiver corresponding to the target message; determining a message processing target script according to the target message type and the target receiver identification of the target receiver; processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver; and pushing the message to be pushed to the target receiver. Therefore, the target receiver customizes the message to be pushed in a message processing target script mode, and the target receiver needs to be docked by a simple message processing target script, so that the efficiency is effectively improved, and the code development cost is reduced.

Description

Message pushing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a message pushing method and device, electronic equipment and a storage medium.
Background
With the rapid development of internet technology, software developers gradually develop a plurality of different types of software for different enterprises, for example, software developers develop platform software (3D design, quotation system, order system, etc.) for different enterprises. This requires a unified platform to interface with different enterprises, from which an open platform arises.
In the process of docking different enterprises, pushing of messages such as change messages of order states and quotation generation messages is involved, and due to the fact that technical specifications of different enterprises are different (for example, different CRM are used), message contents required by different enterprises are different, therefore, different codes need to be customized and developed for different enterprises, pushing of different message contents is achieved, and accordingly efficiency is low and code development cost is high.
Disclosure of Invention
In order to solve the technical problems that different enterprises need to customize and develop different codes and realize pushing of different message contents due to different technical specifications of the different enterprises and difference of message contents needed by the different enterprises, so that efficiency is low and code development cost is high, embodiments of the present invention provide a message pushing method, an apparatus, an electronic device and a storage medium.
In a first aspect of the embodiments of the present invention, a method for pushing a message is provided first, where the method includes:
under the condition of receiving a target message, determining a target message type and a target receiver corresponding to the target message;
determining a message processing target script according to the target message type and the target receiver identification of the target receiver;
processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver;
and pushing the message to be pushed to the target receiver.
In an optional embodiment, before performing the method, the method further comprises:
acquiring configuration information pushed by a message corresponding to a receiver, and extracting download addresses of message processing script codes corresponding to different message types from the configuration information;
for any download address, downloading the corresponding message processing script code according to the download address;
compiling the message processing script code by using a compiler to generate a message processing script;
establishing a mapping relation between the message processing script and a receiver identification of the receiver and a message type corresponding to the message processing script code;
the determining a message processing target script according to the target message type and the target receiver identification of the target receiver comprises:
and searching a message processing target script corresponding to the target message type and the target receiver identification of the target receiver according to the mapping relation.
In an optional embodiment, the processing the target message by using the message processing target script to generate the to-be-pushed message corresponding to the target recipient includes:
searching a Key for script updating corresponding to the message processing target script, and monitoring whether the Key for script updating changes;
and if the Key for updating the script is not changed, processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver.
In an optional embodiment, the method further comprises:
if the Key for updating the script is changed, acquiring target configuration information pushed by the message of the target receiver;
extracting a target download address of a message processing target script code corresponding to the target message type from the target configuration information;
downloading the message processing target script code according to the target downloading address;
compiling the message processing target script codes by using a compiler to generate a message processing target script;
updating the target mapping relation between the message processing target script and the target message type and the target receiver identification of the target receiver; and the number of the first and second groups,
and processing the target message by using the message processing target script, generating a message to be pushed corresponding to the target receiver, and pushing the message to be pushed to the target receiver.
In an optional embodiment, the processing the target message by using the message processing target script to generate the to-be-pushed message corresponding to the target recipient includes:
utilizing the message processing target script to perform message field and message field parameter increasing processing on the target message to generate a message to be pushed corresponding to the target receiver;
changing the message field in the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver;
and/or the presence of a gas in the gas,
and changing the message field parameters of the message field in the target message by using the message processing target script to generate the message to be pushed corresponding to the target receiver.
In an optional embodiment, the method further comprises:
receiving a message pushing result returned by the target receiver, wherein the message pushing result comprises a message pushing result generated by the target receiver in response to the message to be pushed;
if the message pushing result is that the message pushing is successful, updating the state of the message to be pushed to be the pushing success;
and if the message pushing result is that the message pushing fails, updating the state of the message to be pushed to be the pushing failure, and updating the pushing times of the message to be pushed.
In an optional embodiment, the method further comprises:
determining the message to be pushed in a failed pushing state, and determining the target message type corresponding to the message to be pushed in the failed pushing state;
inquiring a preset pushing time threshold corresponding to the target message type, and judging whether the pushing time corresponding to the message to be pushed in the state of failure in pushing exceeds the pushing time threshold or not;
and if the pushing times corresponding to the message to be pushed in the state of pushing failure do not exceed the threshold value of the pushing times, re-pushing the message to be pushed in the state of pushing failure to the target receiver.
In a second aspect of the embodiments of the present invention, there is provided a message pushing apparatus, where the apparatus includes:
the type determining module is used for determining a target message type corresponding to a target message under the condition of receiving the target message; and the number of the first and second groups,
a receiver determining module, configured to determine a target receiver corresponding to the target message;
the script determining module is used for determining a message processing target script according to the target message type and the target receiver identification of the target receiver;
the message generation module is used for processing the target message by using the message processing target script and generating a message to be pushed corresponding to the target receiver;
and the message pushing module is used for pushing the message to be pushed to the target receiving party.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the message pushing method in the first aspect when executing a program stored in a memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a storage medium, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the message pushing method in the first aspect.
In a fifth aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the message pushing method described in the first aspect.
According to the technical scheme provided by the embodiment of the invention, under the condition of receiving the target message, the target message type and the target receiver corresponding to the target message are determined, the message processing target script is determined according to the target message type and the target receiver identification of the target receiver, the target message is processed by utilizing the message processing target script, the message to be pushed corresponding to the target receiver is generated, and the message to be pushed is pushed to the target receiver. Therefore, the target receiver customizes the message to be pushed in a message processing target script mode, and the target receiver needs to be docked by a simple message processing target script, so that the efficiency is effectively improved, and the code development cost is reduced.
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.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic implementation flow diagram of a message pushing method shown in an embodiment of the present invention;
fig. 2 is a schematic diagram of an implementation flow of a mapping relationship between a cache message processing script in a HashMap and a recipient identifier and a message type of a recipient, shown in an embodiment of the present invention;
fig. 3 is a schematic diagram of a message pushing application scenario shown in the embodiment of the present invention;
fig. 4 is a schematic implementation flow diagram of a method for changing a state of a message to be pushed according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a message pushing apparatus shown in the embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in fig. 1, an implementation flow diagram of a message pushing method provided in an embodiment of the present invention is shown, where the method is applied to an open platform, and specifically includes the following steps:
s101, under the condition that the target message is received, determining the target message type and the target receiver corresponding to the target message.
At present, a designer of an enterprise logs in 3D software of a certain software developer to design a furniture scheme, and after the scheme is made, the scheme is placed; after placing an order, the order system generates an order of the enterprise and calls an interface to send an order creating message to the open platform; the open platform will receive the order creation message and save the order creation message as a task to a task table of its Mysql database.
In such a scenario, the open platform may receive different messages, where the messages may be the order creation message described above, may be an order cancellation message, and the like, and the embodiment of the present invention is not limited thereto. When the open platform receives the target message, where the target message may be the above-mentioned order creation message, may be an order cancellation message, and the like, the type of the target message corresponding to the target message and the target recipient are determined.
For example, a designer of an enterprise a logs in 3D software of a certain software developer to make a furniture scheme design, and after a scheme is made, a scheme ordering is performed; after placing an order, the order system generates an order of the enterprise A and calls an interface to send an order creating message to the open platform; the open platform receives the order creation message, and determines a target message type (order creation) and a target receiver (enterprise a) corresponding to the order creation message when the order creation message is received.
It should be noted that, for a target message type, for example, order creation, order cancellation, etc. may refer to different states of an order, and for a target recipient, for example, an enterprise may be, an organization may be, etc., which is not limited in this embodiment of the present invention. In addition, the target message carries a message type field and a receiver field, so that the target message type and the target receiver corresponding to the target message can be determined.
For example, different message types are defined in different states of the ORDER, and if an enterprise needs to CREATE the ORDER and CANCEL the ORDER, it will define two message types of CREATE _ ORDER and CANCEL _ ORDER, where the ORDER creation message carries a message type field CREATE _ ORDER, and the ORDER cancellation message carries a message type field CANCEL _ ORDER, and in addition, carries an enterprise field, so as to determine the target message type and the enterprise corresponding to the target message.
And S102, determining a message processing target script according to the target message type and the target receiver identification of the target receiver.
For the target message type and the target receiver corresponding to the target message, the open platform can determine the message processing target script according to the target message type and the target receiver identification of the target receiver.
Specifically, the target message type and the target receiver identifier of the target receiver are used as keys, the query can be performed in the cached HashMap, and if the message processing target script is configured, the corresponding value, that is, the message processing target script is directly obtained from the cached HashMap.
As shown in fig. 2, an implementation flow diagram of a mapping relationship between a cache message processing script in a HashMap and a recipient identifier and a message type of a recipient provided in an embodiment of the present invention may specifically include the following steps:
s201, obtaining configuration information pushed by a message corresponding to a receiver, and extracting download addresses of message processing script codes corresponding to different message types from the configuration information.
And establishing a Groovy Class in the project code of the open platform, writing a message processing script code, storing the message processing script code, and acquiring a download address of the message processing script code. For example, the message processing script code passing the verification is uploaded to the Aliskies file server by using an Aliskive cloud OSS file server client tool OSS-browser, and the download address of the Aliskive cloud OSS file server is obtained.
It should be noted that other file services, for example, ftp file service, FastDFS, and the like, may be used to replace the OSS file server, and obtain the download address, where the download address may be different according to the message type, that is, different message types configure different message processing script codes, and different download addresses may exist, which is not limited in this embodiment of the present invention.
When the configuration information pushed by the message corresponding to the receiver (such as an enterprise) is configured in a visualized manner in the open platform background system, the message type corresponding to the message processing script code is determined according to the configuration information pushed by the message corresponding to the receiver (such as the enterprise), and the acquired download address of the message processing script code is configured to the message type. In addition, the configuration information is saved to a configuration table in the (Mysql) database used.
Thus, for different receiving parties (for example, enterprises), there are corresponding message pushing configuration information, and these configuration information have message pushing interface addresses, maximum retry times, and downloading addresses corresponding to message processing script codes corresponding to different message types, and different message types correspond to different message processing script codes.
Based on the configuration information, the configuration information pushed by the message corresponding to the receiver is obtained from a configuration table of the (Mysql) database, and the download addresses of the message processing script codes corresponding to different message types are extracted from the configuration information. Here, the receiving party refers to all receiving parties, for example, obtaining configuration information of message push corresponding to all enterprises.
For example, the configuration information of the message pushing corresponding to each of the enterprises, such as enterprise a, enterprise B, and enterprise C, is obtained from one configuration table of the (Mysql) database, and as shown in table 1 below, for the configuration information of the message pushing corresponding to each of enterprise a, enterprise B, and enterprise C, the download addresses of the message processing script codes corresponding to different message types are extracted from the configuration information.
Receiving party Configuration information for message push
Enterprise A Configuration information 1 for message push
Enterprise B Configuration information 2 for message push
Enterprise C Configuration information 3 for message push
TABLE 1
S202, aiming at any download address, downloading the corresponding message processing script code according to the download address.
S203, compiling the message processing script code by using a compiler to generate a message processing script.
S204, establishing a mapping relation between the message processing script and the receiver identification of the receiver and the message type corresponding to the message processing script code.
For a download address of any message processing script code, downloading a corresponding message processing script code according to the download address, compiling the message processing script code by using a Groovy compiler (a compiling tool class provided by Groovy), and generating a message processing script, so that a mapping relation between the message processing script and a receiving identifier of a receiving party and a message type corresponding to the message processing script code can be established, and the message processing script is a value and cached in a HashMap structure (key value pair) by taking the receiving identifier of the receiving party and the message type corresponding to the message processing script code as a key and taking the message type corresponding to the message processing script code as a value.
For example, taking enterprise a as an example, the download addresses of the message processing script codes corresponding to different message types, such as order creation, order cancellation, etc., are extracted from the configuration information pushed by the message corresponding to enterprise a, as shown in table 2 below.
Message type Download address of message processing script code
Order creation 192.168.1.1
Order cancellation 192.168.1.0
TABLE 2
For the download address (192.168.1.1) of the message processing script code, the corresponding message processing script code is downloaded according to the download address (192.168.1.1), and the Groovy compiler (a compilation tool class provided by Groovy) is used to compile the message processing script code to generate a message processing script a1, so that the mapping relationship between the message processing script a1 and the enterprise ID of enterprise a and the message type (order creation) corresponding to the message processing script code can be established, as shown in table 3 below.
For the download address (192.168.1.0) of the message processing script code, the corresponding message processing script code is downloaded according to the download address (192.168.1.0), and the Groovy compiler (a compilation tool class provided by Groovy) is used to compile the message processing script code to generate a message processing script a2, so that the mapping relationship between the message processing script a2 and the enterprise ID of enterprise a and the message type (order cancellation) corresponding to the message processing script code can be established, as shown in table 3 below.
Figure BDA0003124096980000091
Figure BDA0003124096980000101
TABLE 3
Therefore, the target message type and the target receiver identification of the target receiver can be used as keys, the query can be carried out in the cached HashMap, and if the message processing target script is configured, the corresponding value, namely the message processing target script, is directly obtained from the cached HashMap.
The recipient identifier may be, for example, an enterprise ID of an enterprise, a name of the enterprise, a registration address of the enterprise, or the like, which is not limited in this embodiment of the present invention.
S103, processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver.
For the message processing target script, the open platform can process the target message by using the message processing target script to generate the message to be pushed corresponding to the target receiver. For example, for the message processing target script, the open platform may process the order creation message by using the message processing target script, and generate a to-be-pushed message corresponding to enterprise a, where the to-be-pushed message is changed compared with the order creation message.
Because the message processing target script is dynamically changeable, before the message processing target script is used for processing the target message and generating the message to be pushed corresponding to the target receiver, the Key for script updating corresponding to the message processing target script can be searched, whether the Key for script updating is changed or not is monitored, if the Key for script updating is not changed, the message processing target script code is not updated, and therefore the message processing target script can be used for processing the target message and generating the message to be pushed corresponding to the target receiver.
In addition, if the Key for updating the script changes and indicates that the message processing target script code is updated, the target configuration information pushed by the message of the target receiver is obtained, the target download address of the message processing target script code corresponding to the target message type is extracted from the target configuration information, the message processing target script code is downloaded according to the target download address, the message processing target script code is compiled by a compiler to generate a message processing target script, the target mapping relation between the message processing target script and the target message type and the target receiver identification of the target receiver is updated, the target message is processed by the message processing target script to generate the message to be pushed corresponding to the target receiver, and the message to be pushed is pushed to the target receiver.
For example, if the Key for updating the script corresponding to the message processing target script changes, which indicates that the message processing target script code is updated, the target configuration information pushed by the message of enterprise a is obtained, the target download address of the message processing target script code corresponding to the order creation message type is extracted from the target configuration information, the message processing target script code is downloaded according to the target download address, the message processing target script code is compiled by using a Groovy compiler to generate a message processing target script, the target mapping relationship between the message processing target script, the target message type and the target receiver identifier of the target receiver is updated, so that the message processing target script cached in the HashMap is the latest, the target message can be processed by using the message processing target script to generate the message to be pushed corresponding to the target receiver, and pushed to enterprise a.
It should be noted that, processing the target message by using the message processing target script to generate the to-be-pushed message corresponding to the target recipient may specifically be: utilizing the message processing target script to perform message field and message field parameter increasing processing on the target message to generate a message to be pushed corresponding to a target receiver; changing the message field in the target message by using the message processing target script to generate a message to be pushed corresponding to a target receiver; and/or changing the message field parameters of the message field in the target message by using the message processing target script to generate the message to be pushed corresponding to the target receiver.
For example, the order creating message includes three message fields a, b, and c, the message field and the message field parameter adding process is performed on the order creating message by using the message processing target script, so as to generate a to-be-pushed message of enterprise a, the to-be-pushed message includes d message fields more than the order creating message, and the message field parameter values corresponding to the d message fields mean that the message processing target script is used to perform the message field and message field parameter adding process on the order creating message, the d message fields can be additionally added on the basis of the order creating message, and the message field parameters corresponding to the d message fields can be acquired and written by the message processing target script.
For example, the order creating message includes three message fields, namely a, b, and c, the message field in the order creating message is modified by using the message processing object script, and a to-be-pushed message corresponding to enterprise a is generated, the message field in the to-be-pushed message is modified to be the a1 message field, that is, the name of the a message field is modified, that means, the message field in the order creating message is modified by using the message processing object script, the a message field can be modified on the basis of the order creating message, and the message field parameter corresponding to the a message field can be kept unchanged.
For example, the order creating message includes three message fields, i.e., a, b, and c, the message field parameters of the message fields in the order creating message are modified by using the message processing target script, so as to generate a to-be-pushed message corresponding to the enterprise a, where the message field parameters corresponding to the message field of a are changed compared with the order creating message, which means that the message field parameters of the message fields in the order creating message are modified by using the message processing target script, and the message field parameters corresponding to the message field of a can be modified on the basis of the order creating message.
S104, pushing the message to be pushed to the target receiver.
For a message to be pushed, in the process of pushing, a lock (e.g., a Redis distributed lock) of the message to be pushed is first acquired, and then pushed to a target receiver (e.g., an enterprise a) according to a pushing interface address corresponding to a type of the target message, as shown in fig. 3.
It should be noted that, the lock sets a larger timeout time (i.e. a time slightly longer than the normal pushing time), so that even if the timeout or error occurs due to a network or program failure during the process of pushing a message, the lock is not released, the lock is automatically released after the set timeout time, thereby preventing the problem that the lock can not be released forever due to the program abnormality, and then the redis lock is released when the program is pushed successfully or unsuccessfully. The locking mechanism is added, so that the condition that a plurality of servers trigger the same message to be pushed to push the message is avoided.
In addition, after the message to be pushed is pushed to the target recipient, a message pushing result returned by the target recipient may be received, and as shown in fig. 4, the status of the message to be pushed is changed based on the message pushing result returned by the target recipient.
S401, receiving a message pushing result returned by the target receiving party, wherein the message pushing result comprises a message pushing result generated by the target receiving party in response to the message to be pushed.
After receiving or not receiving the message to be pushed, the target receiver can generate a message pushing result in response to the message to be pushed and return the message pushing result to the open platform, so that the open platform receives the message pushing result returned by the target receiver.
For example, after receiving the message to be pushed, the enterprise a may generate a message push success in response to the message to be pushed, and return the message push success to the open platform, so that the open platform receives the message push success returned by the target recipient.
For example, after not receiving the message to be pushed, the enterprise a may generate a message push failure in response to the message to be pushed, and return the message push failure to the open platform, so that the open platform receives the message push failure returned by the target recipient.
S402, if the message pushing result is that the message pushing is successful, updating the state of the message to be pushed to be the pushing success.
And S403, if the message pushing result is that the message pushing fails, updating the state of the message to be pushed to be the pushing failure, and updating the pushing times of the message to be pushed.
For the message pushing result, if the message pushing result is that the message pushing is successful, updating the state of the message to be pushed to be the pushing success; and if the message pushing result is that the message pushing fails, updating the state of the message to be pushed into the pushing failure, and updating the pushing times of the message to be pushed. Therefore, the state of the message to be pushed can be changed according to the message pushing result returned by the target receiver.
Starting a timing task at an open platform background system program, determining a message to be pushed in a failed state at intervals, determining a target message type corresponding to the message to be pushed in the failed state, inquiring a preset pushing time threshold value corresponding to the target message type, judging whether the pushing time corresponding to the message to be pushed in the failed state exceeds the pushing time threshold value, and if the pushing time corresponding to the message to be pushed in the failed state does not exceed the pushing time threshold value, re-pushing the message to be pushed in the failed state to a target receiver.
For example, a timing task is started in an open platform background system program, a message to be pushed in a failed state is determined at intervals of 5 minutes, a target message type (order creation) corresponding to the message to be pushed in the failed state is determined, a preset pushing time threshold (15) corresponding to the target message type is inquired, whether the pushing time corresponding to the message to be pushed in the failed state exceeds the pushing time threshold (15) or not is judged, if the pushing time corresponding to the message to be pushed in the failed state does not exceed the pushing time threshold, the message to be pushed in the failed state is pushed to a target receiver again until the pushing time corresponding to the message to be pushed in the failed state exceeds the pushing time threshold (15).
Through the above description of the technical solution provided by the embodiment of the present invention, in the case of receiving the target message, the target message type and the target recipient corresponding to the target message are determined, a message processing target script is determined according to the target message type and the target recipient identifier of the target recipient, the target message is processed by using the message processing target script, a message to be pushed corresponding to the target recipient is generated, and the message to be pushed is pushed to the target recipient. Therefore, the target receiver customizes the message to be pushed in a message processing target script mode, and the target receiver needs to be docked by a simple message processing target script, so that the efficiency is effectively improved, and the code development cost is reduced.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a message pushing apparatus, and as shown in fig. 5, the apparatus may include: a type determining module 510, a recipient determining module 520, a script determining module 530, a message generating module 540, and a message pushing module 550.
A type determining module 510, configured to determine, in a case that a target message is received, a target message type corresponding to the target message; and the number of the first and second groups,
a receiver determining module 520, configured to determine a target receiver corresponding to the target message;
a script determining module 530, configured to determine a message processing target script according to the target message type and the target recipient identifier of the target recipient;
the message generating module 540 is configured to process the target message by using the message processing target script, and generate a to-be-pushed message corresponding to the target recipient;
a message pushing module 550, configured to push the message to be pushed to the target recipient.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 61, a communication interface 62, a memory 63, and a communication bus 64, where the processor 61, the communication interface 62, and the memory 63 complete mutual communication through the communication bus 64,
a memory 63 for storing a computer program;
the processor 61 is configured to implement the following steps when executing the program stored in the memory 63:
under the condition of receiving a target message, determining a target message type and a target receiver corresponding to the target message; determining a message processing target script according to the target message type and the target receiver identification of the target receiver; processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver; and pushing the message to be pushed to the target receiver.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a storage medium is further provided, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the message pushing method in any one of the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to execute the message pushing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A message pushing method, the method comprising:
under the condition of receiving a target message, determining a target message type and a target receiver corresponding to the target message;
determining a message processing target script according to the target message type and the target receiver identification of the target receiver;
processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver;
and pushing the message to be pushed to the target receiver.
2. The method of claim 1, wherein prior to performing the method, further comprising:
acquiring configuration information pushed by a message corresponding to a receiver, and extracting download addresses of message processing script codes corresponding to different message types from the configuration information;
for any download address, downloading the corresponding message processing script code according to the download address;
compiling the message processing script code by using a compiler to generate a message processing script;
establishing a mapping relation between the message processing script and a receiver identification of the receiver and a message type corresponding to the message processing script code;
the determining a message processing target script according to the target message type and the target receiver identification of the target receiver comprises:
and searching a message processing target script corresponding to the target message type and the target receiver identification of the target receiver according to the mapping relation.
3. The method according to claim 1, wherein the processing the target message by using the message processing target script to generate the message to be pushed corresponding to the target recipient comprises:
searching a Key for script updating corresponding to the message processing target script, and monitoring whether the Key for script updating changes;
and if the Key for updating the script is not changed, processing the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver.
4. The method of claim 3, further comprising:
if the Key for updating the script is changed, acquiring target configuration information pushed by the message of the target receiver;
extracting a target download address of a message processing target script code corresponding to the target message type from the target configuration information;
downloading the message processing target script code according to the target downloading address;
compiling the message processing target script codes by using a compiler to generate a message processing target script;
updating the target mapping relation between the message processing target script and the target message type and the target receiver identification of the target receiver; and the number of the first and second groups,
and processing the target message by using the message processing target script, generating a message to be pushed corresponding to the target receiver, and pushing the message to be pushed to the target receiver.
5. The method according to claim 1, wherein the processing the target message by using the message processing target script to generate the message to be pushed corresponding to the target recipient comprises:
utilizing the message processing target script to perform message field and message field parameter increasing processing on the target message to generate a message to be pushed corresponding to the target receiver;
changing the message field in the target message by using the message processing target script to generate a message to be pushed corresponding to the target receiver;
and/or the presence of a gas in the gas,
and changing the message field parameters of the message field in the target message by using the message processing target script to generate the message to be pushed corresponding to the target receiver.
6. The method according to any one of claims 1 to 5, further comprising:
receiving a message pushing result returned by the target receiver, wherein the message pushing result comprises a message pushing result generated by the target receiver in response to the message to be pushed;
if the message pushing result is that the message pushing is successful, updating the state of the message to be pushed to be the pushing success;
and if the message pushing result is that the message pushing fails, updating the state of the message to be pushed to be the pushing failure, and updating the pushing times of the message to be pushed.
7. The method of claim 6, further comprising:
determining the message to be pushed in a failed pushing state, and determining the target message type corresponding to the message to be pushed in the failed pushing state;
inquiring a preset pushing time threshold corresponding to the target message type, and judging whether the pushing time corresponding to the message to be pushed in the state of failure in pushing exceeds the pushing time threshold or not;
and if the pushing times corresponding to the message to be pushed in the state of pushing failure do not exceed the threshold value of the pushing times, re-pushing the message to be pushed in the state of pushing failure to the target receiver.
8. A message push apparatus, the apparatus comprising:
the type determining module is used for determining a target message type corresponding to a target message under the condition of receiving the target message; and the number of the first and second groups,
a receiver determining module, configured to determine a target receiver corresponding to the target message;
the script determining module is used for determining a message processing target script according to the target message type and the target receiver identification of the target receiver;
the message generation module is used for processing the target message by using the message processing target script and generating a message to be pushed corresponding to the target receiver;
and the message pushing module is used for pushing the message to be pushed to the target receiving party.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored on a memory.
10. A 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 7.
CN202110684715.3A 2021-06-21 2021-06-21 Message pushing method and device, electronic equipment and storage medium Pending CN113379501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110684715.3A CN113379501A (en) 2021-06-21 2021-06-21 Message pushing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110684715.3A CN113379501A (en) 2021-06-21 2021-06-21 Message pushing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113379501A true CN113379501A (en) 2021-09-10

Family

ID=77577916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110684715.3A Pending CN113379501A (en) 2021-06-21 2021-06-21 Message pushing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113379501A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630616A (en) * 2022-12-07 2023-01-20 神州数码融信云技术服务有限公司 Message processing method, message processing device, computer device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066330A1 (en) * 2009-05-21 2012-03-15 Shunan Fan Method, system, and server for processing point to multipoint push message
CN109347934A (en) * 2018-09-30 2019-02-15 口碑(上海)信息技术有限公司 Information push method and system and server, storage medium and electronic device
CN110601952A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Multi-channel message notification sending method and device
CN111400066A (en) * 2020-03-13 2020-07-10 北京云迹科技有限公司 Message distribution method and device
CN111652691A (en) * 2020-06-09 2020-09-11 北京字节跳动网络技术有限公司 Order information processing method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066330A1 (en) * 2009-05-21 2012-03-15 Shunan Fan Method, system, and server for processing point to multipoint push message
CN110601952A (en) * 2018-06-12 2019-12-20 北京京东尚科信息技术有限公司 Multi-channel message notification sending method and device
CN109347934A (en) * 2018-09-30 2019-02-15 口碑(上海)信息技术有限公司 Information push method and system and server, storage medium and electronic device
CN111400066A (en) * 2020-03-13 2020-07-10 北京云迹科技有限公司 Message distribution method and device
CN111652691A (en) * 2020-06-09 2020-09-11 北京字节跳动网络技术有限公司 Order information processing method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王艳芳;: "融合消息推送技术在高校中的应用", 中国科技信息, no. 19 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630616A (en) * 2022-12-07 2023-01-20 神州数码融信云技术服务有限公司 Message processing method, message processing device, computer device, and storage medium

Similar Documents

Publication Publication Date Title
US9594619B2 (en) Robust hardware fault management system, method and framework for enterprise devices
CN111078481B (en) Method, device, electronic equipment and storage medium for acquiring configuration checklist
CN111984264B (en) Static library generation method and device
CN111240892A (en) Data backup method and device
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
CN111158730B (en) System updating method, device, electronic equipment and readable storage medium
CN113342419B (en) Push system loading method and device, electronic equipment and storage medium
CN113379501A (en) Message pushing method and device, electronic equipment and storage medium
CN112306568A (en) Service instance configuration method and device, electronic equipment and storage medium
CN117472627A (en) Task repetition management system, method and device, electronic equipment and storage medium
US8074205B2 (en) Binary verification service
CN116578282A (en) Code generation method, device, electronic equipment and medium
CN109375946B (en) Method and system for managing component package of node package manager
CN112559233B (en) Method, device, equipment and computer readable medium for identifying fault type
CN114221996A (en) Service calling method and device, electronic equipment and storage medium
CN112965697A (en) Code file generation method and device and electronic equipment
CN114268540B (en) Rule engine optimization method, device and equipment
CN112860309B (en) Static library calling method, device, equipment and storage medium based on iOS
CN117290253B (en) Code testing method, device, communication equipment and storage medium
CN111338634B (en) Parallel construction method, device and equipment
US20220237021A1 (en) Systems and methods of telemetry diagnostics
CN114942751A (en) Code modification method and device
CN116257275A (en) BMC upgrading method and device, electronic equipment and storage medium
CN114021062A (en) Communication method, system and device
CN113760921A (en) Method and device for creating dictionary value

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