CN116702714A - Dynamic parameter processing method and device, electronic equipment and storage medium - Google Patents

Dynamic parameter processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116702714A
CN116702714A CN202210173513.7A CN202210173513A CN116702714A CN 116702714 A CN116702714 A CN 116702714A CN 202210173513 A CN202210173513 A CN 202210173513A CN 116702714 A CN116702714 A CN 116702714A
Authority
CN
China
Prior art keywords
markup language
hypertext markup
dynamic
language tag
dynamic parameter
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
CN202210173513.7A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN202210173513.7A priority Critical patent/CN116702714A/en
Publication of CN116702714A publication Critical patent/CN116702714A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/835Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/221Parsing markup language streams
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a dynamic parameter processing method, a device, electronic equipment and a storage medium, wherein the dynamic parameter processing method comprises the following steps: recording a target position in a text editing box; acquiring dynamic parameters recorded in a dynamic parameter bullet frame, and generating a hypertext markup language tag according to the dynamic parameters; the dynamic parameters are included in the hypertext markup language tag; inserting the hypertext markup language tag into the target location. According to the method and the device, the dynamic parameters are input through the dynamic parameter popup frame, the content in the text editing frame is not required to be analyzed after each operation in the process of inputting the dynamic parameters, and resource waste caused by analyzing the content in the text editing frame for many times can be well reduced.

Description

