CN115080898A - View updating method, device, equipment and medium based on front-end trigger scene - Google Patents

View updating method, device, equipment and medium based on front-end trigger scene Download PDF

Info

Publication number
CN115080898A
CN115080898A CN202210820087.1A CN202210820087A CN115080898A CN 115080898 A CN115080898 A CN 115080898A CN 202210820087 A CN202210820087 A CN 202210820087A CN 115080898 A CN115080898 A CN 115080898A
Authority
CN
China
Prior art keywords
trigger
program
area
variable
memory value
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
CN202210820087.1A
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202210820087.1A priority Critical patent/CN115080898A/en
Publication of CN115080898A publication Critical patent/CN115080898A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a computer technology, and discloses a view updating method based on a front-end trigger scene, which comprises the following steps: constructing a virtual view according to placeholders at program variables and program logic; analyzing to obtain a program trigger area and area logic of the program trigger request, and extracting a trigger variable memory value according to the program trigger area; executing the regional logic on the trigger variable memory value, and updating the trigger variable memory value in the memory according to the execution result to obtain an updated variable memory value; searching in the virtual view by using the program trigger area to obtain a corresponding incidence relation, and calculating according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area; and updating the virtual view according to the memory value of the associated area, and displaying the updated virtual view at the front end. The invention also provides a view updating device, equipment and medium based on the front-end trigger scene. The invention can reduce the volume of the level code when the view is updated, and save the memory space and the running performance.

Description

