CN112286662A - Task pushing method, device and equipment based on shared resources and storage medium - Google Patents

Task pushing method, device and equipment based on shared resources and storage medium Download PDF

Info

Publication number
CN112286662A
CN112286662A CN202011189494.4A CN202011189494A CN112286662A CN 112286662 A CN112286662 A CN 112286662A CN 202011189494 A CN202011189494 A CN 202011189494A CN 112286662 A CN112286662 A CN 112286662A
Authority
CN
China
Prior art keywords
task
pushing
target
push
preset
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
CN202011189494.4A
Other languages
Chinese (zh)
Other versions
CN112286662B (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.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202011189494.4A priority Critical patent/CN112286662B/en
Publication of CN112286662A publication Critical patent/CN112286662A/en
Application granted granted Critical
Publication of CN112286662B publication Critical patent/CN112286662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/485Resource constraint

Landscapes

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

Abstract

The invention relates to the field of big data, is applied to the field of intelligent medical treatment, and provides a task pushing method, a task pushing device, task pushing equipment and a task pushing storage medium based on shared resources, wherein the task pushing method, the task pushing device, the task pushing equipment and the task pushing storage medium are used for improving the utilization efficiency of the shared resources. The task pushing method based on the shared resources comprises the following steps: configuring the initial push task based on the shared resource according to the configuration information to obtain a target push task; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information within a preset time period timed by a timer; and sending the push content to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode. In addition, the invention also relates to a block chain technology, and the target consumption data can be stored in the block chain.

Description

Task pushing method, device and equipment based on shared resources and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for pushing a task based on a shared resource.
Background
The shared resource for platform operation refers to a resource which has a definite upper limit of availability or a limited number in a platform system and is commonly used by a plurality of operators of a plurality of service lines. At present, for the use of shared resources, a mode generally adopted is to obtain a fixed upper limit value of the shared resources through evaluation according to the resource condition of existing software or hardware, and to set the data processing of operation at the functional interface level according to the fixed upper limit value of the shared resources.
Although the above method can solve the problems of system crash and downtime caused by over-limit use, for a higher upper limit value of the shared resource, rapid configuration and response cannot be performed through the existing mechanism for expanding the resource, resulting in low utilization efficiency of the shared resource.
Disclosure of Invention
The invention provides a task pushing method, a task pushing device, a task pushing equipment and a task pushing storage medium based on shared resources, which are used for improving the utilization efficiency of the shared resources.
The invention provides a task pushing method based on shared resources in a first aspect, which comprises the following steps:
creating an initial push task based on shared resources, acquiring configuration information through a preset configuration interface, and configuring the initial push task according to the configuration information to obtain a target push task, wherein the target push task comprises push time, push content, push speed and push mode, and the configuration information comprises a push quantity threshold and/or a task push quantity threshold of redundant resources;
task scheduling is carried out on the target push task to obtain a task scheduling message queue, the task scheduling message queue is sent to a preset consumption end, and a consumption message queue based on the task scheduling message queue and sent by the preset consumption end is received;
preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
calling a preset timer, determining a target pushing quantity based on the comprehensive user consumption data according to the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity;
and when the timer counts the pushing time, sending the pushing content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode.
Optionally, in a first implementation manner of the first aspect of the present invention, the creating an initial push task based on a shared resource, acquiring configuration information through a preset configuration interface, and configuring the initial push task according to the configuration information to obtain a target push task, where the target push task includes push time, push content, push speed, and push manner, and the configuration information includes a push quantity threshold and/or a task push quantity threshold of a redundant resource, and includes:
receiving a push request sent by a preset operation terminal, and creating an initial push task based on shared resources according to the push request, wherein the push request is a push request of inquiry data based on an on-line inquiry system;
acquiring pushing speed and configuration information input by the preset operation terminal through a preset configuration interface, and matching a target verification strategy corresponding to the preset operation terminal, wherein the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources;
judging whether the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource conforms to the target verification strategy or not;
and if the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resources conforms to the target verification strategy, configuring the initial pushing task according to the configuration information to obtain a target pushing task, wherein the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the pushing content comprises medicine data, medical institution data and food therapy data.
Optionally, in a second implementation manner of the first aspect of the present invention, the obtaining, through a preset configuration interface, the pushing speed and the configuration information input by the preset operation end, and matching the target verification policy corresponding to the preset operation end, where the configuration information includes a pushing quantity threshold and/or a task pushing quantity threshold of a redundant resource, includes:
acquiring a pushed batch period, a pushed batch quantity, a pushed task quantity threshold and/or a task pushed quantity threshold of redundant resources input by the preset operation terminal through a preset configuration interface;
calculating the pushing batch period and the pushing batch quantity to obtain a pushing speed, and determining the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource as configuration information;
and acquiring the operator identification number of the preset operator, and matching a target verification strategy corresponding to the operator identification number from a plurality of preset verification strategies.
Optionally, in a third implementation manner of the first aspect of the present invention, the preprocessing the consumption message queue to obtain target consumption data, obtaining target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data includes:
extracting initial consumption data in the consumption message queue, performing data cleaning, data stipulation and data transformation on the initial consumption data to obtain target consumption data, and generating a matrix of the target consumption data;
extracting initial user consumption data from a preset database in a preset system, carrying out data cleaning, data stipulation and data transformation on the initial user consumption data to obtain target user consumption data, and generating a matrix of the target user consumption data;
and carrying out weight addition on the matrix of the target consumption data and the matrix of the target user consumption data to obtain comprehensive user consumption data.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the invoking a preset timer, determining, according to the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource, a target pushing quantity based on the comprehensive user consumption data within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity, includes:
calling a preset timer, and extracting user group information in the comprehensive user consumption data and attention in the user group information, wherein the attention is the number of times and the duration of clicking and searching push messages in the comprehensive user consumption data and messages related to the push messages;
within a preset time period timed by the timer, sequencing the user group information according to the sequence of the attention degrees from large to small, and calculating the number of users in the sequenced user group information;
comparing and analyzing the user number with the pushing number threshold and/or the task pushing number threshold of the redundant resources to obtain a target pushing number;
triggering a pull instruction at a preset time through the timer, and reading user information from the comprehensive user consumption data corresponding to the target pushing quantity according to the pull instruction, wherein the preset time is contained in the preset time period.
Optionally, in a fifth implementation manner of the first aspect of the present invention, when the timer counts the push time, the sending the push content to the user side corresponding to the user information through a preset speed limiter, the target push quantity, the push speed, and the push manner includes:
executing a timing task through the timer, and triggering the target pushing task and calling a preset speed limiter when the timing task detects that the current moment is the pushing time;
creating multiple threads of the target pushing task through a scheduling thread corresponding to the task scheduling message queue, a preset thread pool and the target pushing quantity;
and sending the push content to a user side corresponding to the user information according to the target push quantity, the push speed and the push mode through the multithreading and a token bucket flow control algorithm in the speed limiter.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the task scheduling the target push task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consuming end, and receiving a consumption message queue sent by the preset consuming end and based on the task scheduling message queue includes:
performing task scheduling on the target push task to obtain a task scheduling message queue, asynchronously triggering a task starting scheduling to a preset consumption end, and sending the task scheduling message queue to the preset consumption end;
and processing the task scheduling message queue through the preset consuming end based on the starting task, and receiving a consumption message queue which is sent by the preset consuming end and is based on the processed task scheduling message queue.
The second aspect of the present invention provides a task pushing apparatus based on shared resources, including:
the system comprises a creating and configuring module, a sending module and a receiving module, wherein the creating and configuring module is used for creating an initial pushing task based on shared resources, acquiring configuration information through a preset configuration interface, and configuring the initial pushing task according to the configuration information to obtain a target pushing task, the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources;
the task scheduling module is used for performing task scheduling on the target push task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consuming end, and receiving a consumption message queue based on the task scheduling message queue sent by the preset consuming end;
the preprocessing and merging module is used for preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
a calling determining module, configured to call a preset timer, determine, within a preset time period timed by the timer, a target pushing quantity based on the comprehensive user consumption data according to the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource, and acquire user information corresponding to the target pushing quantity;
and the sending module is used for sending the pushed content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode when the pushing time is counted by the timer.
Optionally, in a first implementation manner of the second aspect of the present invention, the creating configuration module includes:
the system comprises a creating unit, a sending unit and a processing unit, wherein the creating unit is used for receiving a push request sent by a preset operation terminal, creating an initial push task based on shared resources according to the push request, and the push request is a push request based on inquiry data of an on-line inquiry system;
the matching unit is used for acquiring the pushing speed and the configuration information input by the preset operation terminal through a preset configuration interface and matching a target verification strategy corresponding to the preset operation terminal, wherein the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources;
a judging unit, configured to judge whether the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource conforms to the target verification policy;
and a configuration unit, configured to configure the initial push task according to the configuration information if the push quantity threshold and/or the task push quantity threshold of the redundant resource meets the target verification policy, so as to obtain a target push task, where the target push task includes push time, push content, push speed, and push mode, and the push content includes drug data, medical institution data, and dietary therapy data.
Optionally, in a second implementation manner of the second aspect of the present invention, the matching unit is specifically configured to:
acquiring a pushed batch period, a pushed batch quantity, a pushed task quantity threshold and/or a task pushed quantity threshold of redundant resources input by the preset operation terminal through a preset configuration interface;
calculating the pushing batch period and the pushing batch quantity to obtain a pushing speed, and determining the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource as configuration information;
and acquiring the operator identification number of the preset operator, and matching a target verification strategy corresponding to the operator identification number from a plurality of preset verification strategies.
Optionally, in a third implementation manner of the second aspect of the present invention, the preprocessing combination module is specifically configured to:
extracting initial consumption data in the consumption message queue, performing data cleaning, data stipulation and data transformation on the initial consumption data to obtain target consumption data, and generating a matrix of the target consumption data;
extracting initial user consumption data from a preset database in a preset system, carrying out data cleaning, data stipulation and data transformation on the initial user consumption data to obtain target user consumption data, and generating a matrix of the target user consumption data;
and carrying out weight addition on the matrix of the target consumption data and the matrix of the target user consumption data to obtain comprehensive user consumption data.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the call determination module is specifically configured to:
calling a preset timer, and extracting user group information in the comprehensive user consumption data and attention in the user group information, wherein the attention is the number of times and the duration of clicking and searching push messages in the comprehensive user consumption data and messages related to the push messages;
within a preset time period timed by the timer, sequencing the user group information according to the sequence of the attention degrees from large to small, and calculating the number of users in the sequenced user group information;
comparing and analyzing the user number with the pushing number threshold and/or the task pushing number threshold of the redundant resources to obtain a target pushing number;
triggering a pull instruction at a preset time through the timer, and reading user information from the comprehensive user consumption data corresponding to the target pushing quantity according to the pull instruction, wherein the preset time is contained in the preset time period.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the sending module is specifically configured to:
executing a timing task through the timer, and triggering the target pushing task and calling a preset speed limiter when the timing task detects that the current moment is the pushing time;
creating multiple threads of the target pushing task through a scheduling thread corresponding to the task scheduling message queue, a preset thread pool and the target pushing quantity;
and sending the push content to a user side corresponding to the user information according to the target push quantity, the push speed and the push mode through the multithreading and a token bucket flow control algorithm in the speed limiter.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the task scheduling module is specifically configured to:
performing task scheduling on the target push task to obtain a task scheduling message queue, asynchronously triggering a task starting scheduling to a preset consumption end, and sending the task scheduling message queue to the preset consumption end;
and processing the task scheduling message queue through the preset consuming end based on the starting task, and receiving a consumption message queue which is sent by the preset consuming end and is based on the processed task scheduling message queue.
The third aspect of the present invention provides a task pushing device based on shared resources, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instructions in the memory to enable the shared resource based task pushing device to execute the above shared resource based task pushing method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-mentioned shared resource-based task pushing method.
In the technical scheme provided by the invention, an initial push task based on shared resources is created, configuration information is obtained through a preset configuration interface, the initial push task is configured according to the configuration information to obtain a target push task, the target push task comprises push time, push content and a push mode, and the configuration information comprises push speed, a push quantity threshold value and/or a task push quantity threshold value of redundant resources; task scheduling is carried out on a target push task to obtain a task scheduling message queue, the task scheduling message queue is sent to a preset consumption end, and a consumption message queue based on the task scheduling message queue sent by the preset consumption end is received; preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data; calling a preset timer, determining a target pushing quantity based on the comprehensive user consumption data according to a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity; and when the timer counts the pushing time, sending the pushing content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode. In the embodiment of the invention, a target pushing task is obtained by configuring the initial pushing task based on the shared resource according to the configuration information; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information in a preset time period of a timer; the push content is sent to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode, flexible allocation, controllability and scheduling of shared resources are achieved, expansion of the shared resources can be rapidly configured and responded, and utilization efficiency of the shared resources is improved.
Drawings
FIG. 1 is a diagram of an embodiment of a task pushing method based on shared resources according to an embodiment of the present invention;
FIG. 2 is a diagram of another embodiment of a task pushing method based on shared resources according to an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a task pushing device based on shared resources according to an embodiment of the present invention;
FIG. 4 is a diagram of another embodiment of a task pushing device based on shared resources according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a task pushing device based on shared resources in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a task pushing method, a task pushing device, a task pushing equipment and a task pushing storage medium based on shared resources, and the utilization efficiency of the shared resources is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a task pushing method based on shared resources in the embodiment of the present invention includes:
101. the method comprises the steps of creating an initial pushing task based on shared resources, obtaining configuration information through a preset configuration interface, configuring the initial pushing task according to the configuration information, and obtaining a target pushing task, wherein the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources.
It is to be understood that the executing entity of the present invention may be a task pushing device based on a shared resource, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
The method comprises the following steps that a server receives a push request sent by a preset operation end, wherein the push request can comprise a pushed service scene, time, content, a mode, a push speed and a push end identification number, the server acquires an internet protocol address and an equipment system of a corresponding push end from preset push end token authorization information according to the push end identification number, and acquires push item data of a current time period according to the push request, the internet protocol address and the equipment system of the push end, wherein the push item data are a total push upper limit value, a service side emphasis value and related priority push factors of a message, and the related priority push factors are as follows: during the epidemic situation, the related information of the epidemic situation is a priority push factor. And matching the corresponding time period and the pushing quantity threshold value which are allowed to be pushed, the pushing request, the Internet protocol address of the pushing end and the equipment system according to the pushing project data, and establishing an initial pushing task based on the shared resource according to the time period and the pushing quantity threshold value which are allowed to be pushed, the pushing request, the Internet protocol address of the pushing end and the equipment system. And acquiring configuration information through a preset configuration interface, and reconfiguring and updating the initial push task according to a push quantity threshold value in the configuration information and/or a task push quantity threshold value of redundant resources to obtain a target push task.
It should be noted that the shared resource includes a system resource and a pushed information resource. The target push task also includes a pushed service scenario, and the target push task includes, for example: the pushed service scene is chat/notification messages (such as online inquiry, online customer service, logistics notification, coupon notification, other notifications and the like, the priority is highest) and marketing messages (such as advertisements, the priority is lowest), wherein the chat messages have the highest priority and the dynamic change amplitude is large; the push content is a title, content, picture, other rich text, a pushed landing page and the like of a push message or a push notification; the pushing speed comprises fixed speed and speed limit values, and is the pushing speed of different services and different time periods; the pushing quantity threshold is a pushing quantity limit value of a preset time period, and can be a predicted value, for example, a legal holiday, and the maximum quantity of pushing is 100 ten thousand (namely, a task quantity threshold); the push mode includes, but is not limited to, a pull mode, a push mode and a proxy push mode, the pull mode may be a polling mode, the push mode may be a short message service mode and a persistent connection mode, and the proxy push mode may be a message queue telemetry transmission proxy (RSMB) push mode.
Configuration information: task push quantity threshold of redundant resources: the threshold of the number of tasks of the redundant resource is the upper limit of the usage amount of the shared resource in different time periods, for example, the upper limit of the usage amount of the shared resource in 9:00-11:00 am and 16:00-20:00 pm may be different, by flexibly distributing the upper limit of the available resources of different services in different time periods of different periods, the effect of flexibly allocating the shared resources is realized, in actual operation, certain resource redundancy is often given to the system, so as to quickly deal with various emergencies, for example, a daily 1000 ten thousand per hour task push quantity is met per business planning requirement, in practice 1100 ten thousand per hour is provided, the task pushing quantity threshold of 100 ten thousand per hour of redundant resources is provided, so that the problems of resource waste caused by redundancy, uneven resource allocation caused by redundancy and low efficiency are avoided.
102. The method comprises the steps of carrying out task scheduling on a target push task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consumption end, and receiving a consumption message queue based on the task scheduling message queue sent by the preset consumption end.
And the server performs resource scheduling calculation, resource allocation, scheduling thread pool processing and state monitoring on the target push task through a preset lightweight distributed task scheduling framework to obtain a task scheduling message queue. The server performs task scheduling on the target push task to obtain a task scheduling message queue, so that the task scheduling message queue can perform task triggering (including a cross-day task), control task sequence and random distribution, and the performance of the multi-server is exerted. The server sends the task scheduling message queue to a preset consuming end, the preset consuming end can be a consuming platform connected with a plurality of user applications or a plurality of consuming systems, the preset consuming end receives the task scheduling message queue, processes the task scheduling message queue to obtain consuming data, the consuming data is put into the preset message queue, and therefore the consuming message queue is obtained and sent to the server.
103. And preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data.
The server extracts consumption data from the consumption message queue, performs data cleaning and data format conversion on the consumption data to obtain target consumption data, obtains user source information in the target consumption data, matches a corresponding preset system according to the user source information, extracts initial user consumption data corresponding to the user source information from the preset system, performs data preprocessing on the initial user consumption data to obtain target user consumption data, performs fusion de-duplication on the same consumption data of the same user in a preset consumption time period in the target consumption data and the target user consumption data, and performs user classification on the fused de-duplicated target consumption data and the target user consumption data to obtain comprehensive user consumption data.
104. And calling a preset timer, determining a target pushing quantity based on the comprehensive user consumption data according to a pushing quantity threshold and/or a task pushing quantity threshold of the redundant resource within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity.
The end time of the preset time period is earlier than the push time or the start time of the push time. After obtaining the comprehensive user consumption data, the server starts a preset timer, times through the preset timer, and sends a calculation request based on the comprehensive user consumption data and a preset time period of the timer to a preset system, wherein the calculation request comprises a calculation instruction, the comprehensive user consumption data, a pushed quantity threshold and/or a task pushed quantity threshold of redundant resources, after receiving the calculation request, the preset system obtains user group information in the comprehensive user consumption data, statistically analyzes and sorts the user group quantity in the comprehensive user consumption data to obtain sorted user group information, the user group information before the task pushed quantity threshold of the sorted user group information which is ranked as the pushed quantity threshold and/or the redundant resources is determined as target user group information, and the user group quantity of the target user group information is the target pushed data, sending the target pushing quantity to a server, triggering a pulling instruction at a preset moment through a timer, and reading user information from the comprehensive user consumption data according to the pulling instruction, wherein the preset moment is contained in a preset time period.
105. And when the timer counts the pushing time, sending the pushing content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode.
When the timer counts the time of triggering the target pushing task, the server triggers the target pushing task and starts a preset speed limiter, and the speed limiter is used for matching the corresponding target pushing speed in the pushing speed according to the current time, for example: and if the current time is 10:00 of a holiday, the target pushing speed is 5000 persons/second, if the current time is 24:00 of a working day, the target pushing speed is 1000 persons/second, the target pushing speed is less than or equal to the pushing speed, and the pushed contents in the target pushing task are sent to the user side corresponding to the user information corresponding to the target pushing quantity according to the pushing mode, the target pushing speed and the target pushing quantity corresponding to the configuration information.
In the embodiment of the invention, a target pushing task is obtained by configuring the initial pushing task based on the shared resource according to the configuration information; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information in a preset time period of a timer; the push content is sent to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode, flexible allocation, controllability and scheduling of shared resources are achieved, expansion of the shared resources can be rapidly configured and responded, and utilization efficiency of the shared resources is improved. This scheme can be applied to in the wisdom medical field to promote the construction in wisdom city.
Referring to fig. 2, another embodiment of a task pushing method based on shared resources according to an embodiment of the present invention includes:
201. the method comprises the steps of receiving a push request sent by a preset operation end, creating an initial push task based on shared resources according to the push request, wherein the push request is a push request of inquiry data based on an on-line inquiry system.
The method comprises the steps that a preset operation end sends a push request for inputting inquiry data based on an on-line inquiry system to a server, the push request comprises push time, a push mode, push speed and a push end identification number, the server receives and obtains medicine data, medical institution data and food therapy data from shared resources according to the push request, converts the medicine data, the medical institution data and the food therapy data into a push mode to obtain push contents, and an initial push task is established according to the push time, the push mode, the push speed and the push end identification number in the push request and the push contents. Wherein, the pushing time may be a time period, for example: early golden section (8:00-10:00), early silver section (10:00-12:00), noon break section (12:00-14:00), afternoon silver section (14:00-16:00), afternoon golden section (16:00-18:00), late golden section (18:00-20:00), late silver section (20:00-22:00), all day, custom time period. The pushing mode may be a cloud pushing mode and a protocol inference mode, the cloud pushing mode is an application program (C2 DM) pushing mode, and the protocol inference mode is an extensible communication and presentation protocol (XMPP) pushing mode.
202. The method comprises the steps of obtaining pushing speed and configuration information input by a preset operation end through a preset configuration interface, matching a target verification strategy corresponding to the preset operation end, wherein the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources.
Specifically, the server acquires a pushed batch period, a pushed batch number, a pushed task number threshold and/or a task pushed number threshold of the redundant resource, which are input by a preset operation terminal, through a preset configuration interface; calculating the pushing batch period and the pushing batch quantity to obtain a pushing speed, and determining a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources as configuration information; and acquiring an operator identification number of a preset operator, and matching a target verification strategy corresponding to the operator identification number from a plurality of preset verification strategies.
For example, if the preset operator-side input push batch period and the push batch number obtained by the server are 8 seconds and 12000 people, respectively, the obtained push speed is calculated to be 12000/8-1500 people/second, and the configuration information of the push quantity threshold and/or the task push quantity threshold of the redundant resource is/are calculated; after acquiring an Identity (ID) of an operation end of a preset operation end, a server generates a hash value of the identification number of the operation end, and retrieves a plurality of preset verification strategies in a preset verification strategy hash table to obtain a target verification strategy corresponding to the identification number of the operation end; the server can also extract the push end identification number in the push request, and according to the push end identification number and the operation end identification number, a target verification strategy corresponding to the operation end identification number and the push end identification number is matched from a plurality of preset verification strategies, different push ends have different push amount requirements, and by matching the operation end identification number and the push end identification number, shared resources can be flexibly allocated, so that the utilization efficiency of the shared resources is improved; the server can also extract the service scene, the pushing time, the pushing content and the keywords of the pushing mode pushed in the initial pushing task, and convert the operator identification number, the pushing end identification number and the keywords into vectors; calculating cosine similarity between the vector and the preset verification strategies, sequencing the preset verification strategies according to the sequence of the cosine similarity from large to small, and determining the first sequenced preset verification strategy as a target verification strategy of the initial push task.
203. And judging whether the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resources meet the target verification strategy or not.
The target verification policy may be an allowable pushed quantity threshold corresponding to each preset operation end and/or a task pushed quantity threshold of the redundant resource, that is, it is determined whether the accumulated pushed quantity in the pushing time period will not exceed the upper limit, and it is determined whether the pushed quantity threshold corresponding to the preset operation end and/or the task pushed quantity threshold of the redundant resource is within a preset allowable range, and each preset operation end is allocated with an allowable range, for example: the allowed pushing quantity threshold corresponding to the preset operation end a is 50 thousands, whether the pushing quantity threshold of the preset operation end a in the configuration information is smaller than or equal to 50 thousands or not, the allowed pushing quantity threshold corresponding to the preset operation end B is 80 thousands or not, and whether the pushing quantity threshold of the preset operation end B in the configuration information is smaller than or equal to 80 thousands or not. Judging whether a pushing quantity threshold value and/or a task pushing quantity threshold value of redundant resources in the configuration information conforms to a target verification strategy or not, if so, continuing to establish the task, configuring the initial pushing task according to the configuration information to obtain a target pushing task, if not, not continuing to establish the task, canceling the initial pushing task, and if not, using a corresponding preset default value to configure the initial pushing task through the default value to obtain the target pushing task.
204. And if the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resources conforms to a target verification strategy, configuring the initial pushing task according to the configuration information to obtain a target pushing task, wherein the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the pushing content comprises medicine data, medical institution data and food therapy data.
If the pushing quantity threshold value in the configuration information and/or the task pushing quantity threshold value of the redundant resource conforms to the target verification strategy, the task can be continuously established, the pushing speed, the pushing quantity threshold value and/or the task pushing quantity threshold value of the redundant resource in the initial pushing task are configured according to the configuration information, and the initial pushing task is configured and updated to obtain the target pushing task.
205. The method comprises the steps of carrying out task scheduling on a target push task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consumption end, and receiving a consumption message queue based on the task scheduling message queue sent by the preset consumption end.
Specifically, the server performs task scheduling on a target push task to obtain a task scheduling message queue, asynchronously triggers a task starting scheduling to a preset consumption end, and sends the task scheduling message queue to the preset consumption end; and processing the task scheduling message queue based on the starting task through the preset consuming end, and receiving a consumption message queue which is sent by the preset consuming end and is based on the processed task scheduling message queue.
When a server performs task scheduling on a target push task through a preset lightweight distributed task scheduling framework to obtain a task scheduling message queue, a plurality of asynchronous task processes are started, data in the task scheduling message queue are read through the asynchronous task processes, the execution time of task scheduling is timed, the execution time reaches a preset target moment, a starting task of task scheduling is asynchronously triggered, and the starting task of task scheduling and the completed task scheduling message queue are sent to a preset consuming end through the asynchronous task processes, for example: the task scheduling message queues comprise a first task, a second task and a third task, when the target time is preset, the first task and the second task are scheduled, the starting task, the first task and the second task of the task scheduling are sent to a preset consuming end through a plurality of asynchronous task processes, after the preset consuming end receives the starting task of the task scheduling and the completed task scheduling message queue, the completed task scheduling message queue is subjected to data processing according to the starting task to obtain consumption data, the consumption data are put into the preset message queue to obtain a consumption message queue, and the consumption message queue is sent to a server after the consumption message queue is obtained by the preset consuming end.
206. And preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data.
Specifically, the server extracts initial consumption data in a consumption message queue, performs data cleaning, data stipulation and data transformation on the initial consumption data to obtain target consumption data, and generates a matrix of the target consumption data; extracting initial user consumption data from a preset database in a preset system, carrying out data cleaning, data stipulation and data transformation on the initial user consumption data to obtain target user consumption data, and generating a matrix of the target user consumption data; and carrying out weight addition on the matrix of the target consumption data and the matrix of the target user consumption data to obtain comprehensive user consumption data.
The server extracts initial consumption data from the consumption message queue, and can perform user classification and normalization processing on the initial consumption data to obtain target consumption data, convert the target consumption data into a matrix, and obtain the matrix of the target user consumption data in the same way except performing data cleaning, data specification and data transformation on the initial consumption data. The weights in the weight addition may be the same weights, or different weights with a phase difference smaller than or equal to 0.1, which can both ensure the original data and bias the original data, for example: the matrix of the target consumption data is B, the matrix of the target user consumption data is C, the same weights are 0.50(B) and 0.50(C), and the weights which are different and have a difference value of less than or equal to 0.1 are 0.55(B) and 0.45 (C).
207. And calling a preset timer, determining a target pushing quantity based on the comprehensive user consumption data according to a pushing quantity threshold and/or a task pushing quantity threshold of the redundant resource within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity.
Specifically, the server calls a preset timer, and extracts user group information in the comprehensive user consumption data and attention in the user group information, wherein the attention is the number of times and the duration of clicking and searching push messages in the comprehensive user consumption data and messages related to the push messages; in a preset time period timed by a timer, sequencing user group information according to a sequence of the attention degrees from large to small, and calculating the number of users in the sequenced user group information; comparing and analyzing the number of users with a pushing number threshold and/or a task pushing number threshold of redundant resources to obtain a target pushing number; triggering a pull instruction at a preset time through a timer, and reading user information from the comprehensive user consumption data corresponding to the target pushing quantity according to the pull instruction, wherein the preset time is included in a preset time period.
For example, the push time is 11: 00-12:00, the server calls a preset timer to time, and the preset time period for timing is 10: 20-10: 50, in the range of 10: 20-10: before the timing of 50 periods is finished, the server extracts user group information in the comprehensive user consumption data and attention degrees in the user group information, wherein the attention degrees are as follows: continuously paying attention to medical related consultation messages or consultation notifications within three days, sorting user group information by the server according to a sequence of attention degrees from large to small, calculating the number of users in the sorted user group information, then setting a pushing number threshold value to be 100 ten thousand, taking the first 100 ten thousand of the user number as a target pushing number if the user number is 110 ten thousand, taking the user number 90 ten thousand as the target pushing number if the user number is 90 ten thousand, and setting a timer at 10: 50, triggering a pulling instruction, and reading user information from consumption information corresponding to 100 ten thousand users or 90 ten thousand users in the comprehensive user consumption data according to the pulling instruction; for another example: the threshold value of the task pushing quantity of the redundant resources is 100 ten thousand per hour, if the threshold value of the pushing quantity is 100 ten thousand and the user quantity is 110 ten thousand, the target pushing quantity is 100 ten thousand, the first 100 ten thousand users are pushed in each hour, if the threshold value of the pushing quantity is 100 ten thousand and the user quantity is 90 ten thousand, the target pushing quantity is 100 ten thousand, and the first 90 ten thousand users and the first 10 ten thousand users in 90 ten thousand are pushed in each hour.
208. And when the timer counts the pushing time, sending the pushing content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode.
Specifically, the server executes a timing task through a timer, and when the timing task detects that the current time is pushing time, a target pushing task is triggered and a preset speed limiter is called; creating multiple threads of a target pushing task through a scheduling thread corresponding to the task scheduling message queue, a preset thread pool and the target pushing quantity; and sending the push content to a user side corresponding to the user information according to the target push quantity, push speed and push mode by a token bucket flow control algorithm in the multithreading and speed limiter.
For example, when a timer detects that the current time is the pushing time in the target pushing task through a timing task, the target pushing task is triggered, a main thread of the target pushing task is created through a scheduling thread corresponding to a task scheduling message queue, a plurality of sub-threads of the main thread are created through a thread pool corresponding to a preset task scheduling message queue, the number of the sub-threads is the target pushing number, so that multithreading is obtained, a preset speed limiter is called, pushing contents in the target pushing task are sent to a user terminal corresponding to user information of the target pushing number in a multithreading concurrent execution mode according to a pushing mode and a pushing speed corresponding to the pushing time through a token bucket flow control algorithm of the speed limiter, the multithreading and the state of the preset thread pool are monitored every 2 seconds during the multithreading concurrent execution, and CountLatch is adopted to lock and wait multithreading, and executing the business logic of the main thread after the preset thread pool executes the target push task.
In the embodiment of the invention, a target pushing task is obtained by configuring the initial pushing task based on the shared resource according to the configuration information; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information in a preset time period of a timer; the push content is sent to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode, flexible allocation, controllability and scheduling of shared resources are achieved, expansion of the shared resources can be rapidly configured and responded, and utilization efficiency of the shared resources is improved. This scheme can be applied to in the wisdom medical field to promote the construction in wisdom city.
With reference to fig. 3, the method for pushing a task based on a shared resource in the embodiment of the present invention is described above, and a task pushing device based on a shared resource in the embodiment of the present invention is described below, where an embodiment of the task pushing device based on a shared resource in the embodiment of the present invention includes:
the configuration creating module 301 is configured to create an initial push task based on a shared resource, acquire configuration information through a preset configuration interface, configure the initial push task according to the configuration information, and obtain a target push task, where the target push task includes push time, push content, push speed, and push mode, and the configuration information includes a push quantity threshold and/or a task push quantity threshold of a redundant resource;
the task scheduling module 302 is configured to perform task scheduling on a target push task to obtain a task scheduling message queue, send the task scheduling message queue to a preset consuming end, and receive a consumption message queue based on the task scheduling message queue sent by the preset consuming end;
the preprocessing merging module 303 is configured to preprocess the consumption message queue to obtain target consumption data, obtain target user consumption data in a preset system, and merge the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
a calling determining module 304, configured to call a preset timer, determine, according to a pushing quantity threshold and/or a task pushing quantity threshold of a redundant resource, a target pushing quantity based on the comprehensive user consumption data within a preset time period timed by the timer, and acquire user information corresponding to the target pushing quantity;
the sending module 305 is configured to send the push content to the user side corresponding to the user information through a preset speed limiter, a target push quantity, a push speed, and a push mode when the timer counts the push time.
The function implementation of each module in the task pushing device based on shared resources corresponds to each step in the embodiment of the task pushing method based on shared resources, and the function and implementation process are not described in detail herein.
In the embodiment of the invention, a target pushing task is obtained by configuring the initial pushing task based on the shared resource according to the configuration information; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information in a preset time period of a timer; the push content is sent to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode, flexible allocation, controllability and scheduling of shared resources are achieved, expansion of the shared resources can be rapidly configured and responded, and utilization efficiency of the shared resources is improved. This scheme can be applied to in the wisdom medical field to promote the construction in wisdom city.
Referring to fig. 4, another embodiment of a task pushing device based on shared resources according to an embodiment of the present invention includes:
the configuration creating module 301 is configured to create an initial push task based on a shared resource, acquire configuration information through a preset configuration interface, configure the initial push task according to the configuration information, and obtain a target push task, where the target push task includes push time, push content, push speed, and push mode, and the configuration information includes a push quantity threshold and/or a task push quantity threshold of a redundant resource;
the creating configuration module 301 specifically includes:
the creating unit 3011 is configured to receive a push request sent by a preset operation end, create an initial push task based on a shared resource according to the push request, where the push request is a push request based on inquiry data of an online inquiry system;
the matching unit 3012 is configured to obtain, through a preset configuration interface, a pushing speed and configuration information input by a preset operation end, and match a target verification policy corresponding to the preset operation end, where the configuration information includes a pushing quantity threshold and/or a task pushing quantity threshold of a redundant resource;
a determining unit 3013, configured to determine whether the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource meet a target verification policy;
a configuration unit 3014, configured to, if the pushed quantity threshold and/or the task pushed quantity threshold of the redundant resource meets a target verification policy, configure the initial pushed task according to the configuration information to obtain a target pushed task, where the target pushed task includes pushing time, pushing content, pushing speed, and pushing mode, and the pushing content includes drug data, medical institution data, and dietary therapy data;
the task scheduling module 302 is configured to perform task scheduling on a target push task to obtain a task scheduling message queue, send the task scheduling message queue to a preset consuming end, and receive a consumption message queue based on the task scheduling message queue sent by the preset consuming end;
the preprocessing merging module 303 is configured to preprocess the consumption message queue to obtain target consumption data, obtain target user consumption data in a preset system, and merge the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
a calling determining module 304, configured to call a preset timer, determine, according to a pushing quantity threshold and/or a task pushing quantity threshold of a redundant resource, a target pushing quantity based on the comprehensive user consumption data within a preset time period timed by the timer, and acquire user information corresponding to the target pushing quantity;
the sending module 305 is configured to send the push content to the user side corresponding to the user information through a preset speed limiter, a target push quantity, a push speed, and a push mode when the timer counts the push time.
Optionally, the matching unit 3012 may be further specifically configured to:
acquiring a pushed batch period, a pushed batch quantity, a pushed task quantity threshold and/or a task pushed quantity threshold of redundant resources input by a preset operation terminal through a preset configuration interface;
calculating the pushing batch period and the pushing batch quantity to obtain a pushing speed, and determining a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources as configuration information;
and acquiring an operator identification number of a preset operator, and matching a target verification strategy corresponding to the operator identification number from a plurality of preset verification strategies.
Optionally, the preprocessing and merging module 303 may be further specifically configured to:
extracting initial consumption data in a consumption message queue, performing data cleaning, data stipulation and data transformation on the initial consumption data to obtain target consumption data, and generating a matrix of the target consumption data;
extracting initial user consumption data from a preset database in a preset system, carrying out data cleaning, data stipulation and data transformation on the initial user consumption data to obtain target user consumption data, and generating a matrix of the target user consumption data;
and carrying out weight addition on the matrix of the target consumption data and the matrix of the target user consumption data to obtain comprehensive user consumption data.
Optionally, the call determination module 304 may be further specifically configured to:
calling a preset timer, and extracting user group information in the comprehensive user consumption data and attention in the user group information, wherein the attention is the number of times and the duration of clicking and checking push messages in the comprehensive user consumption data and messages related to the push messages;
in a preset time period timed by a timer, sequencing user group information according to a sequence of the attention degrees from large to small, and calculating the number of users in the sequenced user group information;
comparing and analyzing the number of users with a pushing number threshold and/or a task pushing number threshold of redundant resources to obtain a target pushing number;
triggering a pull instruction at a preset time through a timer, and reading user information from the comprehensive user consumption data corresponding to the target pushing quantity according to the pull instruction, wherein the preset time is included in a preset time period.
Optionally, the sending module 305 may further be specifically configured to:
executing a timing task through a timer, and triggering a target pushing task and calling a preset speed limiter when the timing task detects that the current moment is pushing time;
creating multiple threads of a target pushing task through a scheduling thread corresponding to the task scheduling message queue, a preset thread pool and the target pushing quantity;
and sending the push content to a user side corresponding to the user information according to the target push quantity, push speed and push mode by a token bucket flow control algorithm in the multithreading and speed limiter.
Optionally, the task scheduling module 302 may be further specifically configured to:
task scheduling is carried out on a target push task to obtain a task scheduling message queue, a starting task of task scheduling is asynchronously triggered to a preset consumption end, and the task scheduling message queue is sent to the preset consumption end;
and processing the task scheduling message queue based on the starting task through the preset consuming end, and receiving a consumption message queue which is sent by the preset consuming end and is based on the processed task scheduling message queue.
The function implementation of each module and each unit in the task pushing device based on shared resources corresponds to each step in the embodiment of the task pushing method based on shared resources, and the function and implementation process are not described in detail herein.
In the embodiment of the invention, a target pushing task is obtained by configuring the initial pushing task based on the shared resource according to the configuration information; acquiring a task scheduling message queue and a corresponding consumption message queue according to a target pushing task; acquiring target consumption data according to the consumption message queue, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data; determining the target pushing quantity and acquiring user information in a preset time period of a timer; the push content is sent to the user side corresponding to the user information through the speed limiter, the target push quantity, the push speed and the push mode, flexible allocation, controllability and scheduling of shared resources are achieved, expansion of the shared resources can be rapidly configured and responded, and utilization efficiency of the shared resources is improved. This scheme can be applied to in the wisdom medical field to promote the construction in wisdom city.
Fig. 3 and fig. 4 above describe the shared resource based task pushing apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the shared resource based task pushing apparatus in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a shared resource based task pushing apparatus 500 according to an embodiment of the present invention, where the shared resource based task pushing apparatus 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), and each module may include a series of instruction operations for the task pushing device 500 based on the shared resource. Still further, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the shared resource based task pushing device 500.
The shared resource based task pushing device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the shared resource based task pushing device architecture shown in fig. 5 does not constitute a limitation of shared resource based task pushing devices and may include more or less components than those shown, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the shared resource based task pushing method.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; 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 task pushing method based on shared resources is characterized in that the task pushing method based on the shared resources comprises the following steps:
creating an initial push task based on shared resources, acquiring configuration information through a preset configuration interface, and configuring the initial push task according to the configuration information to obtain a target push task, wherein the target push task comprises push time, push content, push speed and push mode, and the configuration information comprises a push quantity threshold and/or a task push quantity threshold of redundant resources;
task scheduling is carried out on the target push task to obtain a task scheduling message queue, the task scheduling message queue is sent to a preset consumption end, and a consumption message queue based on the task scheduling message queue and sent by the preset consumption end is received;
preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
calling a preset timer, determining a target pushing quantity based on the comprehensive user consumption data according to the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource within a preset time period timed by the timer, and acquiring user information corresponding to the target pushing quantity;
and when the timer counts the pushing time, sending the pushing content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode.
2. The method according to claim 1, wherein the creating an initial push task based on a shared resource, obtaining configuration information through a preset configuration interface, configuring the initial push task according to the configuration information, and obtaining a target push task, the target push task includes push time, push content, push speed, and push manner, the configuration information includes a push quantity threshold and/or a task push quantity threshold of a redundant resource, and the method includes:
receiving a push request sent by a preset operation terminal, and creating an initial push task based on shared resources according to the push request, wherein the push request is a push request of inquiry data based on an on-line inquiry system;
acquiring pushing speed and configuration information input by the preset operation terminal through a preset configuration interface, and matching a target verification strategy corresponding to the preset operation terminal, wherein the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources;
judging whether the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource conforms to the target verification strategy or not;
and if the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resources conforms to the target verification strategy, configuring the initial pushing task according to the configuration information to obtain a target pushing task, wherein the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the pushing content comprises medicine data, medical institution data and food therapy data.
3. The method according to claim 2, wherein the obtaining of the push speed and the configuration information input by the preset operator through a preset configuration interface and matching with the target verification policy corresponding to the preset operator are performed, and the configuration information includes a push quantity threshold and/or a task push quantity threshold of the redundant resource, and includes:
acquiring a pushed batch period, a pushed batch quantity, a pushed task quantity threshold and/or a task pushed quantity threshold of redundant resources input by the preset operation terminal through a preset configuration interface;
calculating the pushing batch period and the pushing batch quantity to obtain a pushing speed, and determining the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource as configuration information;
and acquiring the operator identification number of the preset operator, and matching a target verification strategy corresponding to the operator identification number from a plurality of preset verification strategies.
4. The task pushing method based on shared resources according to claim 1, wherein the preprocessing the consumption message queue to obtain target consumption data, obtaining target user consumption data in a preset system, and combining the target user consumption data and the target consumption data to obtain comprehensive user consumption data comprises:
extracting initial consumption data in the consumption message queue, performing data cleaning, data stipulation and data transformation on the initial consumption data to obtain target consumption data, and generating a matrix of the target consumption data;
extracting initial user consumption data from a preset database in a preset system, carrying out data cleaning, data stipulation and data transformation on the initial user consumption data to obtain target user consumption data, and generating a matrix of the target user consumption data;
and carrying out weight addition on the matrix of the target consumption data and the matrix of the target user consumption data to obtain comprehensive user consumption data.
5. The method according to claim 1, wherein the invoking a preset timer, determining a target push quantity based on the integrated user consumption data according to the push quantity threshold and/or the task push quantity threshold of the redundant resource within a preset time period timed by the timer, and acquiring user information corresponding to the target push quantity, comprises:
calling a preset timer, and extracting user group information in the comprehensive user consumption data and attention in the user group information, wherein the attention is the number of times and the duration of clicking and searching push messages in the comprehensive user consumption data and messages related to the push messages;
within a preset time period timed by the timer, sequencing the user group information according to the sequence of the attention degrees from large to small, and calculating the number of users in the sequenced user group information;
comparing and analyzing the user number with the pushing number threshold and/or the task pushing number threshold of the redundant resources to obtain a target pushing number;
triggering a pull instruction at a preset time through the timer, and reading user information from the comprehensive user consumption data corresponding to the target pushing quantity according to the pull instruction, wherein the preset time is contained in the preset time period.
6. The method for pushing tasks based on shared resources according to any one of claims 1 to 5, wherein the sending the push content to the user side corresponding to the user information through a preset speed limiter, the target push amount, the push speed, and the push manner when the timer counts the push time comprises:
executing a timing task through the timer, and triggering the target pushing task and calling a preset speed limiter when the timing task detects that the current moment is the pushing time;
creating multiple threads of the target pushing task through a scheduling thread corresponding to the task scheduling message queue, a preset thread pool and the target pushing quantity;
and sending the push content to a user side corresponding to the user information according to the target push quantity, the push speed and the push mode through the multithreading and a token bucket flow control algorithm in the speed limiter.
7. The method for pushing tasks based on shared resources according to claim 1, wherein the task scheduling for the target pushed task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consuming end, and receiving a consuming message queue based on the task scheduling message queue sent by the preset consuming end, comprises:
performing task scheduling on the target push task to obtain a task scheduling message queue, asynchronously triggering a task starting scheduling to a preset consumption end, and sending the task scheduling message queue to the preset consumption end;
and processing the task scheduling message queue through the preset consuming end based on the starting task, and receiving a consumption message queue which is sent by the preset consuming end and is based on the processed task scheduling message queue.
8. A task pushing apparatus based on shared resources, wherein the task pushing apparatus based on shared resources comprises:
the system comprises a creating and configuring module, a sending module and a receiving module, wherein the creating and configuring module is used for creating an initial pushing task based on shared resources, acquiring configuration information through a preset configuration interface, and configuring the initial pushing task according to the configuration information to obtain a target pushing task, the target pushing task comprises pushing time, pushing content, pushing speed and a pushing mode, and the configuration information comprises a pushing quantity threshold and/or a task pushing quantity threshold of redundant resources;
the task scheduling module is used for performing task scheduling on the target push task to obtain a task scheduling message queue, sending the task scheduling message queue to a preset consuming end, and receiving a consumption message queue based on the task scheduling message queue sent by the preset consuming end;
the preprocessing and merging module is used for preprocessing the consumption message queue to obtain target consumption data, acquiring target user consumption data in a preset system, and merging the target user consumption data and the target consumption data to obtain comprehensive user consumption data;
a calling determining module, configured to call a preset timer, determine, within a preset time period timed by the timer, a target pushing quantity based on the comprehensive user consumption data according to the pushing quantity threshold and/or the task pushing quantity threshold of the redundant resource, and acquire user information corresponding to the target pushing quantity;
and the sending module is used for sending the pushed content to a user side corresponding to the user information through a preset speed limiter, the target pushing quantity, the pushing speed and the pushing mode when the pushing time is counted by the timer.
9. A task pushing device based on shared resources, wherein the task pushing device based on shared resources comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the shared resource based task pushing device to perform the shared resource based task pushing method of any of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the shared resource-based task pushing method according to any one of claims 1-7.
CN202011189494.4A 2020-10-30 2020-10-30 Task pushing method, device and equipment based on shared resources and storage medium Active CN112286662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011189494.4A CN112286662B (en) 2020-10-30 2020-10-30 Task pushing method, device and equipment based on shared resources and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011189494.4A CN112286662B (en) 2020-10-30 2020-10-30 Task pushing method, device and equipment based on shared resources and storage medium