Dynamic parameter processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a dynamic parameter processing method, a device, an electronic device, and a storage medium.
Background
In the big data age, people are more and more exposed to various information channels, and attention is more and more easily dispersed. In business scenarios of various services and products, message triggering (or message pushing) becomes an indispensable loop, and most common message triggering is triggering of a short message, a WeChat subscription notification and the like. In this process, there may be dynamic changes in specific fields, such as client name, gender, etc. in the message, for messages pushed by different client individuals, micro-credit nicknames in the micro-credit subscription notification push, related information of the push subject, such as date, detail links, etc.
Thus, in the prior art, document object model (document object model, DOM) provided document.execcommand () functions are typically used to operate on currently selected content, such as setting the font, size, foreground color, background color, deleting selected text, inserting hypertext markup language (hyper text markup language, HTML) tags, etc. of the selected content. After the user inputs the dynamic parameters of a specific format, namely the specific fields, in the text editing box, a corresponding html tag is inserted by using an insert html () method in the application program interface (application programming interface, API) so as to replace the input dynamic parameter character string, and then a corresponding style and interaction are added to the html tag.
However, in the prior art, in the process of inputting text in a specific format in a text editing box, each time of operations such as inputting, clicking, selecting, etc., an operation of parsing content in the text editing box is triggered, which may consume more resources and cause resource waste.
Disclosure of Invention
The application provides a dynamic parameter processing method, a device, electronic equipment and a storage medium, which are used for solving the problems that in the process of inputting a text in a specific format in a text editing box, each time of operations such as inputting, clicking, selecting and the like, the operation of analyzing the content in the text editing box is triggered, more resources are possibly consumed, and resource waste is caused.
In a first aspect, the present application provides a dynamic parameter processing method, where the dynamic parameter processing method includes:
recording a target position in a text editing box;
acquiring dynamic parameters recorded in a dynamic parameter bullet frame, and generating a hypertext markup language tag according to the dynamic parameters; the dynamic parameters are included in the hypertext markup language tag;
inserting the hypertext markup language tag into the target location.
Optionally, the recording the target position in the text editing box includes:
detecting the position of the selected text in the text editing box, the position of a cursor or the position of the hypertext markup language tag;
recording the position of the selected text, the cursor position or the position of the hypertext markup language tag as a target position in the text editing box.
Optionally, before the acquiring the dynamic parameters entered in the dynamic parameter frame, the method further includes:
and popping up the dynamic parameter popup box when detecting the operation on the target control or the hypertext markup language tag.
Optionally, the generating the hypertext markup language tag according to the dynamic parameter includes:
after detecting the storage operation in the dynamic parameter bullet frame, generating the hypertext markup language tag by the dynamic parameter according to a preset format.
Optionally, the hypertext markup language tag further includes a delete icon, the method further comprising:
detecting an operation of the delete icon in the hypertext markup language tag, deleting a dynamic parameter in the hypertext markup language tag, or deleting the hypertext markup language tag.
Optionally, the method further comprises:
after the form preservation operation is detected, converting the dynamic parameters in the hypertext markup language tag into dynamic parameters in a preset data format;
and storing the dynamic parameters of the preset data format into a form.
Optionally, the method further comprises:
inquiring a stored form according to the received form inquiring request to obtain a target form, wherein the target form is used for storing dynamic parameters in a target hypertext markup language tag in a preset data format;
and generating the target hypertext markup language tag according to the dynamic parameters in the target form.
In a second aspect, the present application provides a dynamic parameter processing apparatus, comprising:
the recording module is used for recording the target position in the text editing box;
the generation module is used for inputting dynamic parameters through a dynamic parameter bullet box, and generating a hypertext markup language tag according to the dynamic parameters after the dynamic parameters are stored; the dynamic parameters are included in the hypertext markup language tag;
and the inserting module is used for inserting the hypertext markup language tag into the target position.
In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the steps of the dynamic parameter processing method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the dynamic parameter processing method according to any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the dynamic parameter processing method provided by the embodiment of the application, the target position in the text editing box is recorded, and the hypertext markup language tag containing the dynamic parameter is generated according to the acquired dynamic parameter recorded in the dynamic parameter box. The hypertext markup language tag is then inserted into the text editing box at the target location. In the process, dynamic parameters are input through the dynamic parameter bullet frame, the content in the text editing frame is not required to be analyzed after each operation in the process of inputting the dynamic parameters, and resource waste caused by analyzing the content in the text editing frame for many times can be well reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a dynamic parameter processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a process for adding dynamic parameters according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a process for editing dynamic parameters according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a process for deleting dynamic parameters according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a procedure for returning content in a text editing box according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process for receiving data returned by a database according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a dynamic parameter processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to solve the problem that more resources are consumed and resource waste is caused because the analysis operation of the content in the text editing box is triggered every time operations such as inputting, clicking and selecting are performed in the process of inputting the text in the specific format in the text editing box, the embodiment of the application provides a dynamic parameter processing method which is applied to any device, and any device can communicate with user equipment. As shown in fig. 1, the dynamic parameter processing method includes steps 101-103:
step 101: the target position in the text edit box is recorded.
Optionally, the position of the selected text in the text editing box, the position of the cursor or the position of the hypertext markup language tag is detected. And recording the position of the selected text, the cursor position or the position of the hypertext markup language tag as the target position in the text editing box. Wherein the target location is the location where the text markup language tag is required.
The hypertext markup language is a markup language and comprises a series of labels, and document formats on a network can be unified through the labels, and scattered internet resources can be connected into a logic whole. Hypertext markup language text is descriptive text composed of Hypertext markup language commands that can describe words, graphics, animations, sounds, forms, links, etc.
That is, the target location in the text edit box may be the location of the selected text, the cursor location, or the location of the hypertext markup language tag.
In one possible implementation, the operation of the selected text, cursor, or hypertext markup language tag in the text editing box is detected before the dynamic parameters are entered via the dynamic parameters box. If the selected text is detected, determining the position of the selected text, and recording the position of the selected text as a target position in a text editing box. If the cursor is detected, determining the position of the cursor, and recording the position of the cursor as the target position in the text editing box. If an operation on the hypertext markup language tag is detected, determining the position of the hypertext markup language tag, and recording the position of the hypertext markup language tag as a target position in a text editing box.
Illustratively, taking a browser environment as an example, detecting the selected text or cursor in the text editing box can be implemented through selection and range. The selection object is used to represent the cursor position, range is used to represent the selected text, and at most one range is saved in the selection. The isCollapsed attribute of the position of the selected text range may be true, that is, the selected text range is folded, where the start point and the end point of the selected text range are located at the same position, and visually displayed as a cursor. At this time, the position of the selected text range may be referred to as a cursor position. Thus, the cursor position included in selection may be the position of the selected text range or the position of the cursor used to insert the symbol.
Wherein range is a sub-module included in the document object model for representing a document snippet containing nodes and a portion of text. Alternatively, the document. CreateRange method may be used to create a Range, or the getRangeAt method of the Selection object may be used to obtain the current Range of the browser.
In addition, selection is a sub-module included in the document object model to represent the text range selected by the user or the current position of the inserted symbol (i.e., cursor). selection represents a text selection region in a page, possibly across multiple tags. The text selection is generated by the user dragging the mouse through the text. Window. Getselection in selection may be used to obtain the current selection object, thereby controlling the current text selection and cursor of the page (i.e., the text editing box interface in the present application).
For example, before the dynamic parameters are entered through the dynamic parameters box, the position of the currently selected text range or the cursor position can be acquired and recorded as the target position through a window. Getselection () method in selection.
Specifically, upon detecting an operation on the text edit box, such as clicking, an operation on a selected text, cursor, or hypertext markup language tag in the text edit box is detected, and the target position in the text edit box is recorded in the same manner as described above.
For example, when an operation such as clicking on a text edit box is detected, the position of the currently selected text range or the cursor position may be acquired and recorded as the target position by a window. Getselect () method in selection. After the dynamic parameters are input through the dynamic parameter bullet frame, the cursor position is restored according to the position or cursor position of the latest acquired selection object, namely the selected text range, so that the hypertext markup language tag generated according to the input dynamic parameters is inserted after the cursor position represented by the selection object.
In one possible implementation, before the dynamic parameters entered in the dynamic parameter box are acquired, the dynamic parameter box is popped up when an operation on the target control or the hypertext markup language tag is detected. That is, the target control is used to trigger an action to pop up the dynamic parameter box.
Specifically, setting a target control in a text editing box, and popping up a dynamic parameter box after detecting an operation such as clicking operation on the target control so as to input dynamic parameters through the dynamic parameter box.
Illustratively, a "add dynamic parameters" button is added to the text editing box, after detecting the clicking operation on the button, the cursor position in the current text editing box is saved using, for example, a selection () function, and a box capable of editing dynamic parameters, i.e., a dynamic parameter box, is popped up.
Specifically, after detecting an operation, such as a click (single click or double click, etc.), on a hypertext markup language tag in a current text editing box, a dynamic parameter box is popped up so as to re-enter a dynamic parameter through the dynamic parameter box, that is, edit (or modify) the dynamic parameter entered in the box through the dynamic parameter box.
In one possible implementation, upon detecting an operation on a target control or a hypertext markup language tag, a target location in a text editing box is recorded. It should be noted that, the recording of the target position in the text editing box and the popping up of the dynamic parameter box may be performed simultaneously, or the recording of the target position in the text editing box may be performed first, and then the popping up of the dynamic parameter box may be performed.
Step 102: and acquiring the dynamic parameters recorded in the dynamic parameter bullet frame, and generating the hypertext markup language tag according to the dynamic parameters.
Optionally, after detecting the save operation in the dynamic parameter bullet frame, generating the hypertext markup language tag with the dynamic parameter according to a preset format. The preset format may be predetermined or determined according to an actual working condition.
Illustratively, when a click operation of a "save" button in the dynamic parameter bullet is detected, a hypertext markup language tag is generated according to a preset format.
In addition, the preset format includes font and text size, foreground color, background color, etc.
In one possible implementation, the dynamic parameters entered in the dynamic parameter box may be default values.
Illustratively, the dynamic parameter represents the gender of the user as an example, and the default gender of the user as an example, and after the dynamic parameter box is popped up, the default value of the dynamic parameter, such as "woman", is directly entered in the dynamic parameter box.
It should be noted that, after the dynamic parameters are input through the dynamic parameter bullet frame and the save operation in the dynamic parameter frame is detected, the hypertext markup language tag with the preset format can be directly generated according to the dynamic parameters input in the dynamic parameter frame, so that the user is prevented from memorizing and manually inputting the dynamic parameters with the preset format, the interface interaction threshold is reduced, and the user experience is improved. In addition, according to the dynamic parameters recorded in the dynamic parameter frame, the hypertext markup language tag with the preset format is directly generated, the requirement on the format of the recorded dynamic parameters is eliminated, and therefore dependence on document.execCommand functions during recording the dynamic parameters is eliminated, the problem that the compatibility of a method for recording the dynamic parameters with the preset format by using the document.execCommand functions is poor is solved, and the adaptation degree and compatibility between the method for recording the dynamic parameters and each browser are improved.
In the process, the dynamic parameters are recorded through the popped dynamic parameter popup frame, so that each operation in the text editing frame is not required to be monitored, a large amount of calculation performance is saved, and throttling problems and experience problems caused by the process are not required. In addition, in the prior art, since each operation in the text editing box needs to be monitored, in a service scene of continuously inputting a large number of characters, user input needs to be performed for anti-shake processing, and the problem that interface response is not timely enough and user experience is poor may occur. In the application, however, the dynamic parameters are input through the popped dynamic parameter popup frame, so that monitoring of each operation in the text editing frame is not needed in a service scene of continuously inputting a large number of characters, thereby reducing the response time of the interface and improving the user experience.
Step 103: a hypertext markup language tag is inserted into the target location.
The description of the target position may be referred to above, and will not be described herein.
Through the process, the cursor position is recorded, and the dynamic parameters input through the dynamic parameter bullet frame are obtained. A hypertext markup language tag including the dynamic parameter is then generated from the dynamic parameter, inserting the previously recorded cursor position. Finally, the functions of editing the dynamic parameters and the like can be realized by controlling the hypertext markup language tag (or the dynamic parameter tag), for example, clicking the hypertext markup language tag to pop up the corresponding dynamic parameter popup frame.
That is, the processing of the cursor in the text editing box in the present application includes: acquiring (or detecting) and recording the cursor position in the text editing box before inserting the hypertext markup language label corresponding to the dynamic parameter; refocusing the text editing box and restoring the cursor position after the dynamic parameters are input through the dynamic parameter bullet box, namely inserting the hypertext markup language tag generated according to the input dynamic parameters into the cursor position.
By the above process, the dynamic parameters are input through the dynamic parameter popup frame, so that the content in the text editing frame is not required to be analyzed after each operation in the process of inputting the dynamic parameters, and the resource waste caused by analyzing the content in the text editing frame for many times can be well reduced.
In one possible implementation, the hypertext markup language tag further includes a delete icon. At this time, after inserting the hypertext markup language tag into the target position, if an operation to delete the icon in the hypertext markup language tag is detected, a dynamic parameter in the hypertext markup language tag is deleted, or the hypertext markup language tag is deleted.
Illustratively, the < span > element is dynamically created using a document. A cascading style sheet (cascading style sheets, CSS) class name is then added to the < span > element to facilitate setting the < span > element style (i.e., appearance, e.g., shape, size) and a dataset attribute is set for the < span > element to facilitate extracting dynamic parameters in the tag when the tag is subsequently parsed by the regular expression of the hypertext markup language tag in which the < span > element is located. Wherein the < span > element is used to add a delete icon to the hypertext markup language tag to facilitate subsequent implementation of the delete function of the hypertext markup language tag via the delete icon.
Note that, the cascading style sheet is a computer language for representing document styles such as hypertext markup language or extensible markup language (extensible markup language, XML). The web page may be modified statically or dynamically to format the elements of the web page. The document object model is an application program interface for hypertext markup language and extensible markup language documents, depicting a hierarchical tree of nodes that allows developers to add, remove, and modify portions of pages. An extensible markup language, a subset of the standard generic markup language, is a markup language used to mark electronic files to be structured. An application program interface is a convention in which different components in a software system are joined, and other application programs or developers can access or acquire related data or functions based on certain software or hardware without knowing the details of their internal working mechanisms.
Illustratively, an operation to delete an icon in the hypertext markup language tag is detected, such as a click, deleting a word in a dynamic parameter in the hypertext markup language tag (e.g., deleting a "color" in "black"), or deleting the entire hypertext markup language tag.
That is, the processing of the hypertext markup language tag containing dynamic parameters in the text editing box includes: after the dynamic parameters input by the dynamic parameter bullet frame are acquired, inserting a hypertext markup language tag with a preset format and containing the dynamic parameters into the recorded cursor position; after detecting that the hypertext markup language tag is operated, popping up a dynamic parameter bullet frame; after the dynamic parameter editing in the dynamic parameter bullet frame is detected, the hypertext markup language tag is updated according to the edited dynamic parameter; an operation to delete an icon in a hypertext markup language tag, delete the hypertext markup language tag, or delete a dynamic parameter in the hypertext markup language tag is detected.
In one possible implementation, after inserting the hypertext markup language tag into the target location, after detecting the form save operation, the dynamic parameters in the hypertext markup language tag are converted into dynamic parameters in a preset data format, and then the dynamic parameters in the preset data format are saved into the form. The description of the forms may be found in the prior art and will not be described in detail herein.
Specifically, detecting an operation of the form save control, such as clicking, determines that the form save operation is detected. That is, the form save control is used to trigger a form save operation.
That is, the front end converts the contents of the text edit box containing the hypertext markup language tag of the dynamic parameter into data conforming to the document format of the background interface and sends (or otherwise passes back) the data to the background for the background to store the received data. Included in this data are dynamic parameters in the hypertext markup language tag.
Illustratively, the contents of the text edit box containing the hypertext markup language tag of the dynamic parameter are converted by a regular expression into data conforming to the background interface document format. Among them, regular expression (regular expression) is a concept of computer science, and is commonly used to search for and replace text conforming to a certain pattern or rule, and many programming languages support string operations using regular expressions.
In one possible implementation, the stored form is queried according to the received form query request to obtain the target form. The target form is used for storing dynamic parameters in the target hypertext markup language tag in a preset data format. And generating the target hypertext markup language tag according to the dynamic parameters in the target form. The preset data format may be predetermined or determined according to an actual working condition.
By way of example, the preset data format may be "name-xx", "date-2021.11.24", or the like. That is, the preset data format includes a dynamic parameter name and a value of the dynamic parameter.
The preset data format may be a table, for example.
That is, the background queries the corresponding form according to the received form query request sent by the front end, and returns the data stored in the form, i.e. the dynamic parameters, to the front end, i.e. returns the hypertext markup language tag containing the dynamic parameters to the front end. The front end then renders the received hypertext markup language tag containing the dynamic parameters to display the hypertext markup language tag normally.
Illustratively, the dynamic parameters stored in the target form are converted into target hypertext markup language tags through a regular expression, or the target hypertext markup language tags are generated according to the dynamic parameters in the target form. The description of the regular expression can be found in the above, and will not be described in detail herein.
When the content information of the text editor is returned to the background, the regular expression is used for replacing the hypertext markup language tag part in the content of the editing box, namely the dynamic parameters in the tag, with the data format required by the background. Similarly, when the form information is received from the background, the regular expression can be used for analyzing dynamic parameters in the form information into the hypertext markup language tag required to be displayed by the text editing box.
It should be noted that the front end may be, for example, a display interface, and the background is the database, that is, the front end and the background are located on the same device. Of course, the front end and the back end may be provided on different devices according to different needs.
In one possible implementation manner, after the form data is stored, a notification message can be generated by combining the dynamic parameters stored in the form data and the fixed text, and the notification message is sent to the user equipment corresponding to the dynamic parameters, so as to realize message access.
By way of example, the notification message may be, for example, "esteem xx lady, your good, your number xxxxxxxxxxx … …". Where "xx" and "xxxxxxxxxx" are dynamic parameters mentioned in the present application, and the rest of the text in the message is the above-mentioned fixed text.
In one possible implementation, according to the received form query request, the relevant dynamic parameters are queried to look up the dynamic parameters, so as to ensure the accuracy of the dynamic parameters stored in the form, and in case of errors of the stored dynamic parameters, the erroneous dynamic parameters are adjusted in time.
For example, as shown in fig. 2, the process of adding the dynamic parameters may detect the operation on the target control, record the cursor position, and pop up the newly built dynamic parameter bullet frame. And then, recording dynamic parameters in a dynamic parameter bullet frame, and detecting a save operation. And finally, after the storage operation is detected, determining that the dynamic parameter is input, closing the dynamic parameter bullet frame, generating a hypertext markup language tag according to the input dynamic parameter, and inserting the hypertext markup language tag into the recorded cursor position.
For example, the process of editing dynamic parameters may pop up a dynamic parameter box after detecting an operation (e.g., click) on a hypertext markup language tag, as shown in fig. 3. Then, the original dynamic parameters are edited in the dynamic parameter bullet frame, and the preservation operation is detected. And finally, after the storage operation is detected, determining that the dynamic parameter editing is completed, closing the dynamic parameter bullet frame, and updating the hypertext markup language tag according to the edited dynamic parameter.
For example, the process of deleting a dynamic parameter may delete a hypertext markup language tag after detecting an operation (e.g., clicking) on a delete icon in the hypertext markup language tag as illustrated in fig. 4.
For example, as shown in fig. 5, the process of returning the content in the text editing box may detect the operation of the form saving control in the text editing box, and replace the hypertext markup language tag containing the dynamic parameter in the content in the text editing box with the data format required by the database, that is, the preset data format. Then, a save interface is called, and the content in the replaced text editing box is returned. Finally, form related data is saved by a database. Wherein the form related data includes dynamic parameters in a hypertext markup language tag in the content in the text editing box.
Illustratively, the process of receiving the data returned by the database may be as shown in fig. 6, and the form that has submitted the data, i.e., the form stored in the database, may be re-opened. Then, the form information query interface is called to query the form related data, and the database returns the queried form related data. Finally, the regular expression is used to replace dynamic parameters in the database return data with the hypertext markup language tag and re-render the content in the text editing box to display the hypertext markup language tag.
As shown in fig. 7, an embodiment of the present application provides a dynamic parameter processing apparatus, which includes a recording module 701, a generating module 702, and an inserting module 703.
The recording module 701 is configured to record a target position in the text editing box.
The generation module 702 is configured to obtain a dynamic parameter entered in a dynamic parameter bullet frame, and generate a hypertext markup language tag according to the dynamic parameter; the dynamic parameters are included in the hypertext markup language tag.
An inserting module 703, configured to insert the hypertext markup language tag into the target location.
As shown in fig. 8, an embodiment of the present application provides an electronic device including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
in one embodiment of the present application, the processor 801 is configured to implement the steps of the dynamic parameter processing method provided in any one of the foregoing method embodiments when executing the program stored in the memory 803.
The embodiment of the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the dynamic parameter processing method provided in any one of the method embodiments described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of dynamic parameter processing, the method comprising:
recording a target position in a text editing box;
acquiring dynamic parameters recorded in a dynamic parameter bullet frame, and generating a hypertext markup language tag according to the dynamic parameters; the dynamic parameters are included in the hypertext markup language tag;
inserting the hypertext markup language tag into the target location.
2. The dynamic parameter processing method according to claim 1, wherein recording the target position in the text editing box comprises:
detecting the position of the selected text in the text editing box, the position of a cursor or the position of the hypertext markup language tag;
recording the position of the selected text, the cursor position or the position of the hypertext markup language tag as a target position in the text editing box.
3. The dynamic parameter processing method according to claim 1, wherein before the acquiring the dynamic parameters entered in the dynamic parameter frame, the method further comprises:
and popping up the dynamic parameter popup box when detecting the operation on the target control or the hypertext markup language tag.
4. The method of claim 1, wherein generating a hypertext markup language tag based on the dynamic parameter comprises:
after detecting the storage operation in the dynamic parameter bullet frame, generating the hypertext markup language tag by the dynamic parameter according to a preset format.
5. The dynamic parameter processing method of claim 1, wherein the hypertext markup language tag further comprises a delete icon, the method further comprising:
detecting an operation of the delete icon in the hypertext markup language tag, deleting a dynamic parameter in the hypertext markup language tag, or deleting the hypertext markup language tag.
6. The dynamic parameter processing method according to claim 1, characterized in that the method further comprises:
after the form preservation operation is detected, converting the dynamic parameters in the hypertext markup language tag into dynamic parameters in a preset data format;
and storing the dynamic parameters of the preset data format into a form.
7. The dynamic parameter processing method according to any one of claims 1 to 6, characterized in that the method further comprises:
inquiring a stored form according to the received form inquiring request to obtain a target form, wherein the target form is used for storing dynamic parameters in a target hypertext markup language tag in a preset data format;
and generating the target hypertext markup language tag according to the dynamic parameters in the target form.
8. A dynamic parameter processing apparatus, the apparatus comprising:
the recording module is used for recording the target position in the text editing box;
the generation module is used for acquiring dynamic parameters recorded in the dynamic parameter bullet frame and generating a hypertext markup language tag according to the dynamic parameters; the dynamic parameters are included in the hypertext markup language tag;
and the inserting module is used for inserting the hypertext markup language tag into the target position.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the dynamic parameter processing method according to any one of claims 1 to 7 when executing a program stored on a memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the dynamic parameter processing method according to any one of claims 1-7.
CN202210173513.7A 2022-02-24 2022-02-24 Dynamic parameter processing method and device, electronic equipment and storage medium Pending CN116702714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210173513.7A CN116702714A (en) 2022-02-24 2022-02-24 Dynamic parameter processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210173513.7A CN116702714A (en) 2022-02-24 2022-02-24 Dynamic parameter processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116702714A true CN116702714A (en) 2023-09-05

