CN113794755A - Shared service pushing method and system based on micro-service architecture - Google Patents

Shared service pushing method and system based on micro-service architecture Download PDF

Info

Publication number
CN113794755A
CN113794755A CN202110983955.3A CN202110983955A CN113794755A CN 113794755 A CN113794755 A CN 113794755A CN 202110983955 A CN202110983955 A CN 202110983955A CN 113794755 A CN113794755 A CN 113794755A
Authority
CN
China
Prior art keywords
pushing
push
request
service
queue
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.)
Granted
Application number
CN202110983955.3A
Other languages
Chinese (zh)
Other versions
CN113794755B (en
Inventor
杨汶蔚
王涛
熊一民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huaxing Digital Technology Co Ltd
Original Assignee
Shanghai Huaxing Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huaxing Digital Technology Co Ltd filed Critical Shanghai Huaxing Digital Technology Co Ltd
Priority to CN202110983955.3A priority Critical patent/CN113794755B/en
Publication of CN113794755A publication Critical patent/CN113794755A/en
Application granted granted Critical
Publication of CN113794755B publication Critical patent/CN113794755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a sharing service pushing method and a system based on a micro-service architecture, wherein the method comprises the following steps: acquiring a push request initiated by a foreground application; carrying out weight judgment on the pushing request, and selecting a pushing queue according to a weight judgment result; monitoring consumption is carried out on the pushing queue, and a corresponding pushing channel is selected for the pushing request according to the consumption mode of the message to be pushed; pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue; the push channel performs unified integrated management in the micro-service system in advance. According to the shared service pushing method and system based on the micro-service architecture, the pushing of the messages is divided into the sequencing queues, the calling frequency of the pushing service is reduced, the pushing channels are integrally managed in the micro-service system, the problem that each micro-service is repeatedly constructed for realizing multiple pushing modes is avoided, and the resource cost and the later maintenance cost are reduced.

Description

Shared service pushing method and system based on micro-service architecture
Technical Field
The invention relates to the technical field of information pushing, in particular to a sharing service pushing method and system based on a micro-service architecture.
Background
With the increasing number of users and service scenes, more and more systems supporting communication interaction are provided, and the terminals also need to acquire service data information in time, so that the systems need to use multiple push modes to transmit information. Specifically, different systems may use some of the multiple push methods, and the repeated logical configuration and arrangement may limit the development efficiency of the system. Specifically, the existing push-mode integration scheme mainly has the following two defects:
on one hand, as the pushing modes are integrated and distributed in different microservices at the background, in a microservice architecture, if other services needing to be pushed are added at the later stage, the corresponding pushing modes also need to be integrated, and certain resistance is provided for the expansion of the services; meanwhile, the micro-service cannot be concentrated on the service module in order to access various pushing modes, so that the phenomena of repeated construction and repeated work are caused.
On the other hand, because the push mode is scattered in different micro services, and the implementation or configuration of the push mode is changed, the corresponding micro services all need to modify or maintain the implementation method, and the later maintenance cost is high.
Therefore, a shared service push method with higher resource utilization and lower maintenance cost is needed to solve the above problems.
Disclosure of Invention
The invention provides a shared service pushing method and system based on a micro-service architecture, which are used for solving the defects of repeated construction and higher maintenance cost caused by the fact that pushing modes are integrated and distributed in different micro-services in the prior art.
In a first aspect, the present invention provides a shared service push method based on a micro-service architecture, including:
acquiring a push request initiated by a foreground application;
carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result;
monitoring consumption is carried out on the push queue, and a corresponding push channel is selected for the push request according to the consumption mode of the message to be pushed in the push request; wherein the consumption modes comprise timely consumption and delayed consumption;
pushing the service corresponding to the pushing request through a selected pushing channel according to the pushing rule corresponding to the pushing queue;
the push channel performs unified integrated management in the micro-service system in advance.
According to the shared service push method based on the micro-service architecture provided by the invention, the weight judgment of the push request is carried out, and a corresponding push queue is selected for the push request according to the weight judgment result, and the method comprises the following steps:
acquiring a message type of a request for entering a parameter, and setting a first initial weight according to the message type and a weight initialization rule; the weight initialization rule is used for dynamically configuring the push request according to a push mode set by a system;
acquiring the content and corresponding parameters of the message requesting for entering the parameters, inquiring the push frequency and the push result of the message within the preset time, and setting a second initial weight;
adding the first initial weight and the second initial weight to obtain a final weight;
comparing the final weight value with a preset weight value threshold value domain, and if the final weight value is smaller than the minimum value of the weight value threshold, ending the calling; if the final weight value is within the weight value threshold value range, sending the push request into a delay queue; and if the final weight value is larger than the maximum weight value threshold value, sending the push request into a direct queue.
According to the sharing service pushing method based on the micro-service architecture provided by the invention, the pushing rule of the delay queue is as follows: the timing round-robin determines whether a message to be pushed enters or not, arranges the sequence of the message to be pushed entering the queue, and carries out delay pushing on the message to be pushed according to the arrangement sequence;
the push rule of the direct queue is as follows: whether a message to be pushed enters is determined through real-time monitoring, and the message to be pushed entering a queue is pushed in time.
According to the shared service push method based on the micro-service architecture provided by the invention, before the weight judgment of the push request, the method further comprises the following steps:
and judging the specification of the pushing request, judging whether the pushing request meets the request specification or not, and intercepting the pushing request which does not meet the request specification.
According to the shared service pushing method based on the micro-service architecture provided by the invention, after the service corresponding to the pushing request is pushed, the method further comprises the following steps:
and determining whether the service corresponding to the pushing request is pushed completely according to the pushing result information, and recording a pushing log corresponding to the pushing request after the pushing is determined to be completed.
In a second aspect, the present invention further provides a shared service push system based on a micro-service architecture, including:
the system comprises a push gateway module, a push gateway module and a push gateway module, wherein the push gateway module is used for acquiring a push request initiated by foreground application and recording the push flow information of the push request;
the message weight module is used for carrying out weight judgment on the push request and selecting a corresponding push queue for the push request according to a weight judgment result;
the message sequencing module is used for monitoring consumption of the push queue and selecting a corresponding push channel for the push request according to the consumption mode of the message to be pushed in the push request; wherein the consumption modes comprise timely consumption and delayed consumption;
and the pushing module is used for integrally managing various pushing channels and pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue.
According to the shared service push system based on the micro-service architecture, the push gateway module is further used for carrying out standard judgment on the push request, judging whether the push request meets the request standard or not and intercepting the push request which does not meet the request standard.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the shared service push method based on the micro service architecture as described in any one of the above.
In a fourth aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the shared service push method based on micro service architecture as described in any one of the above.
In a fifth aspect, the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the shared service push method based on the micro service architecture as described in any one of the above.
According to the shared service pushing method and system based on the micro-service architecture, the pushing of the message can be differentiated in the sequencing queue by judging the weight of the pushing request, the calling frequency of the pushing service is reduced, meanwhile, the pushing channel is subjected to unified integrated management in the micro-service system, the problem that each micro-service is repeatedly constructed for realizing multiple pushing modes is avoided, and the resource cost and the later maintenance cost are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for pushing a shared service based on a microservice architecture according to the present invention;
FIG. 2 is a second flowchart of the method for pushing shared services based on the microservice architecture according to the present invention;
FIG. 3 is a flowchart illustrating a process of performing weight determination on a push request and selecting a corresponding push queue for the push request according to the weight determination result;
FIG. 4 is a schematic structural diagram of a shared service push system based on a microservice architecture according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 and fig. 2 show a shared service push method based on a micro-service architecture according to an embodiment of the present invention, including:
s110: acquiring a push request initiated by a foreground application;
s120: carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result;
s130: monitoring consumption is carried out on the pushing queue, and a corresponding pushing channel is selected for the pushing request according to the consumption mode of the message to be pushed in the pushing request; wherein, the consumption mode comprises timely consumption and delayed consumption;
s140: pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue;
the push channel performs unified integrated management in the micro-service system in advance.
It can be understood that the foreground application may select a corresponding push service interface to call according to the service requirement of the foreground application, so as to initiate a push request to the push gateway.
In order to reduce the waste of server resources caused by a malicious push request or a push request that does not conform to the request rule, after receiving the push request through the push gateway and before performing weight determination on the push request, the embodiment further includes:
carrying out standard judgment on the pushing request, judging whether the pushing request meets the request standard or not, intercepting the pushing request which does not meet the request standard, and directly returning a failed response; and carrying out comprehensive judgment on the pushing request meeting the request specification according to the health condition of the pushing service and the pushing result of the historical service, and determining the calling sequence.
It can be understood that the determination of the request specification mentioned in this embodiment may be to determine whether a push mode corresponding to the push request is available, determine a corresponding authority, and the like, and mainly intercept and filter the push request that obviously does not have the push condition, so as to avoid unreasonable occupation of server resources.
Referring to fig. 3, the process of performing weight determination on a push request and selecting a corresponding push queue for the push request according to a weight determination result in the embodiment specifically includes:
firstly, acquiring a message type of a request for entering a parameter, and setting a first initial weight T1 according to the message type and a weight initialization rule and in a synchronous, asynchronous and different pushing modes;
in this embodiment, the weight initialization rule may dynamically configure the push request according to a push mode specified by the system. For example, different initialization weight settings may be provided for different push modes such as short messages and mails, different configurations may be set according to different services of the user, and the configuration may be configured in a configuration file or a database in the actual application process.
Then, acquiring the content and corresponding parameters of the message requesting for entering the parameters, inquiring cache according to the content and corresponding parameters of the message requesting for entering the parameters, obtaining the pushing frequency and success or failure condition of the message within a certain time, and obtaining a second initial weight T2;
then, adding the first initial weight T1 and the second initial weight T2 to obtain a final weight T1+ T2;
finally, comparing the final weight value with a preset weight value threshold value domain, if the final weight value is smaller than the minimum value of the weight value threshold, returning false, and ending the calling;
if the final weight value is within the weight value threshold value range, sending the pushing request into a delay queue to wait for the pushing service consumption;
and if the final weight is larger than the maximum weight threshold value, directly sending the push request into a direct queue.
It should be noted that, in this embodiment, the pushing rule of the delay queue is as follows: and the timing round patrol determines whether the message to be pushed enters or not, arranges the sequence of the message to be pushed entering the queue, and carries out delay pushing on the message to be pushed according to the arrangement sequence.
In this embodiment, the push rule of the direct queue is as follows: whether a message to be pushed enters is determined through real-time monitoring, and the message to be pushed entering a direct queue is pushed in time.
It should be noted that, in this embodiment, the setting of the initialization weight and the setting of the weight threshold value field may support dynamic configuration, which may support temporary solution of some special situations, thereby facilitating handling of the timeliness problem.
In this embodiment, after determining queue information corresponding to a push request, it is necessary to monitor and consume a queue according to a rule of timeliness and delay, perform queue management on the message request based on the message queue, finely divide a front-back sequence of the message, and finally select a corresponding push channel according to a consumption mode of the message.
For example, if the service corresponding to the push request is to send a holiday blessing, the message needs to be pushed out on a holiday, belongs to a message for delayed consumption, and needs to be triggered in a delayed manner, so that the message needs to be sent into a delay queue, and push modes such as mails and short messages can be selected for pushing.
For example, the service corresponding to the push request is to send a work task notification, the message is a message which needs to be immediately pushed to a receiver and belongs to timely consumption, and the message needs to be immediately triggered, so that the message needs to be sent to a direct queue, and push modes such as flybook and enterprise WeChat can be selected for pushing.
Preferably, after the service corresponding to the push request is pushed, the method may further include:
and determining whether the service corresponding to the pushing request is pushed completely according to the pushing result information, and recording a pushing log corresponding to the pushing request after the pushing is determined to be completed.
In this embodiment, after the service corresponding to the push request is pushed, the push result information is further assembled and placed into a corresponding push queue, the queue information falls into the library after being consumed, after the push is determined to be completed, the push gateway returns to record, a push log corresponding to the push request is recorded, and the recorded data is stored and then is used as a data basis of the weight determination link. And finally, after the gateway recorded data is pushed, returning to the foreground application.
Therefore, the sharing service pushing method based on the micro-service architecture provided by the embodiment of the invention has the following advantages:
1. constructing a complete push service flow based on links such as push gateway management, message weight judgment, message sequencing, push mode selection and the like, and providing key data for service resource inclination by calling statistics and combing of logs;
2. the final consistency of the push mode realization is ensured through the gathering integration and unified management of the push mode;
3. the maintenance of the pushing mode in each micro service is reduced, the labor cost is reduced, the micro services are finally assisted to reduce the cost, and the research and development efficiency is improved.
The sharing service pushing system based on the micro-service architecture provided by the present invention is described below, and the sharing service pushing system based on the micro-service architecture described below and the sharing service pushing method based on the micro-service architecture described above may be referred to correspondingly. Fig. 4 shows a shared service push system based on a microservice architecture according to an embodiment of the present invention, including:
the push gateway module 410 is configured to obtain a push request initiated by a foreground application, and record push flow information of the push request;
the message weight module 420 is configured to perform weight determination on the push request, and select a corresponding push queue for the push request according to a weight determination result;
the message ordering module 430 is configured to monitor consumption of the push queue, and select a corresponding push channel for the push request according to a consumption mode of a message to be pushed in the push request; wherein, the consumption mode comprises timely consumption and delayed consumption;
the pushing module 440 is configured to integrally manage multiple pushing channels, and push a service corresponding to the pushing request through a selected pushing channel according to a pushing rule corresponding to the pushing queue.
It should be noted that the push gateway module, the message weight module, the message ordering module, and the push module in this embodiment may all be regarded as a micro service, and these micro services are aggregated into a micro service system.
In this embodiment, the push gateway module 410 mainly achieves the functions of maintaining the detection of the health status of the push service, completing the selective call of the service, and requesting the interception and filtering record of data.
Specifically, the push gateway module 410 monitors the normal status of a plurality of running push services in real time in a mode of interface call, performs comprehensive selection according to the health status and the result status of the push completed by the service when selecting the service, and filters the push request according to the rule when receiving the push request.
It can be understood that the detection of the health status of the push service is an action of the push gateway module 410 performing heartbeat detection on all push services to change the status of the service node.
And selecting and calling the service, namely performing weighting judgment on each push service from dimensions such as a push mode, use frequency, result guidance and the like based on a load balancing algorithm in cooperation with a message weight module, calling the service according to the weight, supporting dynamic configuration of the weight, and realizing reasonable application of server resources.
The interception filtering record of the request data establishes a basic specification (namely a request specification) according to different pushing modes, intercepts malicious or non-specification requests and reduces the waste of server resources; and simultaneously recording the request of the push service to be called and the monitoring calling result, and using the recorded request as a weight value addition data basis for subsequent service selection.
The message weight module 420 in this embodiment mainly includes the functions of initializing a weight according to a push type, processing the weight according to a push record, recording the weight of a push request in real time, and selecting a queue according to the weight.
It can be understood that, the weight initialization according to the push type means that the initial assignment of the weight is performed on the push type according to the dynamically configurable algorithm rule.
And according to the push record processing weight, performing addition and subtraction operation on the weight of the push request by multiple dimensionalities such as push information, frequency, input parameters, records and the like to obtain a final weight.
And recording the weight of the push request in real time, namely recording the final weight, dividing the latest and historical records and providing a data basis for weight calculation.
And selecting the queue according to the weight, namely using a priority queue (namely a direct queue) for the messages with higher weight according to system configuration, and entering the messages with lower weight into a delay queue to wait for consumption response, so that the resources of the push service are fully utilized, and the push sequencing is reasonably realized according to the importance degree of the messages.
The main function of the message ordering module 430 in this embodiment is to prevent the push request message from being lost, and if the message push service is restarted, it can ensure that the unconsumed data in the queue continues to be sent after the service is started.
It is understood that the sorting refers to invoking push services based on the storage and consumption of the push queue, which is subdivided into a direct queue and a delay queue in this embodiment.
Specifically, the direct queue can monitor whether a message enters in real time, and if the message enters, the direct queue can directly call according to the message type and the pushing channel.
The delay queue monitors by adopting a timing round-robin mode, arranges the message sequence under a sequencing algorithm and determines the delay pushing of the message.
In this embodiment, the pushing module 440 mainly covers functions of pushing mode integration, template management, log record pushing, and the like.
It can be understood that the integration of the push modes includes a message push function for short messages, mails, app messages, rabbitmq, mqtt, flybook, WeChat, enterprise WeChat, and the like.
The management of the push template is based on the database, and integrates the functions of adding, modifying, deleting, inquiring and the like of the common and fixed message templates.
The log record of the push is based on different data sources, the log record service is used, and the call and execution results of the push mode are recorded in a specified format and a database rule, so that subsequent operation and maintenance personnel can perform problem screening.
It should be noted that the pushing module 440 may perform unified record management on the log, where the unified record management of the log is based on log warehousing under the queue message, and multiple data sources may be selected to be synchronized as needed, so as to ensure a success rate of final log warehousing.
Therefore, the sharing service push system based on the micro-service architecture provided by the embodiment of the invention has the following advantages:
1. the service is selected and called by the push gateway module, the use of the push modes is reasonably sequenced, the calling time and the calling frequency are optimized, the resource cost is reduced, and the push resources are fully used;
2. the message weight module is used for carrying out weight judgment on the push request, and defining and dividing messages to different degrees in the rule, so that a data basis is provided for message sequencing;
3. the push requests are reasonably distributed and filtered through the message sorting module, the push of the messages is differentiated in a sorting queue, the calling frequency of push services is reduced, and the pressure of a server is relieved;
4. the push module is used for carrying out integrated management on a plurality of push modes, so that repeated construction of each micro service on the push modes is reduced, labor cost is reduced, configuration management related to push of each micro service is reduced, and final consistency of the push modes on push execution modes is ensured;
5. by pushing the high cohesion of the service call log, the operation and maintenance personnel can quickly locate the problem, the overall development and operation and maintenance cost of the micro service is reduced, and the design idea of high cohesion and low coupling is realized on the system design.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may invoke logic instructions in the memory 530 to perform a shared services push method based on a microservice architecture, the method comprising: acquiring a push request initiated by a foreground application; carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result; monitoring consumption is carried out on the pushing queue, and a corresponding pushing channel is selected for the pushing request according to the consumption mode of the message to be pushed in the pushing request; wherein, the consumption mode comprises timely consumption and delayed consumption; pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue; the push channel performs unified integrated management in the micro-service system in advance.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions, and when the program instructions are executed by a computer, the computer is capable of executing the shared service push method based on micro service architecture provided by the above methods, where the method includes: acquiring a push request initiated by a foreground application; carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result; monitoring consumption is carried out on the pushing queue, and a corresponding pushing channel is selected for the pushing request according to the consumption mode of the message to be pushed in the pushing request; wherein, the consumption mode comprises timely consumption and delayed consumption; pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue; the push channel performs unified integrated management in the micro-service system in advance.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to execute the shared service pushing method based on the microservice architecture provided in the above, the method comprising: acquiring a push request initiated by a foreground application; carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result; monitoring consumption is carried out on the pushing queue, and a corresponding pushing channel is selected for the pushing request according to the consumption mode of the message to be pushed in the pushing request; wherein, the consumption mode comprises timely consumption and delayed consumption; pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue; the push channel performs unified integrated management in the micro-service system in advance.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A shared service pushing method based on a micro-service architecture is characterized by comprising the following steps:
acquiring a push request initiated by a foreground application;
carrying out weight judgment on the push request, and selecting a corresponding push queue for the push request according to a weight judgment result;
monitoring consumption is carried out on the push queue, and a corresponding push channel is selected for the push request according to the consumption mode of the message to be pushed in the push request; wherein the consumption modes comprise timely consumption and delayed consumption;
pushing the service corresponding to the pushing request through a selected pushing channel according to the pushing rule corresponding to the pushing queue;
the push channel performs unified integrated management in the micro-service system in advance.
2. The method for pushing shared services based on microservice architecture as claimed in claim 1, wherein the determining the weight of the push request and selecting the corresponding push queue for the push request according to the weight determination result comprises:
acquiring a message type of a request for entering a parameter, and setting a first initial weight according to the message type and a weight initialization rule; the weight initialization rule is used for dynamically configuring the push request according to a push mode set by a system;
acquiring the content and corresponding parameters of the message requesting for entering the parameters, inquiring the push frequency and the push result of the message within the preset time, and setting a second initial weight; adding the first initial weight and the second initial weight to obtain a final weight;
comparing the final weight value with a preset weight value threshold value domain, and if the final weight value is smaller than the minimum value of the weight value threshold, ending the calling; if the final weight value is within the weight value threshold value range, sending the push request into a delay queue; and if the final weight value is larger than the maximum weight value threshold value, sending the push request into a direct queue.
3. The shared service pushing method based on micro service architecture as claimed in claim 2, wherein the pushing rule of the delay queue is: the timing round-robin determines whether a message to be pushed enters or not, arranges the sequence of the message to be pushed entering the queue, and carries out delay pushing on the message to be pushed according to the arrangement sequence;
the push rule of the direct queue is as follows: whether a message to be pushed enters is determined through real-time monitoring, and the message to be pushed entering a queue is pushed in time.
4. The method of claim 1, wherein before determining the weight of the push request, the method further comprises:
and judging the specification of the pushing request, judging whether the pushing request meets the request specification or not, and intercepting the pushing request which does not meet the request specification.
5. The shared service pushing method based on microservice architecture of claim 1, wherein after pushing the service corresponding to the pushing request, the method further comprises:
and determining whether the service corresponding to the pushing request is pushed completely according to the pushing result information, and recording a pushing log corresponding to the pushing request after the pushing is determined to be completed.
6. A shared service push system based on micro-service architecture is characterized by comprising:
the system comprises a push gateway module, a push gateway module and a push gateway module, wherein the push gateway module is used for acquiring a push request initiated by foreground application and recording the push flow information of the push request;
the message weight module is used for carrying out weight judgment on the push request and selecting a corresponding push queue for the push request according to a weight judgment result;
the message sequencing module is used for monitoring consumption of the push queue and selecting a corresponding push channel for the push request according to the consumption mode of the message to be pushed in the push request; wherein the consumption modes comprise timely consumption and delayed consumption;
and the pushing module is used for integrally managing various pushing channels and pushing the service corresponding to the pushing request through the selected pushing channel according to the pushing rule corresponding to the pushing queue.
7. The push system of claim 6, wherein the push gateway module is further configured to perform specification determination on the push request, determine whether the push request meets a request specification, and intercept a push request that does not meet the request specification.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the shared services push method based on micro service architecture according to any one of claims 1 to 5 when executing the program.
9. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the shared service push method based on micro service architecture according to any one of claims 1 to 5.
10. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the steps of the shared services push method based on microservice architecture according to any of claims 1 to 5.
CN202110983955.3A 2021-08-25 2021-08-25 Shared service pushing method and system based on micro-service architecture Active CN113794755B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110983955.3A CN113794755B (en) 2021-08-25 2021-08-25 Shared service pushing method and system based on micro-service architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110983955.3A CN113794755B (en) 2021-08-25 2021-08-25 Shared service pushing method and system based on micro-service architecture

Publications (2)

Publication Number Publication Date
CN113794755A true CN113794755A (en) 2021-12-14
CN113794755B CN113794755B (en) 2024-08-06

Family

ID=79182244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110983955.3A Active CN113794755B (en) 2021-08-25 2021-08-25 Shared service pushing method and system based on micro-service architecture

Country Status (1)

Country Link
CN (1) CN113794755B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895879A (en) * 2022-07-14 2022-08-12 四川航天信息有限公司 Management system design scheme determining method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780768A (en) * 2012-06-29 2012-11-14 北京奇虎科技有限公司 Processing method and processing system for highly-concurrent requests
CN103258363A (en) * 2012-02-19 2013-08-21 上海博路信息技术有限公司 Terminal-based queuing service system
CN103426223A (en) * 2012-05-15 2013-12-04 上海博路信息技术有限公司 Queuing and service system based on bar code
US20160285812A1 (en) * 2015-03-24 2016-09-29 Xinyu Xingbang Information Industry Co., Ltd. Method of issuing messages of a message queue and a message issuing device
CN106777026A (en) * 2016-12-08 2017-05-31 用友网络科技股份有限公司 Support method, the apparatus and system of micro services framework affairs final consistency
CN109889454A (en) * 2019-02-26 2019-06-14 浪潮软件集团有限公司 A kind of the message driving means and method of micro services framework
CN111290854A (en) * 2020-01-20 2020-06-16 腾讯科技(深圳)有限公司 Task management method, device and system, computer storage medium and electronic equipment
CN111564006A (en) * 2020-07-14 2020-08-21 江苏云柜网络技术有限公司 Express cabinet delivery control method and system
CN112565342A (en) * 2020-11-13 2021-03-26 广州市百果园网络科技有限公司 Message pushing method, device, equipment and storage medium based on weight calculation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258363A (en) * 2012-02-19 2013-08-21 上海博路信息技术有限公司 Terminal-based queuing service system
CN103426223A (en) * 2012-05-15 2013-12-04 上海博路信息技术有限公司 Queuing and service system based on bar code
CN102780768A (en) * 2012-06-29 2012-11-14 北京奇虎科技有限公司 Processing method and processing system for highly-concurrent requests
US20160285812A1 (en) * 2015-03-24 2016-09-29 Xinyu Xingbang Information Industry Co., Ltd. Method of issuing messages of a message queue and a message issuing device
CN106777026A (en) * 2016-12-08 2017-05-31 用友网络科技股份有限公司 Support method, the apparatus and system of micro services framework affairs final consistency
CN109889454A (en) * 2019-02-26 2019-06-14 浪潮软件集团有限公司 A kind of the message driving means and method of micro services framework
CN111290854A (en) * 2020-01-20 2020-06-16 腾讯科技(深圳)有限公司 Task management method, device and system, computer storage medium and electronic equipment
CN111564006A (en) * 2020-07-14 2020-08-21 江苏云柜网络技术有限公司 Express cabinet delivery control method and system
CN112565342A (en) * 2020-11-13 2021-03-26 广州市百果园网络科技有限公司 Message pushing method, device, equipment and storage medium based on weight calculation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PARTHA PRATIM RAY; MITHUN MUKHERJEE; LEI SHU: "Internet of Things for Disaster Management: State-of-the-Art and Prospects", IEEE ACCESS ( VOLUME: 5), 14 September 2017 (2017-09-14) *
刘传;王毅;胡明清;陈益强;: "普适多媒体信息发布系统的构建", 计算机工程与设计, no. 01, 16 January 2011 (2011-01-16) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895879A (en) * 2022-07-14 2022-08-12 四川航天信息有限公司 Management system design scheme determining method, device, equipment and storage medium
CN114895879B (en) * 2022-07-14 2022-11-04 四川航天信息有限公司 Management system design scheme determining method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113794755B (en) 2024-08-06

Similar Documents

Publication Publication Date Title
US10972344B2 (en) Automated adjustment of subscriber policies
EP3072260B1 (en) Methods, systems, and computer readable media for a network function virtualization information concentrator
CN109618002B (en) Micro-service gateway optimization method, device and storage medium
WO2018072687A1 (en) Resource scheduling method and apparatus, and filtered scheduler
CN111459750A (en) Private cloud monitoring method and device based on non-flat network, computer equipment and storage medium
US6862619B1 (en) Network management system equipped with event control means and method
CN110442432B (en) Service processing method, system, device, equipment and storage medium
CN111124819A (en) Method and device for monitoring full link
CN111209110B (en) Task scheduling management method, system and storage medium for realizing load balancing
CN109828960B (en) Log library capacity expansion method, system, computer device and readable storage medium
CN109542659A (en) Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
CN109271259B (en) Enterprise service bus system, data processing method, terminal and storage medium
CN112187903B (en) Message pushing method and device and message service system
CN111796935B (en) Consumption instance distribution method and system for calling log information
CN110868323B (en) Bandwidth control method, device, equipment and medium
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN110839023B (en) Electric power marketing multi-channel customer service system
CN115695139A (en) Method for enhancing micro-service system architecture based on distributed robust
CN113794755B (en) Shared service pushing method and system based on micro-service architecture
CN117354312A (en) Access request processing method, device, system, computer equipment and storage medium
CN111427704A (en) Remote monitoring method, device and equipment for configuration instruction and storage medium
CN116980526A (en) Method, device and equipment for realizing multi-channel queuing machine applied to converged communication
CN115603938A (en) Attack protection method, terminal device and computer readable storage medium
CN114237914A (en) Management scheduling system based on hybrid cloud
CN114268799A (en) Streaming media transmission method and device, electronic equipment and medium

Legal Events

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