Publications (2)

Publication Number Publication Date
CN112286662A true CN112286662A (en) 2021-01-29
CN112286662B CN112286662B (en) 2023-02-10

Family

ID=74353766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011189494.4A Active CN112286662B (en) 2020-10-30 2020-10-30 Task pushing method, device and equipment based on shared resources and storage medium

Country Status (1)

Country Link
CN (1) CN112286662B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760260A (en) * 2022-01-06 2022-07-15 青岛海尔科技有限公司 Message pushing system and method, storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304165A1 (en) * 2011-08-17 2014-10-09 Lookout, Inc. Mobile communications device payment method utilizing location information
CN106649482A (en) * 2016-09-30 2017-05-10 网易(杭州)网络有限公司 Information push method and device
CN107784552A (en) * 2017-07-24 2018-03-09 上海壹账通金融科技有限公司 Information push task executing method, device, computer equipment and storage medium
CN109257434A (en) * 2018-10-19 2019-01-22 成都品果科技有限公司 A kind of real-time messages method for pushing and system
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
WO2019212182A1 (en) * 2018-05-04 2019-11-07 Samsung Electronics Co., Ltd. Apparatus and method for managing a shareable resource in a multi-core processor
CN111400619A (en) * 2020-03-11 2020-07-10 上海东普信息科技有限公司 Logistics track data pushing method, device, equipment and storage medium
CN111741058A (en) * 2020-05-07 2020-10-02 北京五八信息技术有限公司 Message pushing method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304165A1 (en) * 2011-08-17 2014-10-09 Lookout, Inc. Mobile communications device payment method utilizing location information
CN106649482A (en) * 2016-09-30 2017-05-10 网易(杭州)网络有限公司 Information push method and device
CN107784552A (en) * 2017-07-24 2018-03-09 上海壹账通金融科技有限公司 Information push task executing method, device, computer equipment and storage medium
WO2019212182A1 (en) * 2018-05-04 2019-11-07 Samsung Electronics Co., Ltd. Apparatus and method for managing a shareable resource in a multi-core processor
CN109257434A (en) * 2018-10-19 2019-01-22 成都品果科技有限公司 A kind of real-time messages method for pushing and system
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
CN111400619A (en) * 2020-03-11 2020-07-10 上海东普信息科技有限公司 Logistics track data pushing method, device, equipment and storage medium
CN111741058A (en) * 2020-05-07 2020-10-02 北京五八信息技术有限公司 Message pushing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈志刚等: "使用Java实现高并发推送服务", 《电力信息与通信技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760260A (en) * 2022-01-06 2022-07-15 青岛海尔科技有限公司 Message pushing system and method, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112286662B (en) 2023-02-10

Similar Documents

Publication Publication Date Title
Pham et al. A cost-and performance-effective approach for task scheduling based on collaboration between cloud and fog computing
US8522241B1 (en) Systems and methods for auto-balancing of throughput in a real-time event-driven system
US8719833B2 (en) Adaptive demand-driven load balancing
AU2006248747A1 (en) Data processing network
CN105306277A (en) Message scheduling method and message scheduling device for message queues
US20040163085A1 (en) Method to distribute programs using remote java objects
JPH11259443A (en) Device for scheduling and dispatching client request and method therefor
Chandy Smart resource usage prediction using cloud computing for massive data processing systems
US11113244B1 (en) Integrated data pipeline
CN110750331B (en) Container cluster scheduling method and platform for education desktop cloud application
CN110806928A (en) Job submitting method and system
CN112286662B (en) Task pushing method, device and equipment based on shared resources and storage medium
US11983568B2 (en) Allocation of heterogeneous computational resource
CN114418396A (en) Customer service resource routing method, device, equipment and storage medium
Muruganandam et al. Blockchain based adaptive resource allocation in cloud computing
CN113064696A (en) Cluster system capacity expansion method, device and medium
Yang et al. Multi-resource allocation for virtual machine placement in video surveillance cloud
CN111259045A (en) Data processing method, device, server and medium
Sakthivelmurugan et al. Magnum opus of an efficient hospitality technique for load balancing in cloud environment
CN113515524A (en) Automatic dynamic allocation method and device for distributed cache access layer nodes
Malathi et al. Energy Aware Load Balancing Algorithm for Upgraded Effectiveness in Green Cloud Computing
CN104252661A (en) Time division calendar segmentation
Sinha et al. Computational model for hybrid job scheduling in grid computing
Mutichiro et al. User preference–based QoS-aware service function placement in IoT-Edge cloud
CN111741097B (en) Method for tenant to monopolize node, computer equipment and storage medium

Legal Events

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