Family

ID=87838008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210173513.7A Pending CN116702714A (en) 2022-02-24 2022-02-24 Dynamic parameter processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116702714A (en)

Similar Documents

Publication Publication Date Title
US10706091B2 (en) User driven computerized selection, categorization, and layout of live content components
US10067931B2 (en) Analysis of documents using rules
US10318628B2 (en) System and method for creation of templates
EP1920350B1 (en) Markup based extensibility for user interfaces
CN106682219B (en) Associated document acquisition method and device
US7721195B2 (en) RTF template and XSL/FO conversion: a new way to create computer reports
US7428699B1 (en) Configurable representation of structured data
US9122664B2 (en) Method for automatically creating transforms
US20090019386A1 (en) Extraction and reapplication of design information to existing websites
CN108762743B (en) Data table operation code generation method and device
KR20040077530A (en) Method and system for enhancing paste functionality of a computer software application
CN112527291A (en) Webpage generation method and device, electronic equipment and storage medium
US20090083300A1 (en) Document processing device and document processing method
US20130124969A1 (en) Xml editor within a wysiwyg application
CN115309298A (en) Text structuring method and device, medium and equipment based on rich text editor
EP1830274A1 (en) Server device and name space issuing method
US20080005085A1 (en) Server Device and Search Method
US7936356B2 (en) Information processing method for information registration, and information processing method for information retrieval
CN116702714A (en) Dynamic parameter processing method and device, electronic equipment and storage medium
US20090083620A1 (en) Document processing device and document processing method
JP5476867B2 (en) Mashup program, mashup device, and mashup method
CN116955289A (en) File processing method and device, electronic equipment and storage medium
CN117389538A (en) Page component content development method, device, equipment and storage medium
CN115422433A (en) Page query method, page query device and storage medium
Cui et al. XML structure graphic display based on JSmind

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