CN115222545A - Message modular processing method and device, computer equipment and storage medium - Google Patents

Message modular processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115222545A
CN115222545A CN202210827189.6A CN202210827189A CN115222545A CN 115222545 A CN115222545 A CN 115222545A CN 202210827189 A CN202210827189 A CN 202210827189A CN 115222545 A CN115222545 A CN 115222545A
Authority
CN
China
Prior art keywords
writing
module
page
write
page module
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.)
Pending
Application number
CN202210827189.6A
Other languages
Chinese (zh)
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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210827189.6A priority Critical patent/CN115222545A/en
Publication of CN115222545A publication Critical patent/CN115222545A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Abstract

The embodiment of the application belongs to the field of data processing, is applied to the field of message modular processing, and relates to a message modular processing method which comprises message loading, carrying out modular processing on the loaded page content, acquiring each page module, acquiring a single number of a message, judging whether each page module is written in, acquiring written data and caching the written data to a distinguishing cache region if the current page module is written in, and setting a version number; and if all the page modules are written, the single number and the version number of each page module are sent to the back end, so that back-end personnel can select to perform message modularization combination. The message is processed in a modularization mode on the front-end interface, a single number is set for the message, version numbers are set for all modules, the single number and the version numbers are sent to the rear end, the rear end performs message combination generation through the single number and the version numbers, and the modularization technology reduces single-time data interaction amount, reduces network abnormity and increases service response speed.

Description

