CN114238466A - Message pushing method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN114238466A
CN114238466A CN202111436408.XA CN202111436408A CN114238466A CN 114238466 A CN114238466 A CN 114238466A CN 202111436408 A CN202111436408 A CN 202111436408A CN 114238466 A CN114238466 A CN 114238466A
Authority
CN
China
Prior art keywords
data
message
flink
user
database
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
CN202111436408.XA
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202111436408.XA priority Critical patent/CN114238466A/en
Publication of CN114238466A publication Critical patent/CN114238466A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application belongs to the field of data processing, and relates to a message pushing method which comprises the steps of analyzing key fields of acquired product data and user data to obtain first table data corresponding to the product data and second table data corresponding to the user data, reading the first table data and the second table data acquired by a Kafka end through a Flink end, splicing the first table data and the second table data through the Flink end to obtain a data processing result, writing the data processing result into a database, acquiring user information in the data processing result, calling a message pushing interface according to the user information, and pushing a pre-configured message to a user terminal corresponding to the user information. The application also provides a message pushing device, computer equipment and a storage medium. In addition, the application also relates to a block chain technology, and a data processing result can be stored in the block chain. This application can conveniently follow up the user, promotes communication efficiency, effectively promotes the experience degree simultaneously, further promotes the user degree of adhesion.

Description

