Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for updating page view based on unidirectional data flow

A technology of page view and update method, which is applied in the computer field, can solve the problems of messy data flow maintenance cost, chaotic code structure, exponential growth, etc., and achieve the effects of eliminating state shocks, reducing costs, and facilitating maintenance

Active Publication Date: 2022-03-18
南京苏宁加电子商务有限公司
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to solve the problems of the prior art, the embodiment of the present invention provides a page view update method based on unidirectional data flow, so as to overcome the chaotic code structure and easy Problems such as poor readability, cluttered data flow, and post-maintenance costs increase exponentially with business stacking

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for updating page view based on unidirectional data flow
  • Method and device for updating page view based on unidirectional data flow

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0043] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Some, but not all, embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0044] In the embodiment of the present invention, the idea of ​​unidirectional data flow is adopted, and the logic of view (data) update is stripped out, which is uniformly scheduled by Actors. When the user visits the page view, he sends out user interaction actions on the page, and the actions update the corresponding state data accordingly. After the state is upda...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and system for updating a page view based on unidirectional data flow. The method includes: the page view layer invokes the corresponding update state action in the intermediate agent layer according to the page update request; Update the task and add the update task to the asynchronous update queue; the scheduler pulls the asynchronous update queue, and updates the page data on the data layer according to the asynchronous update queue; after the data layer updates the page data, it pushes the updated data to the page view layer, and the page The view layer updates the page according to the updated data. By adopting the idea of ​​one-way data flow, the present invention ensures the clarity of the process, is easy to maintain and can be predicted, all state changes are bound to the intermediate agent layer, the unified data source is modified, and then top-down Redistribution reduces the cost of state / attribute transfer, and also eliminates state shocks at the root.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for updating a page view based on unidirectional data flow. Background technique [0002] The front-end technology iteration speed is very fast, and mvvm (Model-View-ViewModel) is very popular now. These frameworks encapsulate the previous complicated DOM operations to a certain extent, and also lower the threshold for use. When dealing with small-scale applications, constrained data flow and transmission may not have any side effects, but when the scale of the project expands, the level-by-level state / attribute transmission is particularly bloated and inefficient. Moreover, in relatively complex business scenarios, problems such as chaotic code structure, poor readability, and messy data flow will be encountered, and the post-maintenance cost will increase exponentially with the stacking of business. Contents of the invention [0003] In order to solve t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/903G06F16/9038G06F16/904G06F9/451
CPCG06F16/904G06F16/903G06F16/9038G06F9/451
Inventor 李海豹韩念琪黄德志徐晓光王文龙
Owner 南京苏宁加电子商务有限公司