Message modularization processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing and packet modular processing technologies, and in particular, to a packet modular processing method and apparatus, a computer device, and a storage medium.
Background
The message data is huge, for example, the message in the form of a policy, and a complete policy usually consists of information modules such as information of an applicant, an insured life, beneficiary users, insurance start and end periods, total insurance amount, total premium basic information, target information, re-insurance information, common insurance information and the like, and the maximum message of all data organizations can be dozens of megabits of data.
In the traditional web technology, the bottleneck of network broadband and transport layer protocols exists in one-time transmission from a front end to a server background, and service timeout or transmission timeout is easily caused.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for processing a packet in a modular manner, a computer device, and a storage medium, so as to reduce a single-time data interaction amount, reduce network anomalies, and increase a service response speed when processing packet data.
In order to solve the foregoing technical problem, an embodiment of the present application provides a method for packet modular processing, which adopts the following technical solutions:
a message modularization processing method comprises the following steps:
loading each template file forming the message to a man-machine interaction interface based on a page static loading technology, starting a preset first monitoring component to perform reading monitoring on the man-machine interaction interface, and judging whether each template file is loaded completely;
performing modular processing on the page content rendered to the human-computer interaction interface after the loading is finished to obtain each page module;
starting a preset second monitoring component to perform writing monitoring on the man-machine interaction interface, and judging whether the writing of each page module is finished;
if the current page module finishes writing, acquiring written data and caching the written data to a distinguishing cache region, and setting a version number;
and if the writing of each page module is finished, sending the version number of each page module to a background database.
Further, the step of loading each template file forming the message to the human-computer interaction interface based on the page static loading technology specifically includes:
the method comprises the steps that a part with fixed page formats and character contents in a message is used as a fixed file in advance;
splitting the fixed file according to each function in a service scene, and splitting the fixed file into a plurality of template files which are in one-to-one correspondence with each function;
initializing each template file to a human-computer interaction interface through a freemaker loading piece.
Further, the step of starting a preset first monitoring component to perform reading monitoring on the human-computer interaction interface and judging whether the template file is completely loaded includes:
setting line numbers and character numbers for each line of characters in each template file in advance;
when each template file is loaded to a human-computer interaction interface, monitoring the line number and the character number of each line of characters in a message loaded to the human-computer interaction interface through the first monitoring component, wherein the first monitoring component can at least complete reading and monitoring;
and if the line number and the character number of each line of characters in the message on the human-computer interaction interface correspond to the line number and the character number set by each line of characters in each template file one by one, finishing loading each template file.
Further, the step of performing modular processing on the page content rendered to the human-computer interaction interface after the loading is completed and acquiring each page module specifically includes:
partitioning the page content on the man-machine interaction interface based on the template files, and setting partition identifiers for partition results;
and taking the partition result as each page module, and taking the partition identifier corresponding to the partition result as the module identifier of the corresponding page module.
Further, the step of starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether each page module is completely written in includes:
step A: setting distinguishing numbers for all writing positions in each page module in advance, acquiring a contrast relation between a module identifier of each page module and the distinguishing numbers, and setting a first state value and a second state value for the distinguishing numbers;
and B, step B: starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface;
and C: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a first state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and determining that a page module corresponding to the writing position carries out writing operation for the first time;
step D: after the writing operation is carried out at the writing position, if the condition that the focus is lost at the writing position is monitored, updating the state value of the writing position from the first state value to a second state value, confirming that the writing position is written in for the first time, continuously monitoring the writing operation of each writing position of the current page module until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and confirming that the writing of the current page module is written in for the first time;
and E, step E: repeating the step B and the step D until the second monitoring component monitors that the state values of all the writing positions in each page module in the human-computer interaction interface are updated to the second state values, judging that all the page modules are completely written,
wherein the second listening component is capable of at least completing a write snoop.
Further, after the step of starting to preset a second monitoring component to perform write monitoring on the human-computer interaction interface, the method further includes:
step F: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value is a second state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and confirming that a page module corresponding to the writing position is carrying out writing updating;
step G: after the write-in updating operation is carried out at the write-in position, if the focus is monitored to be lost at the write-in position, the completion of the update and the write-in of the write-in position is confirmed, the write-in updating operation of each write-in position of the current page module is monitored continuously until the second monitoring component cannot monitor the write-in operation at each write-in position of the current page module, and the completion of the update and the write-in of the current page module is confirmed.
Further, the step of obtaining write data and caching the write data to the distinct cache region and setting the version number if the current page module finishes writing includes:
if the current page module finishes writing and the current page module finishes writing for the first time, acquiring written data and caching the written data to a distinguishing cache region, and setting an initial version number;
and if the current page module is completely written and is updated, acquiring a module identifier corresponding to the writing position based on the comparison relation, determining the page module subjected to writing and updating, acquiring the written data of all the writing positions in the page module after the updating and writing are completed, caching the written data to the distinguishing cache region, and setting an updating version number.
Further, the step of sending the version number of each page module to a background database specifically includes:
acquiring module identifiers of all page modules for integration, and taking an integration result as a single number of the message;
and sending the single number and the version number of each page module to a background database.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a packet modular processing apparatus, which adopts the following technical solutions:
a message modular processing apparatus, comprising:
the loading monitoring module is used for loading each template file forming the message to a man-machine interaction interface based on a page static loading technology, starting a preset first monitoring component to perform reading monitoring on the man-machine interaction interface, and judging whether each template file is completely loaded;
the page modularization module is used for carrying out modularization processing on page contents rendered to the man-machine interaction interface after the loading is finished to obtain each page module;
the write-in monitoring module is used for starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether the writing of each page module is finished;
the version number setting module is used for acquiring the written data and caching the written data to the distinguishing cache region if the current page module finishes writing, and setting a version number;
and the front-end sending module is used for sending the version number of each page module to a background database if the page modules are completely written.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
according to the message modularization processing method, through message loading, page content after loading is subjected to modularization processing, each page module is obtained, whether the writing of each page module is finished or not is judged, if the writing of the current page module is finished, written data is obtained and cached to a distinguishing cache region, and a version number is set; and if the writing of each page module is finished, the version number of each page module is sent to the back end, so that back-end personnel can select to perform message modular combination. Through the write-in monitoring component, after the write-in of each page module is finished, the current page module is directly cached, the unified caching of message data is avoided, the single-time data interaction amount is reduced, the message is subjected to modular processing on a front-end interface, version numbers are set for the modules, the version numbers are sent to a rear end, the rear end performs message combination generation through the version numbers, the modular technology reduces network abnormity, and the service response speed is increased.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, 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 for modular processing of messages according to the present application;
FIGS. 3 and 4 are flow diagrams of one embodiment of step 203 shown in FIG. 2;
FIG. 5 is a flowchart of one embodiment of first writing and updating a write distinction for a write location within the human-machine interface, according to step 2032;
FIG. 6 is a flowchart of one embodiment of distinguishing a written location from an updated written location within the human-computer interaction interface after a first write is completed according to step 2032;
FIG. 7 is a schematic block diagram illustrating an embodiment of a message modularization processing apparatus according to the present application;
FIG. 8 is a schematic diagram of the structure of one embodiment 703 shown in 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 figures above, 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 serves as a medium for providing 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 a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture experts Group Audio Layer III, motion Picture experts compression standard Audio Layer 3), an MP4 player (Moving Picture experts Group Audio Layer IV, motion Picture experts compression standard Audio Layer 4), a laptop portable computer, a desktop computer, 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 message modularization processing method provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the message modularization processing apparatus is generally disposed in the server/terminal device.
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 an implementation.
With continuing reference to fig. 2, a flow diagram of one embodiment of a method for modular processing of messages according to the present application is shown. The message modularization processing method comprises the following steps:
step 201, loading each template file forming a message to a human-computer interaction interface based on a page static loading technology, starting a preset first monitoring component to perform reading monitoring on the human-computer interaction interface, and judging whether each template file is completely loaded.
In this embodiment, the step of loading, to a human-computer interaction interface, each template file that forms a packet based on a page static loading technology specifically includes: the method comprises the steps that a part with fixed page formats and character contents in a message is used as a fixed file in advance; splitting the fixed file according to each function in a service scene, and splitting the fixed file into a plurality of template files which are in one-to-one correspondence with each function; initializing each template file to a human-computer interaction interface through a freemaker loading piece.
For different messages, the message data updating can be performed according to the problems of time, version updating and the like, but the basic format composition content of the messages is still roughly fixed, for example, each policy or each electronic contract, no matter how the internal details of the messages change, the basic composition characters of the messages or the content of each item related to a legal document are basically fixed, therefore, the fixed part with fixed page format and character content in the messages can be used as a fixed file, the fixed file is split according to each function in a service scene and split into a plurality of template files corresponding to each function one by one, the fixed file is split into a plurality of template files according to different information to be filled in the messages or different objects to be filled, the template files are initialized to a man-machine interaction interface through a freemaker loading piece, wherein the freemaker is a page static loading technology, the character content in the template files can be directly loaded to the man-machine interaction interface, the template files are split through the messages and loaded by using the freemaker loading piece, so that the loading of the message contents is modularized when the network loading service is loaded, the loading speed is reduced, and the abnormal data loading is increased when the network interaction service is performed, and the abnormal data loading is increased.
In this embodiment, the step of starting to preset the first monitoring component to perform read monitoring on the human-computer interaction interface and determining whether the template file is completely loaded includes: setting line numbers and character numbers for each line of characters in each template file in advance; when the template files are loaded to a human-computer interaction interface, monitoring the line number and the character number of each line of characters in a message loaded to the human-computer interaction interface through the first monitoring component, wherein the first monitoring component can at least finish reading and monitoring; and if the line number and the character number of each line of characters in the message on the human-computer interaction interface correspond to the line number and the character number set by each line of characters in each template file one by one, finishing loading each template file.
Reading and monitoring are carried out by arranging the first monitoring component, meanwhile, a line number and a character number are arranged on each line of characters in each template file, after the loading is finished, if the line number and the character number of each line of characters in the message on the man-machine interaction interface are in one-to-one correspondence with the line number and the character number arranged on each line of characters in each template file, then the loading of each template file is finished, the line number and the character number of each line are utilized, the template file is guaranteed to be completely loaded on the interaction interface, and whether the message is lost during the loading can be identified.
Step 202, after the loading is finished, performing modular processing on the page content rendered to the human-computer interaction interface to obtain each page module.
In this embodiment, the performing modular processing on the content of the page rendered to the human-computer interaction interface after the loading is completed to obtain each page module specifically includes: partitioning the page content on the man-machine interaction interface based on the template files, and setting partition identifiers for partition results; and taking the partition result as each page module, and taking a partition identifier corresponding to the partition result as a module identifier of the corresponding page module.
The page content is partitioned on the basis of the template files on the human-computer interaction interface, and partition identification is set for a partition result, specifically, after the template files are loaded, a line number of a first line character and a line number of a last line character in a single template file are respectively obtained, and the content between the two line numbers is used as a modularization result; and after the line numbers of the first line characters and the line numbers of the last line characters in each template file are obtained as modularization results, obtaining front-end interface modules with the same number as that of the template files.
The method comprises the steps of conducting modularization processing on messages displayed on an interactive interface on a front-end interface, identifying front-end interface partitions corresponding to different page modules, setting partition identification for each partition, using the partition identification as a module identification of a corresponding page template, conducting modularization on the messages on the front-end interface, and ensuring that when the messages are written, each page module is determined directly through the corresponding partition when the messages are written.
And 203, starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface, and judging whether the writing of each page module is finished.
In this embodiment, the step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface and determining whether each page module is written completely includes: step A: setting distinguishing numbers for all writing positions in each page module in advance, acquiring a comparison relation between a module identifier of each page module and the distinguishing numbers, and setting a first state value and a second state value for the distinguishing numbers; and B: starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface; and C: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a first state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and determining that a page module corresponding to the writing position carries out writing operation for the first time; step D: after the writing operation is carried out at the writing position, if the condition that the focus is lost at the writing position is monitored, updating the state value of the writing position from the first state value to a second state value, confirming that the writing position is written in for the first time, continuously monitoring the writing operation of each writing position of the current page module until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and confirming that the writing operation of the current page module is written in for the first time; step E: repeatedly executing the step B and the step D until the second monitoring component monitors that the state values of all the writing positions in each page module in the human-computer interaction interface are updated to second state values, and judging that all the page modules are completely written, wherein the second monitoring component at least can finish writing monitoring; step F: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a second state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and confirming that a page module corresponding to the writing position is carrying out writing updating; step G: after the write-in updating operation is carried out at the write-in position, if the situation that the focus is lost at the write-in position is monitored, the completion of the update and the write-in of the write-in position is confirmed, the write-in updating operation of each write-in position of the current page module is monitored continuously until the second monitoring component cannot monitor the write-in operation at each write-in position of the current page module, and the completion of the update and the write-in of the current page module is confirmed.
And monitoring the writing position in each page module through a set second monitoring component, and determining whether the writing is performed for the first time or not through the first state value and the second state value, wherein the focus is lost on all pages, namely the writing is completed for the first time.
In this embodiment, the step of starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface and determining whether each page module is written completely further includes: step F: if the second monitoring component monitors that a writing position exists in the man-machine interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a second state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and judging that the page module is carrying out writing updating; step G: if the second monitoring component loses focus at the writing position after monitoring that the writing position in the human-computer interaction interface carries out writing updating operation, the writing position is judged to be updated and written completely, and the current page module is updated and written completely until the second monitoring component cannot monitor the writing operation at each writing position of the current page module.
And monitoring the writing position in each page module through a set second monitoring component, and determining whether the writing position is updated or not through the first state value and the second state value, wherein the focus is lost on all pages, namely the updating writing is finished.
The focus lost means that the second listening component cannot monitor the writing operation at the writing position on the whole interactive interface.
With continuing reference to fig. 3 and 4, fig. 3 and 4 together illustrate a flowchart of one embodiment of step 203 shown in fig. 2, comprising the steps of:
step 2031: and setting distinguishing numbers for all writing positions in each page module in advance, acquiring the contrast relation between the module identification of each page module and the distinguishing numbers, and setting a first state value and a second state value for the distinguishing numbers.
Step 2032: and starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface.
With continued reference to fig. 5, a flowchart of one embodiment of distinguishing between an initial write and an updated write to a write location within the human-machine interface according to step 2032 is shown, including the steps of:
step 501, judging whether a writing position exists in the human-computer interaction interface and a writing operation is carried out;
step 502, if a write-in position is performing write-in operation, determining a state value of the write-in position;
step 503, if the status value of the writing position is the first status value, the writing position is performing the first writing;
step 504, if the status value of the writing location is the second status value, the writing location is performing updating writing.
With continued reference to fig. 6, a flowchart of an embodiment of distinguishing between initial write-done and updated write-done for a write location in the human-computer interaction interface according to step 2032 is shown, which includes the steps of:
step 601, judging whether a writing position exists in the human-computer interaction interface and then the focus is lost at the writing position after the writing operation is carried out;
step 602, if there is a writing position that loses focus at the writing position after performing writing operation, determining that the status value of the writing position changes;
step 603, if the state value of the writing position is converted from the first state value to the second state value, the writing position is written into for the first time;
step 604, if the state value of the writing position is always in the second state value, the writing position update is finished.
Step 2033: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value is a first state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and determining that a page module corresponding to the writing position carries out writing operation for the first time.
Since the second monitoring component performs write monitoring on the write position, and an overall message interface is divided into page modules, each page module may include multiple write positions, so that the distinct number of the write position needs to be obtained first, and then the module identifier is determined through the comparison relationship between the write position and the module identifier, thereby determining which module performs write operation.
Step 2034: after the writing operation is carried out at the writing position, if the condition that the focus is lost at the writing position is monitored, the state value of the writing position is updated from the first state value to a second state value, the first writing completion of the writing position is confirmed, the writing operation of each writing position of the current page module is monitored continuously until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and the first writing completion of the current page module is confirmed.
Step 2035: and repeatedly executing the step 2032 and the step 2034 until the second monitoring component monitors that the state values of all the writing positions in each page module in the human-computer interaction interface are updated to second state values, and then determining that all the page modules are written completely, wherein the second monitoring component can at least complete writing monitoring.
Step 2036: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a second state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and confirming that a page module corresponding to the writing position is carrying out writing updating.
Step 2037: after the write-in updating operation is carried out at the write-in position, if the focus is monitored to be lost at the write-in position, the completion of the update and the write-in of the write-in position is confirmed, the write-in updating operation of each write-in position of the current page module is monitored continuously until the second monitoring component cannot monitor the write-in operation at each write-in position of the current page module, and the completion of the update and the write-in of the current page module is confirmed.
And step 204, if the current page module finishes writing, acquiring the written data and caching the written data to the distinguishing cache region, and setting a version number.
In this embodiment, the step of obtaining write data and caching the write data to the distinct cache region and setting the version number if the current page module finishes writing includes: if the current page module finishes writing and the current page module finishes writing for the first time, acquiring written data and caching the written data to a distinguishing cache region, and setting an initial version number; and if the current page module is completely written and is updated, acquiring a module identifier corresponding to the writing position based on the comparison relation, determining the page module subjected to writing and updating, acquiring the written data of all the writing positions in the page module after the updating and writing are completed, caching the written data to the distinguishing cache region, and setting an updating version number.
By identifying whether the writing of the current page module is finished for the first time or the updating is finished, the version numbers are respectively set, namely the content corresponding to the initial version number is reserved, and the content corresponding to the updating version number is also reserved, so that the message generation personnel at the rear end can conveniently and freely select and combine messages of different versions.
And step 205, if the writing of each page module is finished, sending the version number of each page module to a background database.
Through with the single number with the version number of each page module sends to the rear end, supplies the rear end personnel to select to carry out message modularization combination and use, when passing value from the front end to the rear end, has avoided whole message data to transmit, and the rear end combination personnel only need pass through single number and version number search for the combination, can call difference buffer memory content at the front end, make up and show the text content of protecting to the front end interface, and the message generator of the rear end of being convenient for carries out the free choice, combines the message of different editions, simultaneously, also reduces the disposable data interaction volume on the transmission between the front end and the rear end, reduces network anomaly, increases service response speed.
In this embodiment, the step of sending the single number and the version number of each page module to a back end further includes: and if only a certain page module is updated and written, only sending the corresponding update version number after the update and writing are finished.
In this embodiment, the step of sending the version number of each page module to a background database specifically includes: acquiring module identifiers of all page modules for integration, and taking an integration result as a single number of the message; and sending the single number and the version number of each page module to a background database.
In this embodiment, the module identifiers of the page modules are acquired for integration, the module identifiers of the page modules may be set to different values or different IDs, and the preset algorithm is used for performing algorithm operation on the module identifiers to acquire a character string corresponding to a final operation result, where the character string is used as a single number of a message. The single number of the message is determined through the module identification of each page module, so that the condition that the single number is named in a mode of directly and manually performing numerical value accumulation sequencing when the single number is generated in the prior art is avoided.
In this embodiment, when the version number of each page module is sent to the background database, the single number is sent to the back end together.
In this embodiment, after a single number is obtained based on the module identifier of each page module, the single number is sent together when the version number of each page module is sent to the background database, and since the single number is generated based on the module identifier of each page module, even if a certain page is updated to generate a new version number, the single number is not affected.
According to the method, through message loading, page content after loading is subjected to modular processing, each page module is obtained, a single number of the message is obtained, whether the writing of each page module is finished or not is judged, if the writing of the current page module is finished, written data is obtained and cached in a distinguishing cache region, and a version number is set; and if all the page modules are written, the single number and the version number of each page module are sent to the back end, so that back-end personnel can select to perform message modularization combination. Through the write-in monitoring component, after all page modules are written in, the current page module is directly cached, unified caching of message data is avoided, single-time data interaction amount is reduced, a single number is set for a message through modular processing of the message on a front-end interface, version numbers are set for all modules, the single number and the version numbers are sent to a rear end, message combination generation is carried out on the rear end through the single number and the version numbers, the modularization technology reduces network abnormity, and service response speed is increased.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
For example, in the embodiment of the present application, the module identifier of each page module can be processed as a single number by using a neural network learning model in artificial intelligence.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. 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 order as indicated by the arrows, the steps are not necessarily performed in order 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, and the order of execution is not necessarily sequential, but may be performed alternately or alternately 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 message modularization processing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 7, the message modularization processing apparatus 700 according to this embodiment includes: a loading monitoring module 701, a page modularization module 702, a writing monitoring module 703, a version number setting module 704 and a front end sending module 705. Wherein:
a loading monitoring module 701, configured to load, based on a page static loading technology, each template file forming a packet to a human-computer interaction interface, start a preset first monitoring component to perform reading monitoring on the human-computer interaction interface, and determine whether each template file is completely loaded;
the page modularization module 702 is configured to perform modularization processing on the page content rendered to the human-computer interaction interface after the loading is completed, and obtain each page module;
a write monitoring module 703, configured to start a preset second monitoring component to perform write monitoring on the human-computer interaction interface, and determine whether the writing of each page module is completed;
a version number setting module 704, configured to obtain write data and cache the write data in the distinct cache region if the current page module finishes writing, and set a version number;
a front end sending module 705, configured to send the version number of each page module to a background database if all the page modules are written in.
Referring to fig. 8, which is a schematic structural diagram of an embodiment of the write snoop module, the write snoop module includes a first write identification sub-module 7031 and an update write identification sub-module 7032,
the first write-in recognition sub-module 7031 is configured to, if the second monitoring component monitors that a write-in position exists in the human-computer interaction interface and a current state value of the second monitoring component is a first state value, obtain a module identifier corresponding to the write-in position based on the comparison relationship, and determine that a page module corresponding to the write-in position is performing a first write-in operation; the monitoring module is further configured to, after performing a write operation at the write position, update the state value of the write position from the first state value to a second state value if it is monitored that the focus is lost at the write position, confirm that the write position is written in for the first time, and continuously monitor the write operation at each write position of the current page module until the second monitoring module cannot monitor the write operation at each write position of the current page module, and then confirm that the write operation of the current page module is written in for the first time; and the second monitoring component is further configured to repeatedly execute the write-in monitoring module until the second monitoring component monitors that the state values of all the write-in positions in each page module in the human-computer interaction interface are updated to second state values, and then it is determined that all the page modules are completely written in, wherein the second monitoring component can at least complete write-in monitoring.
In this embodiment, the first writing identifier 7031 includes: a first-time writing identification unit, a first-time writing completion unit of the current page module and a first-time writing completion unit of the interactive interface, wherein,
and the writing-in-first recognition unit is used for acquiring a module identifier corresponding to the writing position based on the comparison relationship and determining that the page module corresponding to the writing position is performing writing-in operation for the first time if the second monitoring component monitors that the writing position exists in the human-computer interaction interface and the current state value is the first state value.
And the current page module first writing completion unit is used for updating the state value of the writing position from the first state value to a second state value if the condition that the writing position loses focus is monitored after the writing position performs writing operation, confirming that the writing position is first written, continuously monitoring the writing operation of each writing position of the current page module until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and confirming that the current page module is first written.
And the interactive interface first writing-in finishing unit is used for repeatedly executing the writing-in monitoring module until the second monitoring component monitors that the state values of all the writing-in positions in each page module in the human-computer interactive interface are updated to second state values, and then the page modules are judged to be completely written in, wherein the second monitoring component can at least finish writing-in monitoring.
An update write identifier module 7032, configured to, if it is monitored by the second monitoring component that a write position is currently performing write operation in the human-computer interaction interface and a current state value of the write position is a second state value, obtain a module identifier corresponding to the write position based on the comparison relationship, and confirm that a page module corresponding to the write position is currently performing write update; and after the write-in updating operation is carried out at the write-in position, if the focus loss at the write-in position is monitored, the completion of the update write-in at the write-in position is confirmed, the write-in updating operation of each write-in position of the current page module is monitored continuously until the second monitoring component cannot monitor the write-in operation at each write-in position of the current page module, and the completion of the update write-in of the current page module is confirmed.
In this embodiment, the update write identifier module 7032 includes: an updating-writing recognition unit and an updating-writing completion recognition unit, wherein,
and the updating and writing identification unit is used for acquiring the module identification corresponding to the writing position based on the comparison relationship and confirming that the page module corresponding to the writing position is performing writing updating if the second monitoring component monitors that the writing position exists in the human-computer interaction interface and the current state value is a second state value.
And the update writing completion identification unit is used for confirming that the update writing of the writing position is completed if the condition that the focus is lost at the writing position is monitored after the writing update operation is carried out at the writing position, continuously monitoring the write update operation of each writing position of the current page module until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and then confirming that the update writing of the current page module is completed.
In order to solve the technical problem, the embodiment of the application further provides computer equipment. 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 9 comprises a memory 91, a processor 92, a network interface 93 communicatively connected to each other via a system bus. It is noted that only a computer device 9 having components 91-93 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or less 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 91 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 91 may be an internal storage unit of the computer device 9, such as a hard disk or a memory of the computer device 9. In other embodiments, the memory 91 may also be an external storage device of the computer device 9, 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, provided on the computer device 9. Of course, the memory 91 may also comprise both an internal memory unit and an external memory device of the computer device 9. In this embodiment, the memory 91 is generally used for storing an operating system installed in the computer device 9 and various application software, such as computer readable instructions of a message modularization processing method. Further, the memory 91 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 92 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 92 is typically used to control the overall operation of the computer device 9. In this embodiment, the processor 92 is configured to execute the computer readable instructions or processing data stored in the memory 91, for example, execute the computer readable instructions of the message modularization processing method.
The network interface 93 may comprise a wireless network interface or a wired network interface, and the network interface 93 is generally used for establishing communication connection between the computer device 9 and other electronic devices.
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 implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be 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 should be understood that the above-described embodiments are merely exemplary of some, and not all, embodiments of the present application, and that the drawings illustrate preferred embodiments of the present application without limiting the scope of the claims appended hereto. This application is capable of embodiments in many different forms and the embodiments are provided so that this disclosure will be thorough and complete. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification 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 all the equivalent structures are within the protection scope of the present application.