Message pushing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a message pushing method and apparatus, a computer device, and a storage medium.
Background
With the rapid development of communication technology and internet technology, the push of various messages is messy. Particularly for many enterprises, users are important service objects, and generally push some product-related messages to users by means of telephone, mail or application programs, but telephone pushing is inefficient and easily causes troubles to users; the mail pushing cannot effectively communicate, so that information is easy to miss; the application program push is to uniformly push messages to all users, some of the pushed messages are not the messages in which the users are interested at the moment, and the messages in which the users are not interested at the moment are spam messages for the users. Therefore, the message pushing in the related art has the problems of low efficiency, easiness in missing related information, trouble for users and the like.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for pushing a message, a computer device, and a storage medium, so as to solve technical problems that, in the related art, message pushing is inefficient, related information is easy to miss, and troubles are caused to a user.
In order to solve the foregoing technical problem, an embodiment of the present application provides a message pushing method, which adopts the following technical solutions:
acquiring product data and user data, and performing key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data;
reading the first table data and the second table data acquired by the Kafka end through the Flink end;
splicing the first table data and the second table data through the Flink end to obtain a data processing result, and writing the data processing result into a database;
and acquiring the user information in the data processing result from the database, calling a message pushing interface according to the user information, and pushing a pre-configured message to a user terminal corresponding to the user information.
Further, the step of reading the first table data and the second table data acquired by the Kafka end through the Flink end includes:
responding to a starting instruction of a consumption mode, calling a connection interface between the Flink end and the Kafka end through the Flink end;
and reading the first table data and the second table data by the Flink end through the connecting interface.
Further, the step of writing the data processing result into a database includes:
performing data type conversion on the data processing result through the data conversion parameters of the Flink end to obtain a data stream;
and calling a database interface of the Flink end to write the data stream into the database.
Further, before the step of writing the data processing result into the database, the method further includes:
and creating a connection relation between the Flink terminal and the database.
Further, the step of creating the connection relationship between the Flink terminal and the database includes:
acquiring an initial source code corresponding to the Flink end, and adding a format configuration file of the database to a source code format file corresponding to the initial source code;
adding a format configuration method corresponding to the format configuration file to a database connection conversion file under the source code format file to obtain an intermediate source code;
adding the data conversion file of the database to the conversion file of the intermediate source code to obtain a target source code;
and packaging the target source codes and uploading the target source codes to an installation directory corresponding to the Flink end, operating the Flink end, and finishing the establishment of the connection relation between the Flink end and the database.
Further, the step of calling a message pushing interface according to the user information and pushing a preconfigured message to a user terminal corresponding to the user information includes:
reading a data processing result in the database through the message pushing interface, and acquiring user information from the data processing result;
and sending the pre-configuration message to the user terminal through the message pushing interface according to the message type of the pre-configuration message.
Further, the step of sending the provisioning message to the ue through the message push interface according to the message type of the provisioning message includes:
when the message type is an event trigger type, responding to a message request instruction of a user, calling the message pushing interface to perform keyword query according to the message request instruction, and returning the queried message to the user terminal;
and when the message type is a timing pushing type, monitoring the pushing time of the pre-configuration message through the message pushing interface, and pushing the corresponding pre-configuration message to the user terminal when the pushing time is up.
In order to solve the above technical problem, an embodiment of the present application further provides a message pushing apparatus, which adopts the following technical solutions:
the acquisition module is used for acquiring product data and user data, and performing key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data;
the reading module is used for reading the first table data and the second table data acquired by the Kafka end through the Flink end;
the splicing module is used for splicing the first table data and the second table data through the Flink end to obtain a data processing result, and writing the data processing result into a database;
and the pushing module is used for acquiring the user information in the data processing result from the database, calling a message pushing interface according to the user information and pushing the preconfigured message to the user terminal corresponding to the user information.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
the computer device comprises a memory and a processor, wherein the memory stores computer readable instructions, and the processor implements the steps of the message pushing method when executing the computer readable instructions.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
the computer readable storage medium has stored thereon computer readable instructions which, when executed by a processor, implement the steps of the message push method as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the method comprises the steps of obtaining product data and user data, conducting key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data, reading the first table data and the second table data obtained by a Kafka end through a Flink end, splicing the first table data and the second table data through the Flink end to obtain a data processing result, writing the data processing result into a database, obtaining user information in the data processing result from the database, calling a message pushing interface according to the user information, and pushing a pre-configured message to a user terminal corresponding to the user information; according to the method and the device, a series of processing is carried out according to the product data and the user data to obtain a data processing result, and the pre-configuration message is pushed according to the user information in the data processing result, so that the user can conveniently follow up, the communication efficiency is improved, meanwhile, the experience degree is effectively improved, and the user adhesion degree is further improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a message push method according to the present application;
FIG. 3 is a schematic diagram illustrating an embodiment of a message pushing device according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
The present application provides a message pushing method, which can be applied to a system architecture 100 as shown in fig. 1, where the system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the message pushing method provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the message pushing apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to fig. 2, a flow diagram of one embodiment of a message push method according to the present application is shown, including the steps of:
step S201, acquiring product data and user data, and performing key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data.
In this embodiment, the user historical product data and the corresponding user data are collected from the client platform, and the key fields of the user historical product data are analyzed to obtain the first table data, where the key fields of the product data include, but are not limited to, a product unique serial number, a product name, an application status, a user ID, a follower name, and a passing amount.
And analyzing key fields of the user data to obtain second table data, wherein the key fields of the user data comprise but are not limited to a user ID, a user name, a user certificate number, a mobile phone number and the like. It should be noted that the first table data and the second table data may be associated by the user ID. Wherein the generated first table data and second table data can be stored in the client platform.
Step S202, reading the first table data and the second table data acquired by the Kafka end through the Flink end.
In this embodiment, the Flink end is a Flink framework, which is a stream processing framework, and the core of the Flink framework is a stream data stream engine written in Java and Scala, and the Flink runtime system can perform batch and stream processing.
The Kafka end is a Kafka system, and the Kafka system is a distributed message system which supports partitioning, multiple copies and is based on zookeeper coordination. The structure of Kafka is mainly as follows:
1) the message theme (topic) stores message data of a specific type, namely, each data is stored under a certain theme, so that the data can be stored in a classified mode, and disorder caused by cross use is avoided;
2) the message producer (producer) encapsulates the data into a Kafka message unit and sends the message unit to the Kafka system, namely stores the message unit into the topic of the corresponding type;
3) a message consumer (consumer) subscribing to one or more topics to consume the required message data;
4) the broker persists message data in the topic to a local disk for the Kafka node name, the producer pushes the message to the topic, and the consumer subscribing to the topic pulls the message from the topic.
The first table data and the second table data are acquired by the Kafka terminal from the client platform, namely the first table data and the second table data which can be consumed by the Kafka terminal to the client platform.
Specifically, in response to a start instruction of a consumption mode of the connector, a connection interface between the Flink terminal and the Kafka terminal is called through the Flink terminal, and the Flink terminal reads the first table data and the second table data through the connection interface.
The connection interface is a connection interface of a connector, the connector is a FlinkKafkaConnector, the connector is a Kafka system connector with a built-in Flink frame, the FlinkKafkaConsumer reads data from the topic and the FlinkKafkaProducer writes data into the topic, and besides basic functions, the connector also provides perfect fault tolerance based on a checkpoint mechanism.
Specifically, the Flink Kafka connector consumption application is started, that is, the consumption mode (that is, the data reading mode) is started, and the Flink framework calls the connection interface Flink-connector-Kafka interface through the Flink framework, so that the Flink framework is connected with the Kafka system, so that the Flink framework can consume (that is, read) the first tabular data and the second tabular data in the Kafka system.
In this embodiment, the first tabular data and the second tabular data acquired by the Kafka terminal are read by the Flink terminal, so that the data acquisition efficiency can be improved.
And S203, splicing the first table data and the second table data through the Flink end to obtain a data processing result, and writing the data processing result into a database.
In this embodiment, the read first table data and second table data are processed through the FlinkSql of the Flink frame, and specifically, a new table, that is, a data processing result, may be generated by splicing the common key fields between the first table data and the second table data. The common key field can be a user ID, and the first table data and the second table data are associated through the user ID to obtain a data processing result.
In this embodiment, the data processing result is written into the database for storage, so as to facilitate query and invocation.
Among them, the database is a clickwouse database, which is a columnar database management system for OLAP (Online Analytical Processing), and as the amount of data increases greatly, the database is used as a data analysis engine which is computationally intensive and storage intensive and is heavy, and is increasingly widely applied in the field of big data due to its lightweight and easy-to-use characteristics.
It is emphasized that the data processing results may also be stored in nodes of a blockchain in order to further ensure privacy and security of the data processing results.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
And step S204, acquiring the user information in the data processing result from the database, calling a message pushing interface according to the user information, and pushing the pre-configured message to the user terminal corresponding to the user information.
The message pushing interface provides services in an interface form, and an external system can be in butt joint with the component through the interface to complete the customized pushing task. The implementation function of the message pushing interface can be written according to the actual need, and the implementable function includes but is not limited to reading the corresponding data in the database, calling the public interface opened by the WeChat public platform to access, receiving/responding the message, and the like.
In the present embodiment, the form of the preconfigured message push includes, but is not limited to, a text form, a picture form, a text-picture combination form, and the like. The pre-configured message can be written in advance and stored in a message pushing interface, and is pushed according to the requirements of users.
The channels pushed to the user include but are not limited to short messages, applications, and wechat public numbers.
In this embodiment, a data processing result in the database may be read through a preconfigured interface, and user information may be obtained from the data processing result, where the user information includes, but is not limited to, a user ID, a user name, a user certificate number, a mobile phone number, and the like, a user terminal corresponding to a user is determined according to the user information, a preset message pushing interface is invoked, and a preconfigured message is pushed to the user terminal for the user to receive.
According to the method and the device, a series of processing is carried out according to the product data and the user data to obtain a data processing result, and the pre-configuration message is pushed according to the user information in the data processing result, so that the user can conveniently follow up, the communication efficiency is improved, meanwhile, the experience degree is effectively improved, and the user adhesion degree is further improved.
In some optional implementation manners of this embodiment, the step of writing the data processing result into the database includes:
performing data type conversion on the data processing result through the data conversion parameters of the Flink end to obtain a data stream;
and calling a database interface at the Flink end to write the data stream into the database.
In this embodiment, the database is a ClickHouse database, and the principal condition for performing real-time data acquisition and analysis by using the ClickHouse database is to implement real-time synchronization of data from a business database to the ClickHouse database, where the real-time synchronization of data is to migrate data from the source database to a target database, and the real-time synchronization of real-time data is to ensure that the source database and the target database are consistent in real time on the basis of full data.
And writing the data processing result of the Flink framework into the ClickHouse database to realize the data synchronization of the Flink and the ClickHouse database. Specifically, according to a format configuration file corresponding to a database added in the Flink frame and data conversion parameters in the conversion file, a data processing result is converted into a data stream, and the data stream is written into the database by calling a database interface in the Flink frame, so that data synchronization is realized.
In some optional implementations, before the step of writing the data processing result to the database, the method further includes:
and creating a connection relation between the Flink terminal and the database.
In this embodiment, before the Flink is installed, the format configuration file and the conversion file corresponding to the database are added to the file corresponding to the Flink source code, so as to modify the Flink source code, and thus, when the Flink runs, the connection between the Flink and the database is established.
Specifically, an initial source code corresponding to a Flink terminal is obtained, a format configuration file of a database is added to a source code format file corresponding to the initial source code, a format configuration method corresponding to the format configuration file is added to a database connection conversion file under the source code format file to obtain an intermediate source code, then a data conversion file of the database is added to a conversion file of the intermediate source code to obtain a target source code, finally, the target source code is packaged and uploaded to an installation directory corresponding to the Flink terminal, the Flink terminal is operated, and the establishment of a connection relationship between the Flink terminal and the database is completed.
Wherein, the format configuration file of the database is a clickhouse Dialect file, the source code format file is a Dialect file, the database connection conversion file is a jdbccdialects file, and the data conversion file of the database is a clickhouse rowconverter file, then the specific steps of establishing connection are as follows:
(1) downloading a Flink source code, and adding a ClickHouseDialect file into a Dialect file under a flash-condnetors file corresponding to the Flink source code;
(2) adding a ClickHouseDialect method to a JdbcDialects file under a Dialect file;
(3) adding the ClickHouseRowConverter file into a Converter file under the flash-condentors file;
(4) and packaging and uploading the modified Flink source codes to a lib directory of a Flink installation directory, and performing installation and operation.
The connection between the Flink framework and the database can be realized through the steps, and the consistency of the Fink table containing the data processing result in the Flink end and the ClickHouse table structure data of the data processing result in the database is further realized.
In some optional implementation manners of this embodiment, the step of invoking a message pushing interface according to the user information and pushing the preconfigured message to the user terminal corresponding to the user information includes:
reading a data processing result in the database through a message pushing interface, and acquiring user information from the data processing result;
and sending the pre-configuration message to the user terminal through the message pushing interface according to the message type of the pre-configuration message.
In this embodiment, the message pushing interface may be written using Java code, and the message pushing interface links the Clickhouse Database through Java JDBC (Java Database Connectivity) to read data in the Clickhouse table.
The message type at least comprises an event triggering type and a timing pushing type, wherein the event triggering type is triggered according to a message request instruction sent by a user, the timing pushing type is set triggering time, and the message is automatically sent to the user when a certain time point is reached. And sending the pre-configured message to the user terminal according to the message type, thereby improving the message processing efficiency.
In some optional implementations, the step of sending the provisioning message to the user terminal through the message push interface according to the message type of the provisioning message includes:
when the message type is an event trigger type, responding to a message request instruction of a user, calling a message pushing interface according to the message request instruction to perform keyword query, and returning the queried message to the user terminal;
and when the message type is a timing push type, monitoring the push time of the pre-configuration message through a message push interface, and when the push time is up, pushing the corresponding pre-configuration message to the user terminal.
Specifically, when the message type is an event trigger type, some messages, such as product query, user's related questions about the product, product service, etc., are pre-stored in the message pushing interface according to the product characteristics. Therefore, the corresponding message stored in the message pushing interface can be inquired according to the message sent by the user and returned to the user terminal.
For example, when the message receiving channel of the user is a wechat public number, the message pushing interface can call a public interface opened by a wechat public platform to push the message to the user, specifically, a URL request link is established in the get method, so that a channel between the message pushing interface and the public interface is opened, and the information of the public interface is read; and establishing a URL request link in the post method, thereby opening a channel between the message push interface and the public interface, sending information to the public interface, and realizing the transmission of the message between the micro-message public number and the message push interface through the public interface. In addition, the information modification update can be carried out through update.
When the message type is a timed push type, push time can be set for the pre-configured message, and the corresponding message is pushed periodically and dynamically.
Monitoring whether the preconfigured message contains timing information or not through a message pushing interface, if the preconfigured message contains the timing information, determining pushing time according to the timing information, and pushing the corresponding preconfigured message to the user terminal when the preset pushing time is reached.
As a specific implementation mode, for the loan product, message pushing can be carried out according to the application state, wherein the application state comprises client consultation, data filling, verification and verification passing, the current application state of the user is obtained, and the message is sent to the user according to the application state, so that the user can know the current application condition or remind the user of carrying out the next operation.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a message pushing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the message pushing apparatus 300 according to the embodiment includes: the device comprises an acquisition module 301, a reading module 302, a splicing module 303 and a pushing module 304. Wherein:
the obtaining module 301 is configured to obtain product data and user data, and perform key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data;
the reading module 302 is configured to read the first table data and the second table data acquired by the Kafka terminal through the Flink terminal;
the splicing module 303 is configured to splice the first tabular data and the second tabular data through the Flink end to obtain a data processing result, and write the data processing result into a database;
the pushing module 304 is configured to obtain the user information in the data processing result from the database, call a message pushing interface according to the user information, and push a preconfigured message to a user terminal corresponding to the user information.
It is emphasized that the data processing results may also be stored in nodes of a blockchain in order to further ensure privacy and security of the data processing results.
According to the message pushing device, a series of processing is carried out according to the product data and the user data to obtain the data processing result, and the pre-configuration message is pushed according to the user information in the data processing result, so that the user can be conveniently followed, the communication efficiency is improved, meanwhile, the experience degree is effectively improved, and the user adhesion degree is further improved.
In this embodiment, the reading module 302 is further configured to:
responding to a starting instruction of a consumption mode, calling a connection interface between the Flink end and the Kafka end through the Flink end;
and reading the first table data and the second table data by the Flink end through the connecting interface.
In this embodiment, the first tabular data and the second tabular data acquired by the Kafka terminal are read by the Flink terminal, so that the data acquisition efficiency can be improved.
In some optional implementations of this implementation, the splicing module 303 includes a conversion submodule and a write submodule, where:
the conversion submodule is used for performing data type conversion on the data processing result through the data conversion parameters of the Flink end to obtain a data stream;
and the writing sub-module is used for calling a database interface of the Flink end to write the data stream into the database.
In this embodiment, data synchronization between the Flink terminal and the database can be realized by writing the data processing result into the database, so as to facilitate data acquisition.
In this embodiment, the message pushing apparatus 300 further includes a creating module, configured to create a connection relationship between the Flink terminal and the database.
In this embodiment, the creating module is further configured to:
acquiring an initial source code corresponding to the Flink end, and adding a format configuration file of the database to a source code format file corresponding to the initial source code;
adding a format configuration method corresponding to the format configuration file to a database connection conversion file under the source code format file to obtain an intermediate source code;
adding the data conversion file of the database to the conversion file of the intermediate source code to obtain a target source code;
and packaging the target source codes and uploading the target source codes to an installation directory corresponding to the Flink end, operating the Flink end, and finishing the establishment of the connection relation between the Flink end and the database.
The connection between the Flink terminal and the database can be realized through the steps, and the consistency of the Fink table containing the data processing result in the Flink terminal and the ClickHouse table structure data of the data processing result in the database is further realized.
In some optional implementations of the present embodiment, the pushing module 304 includes an obtaining sub-module and a pushing sub-module, where:
the acquisition submodule is used for reading a data processing result in the database through the message pushing interface and acquiring user information from the data processing result;
and the pushing submodule is used for sending the pre-configuration message to the user terminal through the message pushing interface according to the message type of the pre-configuration message.
In this embodiment, the push submodule is further configured to:
when the message type is an event trigger type, responding to a message request instruction of a user, calling the message pushing interface to perform keyword query according to the message request instruction, and returning the queried message to the user terminal;
and when the message type is a timing pushing type, monitoring the pushing time of the pre-configuration message through the message pushing interface, and pushing the corresponding pre-configuration message to the user terminal when the pushing time is up.
In the embodiment, the pre-configuration message is sent to the user terminal according to the message type, so that the message processing efficiency can be improved.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as computer readable instructions of a message pushing method. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, execute computer readable instructions of the message pushing method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
In this embodiment, when the processor executes the computer readable instructions stored in the memory, the steps of the message pushing method according to the above embodiments are implemented, a series of processing is performed according to the product data and the user data to obtain a data processing result, and the preconfigured message is pushed according to the user information in the data processing result, so that the user can be conveniently followed up, the communication efficiency is improved, meanwhile, the experience degree is effectively improved, and the user adhesion degree is further improved.
The present application further provides another embodiment, that is, a computer-readable storage medium is provided, where computer-readable instructions are stored, and the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the message pushing method, and performs a series of processing according to product data and user data to obtain a data processing result, and pushes a preconfigured message according to user information in the data processing result, so as to facilitate follow-up for a user, improve communication efficiency, effectively improve experience, and further improve user adhesion.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A message pushing method, comprising the steps of:
acquiring product data and user data, and performing key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data;
reading the first table data and the second table data acquired by the Kafka end through the Flink end;
splicing the first table data and the second table data through the Flink end to obtain a data processing result, and writing the data processing result into a database;
and acquiring the user information in the data processing result from the database, calling a message pushing interface according to the user information, and pushing a pre-configured message to a user terminal corresponding to the user information.
2. The message pushing method according to claim 1, wherein the step of reading the first table data and the second table data acquired by the Kafka end through the Flink end comprises:
responding to a starting instruction of a consumption mode, calling a connection interface between the Flink end and the Kafka end through the Flink end;
and reading the first table data and the second table data by the Flink end through the connecting interface.
3. The message pushing method according to claim 1, wherein the step of writing the data processing result into a database comprises:
performing data type conversion on the data processing result through the data conversion parameters of the Flink end to obtain a data stream;
and calling a database interface of the Flink end to write the data stream into the database.
4. The message pushing method according to claim 1, further comprising, before the step of writing the data processing result to a database:
and creating a connection relation between the Flink terminal and the database.
5. The message pushing method according to claim 4, wherein the step of creating the connection relationship between the Flink terminal and the database comprises:
acquiring an initial source code corresponding to the Flink end, and adding a format configuration file of the database to a source code format file corresponding to the initial source code;
adding a format configuration method corresponding to the format configuration file to a database connection conversion file under the source code format file to obtain an intermediate source code;
adding the data conversion file of the database to the conversion file of the intermediate source code to obtain a target source code;
and packaging the target source codes and uploading the target source codes to an installation directory corresponding to the Flink end, operating the Flink end, and finishing the establishment of the connection relation between the Flink end and the database.
6. The message pushing method according to claim 1, wherein the step of invoking a message pushing interface according to the user information and pushing a preconfigured message to a user terminal corresponding to the user information comprises:
reading a data processing result in the database through the message pushing interface, and acquiring user information from the data processing result;
and sending the pre-configuration message to the user terminal through the message pushing interface according to the message type of the pre-configuration message.
7. The message pushing method according to claim 6, wherein the step of sending the preconfigured message to the user terminal through the message pushing interface according to the message type of the preconfigured message comprises:
when the message type is an event trigger type, responding to a message request instruction of a user, calling the message pushing interface to perform keyword query according to the message request instruction, and returning the queried message to the user terminal;
and when the message type is a timing pushing type, monitoring the pushing time of the pre-configuration message through the message pushing interface, and pushing the corresponding pre-configuration message to the user terminal when the pushing time is up.
8. A message push apparatus, comprising:
the acquisition module is used for acquiring product data and user data, and performing key field analysis on the product data and the user data to obtain first table data corresponding to the product data and second table data corresponding to the user data;
the reading module is used for reading the first table data and the second table data acquired by the Kafka end through the Flink end;
the splicing module is used for splicing the first table data and the second table data through the Flink end to obtain a data processing result, and writing the data processing result into a database;
and the pushing module is used for acquiring the user information in the data processing result from the database, calling a message pushing interface according to the user information and pushing the preconfigured message to the user terminal corresponding to the user information.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the message push method of any of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the message pushing method according to any one of claims 1 to 7.
CN202111436408.XA 2021-11-29 2021-11-29 Message pushing method and device, computer equipment and storage medium Pending CN114238466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111436408.XA CN114238466A (en) 2021-11-29 2021-11-29 Message pushing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111436408.XA CN114238466A (en) 2021-11-29 2021-11-29 Message pushing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114238466A true CN114238466A (en) 2022-03-25

