Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, and a device for dynamically monitoring service data. The technical scheme is as follows:
in a first aspect, provide
A dynamic monitoring method for service data comprises the following steps:
acquiring real-time service data and performing real-time updating and rendering at a local front end according to preset data requirements;
establishing connection with a user side according to a received connection request sent by the user side, wherein the connection request comprises a user side mark;
and sending the real-time feedback information matched with the user-side mark to the user side according to the user-side mark so as to update and render a large screen of the user side in real time based on the real-time feedback information.
In a preferred embodiment, the acquiring real-time service data and performing real-time update rendering at a local front end according to a preset data requirement includes:
monitoring real-time service data of a message center, wherein the real-time service data comprises at least one piece of key information which is received by the message center and issued by each service system;
converting the at least one piece of key information into a preset data display format in sequence one by one;
and updating the rendering in real time at the local front end based on at least one piece of key information in a preset data display format.
In a preferred embodiment, said converting said at least one piece of key information into a preset data display format in sequence, item by item, includes:
and performing data archiving according to the date, the data type and the generating place of the key information, and performing sorting calculation on the key information according to a preset aggregation configuration rule to obtain a preset data display format.
In a preferred embodiment, the archiving data according to the place of occurrence of the key information includes:
acquiring a place mark based on the key information, wherein the place mark comprises at least one of longitude and latitude, IP and the location of a mobile phone number of the key information;
and determining the occurrence place of the key information according to the descending order of the longitude and latitude, the IP and the location of the mobile phone number as the priority order.
In a preferred embodiment, after the sequentially converting the at least one piece of key information into the preset data display format one by one, and before the rendering of the at least one piece of key information based on the preset data display format is updated by the local front end in real time, the method further includes:
judging whether the key information converted into a preset data display format is pushed to the front end according to a preset front end pushing rule;
and if so, updating and rendering the key information at the local front end in real time.
In a preferred embodiment, the sending, according to the user-side identifier, the real-time feedback information matched with the user side to the user side so that the user side performs real-time updated rendering of a large screen of the user side based on the real-time feedback information includes:
matching feedback information corresponding to the user side according to the user side mark;
acquiring a display template matched with the user side based on the user side mark;
generating the real-time feedback information based on the feedback information and the display template;
and sending the real-time feedback information to the user side so that the user side can update and render a large screen of the user side in real time based on the real-time feedback information.
In a preferred embodiment, the establishing a connection with the ue according to the received connection request sent by the ue includes:
establishing communication connection with the user side through a WebSocket protocol according to the user side mark;
after the connection with the user terminal is established, the method further comprises the following steps:
and establishing a heartbeat mechanism and a disconnection reconnection mechanism with the user terminal.
In a preferred embodiment, the method further comprises: pre-constructing a corresponding execution relation with the user side based on the user side mark, wherein the corresponding execution relation comprises:
establishing connection when receiving a connection request sent by the user side; and/or the presence of a gas in the gas,
and sending at least one forced operation instruction of refreshing a page, refreshing a terminal page cache and forcibly exiting to the user side.
In a second aspect, an apparatus for dynamically monitoring service data is provided, the apparatus including:
a first processing module: the system comprises a local front end, a real-time server and a database, wherein the local front end is used for acquiring real-time service data and performing real-time updating and rendering at the local front end according to preset data requirements;
the connection module is used for establishing connection with the user side according to a received connection request sent by the user side, wherein the connection request comprises a user side mark;
and the second processing module is used for sending the real-time feedback information matched with the user-side mark to the user side according to the user-side mark so as to perform real-time updating and rendering of a large screen of the user side based on the real-time feedback information.
In a third aspect, an electronic device is provided, comprising
One or more processors; and
memory associated with the one or more processors for storing program instructions which, when read and executed by the one or more processors, perform the method of any of the first aspects.
In a fourth aspect, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the method according to any of the first aspects.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment, by establishing the connection among the service end, the platform and the user end, the real-time feedback of the service data is realized, and the newly added service data can be seamlessly recorded and displayed in real time, so that compared with a feedback mode of T +1 in the prior art, the feedback is fast and efficient, and the accuracy of subsequent data analysis and decision making is effectively improved;
and the message center is arranged to acquire the data and process and display the data, so that the method does not occupy a service system and does not influence the performance of the service system compared with a scheme of directly performing statistical analysis based on a service database.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As described in the background art, in the existing insurance product business processing process, there is a certain hysteresis in the acquisition of the business data report, which has a certain influence on data analysis and decision making. Therefore, the present embodiment provides a method, an apparatus, and a device for dynamically monitoring service data, which can effectively improve real-time feedback of data and can implement real-time feedback of data at a service end, a platform, and a user end.
The specific technical scheme of the invention is as follows:
as shown in fig. 1, the embodiment provides a dynamic service data monitoring method, and the embodiment further describes in detail a method for executing dynamic service data monitoring by an insurance service data dynamic monitoring platform as an example.
Specifically, the method for dynamically monitoring the service data comprises the following steps:
and S1, acquiring real-time service data and performing real-time updating and rendering at the local front end according to the preset data requirement.
The real-time service data comprises relevant service data such as the installation APP condition, the registration condition, the order-out condition, the policy-hold quit condition and the like. The local front end refers to a local monitoring large screen, and basic data cannot meet the requirements of most of inquiry and aggregation arrangement observation scenes, so that basic aggregation functions need to be configured for specific scenes to generate display results on the basis of basic data, and a generated chart is rendered to be displayed on the large screen.
Step S1 specifically includes:
s11, monitoring real-time service data of the message center, wherein the real-time service data comprises at least one piece of key information which is received by the message center and is issued by each service system.
In this embodiment, a message center (e.g., kafka) is set, and a data type acquired from the message center to different service systems is configured according to information that needs to be acquired or displayed, so that each service system pushes key information to the message center according to a preset data structure, where the preset data structure at least includes a service data type, service data, and an idempotent key value. Preferably, different message centers, such as a buried point platform, a single platform, a registration center, an activity center, etc., are generally set according to different data types, so as to improve processing efficiency while classifying data.
And S12, converting the at least one piece of key information into a preset data display format one by one in sequence.
Specifically, step S12 includes: and performing data archiving according to the date, the data type and the generating place of the key information, and performing sorting calculation on the key information according to a preset aggregation configuration rule to obtain a preset data display format.
The data type of the key information comprises receipt data, buried point data or registration data and the like. Of course, the structure of the same service data is required to have consistency for statistics. For example, the order data includes information of orders and insurance policies, the buried point data includes information about event types and terminals, and the registration data includes basic information of users. The idempotent key value is used to identify the uniqueness of the current data traffic direction, such as a policy with a policy number or an order number.
Exemplary key information is explained as follows: the data of the buried point comprises at least one of longitude and latitude of a user, a client IP address, a mobile phone number, an operation event type, an operation time point and event key data (such as account id/product id/community article id/activity id). The registration event data comprises at least one of a registered user terminal IP, a registered mobile phone number, a registered account id, registration time, a registered source and an account id of an inviting person. The order-issuing event data includes at least one of client purchase terminal IP, purchaser mobile phone number, order-issuing type, order-issuing time, order number, policy number, affiliated security department, product name, product type, guarantee type, premium amount, policyholder information (sex/age/insurance area/social security/annual income, etc.), information of guaranteed target (sex/age/location/social security/BMI/vehicle type/pet variety, etc.).
Further, the step S12 of archiving data according to the generating location of the key information includes:
sa1, acquiring a place mark based on the key information, wherein the place mark comprises at least one of longitude and latitude, IP and the location of a mobile phone number of the key information;
sa2, determining the occurrence place of the key information according to the descending order of the longitude and latitude, the IP and the location of the mobile phone number as the priority order.
As can be seen, the longitude and latitude are taken as the highest occurrence location of the first matching key information in the embodiment, but not limited thereto. And if the mobile phone number does not have the longitude and latitude, matching the city according to the IP, and if the mobile phone number does not have the IP, matching the city according to the mobile phone number.
Certainly, under the condition of no latitude and longitude, certain offset calculation can be carried out according to the latitude and longitude of the currently matched city, so that whether the occurrence place is on the land or not is calculated according to the latitude and longitude set of the pre-configured continental boundary line, and calculation verification is carried out through a ray method.
And S13, updating the rendering in real time at the local front end based on at least one piece of key information in a preset data format.
Preferably, the steps S12 and S13 further include:
and Sb, judging whether the key information converted into the preset data display format is pushed to the front end according to a preset front end pushing rule, wherein the front end pushing rule is determined according to the current front end display requirement.
And if the front end pushing is needed, updating and rendering the key information at the local front end in real time.
And S2, establishing connection with the user terminal according to the received connection request sent by the user terminal, wherein the connection request comprises a user terminal mark. The user end mark comprises a user end serial number obtained after registration in the monitoring platform, and the registered user end can obtain corresponding basic data after establishing connection with the system. It should be noted that, in this embodiment, the user side is different from the local side. Taking insurance product business display as an example, the local end is a large monitoring screen corresponding to the dynamic insurance business data monitoring platform and is a business core large screen, and the user end is a display screen of any terminal at any other place except the large monitoring screen, for example, a business data dynamic monitoring display screen of different regional subsidiaries, in this embodiment, the basic data of the local end and the user end are synchronous, but the large screen display modules can be different.
Step S2 includes:
s21, establishing communication connection with a user side through a WebSocket protocol according to the user side mark, and ensuring real-time performance of data;
s22, establishing heartbeat mechanism and disconnection reconnection mechanism with the user terminal to ensure connection effectiveness, and reconnecting when disconnection to keep the user terminal and the monitoring platform in a connection state all the time, so as to improve instantaneity and reliability.
After the user end finishes registering and obtains the user end serial number, the method further comprises the following steps: and receiving the request content of the user side, so that the platform sends corresponding real-time feedback information to the user side according to the request content after the user side establishes connection with the platform. Of course, when the content displayed by the user terminal changes, a new request can also be sent in the connection process, and the platform receives the new request and feeds back the new request in real time.
And S3, sending the real-time feedback information matched with the user mark to the user side according to the user mark so that the user side can perform real-time updating and rendering of a large screen of the user side based on the real-time feedback information.
Prior to step S3, the method further comprises:
and Sc, receiving a display template configured by the user side for the user side large screen so as to render the user side large screen by the established display template.
Specifically, step S3 includes:
and S31, matching feedback information corresponding to the user side according to the user side mark.
And S32, acquiring a display template matched with the user side based on the user side mark.
And S33, generating real-time feedback information based on the feedback information and the display template.
Preferably, the present embodiment configures the push frequency and the data size for the registered ue serial number, and performs peak clipping processing on the ue serial number. For example, when the amount of data to be pushed reaches the peak, the subsequent data is pushed in a delayed manner, so as to prevent the system of the user terminal from being crashed and further ensure the stability of the system.
And S34, sending the real-time feedback information to the user terminal so that the user terminal can perform real-time updating rendering of a large screen of the user terminal based on the real-time feedback information. The embodiment does not limit the specific technical means adopted for rendering, and for example, the data presentation module related to the chart performs configuration rendering by using an echarts component.
In summary, in the embodiment, by establishing the connection between the service end, the platform and the user end, the real-time feedback of the service data is realized, and the newly added service data can be seamlessly recorded and displayed in real time, so that compared with the feedback mode of T +1 in the prior art, the feedback is fast and efficient, and the timeliness and accuracy of subsequent data analysis and decision making are effectively improved;
and the message center is arranged to acquire the data and process and display the data, so that the method does not occupy a service system and does not influence the performance of the service system compared with a scheme of directly performing statistical analysis based on a service database.
Corresponding to the above dynamic service data monitoring method, this embodiment further provides a dynamic service data monitoring device, as shown in fig. 2, where the device includes:
a first processing module: the system comprises a local front end, a real-time server and a database, wherein the local front end is used for acquiring real-time service data and performing real-time updating and rendering at the local front end according to preset data requirements;
the connection module is used for establishing connection with the user side according to a received connection request sent by the user side, wherein the connection request comprises a user side mark;
and the second processing module is used for sending the real-time feedback information matched with the user-side mark to the user side according to the user-side mark so as to perform real-time updating and rendering of a large screen of the user side based on the real-time feedback information.
In a preferred embodiment, the first processing module comprises:
the monitoring unit is used for monitoring real-time service data of a message center, wherein the real-time service data comprises at least one piece of key information which is received by the message center and is issued by each service system;
the conversion unit is used for converting the at least one piece of key information into a preset data display format one by one in sequence;
and the first rendering unit is used for updating rendering in real time at the local front end based on at least one piece of key information in a preset data display format.
In a preferred embodiment, the conversion unit comprises:
the filing subunit is used for filing data according to the date, the data type and the generating place of the key information;
and the sorting subunit is used for sorting and calculating the key information according to a preset aggregation configuration rule to obtain a preset data display format.
The binning subunit is specifically configured to:
acquiring a place mark based on the key information, wherein the place mark comprises at least one of longitude and latitude, IP and the location of a mobile phone number of the key information;
and determining the occurrence place of the key information according to the descending order of the longitude and latitude, the IP and the location of the mobile phone number as the priority order.
In a preferred embodiment, the first processing module further includes a determining unit, configured to:
judging whether the key information converted into a preset data display format is pushed to the front end according to a preset front end pushing rule;
and if so, updating and rendering the key information at the local front end in real time.
The second processing module comprises:
the matching unit is used for matching the feedback information corresponding to the user side according to the user side mark;
the acquisition unit is used for acquiring a display template matched with the user side based on the user side mark;
the generating unit is used for generating the real-time feedback information based on the feedback information and a display template;
and the second rendering unit is used for sending the real-time feedback information to the user side so as to perform real-time updating rendering of a large screen of the user side based on the real-time feedback information.
The connection module is used for:
establishing communication connection with the user side through a WebSocket protocol according to the user side mark;
and establishing a heartbeat mechanism and a disconnection reconnection mechanism with the user terminal.
Further, the apparatus further comprises an execution relation construction module configured to:
establishing connection when receiving a connection request sent by a user side; and/or the presence of a gas in the gas,
and sending at least one forced operation instruction of refreshing a page, refreshing a terminal page cache and forcibly exiting to the user side, thereby improving the monitoring capability of the platform on the terminal.
It should be noted that: the service data dynamic monitoring device provided in the above embodiment is illustrated by only dividing the functional modules when triggering the service data dynamic monitoring service, and in practical application, the function allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the embodiment of the dynamic service data monitoring device provided by the above embodiment and the embodiment of the dynamic service data monitoring method provided by the above embodiment belong to the same concept, that is, the device is based on the method, and the specific implementation process thereof is described in detail in the method embodiment, and is not described herein again.
In addition, corresponding to the method and the apparatus for dynamically monitoring the service data, the embodiment further provides an electronic device, including:
one or more processors; and
and a memory associated with the one or more processors, the memory for storing program instructions, the program instructions when read and executed by the one or more processors, performing the dynamic monitoring method for business data disclosed in the above embodiments.
Fig. 3 illustrates an architecture of a computer system, which may include, in particular, a processor 310, a video display adapter 311, a disk drive 312, an input/output interface 313, a network interface 314, and a memory 320. The processor 310, the video display adapter 311, the disk drive 312, the input/output interface 313, the network interface 314, and the memory 320 may be communicatively connected by a communication bus 330.
The processor 310 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solution provided in the present Application.
The Memory 320 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 320 may store an operating system 321 for controlling the operation of the electronic device 300, a Basic Input Output System (BIOS) for controlling low-level operations of the electronic device 300. In addition, a web browser 323, a data storage management system 324, and a device identification information processing system 325, and the like may also be stored. The device identification information processing system 325 may be an application program that implements the operations of the foregoing steps in this embodiment of the present application. In summary, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 320 and called to be executed by the processor 310.
The input/output interface 313 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The network interface 314 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 330 includes a path that transfers information between various components of the device, such as processor 310, video display adapter 311, disk drive 312, input/output interface 313, network interface 314, and memory 320.
In addition, the electronic device 300 may also obtain information of specific pickup conditions from a virtual resource object pickup condition information database for performing condition judgment, and the like.
It should be noted that although the above devices only show the processor 310, the video display adapter 311, the disk drive 312, the input/output interface 313, the network interface 314, the memory 320, the bus 330, etc., in a specific implementation, the devices may also include other components necessary for normal operation. Furthermore, it will be understood by those skilled in the art that the apparatus described above may also include only the components necessary to implement the solution of the present application, and not necessarily all of the components shown in the figures.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from the memory, or installed from the ROM. The computer program, when executed by a processor, performs the above-described functions defined in the methods of embodiments of the present application.
It should be noted that the computer readable medium of the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the server; or may exist separately and not be assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: when the peripheral mode of the terminal is detected to be not activated, acquiring a frame rate of an application on the terminal; when the frame rate meets the screen information condition, judging whether a user is acquiring the screen information of the terminal; and controlling the screen to enter an immediate dimming mode in response to the judgment result that the user does not acquire the screen information of the terminal.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The method, the device and the electronic device for processing the identification information of the terminal device provided by the present application are introduced in detail, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific embodiments and the application range may be changed. In view of the above, the description should not be taken as limiting the application.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again. The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.