Claims (11)

1. A message modularization processing method is characterized by comprising the following steps:
loading each template file forming the message to a human-computer interaction interface based on a page static loading technology, starting a preset first monitoring component to perform reading monitoring on the human-computer interaction interface, and judging whether each template file is loaded completely;
after loading, performing modular processing on page contents rendered to the human-computer interaction interface to obtain each page module;
starting a preset second monitoring component to perform writing monitoring on the human-computer interaction interface, and judging whether the writing of each page module is finished;
if the current page module finishes writing, acquiring written data and caching the written data to a distinguishing cache region, and setting a version number;
and if the writing of each page module is finished, sending the version number of each page module to a background database.
2. The modular processing method for messages according to claim 1, wherein the step of loading each template file constituting a message to a human-computer interaction interface based on a static page loading technique specifically comprises:
the method comprises the steps that a part with fixed page formats and character contents in a message is used as a fixed file in advance;
splitting the fixed file according to each function in a service scene, and splitting the fixed file into a plurality of template files which are in one-to-one correspondence with each function;
initializing each template file to a human-computer interaction interface through a freemaker loading piece.
3. The method for modular processing of messages according to claim 1, wherein the step of starting a preset first monitoring component to perform reading monitoring on the human-computer interaction interface and determining whether the template file is loaded completely includes:
setting line numbers and character numbers for each line of characters in each template file in advance;
when the template files are loaded to a human-computer interaction interface, monitoring the line number and the character number of each line of characters in a message loaded to the human-computer interaction interface through the first monitoring component, wherein the first monitoring component can at least finish reading and monitoring;
and if the line number and the character number of each line of characters in the message on the human-computer interaction interface correspond to the line number and the character number set by each line of characters in each template file one by one, finishing loading each template file.
4. The message modular processing method according to claim 1, wherein the step of performing modular processing on the page content rendered to the human-computer interaction interface after the loading is completed to obtain each page module specifically comprises:
partitioning the page content at the man-machine interaction interface based on the template files, and setting partition identification for partition results;
and taking the partition result as each page module, and taking a partition identifier corresponding to the partition result as a module identifier of the corresponding page module.
5. The message modular processing method according to claim 4, wherein the step of starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether each page module is written completely includes:
step A: setting distinguishing numbers for all writing positions in each page module in advance, acquiring a contrast relation between a module identifier of each page module and the distinguishing numbers, and setting a first state value and a second state value for the distinguishing numbers;
and B, step B: starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface;
and C: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a first state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and determining that a page module corresponding to the writing position carries out writing operation for the first time;
step D: after the writing operation is carried out at the writing position, if the condition that the focus is lost at the writing position is monitored, updating the state value of the writing position from the first state value to a second state value, confirming that the writing position is written in for the first time, continuously monitoring the writing operation of each writing position of the current page module until the second monitoring component cannot monitor the writing operation at each writing position of the current page module, and confirming that the writing operation of the current page module is written in for the first time;
and E, step E: repeating the step B and the step D until the second monitoring component monitors that the state values of all the writing positions in each page module in the human-computer interaction interface are updated to second state values, judging that all the page modules are completely written,
wherein the second listening component is capable of at least completing a write snoop.
6. The modular processing method for packets according to claim 5, wherein after the step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface, the method further comprises:
step F: if the second monitoring component monitors that a writing position exists in the human-computer interaction interface and writing operation is carried out, and the current state value of the second monitoring component is a second state value, acquiring a module identifier corresponding to the writing position based on the comparison relation, and confirming that a page module corresponding to the writing position is carrying out writing updating;
step G: after the write-in updating operation is carried out at the write-in position, if the situation that the focus is lost at the write-in position is monitored, the completion of the update and the write-in of the write-in position is confirmed, the write-in updating operation of each write-in position of the current page module is monitored continuously until the second monitoring component cannot monitor the write-in operation at each write-in position of the current page module, and the completion of the update and the write-in of the current page module is confirmed.
7. The message modular processing method according to claim 6, wherein the step of obtaining write data and caching the write data to the distinct cache region and setting a version number if the current page module finishes writing comprises:
if the current page module finishes writing and the current page module finishes writing for the first time, acquiring written data and caching the written data to a distinguishing cache region, and setting an initial version number;
and if the current page module is completely written and is completely updated, acquiring a module identifier corresponding to the writing position based on the comparison relation, determining the page module subjected to writing and updating, acquiring the written data of all writing positions in the page module after the updating and writing are completed, caching the written data to the distinguishing cache region, and setting an updating version number.
8. The message modular processing method according to claim 4, wherein the step of sending the version number of each page module to a background database specifically includes:
acquiring module identifiers of all page modules for integration, and taking an integration result as a single number of the message;
and sending the single number and the version number of each page module to a background database.
9. A message modular processing apparatus, comprising:
the loading monitoring module is used for loading each template file forming the message to a man-machine interaction interface based on a page static loading technology, starting a preset first monitoring component to perform reading monitoring on the man-machine interaction interface, and judging whether each template file is completely loaded;
the page modularization module is used for carrying out modularization processing on page contents rendered to the man-machine interaction interface after the loading is finished so as to obtain each page module;
the write-in monitoring module is used for starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether the writing of each page module is finished;
the version number setting module is used for acquiring the written data and caching the written data to the distinguishing cache region if the current page module finishes writing, and setting a version number;
and the front-end sending module is used for sending the version number of each page module to a background database if the page modules are completely written.
10. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the message modular processing method of any of claims 1 to 8.
11. A computer-readable storage medium having computer-readable instructions stored thereon which, when executed by a processor, implement the steps of the message modular processing method of any of claims 1-8.
CN202210827189.6A 2022-07-13 2022-07-13 Message modular processing method and device, computer equipment and storage medium Pending CN115222545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210827189.6A CN115222545A (en) 2022-07-13 2022-07-13 Message modular processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210827189.6A CN115222545A (en) 2022-07-13 2022-07-13 Message modular processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115222545A true CN115222545A (en) 2022-10-21

Family

ID=83611497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210827189.6A Pending CN115222545A (en) 2022-07-13 2022-07-13 Message modular processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115222545A (en)

Similar Documents

Publication Publication Date Title
KR102171974B1 (en) Data source-based business customization device, method, system, and storage medium
CN112631910A (en) Front-end testing method and device, computer equipment and storage medium
EP4095686A2 (en) Method for switching skin of mini-program page, and electronic device
CN116431878A (en) Vector retrieval service method, device, equipment and storage medium thereof
CN114140947A (en) Interface display method and device, electronic equipment, storage medium and program product
CN112558966A (en) Depth model visualization data processing method and device and electronic equipment
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN107862035A (en) Network read method, device, Intelligent flat and the storage medium of minutes
CN116483425A (en) Micro-service gray level edition issuing method, device, equipment and storage medium thereof
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN115185625A (en) Self-recommendation type interface updating method based on configurable card and related equipment thereof
CN115222545A (en) Message modular processing method and device, computer equipment and storage medium
CN115330396A (en) Payment state acquisition method and device, computer equipment and storage medium
CN115543565A (en) Task processing method and device, computer equipment and storage medium
CN115061916A (en) Method for automatically generating interface test case and related equipment thereof
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN114565316A (en) Task issuing method based on micro-service architecture and related equipment
CN114969482A (en) Method for automatically completing request by online configuration interface and related equipment thereof
CN115731057A (en) Information generation method and device, computer equipment and storage medium
CN115578050A (en) Approval progress identification method and device, computer equipment and storage medium
CN115834685A (en) Screen adaptation method based on dynamic proxy and related equipment thereof
CN115828018A (en) Electronic magazine interface material replacing method and related equipment thereof
CN115756640A (en) Method for automatically generating job scheduling configuration and related equipment thereof
CN115794110A (en) Multi-path network data source processing method and related equipment thereof
CN116594599A (en) Vue project file scanning display method, device, equipment and storage medium thereof

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