CN112650600B - Method, device and computer equipment for pushing message content - Google Patents

Method, device and computer equipment for pushing message content Download PDF

Info

Publication number
CN112650600B
CN112650600B CN202011528583.7A CN202011528583A CN112650600B CN 112650600 B CN112650600 B CN 112650600B CN 202011528583 A CN202011528583 A CN 202011528583A CN 112650600 B CN112650600 B CN 112650600B
Authority
CN
China
Prior art keywords
data unit
parameter
data
message
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.)
Active
Application number
CN202011528583.7A
Other languages
Chinese (zh)
Other versions
CN112650600A (en
Inventor
武超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GUANGZHOU FAMILY DOCTORS ONLINE INFORMATION CO Ltd
Original Assignee
GUANGZHOU FAMILY DOCTORS ONLINE INFORMATION 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 GUANGZHOU FAMILY DOCTORS ONLINE INFORMATION CO Ltd filed Critical GUANGZHOU FAMILY DOCTORS ONLINE INFORMATION CO Ltd
Priority to CN202011528583.7A priority Critical patent/CN112650600B/en
Publication of CN112650600A publication Critical patent/CN112650600A/en
Application granted granted Critical
Publication of CN112650600B publication Critical patent/CN112650600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • 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/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Methods, apparatus, and computer devices for pushing message content. The application relates to the field of big data, and discloses a method for pushing message content, which comprises the following steps: acquiring parameter entering parameters of a query message body transmitted by a current service layer; analyzing source information and data unit type information corresponding to the parameter entry; calling a data unit corresponding to the parameter according to the data unit type information; according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer; and storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer. Through classifying the message content into the data units which cannot be subdivided, the data units are made into the configurable message function module, so that a convenient analyzer screens and encapsulates the data units according to a message pushing scene, a message queue conforming to the current pushing scene is formed, the system code is reduced, the maintenance is convenient, and the project development efficiency is improved.

Description

Method, device and computer equipment for pushing message content
Technical Field
The present application relates to the field of big data, and in particular, to a method, an apparatus, and a computer device for pushing message content.
Background
In the project development process, information interaction is indispensable, and for the project development of a micro-service architecture, information interaction with other systems is more important. The message queue is the most basic interaction mode in the information interaction, the message queue is generally divided into two roles of a producer and a consumer according to different roles in the information interaction, the producer is responsible for storing the message in the message queue, and the consumer is responsible for acquiring the message from the consumption queue for consumption.
As an information interaction system of the role of a producer, the requirement of meeting the requirement of pushing scenes aiming at different messages is met, and the messages which are suitable for the pushing scenes are produced and put into corresponding message queues. And a producer can develop codes aiming at the message content according to specific requirements, and then push out the message to meet the current push scene. However, along with different pushing scenes, the workload of customizing codes each time needs to be repeatedly carried out, so that repeated investment of development manpower is caused; and with the increase of pushing scenes, the project can become very bloated, the project maintenance difficulty is increased, and the cost is high.
Disclosure of Invention
The application mainly aims to provide a method for pushing message content, and aims to solve the technical problems that the existing project code development workload is repeated and difficult to maintain.
The application provides a method for pushing message content, which comprises the following steps:
acquiring parameter entering parameters of a query message body transmitted by a current service layer;
analyzing source information and data unit type information corresponding to the parameter entry;
calling a data unit corresponding to the parameter according to the data unit type information;
according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer;
and storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
Preferably, the step of calling the data unit corresponding to the parameter according to the data unit type information includes:
judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit;
if yes, copying a data unit corresponding to the parameter from the code base;
If not, a development request is sent to a development management end, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of a query message body transmitted by the current service layer.
Preferably, the step of determining whether the data unit corresponding to the parameter exists in the code base storing the data unit includes:
searching the explanation documents corresponding to the data units in the code library respectively;
calculating the information matching degree with each parameter according to the character content in the description document;
judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base;
if yes, judging that the data unit corresponding to the parameter exists, otherwise, judging that the data unit does not exist.
Preferably, the step of calculating the information matching degree with each parameter according to the character content in the description document includes:
acquiring a first character vector corresponding to a specified character in an explanation document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the explanation document, and the specified parameter is any parameter of all parameter parameters;
Calculating the similarity of the first character vector and the second character vector according to a specified calculation formula, wherein the specified calculation formula is thatX represents a similarity value, M represents the first character vector, N represents the second character vector, mi is the i-th component vector of the first character vector, ni is the i-th component vector of the second character vector, and p represents the number of component vectors;
and taking the similarity as the information matching degree of the designated characters in the description document and the designated parameters.
Preferably, the source information of the parameter includes interface address information, and the step of assembling the data structure corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter, and a preset pushing manner includes:
acquiring a message format corresponding to the interface address information;
identifying each item field in the message format;
filling the data unit into item field tables corresponding to the parameter entering parameters respectively to form a message corresponding to the interface address information;
and adding the message corresponding to the interface address information into a message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
Preferably, before the step of obtaining the parameter of the query message body transmitted by the current service layer, the method includes:
acquiring service attributes corresponding to current data to be classified;
judging whether a first data unit corresponding to the service attribute exists or not;
if yes, the first data unit is used as a data unit corresponding to the current data to be classified;
and storing the current data to be classified in a storage area corresponding to the first data unit.
Preferably, after the step of determining whether the first data unit corresponding to the service attribute exists, the method includes:
if the first data unit corresponding to the service attribute does not exist, a storage area corresponding to the second data unit is newly created;
storing the current data to be classified in a storage area corresponding to the second data unit;
defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit;
and configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
The application also provides a device for pushing the message content, which comprises:
the first acquisition module is used for acquiring parameter entering parameters of a query message body transmitted by the current service layer;
The analysis module is used for analyzing the source information and the data unit type information corresponding to the parameter;
the calling module is used for calling the data unit corresponding to the parameter according to the data unit type information;
the assembly module is used for assembling a data structure body corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode;
and the pushing module is used for storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
The application also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described above.
According to the application, the message content is classified, one type of data is divided into the minimum units which are not subdivided, the minimum unit of each type of data is defined as one data unit, the data unit is made into the configurable message function module, and the parser is used for screening and packaging the message function module according to a specific message pushing scene, so that a message queue conforming to the current pushing scene is formed, the project development efficiency is greatly improved, the investment of development manpower is saved, and the cost is reduced; and the data units with the same functions do not need to be repeatedly developed, the defect that project codes become bloated due to the increase of pushing requirements is avoided, and the called data units are used in production operation, so that the online risk is reduced.
Drawings
FIG. 1 is a flow chart of a method for pushing message content according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a system for pushing message content according to an embodiment of the present application;
FIG. 3 is a schematic diagram showing an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, a method for pushing message content according to an embodiment of the present application includes:
s1: acquiring parameter entering parameters of a query message body transmitted by a current service layer;
s2: analyzing source information and data unit type information corresponding to the parameter entry;
s3: calling a data unit corresponding to the parameter according to the data unit type information;
s4: according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer;
s5: and storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
In the embodiment of the present application, the parameter is from a business layer, such as inquiring a bill of a customer, and the required parameter includes a customer identification card number or a bank card, etc., and the parameter determines from which data units corresponding data can be acquired. The parameter entering is transmitted to a convergence layer through a service layer, and the convergence layer configures related data units, receiver information, pushing modes and the like according to the parameter entering and then transmits the parameter entering to a resolver of a resolving layer. The parser obtains data from the corresponding data unit by parsing the data obtained by the customized convergence stage. Analyzing the type information of the data units corresponding to the parameter input parameters, determining the corresponding data units, analyzing the data units, calling the implementation class corresponding to the data units according to the parameter input parameters, returning to the analyzer, and packaging all the called data units into a message body by the analyzer. The source information includes relevant information of the recipient information parsed by the parser, such as a message format including server address, port and push information. The parser forms a data structure body according to a preset pushing mode, the data structure body is placed into an asynchronous queue to realize the asynchronization, then the content of the asynchronous queue can be monitored, the content of the queue can be realized by a specific consumption receiver, and the message pushing is completed. The preset pushing manner includes, but is not limited to, MQ (Message Queue), distributed Message Queue kafka, etc.
In the embodiment of the application, the parser is a core for realizing unitization of the message content data, and the main task of the parser is to parse the parameter input transmitted, and the parameter input into the parser is customized according to the service requirement when the package is converged, such as which data are required by the service requirement, and which data are distributed in which data units. Analyzing the parameter, extracting the realization class of the corresponding data unit, obtaining the data content of the data unit by calling the realization class of the data unit, and realizing message pushing by fusing all the data units corresponding to the parameter into a message body.
The application realizes code decoupling through data unitization and data unit configuration, improves system functions by expanding different data units, is not limited to the current service demands, and greatly improves the development efficiency of the service demands. When the data units of the new service requirements exist, the service requirements can be met by configuring the association relation without redevelopment, the service layer directly calls the message pushing method meeting the requirements, and the development workload is reduced along with the increase of the service requirements. According to the application, the data is classified into the minimum units which are not subdivided, the minimum unit of each type of data is defined as a data unit, the data unit is made into the configurable message function module, and the screening and packaging of the message function module are carried out according to the specific message pushing scene through the analyzer, so that the message queue conforming to the current pushing scene is formed, the project development efficiency is greatly improved, the investment of development manpower is saved, and the cost is reduced; and the data units with the same functions do not need to be repeatedly developed, the defect that project codes become bloated due to the increase of pushing requirements is avoided, the maintenance is convenient, the called data units are used in production operation, and the online risk is reduced.
Further, step S3 of calling the data unit corresponding to the parameter according to the data unit type information includes:
s31: judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit;
s32: if yes, copying a data unit corresponding to the parameter from the code base;
s33: if not, a development request is sent to a development management end, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of a query message body transmitted by the current service layer.
In the embodiment of the application, only the code development of the unrealized data units is concerned, and if the existing data units can meet the service requirement through aggregation, the development is not needed; if the current data unit does not meet the requirements, or if no existing data unit exists, a new development of the data unit is required. If the existing data unit can already meet the message content in the service requirement, the message push in the service requirement can be realized by only packaging the convergence method called by the service layer, and the development flow and the development cost are saved. For example, the bank account system provides information pushing of accounts, bills, consumption, repayment and the like to the outside, and through confirmation of the whole information field and information classification, such as division into a plurality of data units of account information, bill information, overdue information, repayment information and the like, then screens corresponding data units according to the parameter entering parameters of a business layer, and pushes the data units to a message queue after assembly, thereby not only rapidly meeting business requirements, but also improving the information pushing functions of different business requirements in the bank account system. Even when other systems need similar data units, development is not needed, and the method can be realized by configuring the existing data units directly, so that code redundancy and manpower waste are avoided.
Further, the step S31 of determining whether the data unit corresponding to the parameter exists in the code base storing the data unit includes:
s311: searching the explanation documents corresponding to the data units in the code library respectively;
s312: calculating the information matching degree with each parameter according to the character content in the description document;
s313: judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base;
s314: if yes, judging that the data unit corresponding to the parameter exists, otherwise, judging that the data unit does not exist.
According to the embodiment of the application, the data units corresponding to the service requirements are screened through the description document of the data units. And realizing the data types and the like included in the data unit in the description text file of the data unit, and screening the data unit matched with the parameter through the information matching degree.
Further, the step S312 of calculating the matching degree of the information with each parameter according to the character content in the description document includes:
s3121: acquiring a first character vector corresponding to a specified character in an explanation document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the explanation document, and the specified parameter is any parameter of all parameter parameters;
S3122: calculating the similarity of the first character vector and the second character vector according to a specified calculation formula, wherein the specified calculation formula is thatX represents a similarity value, M represents the first character vector, N represents the second character vector, mi is the i-th component vector of the first character vector, ni is the i-th component vector of the second character vector, and p represents the number of component vectors;
s3123: and taking the similarity as the information matching degree of the designated characters in the description document and the designated parameters.
According to the embodiment, the similarity is calculated in a one-to-one correspondence mode through calculating the first character vector corresponding to the characters in the description document and the second character vector corresponding to the parameter entry, and the information matching degree of the first character vector and the second character vector is determined. The first character vector is similar to the second character vector, the data unit corresponding to the description document is indicated to be the data unit corresponding to the parameter entry, and the data unit corresponding to the parameter entry exists in the code base, or else, the data unit does not exist. The characters in the explanatory document and the parameter are character strings, so that the first character vector and the second character vector comprise a plurality of sub-vectors, and the number of the sub-vectors corresponds to the number of the characters included in the character strings.
Further, the source information of the parameter includes interface address information, and the step S4 of assembling the data structure corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter, and a preset pushing manner includes:
s41: acquiring a message format corresponding to the interface address information;
s42: identifying each item field in the message format;
s43: filling the data unit into item field tables corresponding to the parameter entering parameters respectively to form a message corresponding to the interface address information;
s44: and adding the message corresponding to the interface address information into a message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
In the embodiment of the application, the parameter entering into the analyzer is customized according to the service requirement when the package is converged, and the convergence package is to customize the data unit information, the receiver information, the preset pushing mode and other configured contents according to the service requirement. The convergence encapsulation phase is carried out for basic parameters and service flow, because only basic parameter input parameters capable of inquiring data, such as customer name, identity card and the like, are given in the service flow, other implementation modes are customized in the convergence encapsulation phase, the code encapsulation of a non-service layer in the service program is avoided, the subsequent maintenance difficulty is reduced, the service layer is convenient to call, the service layer only pays attention to which mode the convergence method is pushed to which receiver, only service data needs to be transmitted, and data except the service data does not need to be exposed. The convergence encapsulation of the service layer calling method forms Fang Fati, the method includes that name enumeration is carried out on the implementation class of the data unit, a target system for message pushing is determined, namely a receiver is determined, a preset pushing mode is determined, the service layer only pays attention to basic parameter input related to service, and the system acquires a corresponding data structure body according to the basic parameter input by the service and pushes the data structure body to the receiver.
Further, before the step S1 of obtaining the parameter of the query message body transmitted by the current service layer, the method includes:
s11: acquiring service attributes corresponding to current data to be classified;
s12: judging whether a first data unit corresponding to the service attribute exists or not;
s13: if yes, the first data unit is used as a data unit corresponding to the current data to be classified;
s14: and storing the current data to be classified in a storage area corresponding to the first data unit.
In the embodiment of the application, the data unit is realized according to the message classification, the message classification is based on the service attribute, and the service attribute comprises service item information, such as credit card, customer and the like, and can be divided into a credit card data unit and a customer data unit, wherein the credit card data unit comprises a credit card number, a credit card amount, a credit card account single day, a credit card repayment day and the like. The customer data unit includes customer name, customer age, customer phone number, customer identification card number, etc. If the existing data unit exists, the data unit is directly stored in the storage area of the existing data unit without reconfiguration.
Further, after step S12 of determining whether there is a first data unit corresponding to the service attribute, the method includes:
S121: if the first data unit corresponding to the service attribute does not exist, a storage area corresponding to the second data unit is newly created;
s122: storing the current data to be classified in a storage area corresponding to the second data unit;
s123: defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit;
s124: and configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
The embodiment of the application needs to be redeveloped and configured for the data units which do not exist. The data units are realized through interface definition dataUnitInterface, and the content acquisition method of each data unit is uniform. The realized data units are configured, the name of the data unit realization class bean can be configured into a dictionary table, and the name can also be added into an enumeration class, so that the realization class of the data unit is configured into a code base for storing the data unit, and the subsequent data unit assembly is facilitated. The application preferably enumerates classes during configuration, but can be used directly in the program although inflexible. Enumeration is the definition of several static variables in a class, each being an instance of this class. The configuration is realized through the dictionary table, each constant value is stored, the user can conveniently select, the system can also perform operations such as adding, deleting, modifying and the like on each constant value, and the system is more flexible and friendly, but is inconvenient for a program to take.
Referring to fig. 2, an apparatus for pushing message contents according to an embodiment of the present application includes:
the first acquisition module 1 is used for acquiring parameter entering parameters of a query message body transmitted by a current service layer;
the analysis module 2 is used for analyzing the source information and the data unit type information corresponding to the parameter;
a calling module 3, configured to call a data unit corresponding to the parameter according to the data unit type information;
the assembly module 4 is configured to assemble a data structure body corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter, and a preset pushing manner;
and the pushing module 5 is used for storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
The explanation of the embodiment of the present application is the same as that of the embodiment of the method, and is not repeated.
Further, the calling module 3 includes:
the judging submodule is used for judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit or not;
a copying sub-module, configured to copy, if there is a data unit corresponding to the parameter, a data unit corresponding to the parameter from the code base;
And the sending sub-module is used for sending a development request to a development management terminal if the data unit corresponding to the parameter is not existed, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of the query message body transmitted by the current service layer.
Further, the judging sub-module includes:
the searching unit is used for searching the description documents corresponding to the data units in the code base respectively;
the computing unit is used for computing the information matching degree with each parameter according to the character content in the description document;
the judging unit is used for judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base;
and the judging unit is used for judging that the data unit corresponding to the parameter exists if the specified data unit with the information matching degree larger than the preset threshold value exists, or else, the data unit does not exist.
Further, the computing unit includes:
the acquisition subunit is used for acquiring a first character vector corresponding to a specified character in the description document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the description document, and the specified parameter is any parameter of all the parameter input parameters;
A calculating subunit, configured to calculate a similarity between the first character vector and the second character vector according to a specified calculation formula, where the specified calculation formula is thatX represents a similarity value, M represents the first character vector, N represents the second character vector, mi is the i-th component vector of the first character vector, ni is the i-th component vector of the second character vector, and p represents the number of component vectors;
and the subunit is used for taking the similarity as the information matching degree of the specified character and the specified parameter in the description document.
Further, the source information of the parameter includes interface address information, and the assembly module 4 includes:
the acquisition sub-module is used for acquiring a message format corresponding to the interface address information;
an identification sub-module, configured to identify each item field in the message format;
a filling sub-module, configured to fill the data unit into item field tables corresponding to the parameter entry parameters respectively, so as to form a message corresponding to the interface address information;
and the adding sub-module is used for adding the message corresponding to the interface address information into the message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
Further, an apparatus for pushing message content, comprising:
the second acquisition module is used for acquiring service attributes corresponding to the current data to be classified;
the judging module is used for judging whether a first data unit corresponding to the service attribute exists or not;
the module is used for taking the first data unit as the data unit corresponding to the current data to be classified if the first data unit corresponding to the service attribute exists;
and the first storage module is used for storing the current data to be classified in a storage area corresponding to the first data unit.
Further, an apparatus for pushing message content, comprising:
the creation module is used for newly creating a storage area corresponding to the second data unit if the first data unit corresponding to the service attribute does not exist;
the second storage module is used for storing the current data to be classified in a storage area corresponding to the second data unit;
the definition module is used for defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit;
and the configuration module is used for configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
Referring to fig. 3, in an embodiment of the present application, there is further provided a computer device, which may be a server, and an internal structure thereof may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store all the data required for the process of pushing the message content. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of pushing message content.
The method for executing the push message content by the processor comprises the following steps: acquiring parameter entering parameters of a query message body transmitted by a current service layer; analyzing source information and data unit type information corresponding to the parameter entry; calling a data unit corresponding to the parameter according to the data unit type information; according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer; and storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
According to the computer equipment, the information content is classified, one type of data is divided into the minimum units which are not subdivided, the minimum units of each type of data are defined as one data unit, the data units are made into the configurable information function module, and the information function module is screened and packaged according to a specific information pushing scene through the analyzer, so that an information queue which accords with the current pushing scene is formed, the project development efficiency is greatly improved, the investment of development manpower is saved, and the cost is reduced; and the data units with the same functions do not need to be repeatedly developed, the defect that project codes become bloated due to the increase of pushing requirements is avoided, and the called data units are used in production operation, so that the online risk is reduced.
In one embodiment, the step of calling the data unit corresponding to the parameter according to the data unit type information by the processor includes: judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit; if yes, copying a data unit corresponding to the parameter from the code base; if not, a development request is sent to a development management end, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of a query message body transmitted by the current service layer.
In one embodiment, the step of determining, by the processor, whether the data unit corresponding to the parameter exists in the code base storing the data unit includes: searching the explanation documents corresponding to the data units in the code library respectively; calculating the information matching degree with each parameter according to the character content in the description document; judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base; if yes, judging that the data unit corresponding to the parameter exists, otherwise, judging that the data unit does not exist.
In one embodiment, the step of calculating the information matching degree with each parameter according to the character content in the description document by the processor includes: acquiring a first character vector corresponding to a specified character in an explanation document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the explanation document, and the specified parameter is any parameter of all parameter parameters; calculating the similarity of the first character vector and the second character vector according to a specified calculation formula, wherein the specified calculation formula is that X represents a similarity value, M represents the first character vector, N represents the second character vector, mi is the i-th component vector of the first character vector, ni is the i-th component vector of the second character vector, and p represents the number of component vectors; and taking the similarity as the information matching degree of the designated characters in the description document and the designated parameters.
In one embodiment, the source information of the parameter includes interface address information, and the step of assembling, by the processor, a data structure body corresponding to the current service layer according to the source information of the parameter, a data unit corresponding to the parameter, and a preset pushing manner includes: acquiring a message format corresponding to the interface address information; identifying each item field in the message format; filling the data unit into item field tables corresponding to the parameter entering parameters respectively to form a message corresponding to the interface address information; and adding the message corresponding to the interface address information into a message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
In one embodiment, before the step of obtaining the parameter of the query message body transmitted by the current service layer, the processor includes: acquiring service attributes corresponding to current data to be classified; judging whether a first data unit corresponding to the service attribute exists or not; if yes, the first data unit is used as a data unit corresponding to the current data to be classified; and storing the current data to be classified in a storage area corresponding to the first data unit.
In one embodiment, after the step of determining whether the first data unit corresponding to the service attribute exists, the processor includes: if the first data unit corresponding to the service attribute does not exist, a storage area corresponding to the second data unit is newly created; storing the current data to be classified in a storage area corresponding to the second data unit; defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit; and configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of a portion of the architecture in connection with the present inventive arrangements and is not intended to limit the computer devices to which the present inventive arrangements are applicable.
An embodiment of the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of pushing message content, comprising: acquiring parameter entering parameters of a query message body transmitted by a current service layer; analyzing source information and data unit type information corresponding to the parameter entry; calling a data unit corresponding to the parameter according to the data unit type information; according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer; and storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
According to the computer readable storage medium, the message content is classified, one type of data is divided into the minimum units which are not subdivided, the minimum units of each type of data are defined as one data unit, the data units are made into the configurable message function modules, and the message function modules are screened and packaged according to specific message pushing scenes through the analyzer, so that a message queue conforming to the current pushing scenes is formed, the project development efficiency is greatly improved, the investment of development manpower is saved, and the cost is reduced; and the data units with the same functions do not need to be repeatedly developed, the defect that project codes become bloated due to the increase of pushing requirements is avoided, and the called data units are used in production operation, so that the online risk is reduced.
In one embodiment, the step of calling the data unit corresponding to the parameter according to the data unit type information by the processor includes: judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit; if yes, copying a data unit corresponding to the parameter from the code base; if not, a development request is sent to a development management end, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of a query message body transmitted by the current service layer.
In one embodiment, the step of determining, by the processor, whether the data unit corresponding to the parameter exists in the code base storing the data unit includes: searching the explanation documents corresponding to the data units in the code library respectively; calculating the information matching degree with each parameter according to the character content in the description document; judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base; if yes, judging that the data unit corresponding to the parameter exists, otherwise, judging that the data unit does not exist.
In one embodiment, the step of calculating the information matching degree with each parameter according to the character content in the description document by the processor includes: acquiring a first character vector corresponding to a specified character in an explanation document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the explanation document, and the specified parameter is any parameter of all parameter parameters; from specified calculationsCalculating the similarity of the first character vector and the second character vector according to a formula, wherein the specified calculation formula is that X represents a similarity value, M represents the first character vector, N represents the second character vector, mi is the i-th component vector of the first character vector, ni is the i-th component vector of the second character vector, and p represents the number of component vectors; and taking the similarity as the information matching degree of the designated characters in the description document and the designated parameters.
In one embodiment, the source information of the parameter includes interface address information, and the step of assembling, by the processor, a data structure body corresponding to the current service layer according to the source information of the parameter, a data unit corresponding to the parameter, and a preset pushing manner includes: acquiring a message format corresponding to the interface address information; identifying each item field in the message format; filling the data unit into item field tables corresponding to the parameter entering parameters respectively to form a message corresponding to the interface address information; and adding the message corresponding to the interface address information into a message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
In one embodiment, before the step of obtaining the parameter of the query message body transmitted by the current service layer, the processor includes: acquiring service attributes corresponding to current data to be classified; judging whether a first data unit corresponding to the service attribute exists or not; if yes, the first data unit is used as a data unit corresponding to the current data to be classified; and storing the current data to be classified in a storage area corresponding to the first data unit.
In one embodiment, after the step of determining whether the first data unit corresponding to the service attribute exists, the processor includes: if the first data unit corresponding to the service attribute does not exist, a storage area corresponding to the second data unit is newly created; storing the current data to be classified in a storage area corresponding to the second data unit; defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit; and configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided by the present application and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the application.

Claims (6)

1. A method of pushing message content, comprising:
acquiring parameter entering parameters of a query message body transmitted by a current service layer;
analyzing source information and data unit type information corresponding to the parameter entry;
Classifying the message content, and dividing one type of data into minimum units which are not subdivided, wherein the minimum unit of each type of data is defined as a data unit;
calling a data unit corresponding to the parameter according to the data unit type information;
according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode, assembling a data structure body corresponding to the current service layer;
storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer;
the data unit is made into a configurable message function module, and the screening and packaging of the message function module are carried out through a parser according to specific message pushing scenes;
the step of calling the data unit corresponding to the parameter according to the data unit type information comprises the following steps:
judging whether a data unit corresponding to the parameter exists in a code base for storing the data unit;
if yes, copying a data unit corresponding to the parameter from the code base;
if not, sending a development request to a development management end, wherein the development request carries parameter information of a data unit to be developed, and the parameter information of the data unit to be developed is any one of all parameter entering parameters of a query message body transmitted by the current service layer;
The step of judging whether the data unit corresponding to the parameter exists in the code base for storing the data unit comprises the following steps:
searching the explanation documents corresponding to the data units in the code library respectively;
calculating the information matching degree with each parameter according to the character content in the description document;
judging whether a specified data unit with the information matching degree larger than a preset threshold exists or not, wherein the specified data unit is any one of all data units in a code base;
if yes, judging that a data unit corresponding to the parameter exists, otherwise, judging that the data unit does not exist;
the step of calculating the information matching degree with each parameter according to the character content in the description document comprises the following steps:
acquiring a first character vector corresponding to a specified character in an explanation document and a second character vector corresponding to a specified parameter, wherein the specified character is any character string in the explanation document, and the specified parameter is any parameter of all parameter parameters;
calculating the similarity of the first character vector and the second character vector according to a specified calculation formula, wherein the specified calculation formula is thatX represents a similarity value, M i N, which is the i-th component vector of the first character vector i For the i-th vector of the second character vector, p represents the number of the first character component vector and the second character component vector;
the similarity is used as the information matching degree of the designated characters in the description document and the designated parameters;
before the step of obtaining the parameter of the query message body transmitted by the current service layer, the method comprises the following steps:
acquiring service attributes corresponding to current data to be classified;
judging whether a first data unit corresponding to the service attribute exists or not;
if yes, the first data unit is used as a data unit corresponding to the current data to be classified;
and storing the current data to be classified in a storage area corresponding to the first data unit.
2. The method according to claim 1, wherein the source information of the parameter includes interface address information, and the step of assembling the data structure corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter, and a preset push manner includes:
acquiring a message format corresponding to the interface address information;
Identifying each item field in the message format;
filling the data unit into item field tables corresponding to the parameter entering parameters respectively to form a message corresponding to the interface address information;
and adding the message corresponding to the interface address information into a message queue corresponding to the preset pushing mode to form a data structure body corresponding to the current service layer.
3. The method of pushing message content according to claim 1, wherein after the step of determining whether there is a first data unit corresponding to the service attribute, comprising:
if the first data unit corresponding to the service attribute does not exist, a storage area corresponding to the second data unit is newly created;
storing the current data to be classified in a storage area corresponding to the second data unit;
defining the second data unit through an interface to obtain an implementation class corresponding to the second data unit;
and configuring the implementation class corresponding to the second data unit into a code base for storing the data unit.
4. An apparatus for pushing message content for implementing the method of any one of claims 1 to 3, comprising:
The first acquisition module is used for acquiring parameter entering parameters of a query message body transmitted by the current service layer;
the analysis module is used for analyzing the source information and the data unit type information corresponding to the parameter;
the calling module is used for calling the data unit corresponding to the parameter according to the data unit type information;
the assembly module is used for assembling a data structure body corresponding to the current service layer according to the source information of the parameter, the data unit corresponding to the parameter and a preset pushing mode;
and the pushing module is used for storing the data structure body into a message queue and pushing the data structure body to a terminal interface corresponding to the current service layer.
5. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 3 when the computer program is executed.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 3.
CN202011528583.7A 2020-12-22 2020-12-22 Method, device and computer equipment for pushing message content Active CN112650600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011528583.7A CN112650600B (en) 2020-12-22 2020-12-22 Method, device and computer equipment for pushing message content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011528583.7A CN112650600B (en) 2020-12-22 2020-12-22 Method, device and computer equipment for pushing message content

Publications (2)

Publication Number Publication Date
CN112650600A CN112650600A (en) 2021-04-13
CN112650600B true CN112650600B (en) 2023-10-27

Family

ID=75359110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011528583.7A Active CN112650600B (en) 2020-12-22 2020-12-22 Method, device and computer equipment for pushing message content

Country Status (1)

Country Link
CN (1) CN112650600B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534356A (en) * 2016-12-12 2017-03-22 腾讯科技(深圳)有限公司 Method and apparatus for processing template data, requesting template data and displaying template data
CN109948046A (en) * 2018-01-05 2019-06-28 深圳壹账通智能科技有限公司 Information push method, device, mobile terminal and storage medium
CN110750442A (en) * 2019-09-06 2020-02-04 平安医疗健康管理股份有限公司 Test case generation method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8972512B2 (en) * 2011-09-30 2015-03-03 Mail Bypass, Inc. Message delivery systems and methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534356A (en) * 2016-12-12 2017-03-22 腾讯科技(深圳)有限公司 Method and apparatus for processing template data, requesting template data and displaying template data
CN109948046A (en) * 2018-01-05 2019-06-28 深圳壹账通智能科技有限公司 Information push method, device, mobile terminal and storage medium
CN110750442A (en) * 2019-09-06 2020-02-04 平安医疗健康管理股份有限公司 Test case generation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112650600A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
US20060080336A1 (en) Encapsulation and unified access scheme for components
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
CN109062925B (en) Method, device, computer equipment and storage medium for automatically generating insert sentences
US11531611B2 (en) Auditing-as-a-service
CN113434910A (en) Business data chaining method and device
CN114595199B (en) File analysis method and device, computer equipment and storage medium
CN113221036B (en) Method and device for processing electronic bill mail
CN113489593B (en) JSON message checking method and JSON message checking device
CN113126955A (en) Random data generation method and device, intelligent terminal and storage medium
CN114327374A (en) Business process generation method and device and computer equipment
CN112650600B (en) Method, device and computer equipment for pushing message content
CN111104122B (en) Method for mapping xml service logic to java service logic
CN113468446B (en) Method, system and equipment for supporting identification of third party two-dimensional code data
CN115588206A (en) Automatic template character recognition implementation system and method based on data management
CN111309319B (en) Inheritable office data dynamic page configuration method and device
CN110502483B (en) Data processing method, data processing device, computer equipment and storage medium
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
CN114371884A (en) Method, device, equipment and storage medium for processing Flink calculation task
CN112114790A (en) Domain code generation method and device based on conceptual data model
CN111400058A (en) Method and device for calling message, computer equipment and storage medium
CN111639010A (en) Kong-based Prometheus plug-in transformation method
CN111063340A (en) Service processing method and device of terminal, terminal and computer readable storage medium
CN115052035B (en) Message pushing method, device and storage medium
CN116887197B (en) Bank based on 5G message service processing method and device
CN104053135A (en) Method and device for realizing unstructured supplementary service data

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
TA01 Transfer of patent application right

Effective date of registration: 20230926

Address after: Rooms 802, 808, and 809, No. 80 Xianlie Middle Road, Yuexiu District, Guangzhou City, Guangdong Province, 510030

Applicant after: GUANGZHOU FAMILY DOCTORS ONLINE INFORMATION Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant