Message modular processing method, device, computer equipment and storage medium
Through the modular packet processing method, the page static loading technology and monitoring component monitoring, decompose and cache message data, and set version numbers for each module, solving the problem of low message transmission efficiency in traditional web technology, and achieving faster and more reliable data interaction and message combination.
Patent Information
- Application Number
- CN202210827189.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Traditional web technology is prone to encounter bottlenecks in network broadband and transmission layer protocols when transmitting packet data at one time, resulting in service timeout or transmission timeout, and the message data is huge, and the number of single-time data interactions increases the possibility of network abnormalities.
The modular packet processing method is adopted, and the template files of the packet are loaded into the human-computer interactive interface through page static loading technology. The monitoring component is used to monitor the loading and writing process, decompose the packets into multiple page modules, gradually write and cache data, and set the version number for each module, and finally send the version number to the background database.
It reduces the amount of single-time data interactions, reduces the occurrence of network exceptions, improves service response speed, and improves the efficiency of packet combination and generation through modular processing and version number management.
Smart Images

Figure CN115222545B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing and message modular processing, and in particular to a message modular processing method, device, computer equipment and storage medium. Background Art
[0002] The message data is huge. For example, a message in the form of an insurance policy usually consists of information modules such as the policyholder, the insured, the beneficiary, the insurance start and end dates, the total insured amount, the basic information of the total premium, the underlying information, reinsurance, and co-insurance information. The message composed of all these data can be as large as tens of megabytes.
[0003] Traditional web technology has bottlenecks in network bandwidth and transport layer protocols in one-time transmission from the front end to the server back end, which can easily cause service timeouts or transmission timeouts. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a message modular processing method, device, computer equipment and storage medium, so as to reduce the single data interaction amount, reduce network anomalies and increase service response speed when processing message data.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a message modular processing method, which adopts the following technical solution:
[0006] A message modular processing method comprises the following steps:
[0007] Based on the page static loading technology, the template files constituting the message are loaded into the human-computer interaction interface, and at the same time, a preset first monitoring component is started to read and monitor the human-computer interaction interface to determine whether the template files have been loaded;
[0008] Modularize the page content that is rendered to the human-computer interaction interface after loading to obtain each page module;
[0009] Starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface to determine whether the writing of each page module has been completed;
[0010] If the current page module has been written, obtain the written data and cache it in the difference cache area, and set the version number;
[0011] If all the page modules are written, the version numbers of the page modules are sent to the backend database.
[0012] Furthermore, the step of loading the template files constituting the message into the human-computer interaction interface based on the page static loading technology specifically includes:
[0013] Pre-set the part of the message with fixed page format and text content as a fixed file;
[0014] According to each function in the business scenario, the fixed file is split into a number of template files corresponding to each function;
[0015] The template files are initialized to the human-computer interaction interface through the freemaker loader.
[0016] Furthermore, the step of starting the preset first monitoring component to monitor the reading of the human-computer interaction interface and judging whether the template file has been loaded specifically includes:
[0017] Pre-setting line numbers and character numbers for each line of text in each template file;
[0018] When each template file is loaded into the human-computer interaction interface, the line number and the character number of each line of text in the message loaded into the human-computer interaction interface are monitored by the first monitoring component, wherein the first monitoring component can at least complete the reading monitoring;
[0019] If the line number and character number of each line of text in the message on the human-computer interaction interface correspond one-to-one with the line number and character number set for each line of text in each template file, then the loading of each template file is complete.
[0020] Furthermore, the step of modularizing the page content rendered to the human-computer interaction interface after loading to obtain each page module specifically includes:
[0021] Based on the template files, partition the page content in the human-computer interaction interface, and set partition identifiers for the partition results;
[0022] The partition results are used as each page module, and the partition identifier corresponding to the partition result is used as the module identifier of the corresponding page module.
[0023] Furthermore, the step of starting the preset second monitoring component to monitor the human-computer interaction interface for writing and judging whether each page module has been written includes:
[0024] Step A: pre-set a distinguishing number for all write positions in each page module, obtain a comparison relationship between the module identifier of each page module and the distinguishing number, and set a first state value and a second state value for the distinguishing number;
[0025] Step B: starting a preset second monitoring component to perform write monitoring on the human-computer interaction interface;
[0026] Step C: if the second monitoring component detects that a write operation is being performed at a write location in the human-computer interaction interface, and its current state value is the first state value, then based on the comparison relationship, a module identifier corresponding to the write location is obtained to determine that the page module corresponding to the write location is performing the first write operation;
[0027] Step D: After the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, the state value of the write position is updated from the first state value to the second state value, confirming that the first write to the write position is completed, and continuously monitoring the write operations of each write position of the current page module until the second monitoring component cannot monitor the write operation at each write position of the current page module, then confirming that the first write to the current page module is completed;
[0028] Step E: Repeat step B and step D until the second monitoring component detects that the state values of all write positions in each page module in the human-computer interaction interface are updated to the second state value, and then it is determined that all page modules have been written.
[0029] Wherein, the second monitoring component can at least complete write monitoring.
[0030] Furthermore, after the step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface, the method further includes:
[0031] Step F: If the second monitoring component detects that a write operation is being performed at a write location in the human-computer interaction interface, and its current state value is a second state value, then based on the comparison relationship, a module identifier corresponding to the write location is obtained to confirm that a page module corresponding to the write location is being written and updated;
[0032] Step G: After performing a write update operation at the write position, if it is detected that the focus is lost at the write position, it is confirmed that the write position update is completed, and the write update operations of each write position of the current page module are continuously monitored until the second monitoring component can no longer monitor the write operation at each write position of the current page module, then it is confirmed that the current page module update is completed.
[0033] Furthermore, if the current page module is written, the step of obtaining the written data and caching it in a different cache area, and setting the version number specifically includes:
[0034] If the current page module has been written and it is the first time to be written, the written data is obtained and cached in a different cache area, and an initial version number is set;
[0035] If the current page module has been written and updated, the module identifier corresponding to the write position is obtained based on the comparison relationship, the page module that has been written and updated is determined, and the write data of all write positions in the page module after the update is completed is obtained, and cached in the difference cache area, and the update version number is set.
[0036] Furthermore, the step of sending the version number of each page module to the backend database specifically includes:
[0037] Obtain module identifiers of each page module for integration, and use the integration result as the order number of the message;
[0038] The order number and the version number of each page module are sent to the backend database.
[0039] In order to solve the above technical problems, the embodiment of the present application further provides a message modular processing device, which adopts the following technical solution:
[0040] A modular message processing device, comprising:
[0041] A loading monitoring module is used to load the template files constituting the message into the human-computer interaction interface based on the page static loading technology, start the preset first monitoring component to read and monitor the human-computer interaction interface, and determine whether the template files have been loaded;
[0042] A page modularization module is used to modularize the page content rendered to the human-computer interaction interface after loading is completed, and obtain each page module;
[0043] A write monitoring module, used 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;
[0044] A version number setting module is used to obtain the written data and cache it in a different cache area if the current page module has been written, and to set the version number;
[0045] The front-end sending module is used to send the version number of each page module to the back-end database if the writing of each page module is completed.
[0046] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0047] The message modular processing method described in the embodiment of the present application is to load the message, modularize the page content after loading, obtain each page module, determine whether each page module has been written, if the current page module has been written, obtain the written data and cache it to the difference cache area, and set the version number; if each page module has been written, the version number of each page module is sent to the back end for the back end personnel to choose to use the message modular combination. By writing the monitoring component, after each page module is written, the current page module is directly cached, avoiding the unified caching of message data and reducing the amount of single data interaction. By modularizing the message on the front end interface, setting the version number for each module, sending the version number to the back end, the back end generates the message combination through the version number, and modular technology reduces network anomalies and increases service response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0050] Figure 2 A flowchart of an embodiment of a message modular processing method according to the present application;
[0051] Figure 3 and Figure 4 yes Figure 2 A flowchart of a specific implementation of step 203 is shown;
[0052] Figure 5 It is a flowchart of a specific implementation method of distinguishing between first writing and update writing at the writing location in the human-computer interaction interface according to step 2032;
[0053] Figure 6 A flowchart of a specific implementation method of distinguishing between first writing completion and update writing completion at the writing position in the human-computer interaction interface according to step 2032;
[0054] Figure 7 It is a structural schematic diagram of an embodiment of a message modular processing device according to the present application;
[0055] Figure 8 yes Figure 7 703 is a schematic structural diagram of a specific implementation method;
[0056] Fig. 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0058] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0060] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0061] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0062] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0063] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0064] It should be noted that the message modular processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the message modular processing device is generally arranged in the server / terminal device.
[0065] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0066] Continue to refer Figure 2 , shows a flow chart of an embodiment of a message modular processing method according to the present application. The message modular processing method comprises the following steps:
[0067] Step 201, based on the page static loading technology, the template files constituting the message are loaded into the human-computer interaction interface, and the preset first monitoring component is started to read and monitor the human-computer interaction interface to determine whether the template files have been loaded.
[0068] In this embodiment, the step of loading the template files constituting the message into the human-computer interaction interface based on the page static loading technology specifically includes: pre-setting the part with fixed page format and text content in the message as a fixed file; splitting the fixed file according to each function in the business scenario, and splitting it into several template files corresponding to each function one by one; initializing each template file to the human-computer interaction interface through the freemaker loader.
[0069] For different messages, the message data may be updated according to time, version update and other issues, but the basic format composition content is still roughly fixed. For example, for each insurance policy or each electronic contract, no matter how its internal details change, its basic composition text or the content of each item involved in the legal document is basically fixed. Therefore, the part with fixed page format and text content in the message can be used as a fixed file. According to each function in the business scenario, the fixed file is split into several template files corresponding to each function. According to different information or objects to be filled in the message, the fixed file is split into several template files, and the template files are initialized to the human-computer interaction interface through the freemaker loader. Among them, freemaker is a page static loading technology, which can directly load the text content in the template file into the human-computer interaction interface. By splitting the message into template files and loading it with the freemaker loader, modularization is achieved when loading the message content, ensuring that the single data interaction amount is reduced during loading, reducing network anomalies, and increasing the response speed of the loading service.
[0070] In this embodiment, the step of starting the preset first monitoring component to perform read monitoring on the human-computer interaction interface and determining whether the template file has been loaded specifically includes: pre-setting the line number and character number for each line of text in each template file; when loading each template file into the human-computer interaction interface, monitoring the line number and character number of each line of text in the message loaded onto the human-computer interaction interface through the first monitoring component, wherein the first monitoring component can at least complete the read monitoring; if the line number and character number of each line of text in the message on the human-computer interaction interface correspond one-to-one to the line number and character number set for each line of text in each template file, then the loading of each template file is complete.
[0071] By setting the first monitoring component, reading monitoring is performed. At the same time, by setting the line number and text number for each line of text in each template file, after loading is completed, if the line number and text number of each line of text in the message on the human-computer interaction interface correspond one-to-one with the line number and text number set for each line of text in the template files, then the loading of each template file is completed. The line number and the text number of each line are used to ensure that the template file is completely loaded into the interaction interface, and it can be identified whether there is any missing message during loading.
[0072] Step 202 , after loading is complete, the page content rendered to the human-computer interaction interface is modularized to obtain each page module.
[0073] In this embodiment, the page content rendered to the human-computer interaction interface after loading is modularized to obtain each page module, specifically including: partitioning the page content in the human-computer interaction interface based on the template files, and setting a partition identifier for the partition result; using the partition result as each page module, and using the partition identifier corresponding to the partition result as the module identifier of the corresponding page module.
[0074] Based on the template files, the page content is partitioned in the human-computer interaction interface, and a partition identifier is set for the partition result. Specifically, after the template files are loaded, the line number of the first line of text and the line number of the last line of text in a single template file are obtained respectively, and the content between the two line numbers is used as the modularization result; after the modularization results are obtained for the line number of the first line of text and the line number of the last line of text in each template file, the front-end interface modules equal to the number of template files will be obtained.
[0075] The messages displayed on the interactive interface are modularized on the front-end interface, the front-end interface partitions corresponding to different page modules are identified, and partition identifiers are set for each partition. The partition identifiers are used as module identifiers for the corresponding page templates. The messages are modularized on the front-end interface to ensure that when writing messages, each page module is directly determined by the corresponding partitions when writing.
[0076] Step 203: Start the preset second monitoring component to perform write monitoring on the human-computer interaction interface to determine whether the writing of each page module is completed.
[0077] 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 has been written includes: step A: pre-setting a distinguishing number for all write positions in each page module, obtaining a comparison relationship between the module identifier of each page module and the distinguishing number, and setting a first state value and a second state value for the distinguishing number; step B: starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface; step C: if the second monitoring component detects that a write operation is being performed at a write position in the human-computer interaction interface, and its current state value is a first state value, then based on the comparison relationship, the module identifier corresponding to the write position is obtained, and it is determined that the page module corresponding to the write position is performing the first write operation; step D: after the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, then the state value of the write position is updated from the first state value to the second state value, confirming that the first write of the write position is completed, and continuously monitoring the write operation of each write position of the current page module until the second monitoring component detects that the focus is lost at the write position. If the listening component cannot detect a write operation at each write position of the current page module, it is confirmed that the first write of the current page module has been completed; Step E: Repeat steps B and D until the second listening component detects that the status values of all write positions in each page module in the human-computer interaction interface are updated to the second status value, and then it is determined that all page modules have been written, wherein the second listening component can at least complete the write listening; Step F: If the second listening component detects that there is a write position in the human-computer interaction interface that is undergoing a write operation, and its current status value is the second status value, then based on the reference relationship, the module identifier corresponding to the write position is obtained, and it is confirmed that the page module corresponding to the write position is undergoing a write update; Step G: After the write update operation is performed at the write position, if it is detected that the focus is lost at the write position, it is confirmed that the write position update is completed, and the write update operation of each write position of the current page module is continuously monitored until the second listening component cannot detect a write operation at each write position of the current page module, and then it is confirmed that the current page module update is completed.
[0078] The write position in each page module is monitored by the set second monitoring component, and whether it is the first write is determined by the first state value and the second state value. When all pages lose focus, the first write is completed.
[0079] 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 has been written also includes: Step F: If the second monitoring component detects that there is a write location in the human-computer interaction interface that is undergoing a write operation, and its current state value is a second state value, then based on the reference relationship, the module identifier corresponding to the write location is obtained to determine that the page module is undergoing a write update; Step G: If the second monitoring component detects that the write location in the human-computer interaction interface loses focus after a write update operation is performed at the write location, then it is determined that the write location update is completed, until the second monitoring component cannot detect a write operation at each write location of the current page module, then the current page module update is completed.
[0080] The write position in each page module is monitored by the set second monitoring component, and whether it is an update write is determined by the first state value and the second state value. When all pages lose focus, the update write is completed.
[0081] The loss of focus means that the second monitoring component cannot detect the write operation at the write position on the entire interactive interface.
[0082] Continue to refer Figure 3 and Figure 4 , Figure 3 and Figure 4 Together they show Figure 2 The flowchart of a specific implementation of step 203 shown in FIG. 1 includes the steps of:
[0083] Step 2031: pre-set a distinguishing number for all write positions in each page module, obtain a comparison relationship between the module identifier of each page module and the distinguishing number, and set a first state value and a second state value for the distinguishing number.
[0084] Step 2032: Start the preset second monitoring component to perform write monitoring on the human-computer interaction interface.
[0085] Continue to refer Figure 5 , showing a flowchart of a specific implementation method of distinguishing between initial writing and update writing in the writing position in the human-computer interaction interface according to step 2032, including the steps of:
[0086] Step 501, determining whether there is a write location in the human-computer interaction interface where a write operation is being performed;
[0087] Step 502, if there is a write location where a write operation is being performed, determine the state value of the write location;
[0088] Step 503: If the state value of the write position is the first state value, the write position is being written for the first time;
[0089] Step 504: If the state value of the write position is the second state value, the write position is being updated.
[0090] Continue to refer Figure 6 , showing a flowchart of a specific implementation method of distinguishing between initial writing completion and update writing completion of the writing position in the human-computer interaction interface according to step 2032, including the steps of:
[0091] Step 601, determining whether there is a writing position in the human-computer interaction interface and losing focus at the writing position after a writing operation is performed;
[0092] Step 602, if there is a write position where the focus is lost after the write operation is performed, determining a change in the state value of the write position;
[0093] Step 603, if the state value of the write position is converted from the first state value to the second state value, the first writing of the write position is completed;
[0094] Step 604: If the state value of the write position is always at the second state value, the write position update is completed.
[0095] Step 2033: If the second monitoring component detects that there is a write location in the human-computer interaction interface that is undergoing a write operation, and its current state value is the first state value, then based on the comparison relationship, the module identifier corresponding to the write location is obtained to determine that the page module corresponding to the write location is undergoing the first write operation.
[0096] Since the second monitoring component performs write monitoring on the write location, an overall message interface, after being divided into various page modules, may contain multiple write locations in each page module. Therefore, it is necessary to first obtain the distinguishing number of the write location, and then determine the module identifier through the comparison relationship between the write location and the module identifier, so as to determine which module performs the write operation.
[0097] Step 2034: After the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, the status value of the write position is updated from the first status value to the second status value, confirming that the first write to the write position is completed, and continue to monitor the write operations of each write position of the current page module until the second monitoring component can no longer monitor the write operation at each write position of the current page module, then confirming that the first write to the current page module is completed.
[0098] Step 2035: Repeat steps 2032 and 2034 until the second monitoring component detects that the status values of all write positions in each page module in the human-computer interaction interface are updated to the second status value, then it is determined that all page modules have been written, wherein the second monitoring component can at least complete the write monitoring.
[0099] Step 2036: If the second monitoring component detects that a write operation is being performed at a write location in the human-computer interaction interface and its current state value is a second state value, then based on the comparison relationship, the module identifier corresponding to the write location is obtained to confirm that the page module corresponding to the write location is undergoing a write update.
[0100] Step 2037: After performing a write update operation at the write location, if it is detected that the focus is lost at the write location, it is confirmed that the write location update is complete, and the write update operations at each write location of the current page module are continuously monitored until the second monitoring component can no longer monitor the write operation at each write location of the current page module, then it is confirmed that the current page module update is complete.
[0101] Step 204, if the current page module is written, obtain the written data and cache it in the difference cache area, and set the version number.
[0102] In this embodiment, if the current page module is written, the step of obtaining the write data and caching it in the difference cache area, and setting the version number specifically includes: if the current page module is written and it is the first time to write, then the write data is obtained and cached in the difference cache area, and the initial version number is set; if the current page module is written and it is an update, then based on the comparison relationship, the module identifier corresponding to the write position is obtained, the page module that has been written and updated is determined, and the write data of all write positions in the page module after the update is completed is obtained, and it is cached in the difference cache area, and the update version number is set.
[0103] By identifying whether the current page module has been written for the first time or updated, version numbers are set for them respectively, that is, the content corresponding to the initial version number is retained and the content corresponding to the updated version number is also retained, so that the back-end message generator can freely choose and combine different versions of messages.
[0104] Step 205: If all the page modules have been written, the version numbers of the page modules are sent to the backend database.
[0105] By sending the order number and the version number of each page module to the back end, the back end personnel can choose to use the modular combination of messages. When transmitting values from the front end to the back end, the entire message data is avoided from being transmitted. The back end assembler only needs to search and combine through the order number and the version number, and then call the distinguished cache area content on the front end, combine and display the preserved content to the front end interface, so that the message generation personnel at the back end can freely choose and combine different versions of messages. At the same time, the single data interaction amount in the transmission between the front end and the back end is reduced, network anomalies are reduced, and the service response speed is increased.
[0106] In this embodiment, the step of sending the order number and the version number of each page module to the back end also includes: if only a certain page module is updated and written, only the corresponding updated version number after the update is written is sent.
[0107] In this embodiment, the step of sending the version number of each page module to the background database specifically includes: obtaining the module identifier of each page module for integration, and using the integration result as the order number of the message; sending the order number and the version number of each page module to the background database.
[0108] In this embodiment, the module identification of each page module is obtained and integrated. The module identification of each page module can be set to a different value or a different ID, and the algorithm is calculated by a preset algorithm to obtain a string corresponding to the final calculation result as the order number of the message. The above preset algorithm does not specifically refer to a certain algorithm. As long as an algorithm that can obtain a characterization value after calculating multiple characterization elements is within its protection range. The order number of the message is determined by the module identification of each page module, which avoids the previous method of directly manually naming the order number by accumulating and sorting the values when the order number is generated.
[0109] In this embodiment, when the version number of each page module is sent to the backend database, the order number is also sent to the backend.
[0110] In this embodiment, after the order number is obtained based on the module identifier of each page module, the order number is sent together with the version number of each page module when it is sent to the background database. Since the order number is generated based on the module identifier of each page module, even if a page is updated and a new version number is generated, it will not affect the order number.
[0111] This application loads the page content after loading through the message, performs modular processing, obtains each page module, obtains the message number, determines whether each page module has been written, and if the current page module has been written, obtains the written data and caches it to the different cache area, and sets the version number; if each page module has been written, the number and the version number of each page module are sent to the back end for the back end personnel to choose to use the message modular combination. By writing the monitoring component, after each page module is written, the current page module is directly cached, avoiding the unified caching of message data and reducing the amount of single data interaction. By modularizing the message in the front end interface, setting the number for the message, setting the version number for each module, sending the number and version number to the back end, the back end generates the message combination through the number and version number, and modular technology reduces network anomalies and increases service response speed.
[0112] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0113] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0114] For example, in an embodiment of the present application, a neural network learning model in artificial intelligence can be used to process the module identifier of each page module into a single number.
[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0116] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0117] Further references Figure 7 , as a response to the above Figure 2 The present application provides an embodiment of a message modular processing device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0118] like Figure 7 As shown, the message modular processing device 700 described in 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. Among them:
[0119] The loading monitoring module 701 is used to load the template files constituting the message into the human-computer interaction interface based on the page static loading technology, start the preset first monitoring component to read and monitor the human-computer interaction interface, and determine whether the template files have been loaded;
[0120] The page modularization module 702 is used to modularize the page content rendered to the human-computer interaction interface after loading is completed, and obtain each page module;
[0121] A write monitoring module 703 is used to start a preset second monitoring component to perform write monitoring on the human-computer interaction interface to determine whether the writing of each page module is completed;
[0122] The version number setting module 704 is used to obtain the written data and cache it in the difference buffer area if the current page module is written, and set the version number;
[0123] The front-end sending module 705 is used to send the version number of each page module to the back-end database if the writing of each page module is completed.
[0124] See also Figure 8, is a structural diagram of a specific implementation of the write monitoring module, the write monitoring module includes a first write identification submodule 7031 and an update write identification submodule 7032,
[0125] Among them, the first write identification submodule 7031 is used for obtaining the module identifier corresponding to the write position based on the reference relationship if the second monitoring component detects that there is a write operation in progress at a write position in the human-computer interaction interface and its current state value is the first state value, and determining that the page module corresponding to the write position is undergoing the first write operation; it is also used for, after the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, updating the state value of the write position from the first state value to the second state value, confirming that the first write to the write position is completed, and continuously monitoring the write operations of each write position of the current page module until the second monitoring component cannot monitor the write operation at each write position of the current page module, then confirming that the first write to the current page module is completed; it is also used for repeatedly executing the write monitoring module until the second monitoring component monitors that the state values of all write positions in each page module in the human-computer interaction interface are updated to the second state value, then determining that each page module has been written, wherein the second monitoring component can at least complete the write monitoring.
[0126] In this embodiment, the first writing identification submodule 7031 includes: a first writing identification unit, a current page module first writing completion unit and an interactive interface first writing completion unit, wherein:
[0127] The first writing identification unit is used to obtain the module identifier corresponding to the writing position based on the comparison relationship if the second monitoring component detects that a writing operation is being performed at a writing position in the human-computer interaction interface and its current state value is a first state value, and determine that the page module corresponding to the writing position is undergoing the first writing operation.
[0128] The first write completion unit of the current page module is used to update the status value of the write position from the first status value to the second status value after the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, to confirm that the first write to the write position is completed, and continue to monitor the write operations of each write position of the current page module until the second monitoring component can no longer monitor the write operation at each write position of the current page module, then confirming that the first write to the current page module is completed.
[0129] The first writing completion unit of the interactive interface is used to repeatedly execute the write monitoring module until the second monitoring component detects that the status values of all write positions in each page module in the human-computer interaction interface are updated to the second status value, and then it is determined that all page modules have been written, wherein the second monitoring component can at least complete the write monitoring.
[0130] The update write identification submodule 7032 is used to obtain the module identifier corresponding to the write position based on the reference relationship if the second monitoring component detects that a write operation is being performed at a write position in the human-computer interaction interface and its current state value is a second state value, and confirm that the page module corresponding to the write position is undergoing a write update; it is also used to confirm that the write position update is completed if it is detected that the focus is lost at the write position after the write update operation is performed at the write position, and continue to monitor the write update operations of each write position of the current page module until the second monitoring component can no longer detect the write operation at each write position of the current page module, and then confirm that the current page module update is completed.
[0131] In this embodiment, the update writing identification submodule 7032 includes: an updating writing identification unit and an update writing completion identification unit, wherein:
[0132] The updating write identification unit is used to obtain the module identifier corresponding to the write location based on the comparison relationship if the second monitoring component detects that a write operation is being performed at the write location in the human-computer interaction interface and its current state value is the second state value, and confirm that the page module corresponding to the write location is undergoing a write update.
[0133] The update write completion identification unit is used to confirm that the update of the write position is completed if it is detected that the focus is lost at the write position after the write update operation is performed at the write position, and continue to monitor the write update operations of each write position of the current page module until the second monitoring component can no longer monitor the write operation at each write position of the current page module, and then confirm that the update of the current page module is completed.
[0134] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 9 This is a basic structural block diagram of the computer device in this embodiment.
[0135] The computer device 9 includes a memory 91, a processor 92, and a network interface 93 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 9 with components 91-93, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0136] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0137] The memory 91 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 91 can be an internal storage unit of the computer device 9, such as a hard disk or memory of the computer device 9. In other embodiments, the memory 91 can also be an external storage device of the computer device 9, such as a plug-in hard disk equipped on the computer device 9, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 91 can also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 91 is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions of the message modular processing method, etc. In addition, the memory 91 can also be used to temporarily store various types of data that have been output or are to be output.
[0138] The processor 92 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 92 is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 92 is used to run computer-readable instructions stored in the memory 91 or process data, such as computer-readable instructions for running the message modular processing method.
[0139] The network interface 93 may include a wireless network interface or a wired network interface. The network interface 93 is generally used to establish a communication connection between the computer device 9 and other electronic devices.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0141] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A message modular processing method, characterized in that: The steps include: Based on the page static loading technology, each template file constituting the message is loaded into the human-computer interaction interface, and a preset first monitoring component is started to read and monitor the human-computer interaction interface to determine whether each template file has been loaded. The step of starting the preset first monitoring component to read and monitor the human-computer interaction interface to determine whether the template file has been loaded specifically includes: Pre-setting line numbers and character numbers for each line of text in each template file; When each template file is loaded into the human-computer interaction interface, the line number and the character number of each line of text in the message loaded into the human-computer interaction interface are monitored by the first monitoring component, wherein the first monitoring component can at least complete the reading monitoring; If the line number and the character number of each line of text in the message on the human-computer interaction interface correspond one-to-one with the line number and the character number set for each line of text in each template file, then the loading of each template file is complete; After loading is complete, the page content rendered to the human-computer interaction interface is modularized to obtain each page module; The step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether the writing of each page module is completed, wherein the step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface and judging whether the writing of each page module is completed specifically includes: Step A: pre-set a distinguishing number for all write positions in each page module, obtain a comparison relationship between the module identifier of each page module and the distinguishing number, and set a first state value and a second state value for the distinguishing number; Step B: starting the second monitoring component to perform write monitoring on the human-computer interaction interface; Step C: if the second monitoring component detects that a write operation is being performed at a write location in the human-computer interaction interface, and its current state value is the first state value, then based on the comparison relationship, a module identifier corresponding to the write location is obtained to determine that the page module corresponding to the write location is performing the first write operation; Step D: After the write operation is performed at the write position, if it is monitored that the focus is lost at the write position, the state value of the write position is updated from the first state value to the second state value, confirming that the first write to the write position is completed, and continuously monitoring the write operations of each write position of the current page module until the second monitoring component cannot monitor the write operation at each write position of the current page module, then confirming that the first write to the current page module is completed; Step E: Repeat step B and step D until the second monitoring component detects that the state values of all write positions in each page module in the human-computer interaction interface are updated to the second state value, and then it is determined that all page modules have been written. Wherein, the second monitoring component is at least capable of completing write monitoring; If the current page module has been written, obtain the written data and cache it in the difference cache area, and set the version number; If all the page modules are written, the version numbers of the page modules are sent to the backend database.
2. The message modular processing method according to claim 1, characterized in that: The step of loading the template files constituting the message into the human-computer interaction interface based on the page static loading technology specifically includes: Pre-set the part of the message with fixed page format and text content as a fixed file; According to each function in the business scenario, the fixed file is split into a number of template files corresponding to each function; The template files are initialized to the human-computer interaction interface through the freemaker loader.
3. The message modular processing method according to claim 1, characterized in that: The step of performing modular processing on the page content rendered to the human-computer interaction interface after loading to obtain each page module specifically includes: Based on the template files, partition the page content in the human-computer interaction interface, and set partition identifiers for the partition results; The partition results are used as each page module, and the partition identifier corresponding to the partition result is used as the module identifier of the corresponding page module.
4. The message modular processing method according to claim 1, characterized in that: After the step of starting the preset second monitoring component to perform write monitoring on the human-computer interaction interface, the method further includes: Step F: If the second monitoring component detects that a write operation is being performed at a write location in the human-computer interaction interface, and its current state value is a second state value, then based on the comparison relationship, a module identifier corresponding to the write location is obtained to confirm that a page module corresponding to the write location is being written and updated; Step G: After performing a write update operation at the write position, if it is detected that the focus is lost at the write position, it is confirmed that the write position update is completed, and the write update operations of each write position of the current page module are continuously monitored until the second monitoring component can no longer monitor the write operation at each write position of the current page module, then it is confirmed that the current page module update is completed.
5. The message modular processing method according to claim 4, characterized in that: If the current page module is written, the step of obtaining the written data and caching it in the distinguishing cache area, and setting the version number specifically includes: If the current page module has been written and it is the first time to be written, the written data is obtained and cached in a different cache area, and an initial version number is set; If the current page module has been written and updated, the module identifier corresponding to the write position is obtained based on the comparison relationship, the page module that has been written and updated is determined, and the write data of all write positions in the page module after the update is completed is obtained, and cached in the difference cache area, and the update version number is set.
6. The message modular processing method according to claim 3, characterized in that: The step of sending the version number of each page module to the backend database specifically includes: Obtain module identifiers of each page module for integration, and use the integration result as the order number of the message; The order number and the version number of each page module are sent to the backend database.
7. A modular message processing device, characterized in that: The message modular processing device is used to implement the steps of the message modular processing method according to any one of claims 1 to 6, and the message modular processing device includes: A loading monitoring module is used to load the template files constituting the message into the human-computer interaction interface based on the page static loading technology, start the preset first monitoring component to read and monitor the human-computer interaction interface, and determine whether the template files have been loaded; A page modularization module is used to modularize the page content rendered to the human-computer interaction interface after loading is completed, and obtain each page module; A write monitoring module, used 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 is used to obtain the written data and cache it in a different cache area if the current page module has been written, and to set the version number; The front-end sending module is used to send the version number of each page module to the back-end database if the writing of each page module is completed.
8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the message modular processing method according to any one of claims 1 to 6 when executing the computer-readable instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the message modular processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for generating performance test message
CN105812194A
Page template file storage method and device, page generation method and device, equipment and medium
CN112506854A