View updating method, device, equipment and medium based on front-end trigger scene
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for updating a view based on a front-end triggered scene, an electronic device, and a computer-readable storage medium.
Background
In the prior art, after a trigger event is received by display content in a view layer, related variables are often extracted from a memory through the trigger event, and then program logic is executed to obtain a result caused by the trigger event, the memory is updated by using the result, and the memory calls an updated view through an API (application programming interface) to update the view. However, this view update method requires an update view to be called every time an update is performed, and increases the volume of the level code, wastes memory space, and runs performance.
Disclosure of Invention
The invention provides a view updating method and device based on a front-end trigger scene and a computer readable storage medium, and mainly aims to solve the problems of increasing the size of a level code, wasting memory space and operating performance during view updating.
In order to achieve the above object, the method for updating a view based on a front-end triggered scene provided by the present invention includes:
setting a placeholder at a program variable, and constructing a virtual view according to the placeholder and preset program logic;
receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
executing the region logic on the trigger variable memory value to obtain a logic result, and updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value;
searching in the virtual view by using the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and updating the virtual view by using the memory value of the associated area to obtain an updated virtual view, and performing front-end display on the updated virtual view.
Optionally, the constructing a virtual view according to the placeholder and preset program logic includes:
traversing in a preset program according to the placeholder to obtain a plurality of target program variables;
storing a plurality of target program variables in a preset virtual view in a memory;
acquiring view association areas and variable association relations of a plurality of target program variables;
and correspondingly storing the view association area and the variable association relation at a target program variable in the preset virtual view to obtain a virtual view.
Optionally, the analyzing the program trigger request to obtain a program trigger area and an area logic includes:
extracting a data type field of the program trigger request;
selecting an analyzer corresponding to the data type field to analyze the program triggering request to obtain analysis data;
extracting data of a preset position in the analysis data as a program trigger area;
and extracting a program trigger variable according to the program trigger area, traversing in a preset program according to the program trigger variable to obtain a variable execution logic, and taking the variable execution logic as an area logic.
Optionally, the extracting a memory value of a trigger variable according to the program trigger area includes:
extracting variable attributes of the program trigger area, and extracting program trigger variables from the preset program according to the variable attributes;
and extracting the trigger variable memory value from a preset memory according to the program trigger variable.
Optionally, the updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value includes:
acquiring a corresponding trigger variable in the preset memory according to the trigger variable memory value;
and covering the value corresponding to the trigger variable by using the logic result to obtain the memory value of the updated variable in the memory.
Optionally, the performing logic calculation according to the association relationship and the updated variable memory value to obtain an associated area memory value includes:
extracting the associated variable memory value related to the association relation from a preset memory;
acquiring a correlation area corresponding to the correlation variable memory value and the updated variable memory value;
and calculating the associated variable memory value and the updated variable memory value according to the association relation, and taking the calculation result as the associated area memory value corresponding to the associated area.
Optionally, the performing front-end display on the updated virtual view includes:
converting the updated virtual view into html code, and adding CSS attributes;
and packaging and sending the html codes with the CSS attributes to a front-end page, and analyzing and rendering the html codes by the front-end page to display the html codes.
In order to solve the above problem, the present invention further provides a view updating apparatus based on a front-end triggered scene, the apparatus including:
the virtual view building module is used for setting placeholders at program variables and building a virtual view according to the placeholders and preset program logic;
the program trigger request processing module is used for receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
a variable memory updating module, configured to execute the region logic on the trigger variable memory value to obtain a logic result, and update the trigger variable memory value in a memory according to the logic result to obtain an updated variable memory value;
the virtual view processing module is used for searching in the virtual view by utilizing the program trigger area to obtain an incidence relation corresponding to the program trigger area, and carrying out logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and the view updating module is used for updating the virtual view by using the memory value in the associated area to obtain an updated virtual view and performing front-end display on the updated virtual view.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method for front-end trigger scene based view update as described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the method for updating a view based on a front-end triggered scene described above.
The embodiment of the invention realizes the updating of the virtual view by constructing the virtual view and intercepting and updating the memory variables, and then completes the updating of the view at the front end without depending on the variables evolved by other variables in the program too much and storing the variables in the memory, thereby reducing the volume of program codes and saving the memory space; when the view is updated, only the area variables related to the change in the virtual view are processed, and all the area variables do not need to be processed each time of updating, so that the running performance is improved, and the processing time is saved. Therefore, the view updating method, the view updating device, the electronic equipment and the computer readable storage medium based on the front-end trigger scene, which are provided by the invention, can solve the problems of increasing the size of a level code, wasting a memory space and operating performance during view updating.
Drawings
Fig. 1 is a schematic flowchart of a view updating method based on a front-end triggered scene according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of building a virtual view according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of performing logic calculation according to the association relationship and the updated variable memory value according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a view updating apparatus based on a front-end triggered scenario according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the view updating method based on a front-end triggered scene according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a view updating method based on a front-end trigger scene. The executing body of the view updating method based on the front-end trigger scene includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the view updating method based on the front-end trigger scene may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a view updating method based on a front-end triggered scene according to an embodiment of the present invention. In this embodiment, the method for updating a view based on a front-end triggered scene includes:
s1, setting placeholders at program variables, and constructing a virtual view according to the placeholders and preset program logic.
In the embodiment of the present invention, a plurality of types of codes exist in a program corresponding to a view, and the codes may be used to change data content, where a program code that dynamically changes may be used as a program variable, a program code that cannot generate dynamic changes may be used as an unrelated code, and a placeholder is set for the program variable, so that identification of the program variable corresponding to the view may be implemented, where the placeholder may be set to "/" { } "or the like.
In the embodiment of the invention, the program variables correspond to a certain view area in the view, the variable area of the view area can be further determined by identifying the placeholder, and a dynamically changeable virtual view is formed, and the virtual view is used for describing the association relationship between the program variables and the view area.
Specifically, the virtual view may exist in a preset interceptor, and is used to generate a corresponding virtual view according to a program variable; the interceptors may be stored in memory to reduce the volume of the level code.
In an embodiment of the present invention, referring to fig. 2, the constructing a virtual view according to the placeholder and preset program logic includes:
s21, traversing in a preset program according to the placeholder to obtain a plurality of target program variables;
s22, storing the target program variables in a preset virtual view in a memory;
s23, acquiring view association areas and variable association relations of a plurality of target program variables;
and S24, correspondingly storing the view association area and the variable association relation at a target program variable in the preset virtual view to obtain a virtual view.
In the embodiment of the present invention, each target program variable in the virtual view is stored separately, where the target program variable includes a view association area and a variable association relationship, the view association area refers to a specific area position in the front end view, and the variable association relationship is an association, such as addition or subtraction, between the target program variable and other target program variables.
And S2, receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area.
In the embodiment of the present invention, the program trigger request is sent by the front end, for example, when the front end detects a capacitance change of a screen area, a click signal is received, the click area is determined as a program trigger area, and a corresponding program variable and a corresponding area logic are called according to the program trigger area to generate the program trigger request.
In this embodiment of the present invention, the analyzing the program trigger request to obtain a program trigger area and an area logic includes:
splitting the program trigger request into a request header and a request body;
analyzing the request body to obtain a program triggering area;
and tracing the information of the request header to obtain the region logic corresponding to the program trigger region.
In the embodiment of the present invention, a pre-obtained parser may be used to parse the request body to obtain the identity token included in the target request, where the parser includes CarakanC/C + +, squirrel fisherc + +, squirrel fisherxtremc + +, and the like.
In this embodiment of the present invention, the tracing information to the request header to obtain the area logic corresponding to the program trigger area includes:
identifying a request header data class in the program trigger request;
performing reflection operation on the request head data class to obtain a request head method;
constructing a request head extraction statement according to the request head method;
executing the request header extraction statement to extract a request message header in the access request;
and analyzing the message header to obtain the regional logic.
In detail, in the embodiment of the present invention, the request header data class in the program trigger request is determined by traversing the program trigger request, and the request header is subjected to information tracing according to the request body data class, where the request header data class is used to implement the program trigger request, and the request header method can be obtained by performing a reflection operation on the request header data class.
Specifically, the request header data class is subjected to a reflection operation to obtain a request header method, for example, the following java statements are used to perform a reflection operation on the request header data class:
Stringname="Hualing";Classc1=name.getClass();System.out.println(c1.getName())。
wherein "healing" is the request header data class.
And after the request head data class is subjected to reflection operation, the request head method can be obtained. Illustratively, the following request header extraction statements may be constructed according to the request header method:
String name=field.getName()。
in another optional embodiment of the present invention, the parsing the program trigger request to obtain a program trigger area and an area logic includes:
extracting a data type field of the program trigger request;
selecting an analyzer corresponding to the data type field to analyze the program triggering request to obtain analysis data;
extracting data of a preset position in the analysis data as a program trigger area;
and extracting a program trigger variable according to the program trigger area, traversing in a preset program according to the program trigger variable to obtain a variable execution logic, and taking the variable execution logic as an area logic.
In detail, the data type field is a field for identifying the type of data in the login request, the data type field of the program trigger request can be extracted by using a pre-constructed regular expression, and the regular expression is a function which is compiled in advance and can recall data in a fixed format.
In the embodiment of the present invention, the data obtained by analyzing with the analyzer includes data corresponding to the program trigger area, and the position of the data in the analyzed data may be fixed at a predetermined position.
In the embodiment of the present invention, the program trigger area may have an associated attribute with a program trigger variable.
In an embodiment of the present invention, the extracting a trigger variable memory value according to the program trigger area includes:
extracting variable attributes of the program trigger area, and extracting program trigger variables from a preset program according to the variable attributes;
and extracting the trigger variable memory value from a preset memory according to the program trigger variable.
S3, executing the region logic on the trigger variable memory value to obtain a logic result, and updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value.
In the embodiment of the present invention, the area logic is executed on the trigger variable memory value, that is, the area logic is calculated according to a logic rule or an operation rule corresponding to the area logic, for example, if the area logic is x ═ 2, then an obtained logic result is 2.
In this embodiment of the present invention, the updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value includes:
acquiring a corresponding trigger variable in a preset memory according to the trigger variable memory value;
and covering the value corresponding to the trigger variable by using the logic result to obtain the memory value of the updated variable in the memory.
In the embodiment of the invention, the virtual view in the memory executes the updating operation by updating the variable memory value in the memory.
And S4, retrieving in the virtual view by using the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area.
In the embodiment of the invention, the program variable and the view area in the virtual view have an association relationship, namely the program variable and the view area exist in association, so that the corresponding variable association relationship can be obtained by directly searching in a preset association relationship table according to the program trigger area.
In the embodiment of the present invention, the association relationship may be a logical relationship, an operation relationship, or the like.
In the embodiment of the present invention, referring to fig. 3, the performing a logic calculation according to the association relationship and the updated variable memory value to obtain an associated area memory value includes:
s31, extracting the memory value of the associated variable related to the association relation from a preset memory;
s32, acquiring the associated variable memory value and the associated area corresponding to the updated variable memory value;
and S33, calculating the memory value of the associated variable and the memory value of the updated variable according to the association relationship, and taking the calculation result as the memory value of the associated area corresponding to the associated area.
For example, the area a and the area C are related areas, the relation between the area a and the area C is a ═ x, and C ═ x + y, where x and y are memory values, and the memory values are further calculated through the relation, so that the area values can be obtained.
And S5, updating the virtual view by using the memory value in the associated area to obtain an updated virtual view, and performing front-end display on the updated virtual view.
In the embodiment of the present invention, after the memory value of the association area is obtained, the memory value of the association area may be directly covered in the corresponding association area of the virtual view, so as to obtain the updated virtual view.
In this embodiment of the present invention, the performing front-end display on the updated virtual view includes:
converting the updated virtual view into html code, and adding CSS attributes;
and packaging and sending the html codes with the CSS attributes to a front-end page, and analyzing and rendering the html codes by the front-end page to display the html codes.
In the embodiment of the invention, the updating of the front end view can be realized after the front end page analyzes and displays the updated virtual view, and through the processing process of the virtual view, multivariable evolution is not needed in a program, only the variables which have the incidence relation with the trigger variables are processed, and the performance of view updating is improved.
The embodiment of the invention realizes the updating of the virtual view by constructing the virtual view and intercepting and updating the memory variables, and then completes the updating of the view at the front end without depending on the variables evolved by other variables in the program too much and storing the variables in the memory, thereby reducing the volume of program codes and saving the memory space; when the view is updated, only the area variables related to the change in the virtual view are processed, and all the area variables do not need to be processed each time the view is updated, so that the running performance is improved, and the processing time is saved. Therefore, the view updating method based on the front-end trigger scene can solve the problems of increasing the volume of the level code, wasting the memory space and operating performance during view updating.
Fig. 4 is a functional block diagram of a view updating apparatus based on a front-end trigger scenario according to an embodiment of the present invention.
The view updating apparatus 100 based on the front-end triggered scene according to the present invention can be installed in an electronic device. According to the implemented functions, the view updating apparatus 100 based on the front-end trigger scene may include a virtual view constructing module 101, a program trigger request processing module 102, a variable memory updating module 103, a virtual view processing module 104, and a view updating module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the virtual view building module 101 is configured to set a placeholder at a program variable, and build a virtual view according to the placeholder and preset program logic;
the program trigger request processing module 102 is configured to receive a program trigger request, parse the program trigger request to obtain a program trigger area and an area logic, and extract a trigger variable memory value according to the program trigger area;
the variable memory updating module 103 is configured to execute the area logic on the trigger variable memory value to obtain a logic result, and update the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value;
the virtual view processing module 104 is configured to retrieve the virtual view by using the program trigger area to obtain an association relationship corresponding to the program trigger area, and perform logical calculation according to the association relationship and the updated variable memory value to obtain an associated area memory value;
the view updating module 105 is configured to update the virtual view by using the memory value in the associated area to obtain an updated virtual view, and perform front-end display on the updated virtual view.
In detail, when the modules in the view updating apparatus 100 based on the front-end triggered scene according to the embodiment of the present invention are used, the same technical means as the view updating method based on the front-end triggered scene described in fig. 1 to fig. 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a view updating method based on a front-end trigger scene according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a front-end triggered scene based view update program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a view update program based on a front-end triggered scene, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a view update program based on a front-end triggered scene, but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The view update program stored in the memory 11 of the electronic device 1 based on the front-end trigger scene is a combination of a plurality of instructions, and when running in the processor 10, can realize:
setting a placeholder at a program variable, and constructing a virtual view according to the placeholder and preset program logic;
receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
executing the region logic on the trigger variable memory value to obtain a logic result, and updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value;
searching in the virtual view by using the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and updating the virtual view by using the memory value of the associated area to obtain an updated virtual view, and performing front-end display on the updated virtual view.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor of an electronic device, implements:
setting a placeholder at a program variable, and constructing a virtual view according to the placeholder and preset program logic;
receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
executing the region logic on the trigger variable memory value to obtain a logic result, and updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value;
searching in the virtual view by using the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and updating the virtual view by using the memory value of the associated area to obtain an updated virtual view, and performing front-end display on the updated virtual view.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the same, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for updating a view based on a front-end trigger scene, the method comprising:
setting a placeholder at a program variable, and constructing a virtual view according to the placeholder and preset program logic;
receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
executing the region logic on the trigger variable memory value to obtain a logic result, and updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value;
searching in the virtual view by using the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and updating the virtual view by using the memory value of the associated area to obtain an updated virtual view, and performing front-end display on the updated virtual view.
2. The front-end trigger scene based view updating method as claimed in claim 1, wherein the constructing a virtual view according to the placeholder and preset program logic comprises:
traversing in a preset program according to the placeholder to obtain a plurality of target program variables;
storing a plurality of target program variables in a preset virtual view in a memory;
acquiring view association areas and variable association relations of a plurality of target program variables;
and correspondingly storing the view association area and the variable association relation at a target program variable in the preset virtual view to obtain a virtual view.
3. The front-end trigger scene based view updating method as claimed in claim 1, wherein said parsing said program trigger request to obtain a program trigger area and an area logic comprises:
extracting a data type field of the program trigger request;
selecting an analyzer corresponding to the data type field to analyze the program triggering request to obtain analysis data;
extracting data of a preset position in the analysis data as a program trigger area;
and extracting a program trigger variable according to the program trigger area, traversing in a preset program according to the program trigger variable to obtain a variable execution logic, and taking the variable execution logic as an area logic.
4. The front-end trigger scene based view updating method as claimed in claim 3, wherein said extracting trigger variable memory values according to said program trigger area comprises:
extracting variable attributes of the program trigger area, and extracting program trigger variables from the preset program according to the variable attributes;
and extracting the trigger variable memory value from a preset memory according to the program trigger variable.
5. The front-end trigger scene based view updating method according to claim 4, wherein the updating the trigger variable memory value in the memory according to the logic result to obtain an updated variable memory value comprises:
acquiring a corresponding trigger variable in the preset memory according to the trigger variable memory value;
and covering the value corresponding to the trigger variable by using the logic result to obtain the memory value of the updated variable in the memory.
6. The front-end trigger scene-based view updating method according to claim 4, wherein the performing logic calculation according to the association relationship and the updated variable memory value to obtain an associated area memory value comprises:
extracting the associated variable memory value related to the association relation from a preset memory;
acquiring a correlation area corresponding to the correlation variable memory value and the updated variable memory value;
and calculating the associated variable memory value and the updated variable memory value according to the association relation, and taking the calculation result as the associated area memory value corresponding to the associated area.
7. The front-end trigger scene based view updating method according to any one of claims 1 to 6, wherein the front-end displaying the updated virtual view comprises:
converting the updated virtual view into html code, and adding CSS attributes;
and packaging and sending the html codes with the CSS attributes to a front-end page, and analyzing and rendering the html codes by the front-end page to display the html codes.
8. A front-end triggered scene-based view update apparatus, the apparatus comprising:
the virtual view building module is used for setting placeholders at program variables and building a virtual view according to the placeholders and preset program logic;
the program trigger request processing module is used for receiving a program trigger request, analyzing the program trigger request to obtain a program trigger area and area logic, and extracting a trigger variable memory value according to the program trigger area;
a variable memory updating module, configured to execute the region logic on the trigger variable memory value to obtain a logic result, and update the trigger variable memory value in a memory according to the logic result to obtain an updated variable memory value;
the virtual view processing module is used for retrieving in the virtual view by utilizing the program trigger area to obtain an incidence relation corresponding to the program trigger area, and performing logic calculation according to the incidence relation and the updated variable memory value to obtain a memory value of the incidence area;
and the view updating module is used for updating the virtual view by using the memory value in the associated area to obtain an updated virtual view and performing front-end display on the updated virtual view.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a front-end trigger scene based view update method according to any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the front-end trigger scene based view updating method according to any one of claims 1 to 7.
CN202210820087.1A 2022-07-12 2022-07-12 View updating method, device, equipment and medium based on front-end trigger scene Pending CN115080898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210820087.1A CN115080898A (en) 2022-07-12 2022-07-12 View updating method, device, equipment and medium based on front-end trigger scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210820087.1A CN115080898A (en) 2022-07-12 2022-07-12 View updating method, device, equipment and medium based on front-end trigger scene