Family

ID=80751930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111436408.XA Pending CN114238466A (en) 2021-11-29 2021-11-29 Message pushing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114238466A (en)

Similar Documents

Publication Publication Date Title
CN111666490A (en) Information pushing method, device, equipment and storage medium based on kafka
KR101863981B1 (en) Using text messages to interact with spreadsheets
CN109936621B (en) Information security multi-page message pushing method, device, equipment and storage medium
CN111414407A (en) Data query method and device of database, computer equipment and storage medium
CN112162965B (en) Log data processing method, device, computer equipment and storage medium
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN112631910A (en) Front-end testing method and device, computer equipment and storage medium
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN115794437A (en) Calling method and device of microservice, computer equipment and storage medium
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
WO2022156087A1 (en) Data blood relationship establishing method and apparatus, computer device, and storage medium
CN115203304A (en) Batch data importing method based on timed polling and related equipment
CN114090066A (en) User interface card view generation method and device, computer equipment and medium
CN114238466A (en) Message pushing method and device, computer equipment and storage medium
CN115203672A (en) Information access control method and device, computer equipment and medium
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN114615325A (en) Message pushing method and device, computer equipment and storage medium
CN114238585A (en) Query method and device based on 5G message, computer equipment and storage medium
CN113626438A (en) Data table management method and device, computer equipment and storage medium
CN116108814B (en) Gantt chart processing method and device, computer equipment and storage medium
CN117290019A (en) Interface calling method and device, computer equipment and storage medium
CN115795209A (en) Method, device, equipment and medium for executing Eval function based on browser plug-in
CN116894736A (en) Mail management method, device, computer equipment and storage medium
CN115080045A (en) Link generation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination