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

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

Info

Publication number
CN111327513A
CN111327513A CN201911362346.5A CN201911362346A CN111327513A CN 111327513 A CN111327513 A CN 111327513A CN 201911362346 A CN201911362346 A CN 201911362346A CN 111327513 A CN111327513 A CN 111327513A
Authority
CN
China
Prior art keywords
message data
push terminal
thread pool
push
terminal code
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
CN201911362346.5A
Other languages
Chinese (zh)
Other versions
CN111327513B (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201911362346.5A priority Critical patent/CN111327513B/en
Publication of CN111327513A publication Critical patent/CN111327513A/en
Application granted granted Critical
Publication of CN111327513B publication Critical patent/CN111327513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application belongs to the technical field of cloud, and relates to a message data pushing method, which comprises the steps of establishing and configuring a pushing terminal configuration list; after receiving message data pushed by a push terminal, inquiring a push terminal configuration list according to a push terminal code in the message data; inquiring a configuration list of the push terminal according to the data type of the message data; inquiring a push terminal configuration list to obtain a thread pool size parameter corresponding to a push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the thread pool size parameter; inquiring a push terminal configuration list to obtain a desensitization rule corresponding to a push terminal code in the message data, and desensitizing the message data in the thread pool according to the desensitization rule; and pushing the desensitized message data to a receiving terminal. The application also provides a message data pushing device, computer equipment and a storage medium. The method and the device can realize the configurability of the message data pushing process.

Description

Message data pushing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of cloud technologies, and in particular, to a method and an apparatus for pushing message data, a computer device, and a storage medium.
Background
The existing internet insurance system usually comprises a partner party and a processing center, wherein a terminal of the partner party pushes message data required by insurance business to the processing center, and the processing center pushes the processed message data to turn to serve as the terminal of the partner party after correspondingly processing the message data. When a processing center receives message data from a partner, it is often necessary to allocate a pool of appropriately sized threads for the partner to process the message data pushed by the partner. However, each time a partner is newly accessed, it is common practice in existing internet insurance systems to redevelop a unique set of message data push systems for the new partner. With the increase of partner parties, a large amount of development labor is wasted when a set of unique message data pushing method is newly developed every time, and a large amount of codes are repeated, so that the code engineering management is not facilitated. Meanwhile, since the unique message data pushing system must be verified and adjusted by a developer, real-time adjustment of the message data pushing system cannot be achieved. Therefore, the existing internet insurance system also lacks a message data pushing method which can be configured in real time.
Disclosure of Invention
An object of the embodiment of the present application is to provide a message data pushing method, an apparatus, a computer device, and a storage medium, so as to solve a problem that an existing internet insurance system lacks a message data pushing method that can be configured in real time.
In order to solve the foregoing technical problem, an embodiment of the present application provides a method for pushing message data, which adopts the following technical solutions:
receiving message data pushed by a push terminal;
acquiring a push terminal code in the message data, and inquiring a preset push terminal configuration list according to the push terminal code in the message data, wherein the push terminal configuration list at least comprises the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code and a desensitization rule number corresponding to the push terminal code;
if the push terminal codes in the message data exist in the push terminal configuration list, inquiring the push terminal configuration list according to the data type of the message data;
if the data type of the message data is matched with the data type corresponding to the push terminal code, inquiring the push terminal configuration list to obtain a thread pool size parameter corresponding to the push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the thread pool size parameter;
inquiring the configuration list of the push terminal to obtain a desensitization rule corresponding to a push terminal code in the message data, and desensitizing the message data in the thread pool according to the desensitization rule;
and pushing the desensitized message data to a receiving terminal.
Further, the acquiring the push terminal code in the message data includes:
detecting whether the message data contains a push terminal code;
if so, taking the push terminal code as the push terminal code of the message data;
if not, acquiring a communication address of the terminal for pushing the message data, and inquiring the configuration list of the pushing terminal according to the acquired communication address;
and if a communication address identical to the communication address of the terminal is inquired, using a push terminal code corresponding to the communication address as a push terminal code of the message data.
Further, the querying the configuration list of the push terminal according to the data type of the message data includes:
inquiring the configuration list of the push terminal to obtain a data type corresponding to the code of the push terminal;
querying a preset key character table to obtain a key character corresponding to the data type;
detecting the number of times the key character appears in the message data;
and when the times are greater than a matching threshold value, determining that the data type of the message data is matched with the data type corresponding to the push terminal code.
Further, the thread pool size parameter includes a full load thread pool size parameter, a normal thread pool size parameter, and a low load thread pool size parameter; the querying the configuration list of the push terminal to obtain a thread pool size parameter corresponding to a push terminal code in the message data, and creating a thread pool of a corresponding size for the message data according to the thread pool size parameter includes:
inquiring the configuration list of the push terminal to obtain a normal thread pool size parameter corresponding to a push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the normal thread pool size parameter;
detecting the load condition of the thread pool, and adjusting the size of the thread pool in real time according to the load condition of the thread pool;
when the time of the thread pool in the full load state is larger than a time threshold, adjusting the thread pool to a size corresponding to the size parameter of the full load thread pool;
when the time of the thread pool in the normal state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the normal thread pool;
and when the time of the thread pool in the low-load state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the low-load thread pool.
Further, the detecting the load condition of the thread pool includes:
and calling an application programming interface provided by the development environment to acquire parameter data of the thread pool so as to complete the detection of the load condition of the thread pool.
Further, the querying the configuration list of the push terminal to obtain a desensitization rule corresponding to a push terminal code in the message data, and performing desensitization processing on the message data in a thread pool according to the desensitization rule includes:
inquiring the configuration list of the push terminal to obtain a desensitization rule number corresponding to a push terminal code in the message data;
inquiring a preset desensitization rule table to obtain a desensitization data type corresponding to the desensitization rule number;
and detecting whether the desensitization data type data exists in the message data, if so, desensitizing the data which accord with the desensitization data type in the message data, and otherwise, not desensitizing the message data.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a device for pushing message data, where the following technical solutions are adopted:
the data receiving module is used for receiving message data pushed by the pushing terminal;
the push terminal code query module is used for acquiring a push terminal code in the message data and querying a preset push terminal configuration list according to the push terminal code in the message data, wherein the push terminal configuration list at least comprises the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code and a desensitization rule number corresponding to the push terminal code;
a data type query module, configured to query the push terminal configuration list according to the data type of the message data if the push terminal code in the message data exists in the push terminal configuration list;
a thread pool size query module, configured to query the push terminal configuration list to obtain a thread pool size parameter corresponding to a push terminal code in the message data if the data type of the message data matches the data type corresponding to the push terminal code, and create a thread pool of a corresponding size for the message data according to the thread pool size parameter;
a desensitization rule query module, configured to query the push terminal configuration list to obtain a desensitization rule corresponding to a push terminal code in the message data, and perform desensitization processing on the message data in the thread pool according to the desensitization rule;
and the pushing module is used for pushing the desensitized message data to a receiving terminal.
Further, the push terminal code query module includes:
a code detection unit, configured to detect whether the message data includes a push terminal code;
a push terminal code determining unit, configured to, when it is detected that the message data includes a push terminal code, use the push terminal code as a push terminal code of the message data;
the communication address query unit is used for acquiring a communication address of a terminal for pushing the message data when detecting that the message data does not contain the code of the pushing terminal, and querying the configuration list of the pushing terminal according to the acquired communication address;
and the pushing terminal code replacing unit is used for taking the pushing terminal code corresponding to the communication address as the pushing terminal code of the message data if the communication address which is the same as the communication address of the terminal is inquired.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
a computer device comprising a memory having a computer program stored therein and a processor implementing the steps of the push method of any of the above when the processor executes the computer program.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the push method of any of the above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the method comprises the steps of establishing and configuring a push terminal configuration list, inquiring the push terminal configuration list to determine whether a push terminal code and a data type of message data meet preset conditions or not after receiving the message data pushed by a push terminal, then establishing a thread pool with a corresponding size for the message data according to the configuration list to perform corresponding desensitization processing, and finally pushing the desensitized message data out. Therefore, the configurability of the message data pushing process can be realized, and the problem that the existing internet insurance system lacks a message data pushing method capable of being configured in real time is solved.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for use in the description of the embodiments of the present application, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method of pushing message data according to the present application;
FIG. 3 is a flowchart of one embodiment of step S2 of FIG. 2;
FIG. 4 is a flowchart of one embodiment of step S3 of FIG. 2;
FIG. 5 is a flowchart of one embodiment of step S4 of FIG. 2;
FIG. 6 is a flowchart of one embodiment of step S5 of FIG. 2;
fig. 7 is a schematic structural diagram of an embodiment of a message data pushing apparatus according to the present application;
FIG. 8 is a block diagram illustrating an embodiment of the push terminal code query module 402 of FIG. 7;
FIG. 9 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the push method of the message data provided by the embodiments of the present application generally consists ofServer/terminal DeviceThe execution, correspondingly, of the pushing means of the message data is generally arrangedServer/terminal deviceIn (1).
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to fig. 2, a flow diagram of one embodiment of a method of pushing message data in accordance with the present application is shown. The message data pushing method comprises the following steps:
s1: and receiving message data pushed by the push terminal.
In step S1, the message data may be a character string, and the character string includes key information related to a service, for example, the upper insurance has a service process of a insurance policy together, and the message data pushed by the upper insurance server may be the following character string: "INSAIC, Bao Dan, Zhang San, car insurance, 20181101-. The message data may be all characters of an electronic contract made by the client and the partner company, or may be an electronic image of a contract made by the client and the partner company. The push terminal may be a terminal device, such as a personal mobile phone, a tablet computer, a personal computer, etc., used by a partner for pushing message data.
S2: acquiring a push terminal code in the message data, and inquiring a preset push terminal configuration list according to the push terminal code in the message data, wherein the push terminal configuration list at least comprises the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code and a desensitization rule number corresponding to the push terminal code.
In the above step S2, creating and configuring the push terminal configuration list may be implemented by: and creating a configuration interface on an interactive interface of the server side to collect configuration data, wherein the configuration interface can be used for an operator at the server side to input the configuration data, creating a configuration list of the push terminal after the server side collects the configuration data, and filling the collected configuration data into the configuration list of the push terminal. The configuration interface at least comprises an input box for pushing terminal codes, an input box for thread pool size parameters, an input box for data types and an input box for desensitization rule numbering, and corresponding patterns and/or characters are displayed around each input box to prompt a background operator of configuration data collected by each input box. The push terminal configuration list may be as shown in the following table:
Figure BDA0002337504750000081
the push terminal code can be a unique code preset by the company for the partner company. For example, in the business of a company, the company of the upper insurance partner usually takes the abbreviation "isaic" of its english name, and the push terminal corresponding to the company of the upper insurance partner is coded as "isaic".
The thread pool size parameter may be the number of threads required to process the partner's message data. For example, if the data of a message pushed by a partner company of upper vapour insurance requires 2 threads to process, the thread pool size parameter may be set to 2.
The data type may be determined according to the business types of the self company and the partner company. For example, the business between the self company and the upper steam insurance company is only insurance business, and the corresponding data type of the upper steam insurance company only needs insurance application, batch order, report and the like.
Different desensitization rule numbers correspond to different desensitization rules, and the desensitization rules can be determined according to the convention of the company and the company of the partner. The specific definition of the desensitization rule is described later.
Optionally, the push terminal configuration list may further include a communication address corresponding to the push terminal code. The communication address can also be collected through a configuration interface of the server side. The communication address may be an internet protocol address of the partner company or a physical address of the terminal device of the partner company.
Further, the step S2 of acquiring the push terminal code in the message data may include:
s21: and detecting whether the message data contains a push terminal code.
In the step S21, the following two implementation manners may be used to detect whether the message data includes the push terminal code:
(1) and detecting whether the characters in the field appointed in the message data are consistent with the push terminal codes in the push terminal configuration list. For example, if the first ten characters in the message data are agreed to be the codes of the push terminals, it can be detected whether the sender of the message data is a partner in the configuration list of the push terminals by detecting the first ten characters in the message data.
(2) And traversing all characters in the message data, and judging whether the message data has characters consistent with the codes of the pushing terminal. And if so, using the character consistent with the push terminal code as the push terminal code of the message data.
S22: and if so, taking the push terminal code as the push terminal code of the message data.
S23: if not, acquiring the communication address of the terminal for pushing the message data, and inquiring the configuration list of the pushing terminal according to the acquired communication address.
In the above step S23, the communication address of the terminal of the push message data may be an internet protocol address of a partner company (e.g., 113.89.99.72, 113.89.99.80, etc.) or a physical address of a terminal device of the partner company (e.g., 08: 00: 20: 0A: 8C: 6D, 08: 00: 20, etc.).
S24: and if a communication address identical to the communication address of the terminal is inquired, using a push terminal code corresponding to the communication address as a push terminal code of the message data. And if the communication address identical to the communication address of the terminal cannot be inquired, stopping the processing of the message data.
S3: and if the push terminal codes in the message data exist in the push terminal configuration list, inquiring the push terminal configuration list according to the data type of the message data.
And if the push terminal code in the message data does not exist in the push terminal configuration list, stopping the processing of the message data.
Further, the step S3 may include:
s31: and inquiring the configuration list of the push terminal to obtain the data type corresponding to the code of the push terminal.
In the step S31, the data type corresponding to the push terminal code may include a policy, a batch, an application, and the like. The content of the message data of different data types is different. For example, the content of the message data with the data type of insurance policy may include the name of the insured person, the insurance label, the insurance classification of the insurance policy, the insurance period, the insurance amount, etc., and the content of the message data with the data type of batch policy may include the modified name of the insured person, the modified risk classification, the modified period, etc.
S32: and querying a preset key character table to obtain the key characters corresponding to the data types.
In the step S32, each record of the preset keyword table may include two columns, where one column stores the data type, the other column stores the keyword corresponding to the data type, and the data type and the keyword form a one-to-one correspondence relationship. The key character table may be as follows:
Figure BDA0002337504750000101
in one record in the key character table, the stored data type is a policy, and the key characters corresponding to the data type include "policy", "application", "promise", "start", "policy" and the like.
S33: detecting a number of times the key character appears in the message data.
S34: and when the times are greater than a matching threshold value, determining that the data type of the message data is matched with the data type corresponding to the push terminal code.
In the above steps S33 and S34, all characters of the electronic contract that the client side has signed with the partner company official may be included in the message data. The data type of the message data can be judged according to the times of the occurrence of the key characters in all the characters of the electronic contract. Here, the matching threshold may be adjusted according to actual test conditions, for example, the matching threshold may be 5, 10, 15, 20, and the like. In addition, the message data may be an electronic image of a contract made by the client and the partner company, and in this case, all characters of the contract may be extracted by performing character recognition on the electronic image of the contract, and then the subsequent processing may be performed.
S4: and if the data type of the message data is matched with the data type corresponding to the push terminal code, inquiring the push terminal configuration list to obtain a thread pool size parameter corresponding to the push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the thread pool size parameter.
And if not, stopping the processing of the message data.
In the above step S4, the thread pool may be a set of a plurality of threads. The thread pool size parameter may be the number of threads in the thread pool. For example, if the thread pool size parameter is 2, then two threads are in the thread pool created accordingly. In addition, the thread pool has an overall task processing queue, and processing tasks in the task processing queue are executed by threads in the thread pool one by one in sequence. For example, there are 4 pieces of message data pushed by the upper steam insurance, at this time, the created thread pool has only 2 threads, the first 2 pieces of message data in the 4 pieces of message data are executed by the thread pool first, and after the execution is completed, the thread pool executes the last 2 pieces of message data.
Further, the thread pool size parameter may include a full thread pool size parameter, a normal thread pool size parameter, and an under-loaded thread pool size parameter, and the step S4 may include:
s41: and inquiring the configuration list of the push terminal to obtain a normal thread pool size parameter corresponding to a push terminal code in the message data, and establishing a thread pool with a corresponding size for the message data according to the normal thread pool size parameter.
In the above step S41, a part of the push terminal configuration list may be as shown in the following table:
push terminal encoding ...... Thread pool size parameter
INSAIC ...... 2,4,6
At this time, the full-load thread pool size parameter, the normal thread pool size parameter, and the low-load thread pool size parameter corresponding to the push terminal code of "INSAIC" are sequentially 6, 4, and 2, that is, 6 threads are corresponding to full load, and 2 threads are corresponding to low load.
S42: and detecting the load condition of the thread pool, and adjusting the size of the thread pool in real time according to the load condition of the thread pool.
S43: and when the time of the thread pool in the full load state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the full load thread pool.
S44: and when the time of the thread pool in the normal state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the normal thread pool.
S45: and when the time of the thread pool in the low-load state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the low-load thread pool.
In the above step S42, detecting the load condition of the thread pool may be accomplished by calling an application programming interface provided by the development environment to obtain parameter data of the thread pool. Specifically, the running condition of the thread pool may be obtained through a related API, for example, the java thread pool executes API like threadpoolsexecutor, and data such as the current active thread number of the thread pool, the thread number in queuing, the thread number that has been executed, and the bus thread number may be obtained, and the load condition of the thread pool may be calculated according to the data. When the task processing queue is completely occupied, the thread pool is judged to be in a full-load state, when the occupied proportion of the task processing queue is 0.3-1, the thread pool is judged to be in a normal state, and when the occupied proportion of the task processing queue is below 0.3, the thread pool is judged to be in a low-load state.
Since the amount of message data sent by the partner does not always maintain a steady state in the actual application process, it usually has a peak period and a valley period, for example, there may be seven or eight message data pushed by the partner in one hour in the peak period, but there may be only one or two message data pushed by the partner in one hour in the valley period, and if a fixed number of threads are kept, most of the threads are necessarily in an idle state in the valley period. Therefore, the size of the thread pool can be adjusted in real time in the running process through the steps S41, S42, S43, S44 and S45, and the change of the amount of the message data can be adapted, so that the waste of computing resources can be reduced, the utilization efficiency of the computing resources can be improved, and the configuration can be more flexible.
S5: and inquiring the configuration list of the push terminal to obtain a desensitization rule corresponding to the push terminal code in the message data, and desensitizing the message data in a thread pool according to the desensitization rule.
In step S5, the desensitization processing refers to masking or modifying sensitive fields such as certificate numbers, mobile phone numbers, and names in the message data. For example, the character of the certificate number in the message data is "min a-RT 657", and the character subjected to the desensitization processing is "min a-x". Tasks desensitizing message data are placed into the task processing queues of the created thread pool, and the thread pool assigns corresponding threads to perform desensitization processing of message data.
Further, the step S5 may include:
s51: and inquiring the configuration list of the push terminal to obtain a desensitization rule number corresponding to a push terminal code in the message data.
In the above step S51, a part of the push terminal configuration list may be as shown in the following table:
push terminal numbering ...... Desensitization rule numbering
INSAIC ...... 1-A,2-B......
At this time, the desensitization rule number corresponding to the INSAIC includes 1-A, namely, the number of the last five bits of the serial number needs to be shielded for the characters of the license number in the message data of the INSAIC, and the desensitization rule number corresponding to the INSAIC includes 2-B, namely, the number of the last fifteen bits needs to be shielded for the characters of the ID card number in the message data of the INSAIC.
S52: and querying a preset desensitization rule table to obtain a desensitization data type corresponding to the desensitization rule number.
In step S52 above, a portion of the desensitization rule table may be shown in the following table:
desensitization rule numbering Desensitization data types
1-A Report on case
2-B Insurance policy
At this time, if the desensitization data type corresponding to the desensitization rule number of 1-A is a report, the desensitization processing of 1-A is only performed on the message data of which the data type is a report, and if the desensitization data type corresponding to the desensitization rule number of 2-B is an insurance policy, the desensitization processing of 1-A is only performed on the message data of which the data type is an insurance policy.
S53: and detecting whether the desensitization data type data exists in the message data, if so, desensitizing the data which accord with the desensitization data type in the message data, and otherwise, not desensitizing the message data.
Because the message data of different data types contain different data, if the same desensitization processing is performed on the message data, a great deal of computing resource waste is generated, and the utilization rate of computing resources is reduced. For example, the message data with the data type of the report usually only contains the license plate number and does not contain the identification number, and if the desensitization processing of 2-B is performed on the message data, the waste of computing resources is caused. Therefore, the steps S51, S52, and S53 can implement real-time configurability of desensitization processing, so that the message data targeted by desensitization processing is more accurate, thereby reducing the waste of computing resources, improving the utilization efficiency of computing resources, and making the configurability more flexible.
S6: and pushing the desensitized message data to a receiving terminal.
In the above step S6, the receiving terminal may be a terminal of the partner side different from the terminal sending the message data, for example, a terminal of a partner side auditor, a terminal of a partner side financial staff, a terminal of a partner side process staff, and the like.
In this embodiment, by creating and configuring a push terminal configuration list, after receiving message data pushed by a push terminal, querying the push terminal configuration list to determine whether a push terminal code and a data type of the message data meet preset conditions, then creating a thread pool of a corresponding size for the message data according to the configuration list to perform corresponding desensitization processing, and finally pushing the desensitized message data. Therefore, the configurability of the message data pushing process can be realized, and the problem that the existing internet insurance system lacks a message data pushing method capable of being configured in real time is solved.
It will be understood by those skilled in the art that all or part of the processes for implementing the methods of the embodiments described above can be implemented by using a computer program to instruct associated hardware, the computer program can be stored in a computer-readable storage medium, and the computer program can include the processes of the embodiments of the methods described above when executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or in turns with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 7, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a device for pushing message data, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be applied to various electronic devices.
As shown in fig. 7, the message data pushing apparatus 400 according to this embodiment includes: the system comprises a data receiving module 401, a push terminal coding query module 402, a data type query module 403, a thread pool size query module 404, a desensitization rule query module 405 and a push module 406. Wherein:
a data receiving module 401, configured to receive message data pushed by the push terminal.
A push terminal code query module 402, configured to obtain a push terminal code in the message data, and query a preset push terminal configuration list according to the push terminal code in the message data, where the push terminal configuration list at least includes the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code, and a desensitization rule number corresponding to the push terminal code.
A data type query module 403, configured to query the push terminal configuration list according to the data type of the message data if the push terminal code in the message data exists in the push terminal configuration list.
A thread pool size query module 404, configured to query the push terminal configuration list to obtain a thread pool size parameter corresponding to a push terminal code in the message data if the data type of the message data matches the data type corresponding to the push terminal code, and create a thread pool of a corresponding size for the message data according to the thread pool size parameter.
A desensitization rule query module 405, configured to query the push terminal configuration list to obtain a desensitization rule corresponding to a push terminal code in the message data, and perform desensitization processing on the message data in the thread pool according to the desensitization rule.
A pushing module 406, configured to push the desensitized message data to the receiving terminal.
Further, as shown in fig. 8, the push terminal code query module 402 includes:
a code detecting unit 4021, configured to detect whether the message data includes a push terminal code.
A push terminal code determining unit 4022, configured to, when it is detected that the message data includes a push terminal code, use the push terminal code as a push terminal code of the message data.
The communication address query unit 4023 is configured to, when it is detected that the message data does not include the push terminal code, acquire a communication address of a terminal that pushes the message data, and query the push terminal configuration list according to the acquired communication address.
A push terminal code replacing unit 4024, configured to, if a communication address that is the same as the communication address of the terminal is found, use a push terminal code corresponding to the communication address as a push terminal code of the message data.
Further, the data type query module 403 includes:
and the data type query unit is used for querying the configuration list of the push terminal to obtain the data type corresponding to the push terminal code.
And the key character query unit is used for querying a preset key character table to obtain the key characters corresponding to the data types.
And the key character detection unit is used for detecting the number of times of the key characters appearing in the message data.
And the data type determining unit is used for determining that the data type of the message data is matched with the data type corresponding to the push terminal code when the times are greater than the matching threshold value.
Further, the thread pool size query module 404 includes:
and the thread pool creating unit is used for inquiring the push terminal configuration list to obtain a normal thread pool size parameter corresponding to the push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the normal thread pool size parameter.
And the load detection unit is used for detecting the load condition of the thread pool and adjusting the size of the thread pool in real time according to the load condition of the thread pool.
And the full-load thread pool adjusting unit is used for adjusting the thread pool to the size corresponding to the full-load thread pool size parameter when the time of the thread pool in the full-load state is greater than the time threshold.
And the normal thread pool adjusting unit is used for adjusting the thread pool to the size corresponding to the size parameter of the normal thread pool when the time of the thread pool in the normal state is greater than the time threshold.
And the low-load thread pool adjusting unit is used for adjusting the thread pool to the size corresponding to the size parameter of the low-load thread pool when the time of the thread pool in the low-load state is greater than the time threshold.
Further, the desensitization rule query module 405 includes:
and the desensitization number query unit is used for querying the configuration list of the push terminal to obtain a desensitization rule number corresponding to a push terminal code in the message data.
And the desensitization data type query unit is used for querying a preset desensitization rule table to obtain the desensitization data type corresponding to the desensitization rule number.
A desensitization data type detecting unit, configured to detect whether there is data of the desensitization data type in the message data, if yes, perform desensitization processing on the data in the message data that conforms to the desensitization data type, otherwise, not perform desensitization processing on the message data.
Specifically, the specific definition of the message data pushing device is consistent with the specific definition of the message data pushing method, and is not described in detail herein.
In this embodiment, by creating and configuring a push terminal configuration list, after receiving message data pushed by a push terminal, querying the push terminal configuration list to determine whether a push terminal code and a data type of the message data meet preset conditions, then creating a thread pool of a corresponding size for the message data according to the configuration list to perform corresponding desensitization processing, and finally pushing the desensitized message data. Therefore, the configurability of the message data pushing process can be realized, and the problem that the existing internet insurance system lacks a message data pushing method capable of being configured in real time is solved.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 9, fig. 9 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 11 includes a memory 111, a processor 112, and a network interface 113 communicatively connected to each other via a system bus. It is noted that only a computer device 11 having components 111 and 113 is shown, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 111 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 111 may be an internal storage unit of the computer device 11, such as a hard disk or a memory of the computer device 11. In other embodiments, the memory 111 may also be an external storage device of the computer device 11, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 11. Of course, the memory 111 may also include both internal and external storage devices of the computer device 11. In this embodiment, the memory 111 is generally used for storing an operating system installed in the computer device 11 and various types of application software, such as program codes of a message data pushing method. Further, the memory 111 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 112 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 112 is typically used to control the overall operation of the computer device 11. In this embodiment, the processor 112 is configured to execute the program code stored in the memory 111 or process data, for example, execute the program code of the pushing method of the message data.
The network interface 113 may include a wireless network interface or a wired network interface, and the network interface 113 is generally used to establish a communication connection between the computer device 11 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium, where a message data pushing program is stored, and the message data pushing program is executable by at least one processor to cause the at least one processor to execute the steps of the message data pushing method as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that the present application may be practiced without these specific details or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for pushing message data is characterized by comprising the following steps:
receiving message data pushed by a push terminal;
acquiring a push terminal code in the message data, and inquiring a preset push terminal configuration list according to the push terminal code in the message data, wherein the push terminal configuration list at least comprises the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code and a desensitization rule number corresponding to the push terminal code;
if the push terminal codes in the message data exist in the push terminal configuration list, inquiring the push terminal configuration list according to the data type of the message data;
if the data type of the message data is matched with the data type corresponding to the push terminal code, inquiring the push terminal configuration list to obtain a thread pool size parameter corresponding to the push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the thread pool size parameter;
inquiring the configuration list of the push terminal to obtain a desensitization rule corresponding to a push terminal code in the message data, and desensitizing the message data in the thread pool according to the desensitization rule;
and pushing the desensitized message data to a receiving terminal.
2. The push method according to claim 1, wherein the obtaining of the push terminal code in the message data comprises:
detecting whether the message data contains a push terminal code;
if so, taking the push terminal code as the push terminal code of the message data;
if not, acquiring a communication address of the terminal for pushing the message data, and inquiring the configuration list of the pushing terminal according to the acquired communication address;
and if a communication address identical to the communication address of the terminal is inquired, using a push terminal code corresponding to the communication address as a push terminal code of the message data.
3. The push method according to claim 1, wherein the querying the push terminal configuration list according to the data type of the message data comprises:
inquiring the configuration list of the push terminal to obtain a data type corresponding to the code of the push terminal;
querying a preset key character table to obtain a key character corresponding to the data type;
detecting the number of times the key character appears in the message data;
and when the times are greater than a matching threshold value, determining that the data type of the message data is matched with the data type corresponding to the push terminal code.
4. The push method according to claim 1, wherein the thread pool size parameter comprises a full thread pool size parameter, a normal thread pool size parameter, and an under-loaded thread pool size parameter; the querying the configuration list of the push terminal to obtain a thread pool size parameter corresponding to a push terminal code in the message data, and creating a thread pool of a corresponding size for the message data according to the thread pool size parameter includes:
inquiring the configuration list of the push terminal to obtain a normal thread pool size parameter corresponding to a push terminal code in the message data, and creating a thread pool with a corresponding size for the message data according to the normal thread pool size parameter;
detecting the load condition of the thread pool, and adjusting the size of the thread pool in real time according to the load condition of the thread pool;
when the time of the thread pool in the full load state is larger than a time threshold, adjusting the thread pool to a size corresponding to the size parameter of the full load thread pool;
when the time of the thread pool in the normal state is longer than a time threshold, adjusting the thread pool to a size corresponding to the size parameter of the normal thread pool;
and when the time of the thread pool in the low-load state is greater than the time threshold, adjusting the thread pool to the size corresponding to the size parameter of the low-load thread pool.
5. The push method of claim 4, wherein the detecting the load condition of the thread pool comprises:
and calling an application programming interface provided by the development environment to acquire parameter data of the thread pool so as to complete the detection of the load condition of the thread pool.
6. The push method according to claim 1, wherein the querying the push terminal configuration list to obtain a desensitization rule corresponding to a push terminal code in the message data, and performing desensitization processing on the message data in a thread pool according to the desensitization rule comprises:
inquiring the configuration list of the push terminal to obtain a desensitization rule number corresponding to a push terminal code in the message data;
inquiring a preset desensitization rule table to obtain a desensitization data type corresponding to the desensitization rule number;
and detecting whether the desensitization data type data exists in the message data, if so, desensitizing the data which accord with the desensitization data type in the message data, and otherwise, not desensitizing the message data.
7. A message data pushing apparatus, comprising:
the data receiving module is used for receiving message data pushed by the pushing terminal;
the push terminal code query module is used for acquiring a push terminal code in the message data and querying a preset push terminal configuration list according to the push terminal code in the message data, wherein the push terminal configuration list at least comprises the push terminal code, a thread pool size parameter corresponding to the push terminal code, a data type corresponding to the push terminal code and a desensitization rule number corresponding to the push terminal code;
a data type query module, configured to query the push terminal configuration list according to the data type of the message data if the push terminal code in the message data exists in the push terminal configuration list;
a thread pool size query module, configured to query the push terminal configuration list to obtain a thread pool size parameter corresponding to a push terminal code in the message data if the data type of the message data matches the data type corresponding to the push terminal code, and create a thread pool of a corresponding size for the message data according to the thread pool size parameter;
a desensitization rule query module, configured to query the push terminal configuration list to obtain a desensitization rule corresponding to a push terminal code in the message data, and perform desensitization processing on the message data in the thread pool according to the desensitization rule;
and the pushing module is used for pushing the desensitized message data to a receiving terminal.
8. The pushing apparatus of claim 7, wherein the pushing terminal code query module comprises:
a code detection unit, configured to detect whether the message data includes a push terminal code;
a push terminal code determining unit, configured to, when it is detected that the message data includes a push terminal code, use the push terminal code as a push terminal code of the message data;
the communication address query unit is used for acquiring a communication address of a terminal for pushing the message data when the message data is detected to not contain a pushing terminal code, and querying the pushing terminal configuration list according to the acquired communication address;
and the push terminal code replacing unit is used for taking the push terminal code corresponding to the communication address as the push terminal code of the message data if the communication address which is the same as the communication address of the terminal is inquired.
9. A computer device comprising a memory in which a computer program is stored and a processor which, when executing the computer program, realizes the steps of the push method according to any of claims 1 to 6.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the push method according to any one of claims 1 to 6.
CN201911362346.5A 2019-12-26 2019-12-26 Message data pushing method and device, computer equipment and storage medium Active CN111327513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911362346.5A CN111327513B (en) 2019-12-26 2019-12-26 Message data pushing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911362346.5A CN111327513B (en) 2019-12-26 2019-12-26 Message data pushing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111327513A true CN111327513A (en) 2020-06-23
CN111327513B CN111327513B (en) 2022-09-13

Family

ID=71172097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911362346.5A Active CN111327513B (en) 2019-12-26 2019-12-26 Message data pushing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111327513B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777008A (en) * 2009-12-31 2010-07-14 中兴通讯股份有限公司 Method and device for realizing mobile terminal system thread pool
US20160179518A1 (en) * 2014-12-23 2016-06-23 International Business Machines Corporation Non-serialized push instruction for pushing a message payload from a sending thread to a receiving thread
CN109635187A (en) * 2018-11-26 2019-04-16 平安科技(深圳)有限公司 Information push method, device, computer equipment and storage medium
CN110609737A (en) * 2019-08-14 2019-12-24 平安科技(深圳)有限公司 Associated data query method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777008A (en) * 2009-12-31 2010-07-14 中兴通讯股份有限公司 Method and device for realizing mobile terminal system thread pool
US20160179518A1 (en) * 2014-12-23 2016-06-23 International Business Machines Corporation Non-serialized push instruction for pushing a message payload from a sending thread to a receiving thread
CN109635187A (en) * 2018-11-26 2019-04-16 平安科技(深圳)有限公司 Information push method, device, computer equipment and storage medium
CN110609737A (en) * 2019-08-14 2019-12-24 平安科技(深圳)有限公司 Associated data query method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111327513B (en) 2022-09-13

Similar Documents

Publication Publication Date Title
WO2020042290A1 (en) Risk management method, and apparatus and computer-readable storage medium
CN112052111B (en) Processing method, device and equipment for server abnormity early warning and storage medium
WO2022126961A1 (en) Method for target object behavior prediction of data offset and related device thereof
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN112990583B (en) Method and equipment for determining model entering characteristics of data prediction model
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN114095567A (en) Data access request processing method and device, computer equipment and medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN112181835A (en) Automatic testing method and device, computer equipment and storage medium
CN115936895A (en) Risk assessment method, device and equipment based on artificial intelligence and storage medium
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
CN112966304B (en) Tamper-proof method and device for flow document, computer equipment and medium
CN111327513B (en) Message data pushing method and device, computer equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN113283759B (en) Account risk portrait updating method, device, equipment and storage medium
CN112182107B (en) List data acquisition method, device, computer equipment and storage medium
CN115328764A (en) Test code optimization method based on automatic test and related equipment thereof
CN115378806A (en) Flow distribution method and device, computer equipment and storage medium
CN115545753A (en) Partner prediction method based on Bayesian algorithm and related equipment
CN112085469B (en) Data approval method, device, equipment and storage medium based on vector machine model
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN110992067B (en) Message pushing method, device, computer equipment and storage medium
CN110719260B (en) Intelligent network security analysis method and device and computer readable storage medium
CN112083949B (en) Self-adaptive cross-platform method, device, computer equipment and storage medium

Legal Events

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