Publications (1)

Publication Number Publication Date
CN115080898A true CN115080898A (en) 2022-09-20

Family

ID=83259928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210820087.1A Pending CN115080898A (en) 2022-07-12 2022-07-12 View updating method, device, equipment and medium based on front-end trigger scene

Country Status (1)

Country Link
CN (1) CN115080898A (en)

Similar Documents

Publication Publication Date Title
CN112671921A (en) Data transmission method and device, electronic equipment and readable storage medium
CN113806434B (en) Big data processing method, device, equipment and medium
CN112702228A (en) Service current limiting response method and device, electronic equipment and readable storage medium
CN113868528A (en) Information recommendation method and device, electronic equipment and readable storage medium
CN113282854A (en) Data request response method and device, electronic equipment and storage medium
CN114185776A (en) Big data point burying method, device, equipment and medium for application program
CN114169303A (en) Method, device, equipment and medium for editing table based on vue.js
CN112733531A (en) Virtual resource allocation method and device, electronic equipment and computer storage medium
CN114816371B (en) Message processing method, device, equipment and medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN115827115A (en) H5 page jump method, device, equipment and storage medium of WeChat applet
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN114238233A (en) Automatic file cleaning method, device, equipment and storage medium
CN115022171A (en) Optimization method and device for updating interface, electronic equipment and readable storage medium
CN115080898A (en) View updating method, device, equipment and medium based on front-end trigger scene
CN114356379A (en) Backup-based service upgrading method, device, equipment and storage medium
CN114721952A (en) Method, device, equipment and storage medium for synchronously deploying multiple sets of test environments
CN114238777A (en) Negative feedback flow distribution method, device, equipment and medium based on behavior analysis
CN114185622B (en) Page loading method, device, equipment and storage medium
CN114723400B (en) Service authorization management method, device, equipment and storage medium
CN113657076B (en) Page operation record table generation method and device, electronic equipment and storage medium
CN112596717B (en) Multi-data packing method, device, electronic equipment and computer readable storage medium
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN114518863A (en) Random generation method, device, equipment and storage medium of invitation code
CN111949909A (en) Web-end-based mobile phone number formatting method, device, equipment and medium

Legal Events

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