[go: up one dir, main page]

CN119201494A - Page interaction method, device, medium, electronic device and program product - Google Patents

Page interaction method, device, medium, electronic device and program product Download PDF

Info

Publication number
CN119201494A
CN119201494A CN202411288667.6A CN202411288667A CN119201494A CN 119201494 A CN119201494 A CN 119201494A CN 202411288667 A CN202411288667 A CN 202411288667A CN 119201494 A CN119201494 A CN 119201494A
Authority
CN
China
Prior art keywords
page
data
interaction
attribute
observer
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
CN202411288667.6A
Other languages
Chinese (zh)
Inventor
聂长保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mashang Consumer Finance Co Ltd
Original Assignee
Mashang Consumer Finance 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 Mashang Consumer Finance Co Ltd filed Critical Mashang Consumer Finance Co Ltd
Priority to CN202411288667.6A priority Critical patent/CN119201494A/en
Publication of CN119201494A publication Critical patent/CN119201494A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/545Gui

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请属于计算机技术领域,具体涉及一种页面交互方法、页面交互装置、计算机可读介质、电子设备以及计算机程序产品。该方法包括:根据在交互界面上触发的交互事件,将第一属性数据写入第一数据通道,第一数据通道用于在不同的数据处理环节之间传递数据,第一属性数据用于表示交互界面在交互事件的发起环节产生的属性变化信息;向数据源发送数据获取请求,数据获取请求用于请求获取对第一属性数据做出响应的数据;当第一数据通道中出现与数据获取请求对应的第二属性数据时,根据第二属性数据更新交互界面上展示的页面内容,第二属性数据用于表示交互界面在交互事件的响应环节产生的属性变化信息。本申请可以提高应用程序的交互效率。

The present application belongs to the field of computer technology, and specifically relates to a page interaction method, a page interaction device, a computer-readable medium, an electronic device, and a computer program product. The method includes: writing first attribute data into a first data channel according to an interaction event triggered on an interaction interface, the first data channel is used to transfer data between different data processing links, and the first attribute data is used to indicate the attribute change information generated by the interaction interface in the initiation link of the interaction event; sending a data acquisition request to a data source, the data acquisition request is used to request to obtain data that responds to the first attribute data; when second attribute data corresponding to the data acquisition request appears in the first data channel, updating the page content displayed on the interaction interface according to the second attribute data, and the second attribute data is used to indicate the attribute change information generated by the interaction interface in the response link of the interaction event. The present application can improve the interaction efficiency of the application.

Description

Page interaction method, device, medium, electronic equipment and program product
Technical Field
The application belongs to the technical field of computers, and particularly relates to a page interaction method, a page interaction device, a computer readable medium, electronic equipment and a computer program product.
Background
With the rapid development of mobile device technology, mobile applications have become an integral part of everyday life and business activities, and the popularity of these applications has driven the need for more advanced functionality and richer user experience.
To meet these needs, developers must integrate diverse functional modules in mobile applications, each of which needs to be designed through a software architecture to ensure its compatibility with existing systems and performance optimization. This typically involves the use of modular design principles so that each functional module can be independently developed, tested and maintained. In addition, to improve the extensibility and maintainability of an application, a developer may employ a micro-service architecture to break the application down into a set of small, loosely coupled services, each of which implements a particular business function.
As functional modules increase, user interfaces and user experience designs become more critical. To manage the complexity of page interactions, developers need to employ responsive designs and adaptive layouts that ensure that applications can provide a consistent user experience across different device and screen sizes. To further optimize user interaction, developers may also integrate advanced interaction techniques such as gesture recognition, voice control, and haptic feedback.
On the basis of increasingly diversified and complicated functional modules of application programs, how to simplify the interaction flow of the application programs and improve the interaction efficiency is a problem to be solved at present.
Disclosure of Invention
The application aims to provide a page interaction method, a page interaction device, a computer readable medium, electronic equipment and a computer program product, so that the interaction efficiency of application programs is improved to a certain extent.
According to one aspect of the embodiment of the application, a page interaction method is provided, which comprises the steps of writing first attribute data into a first data channel according to an interaction event triggered on an interaction interface, wherein the interaction event comprises a plurality of data processing links, the first data channel is used for transmitting data among different data processing links, the first attribute data is used for representing attribute change information generated by the interaction interface at an initiation link of the interaction event, sending a data acquisition request to a data source, the data acquisition request is used for requesting to acquire data responding to the first attribute data, and updating page content displayed on the interaction interface according to second attribute data when second attribute data corresponding to the data acquisition request occurs in the first data channel, wherein the second attribute data is used for representing attribute change information generated by the interaction interface at a response link of the interaction event.
According to an aspect of an embodiment of the present application, there is provided a page interaction device, including:
The writing module is configured to write first attribute data into a first data channel according to an interaction event triggered on an interaction interface, wherein the interaction event comprises a plurality of data processing links, the first data channel is used for transmitting data among different data processing links, and the first attribute data is used for representing attribute change information generated by the interaction interface at an initiating link of the interaction event;
A sending module configured to send a data acquisition request to a data source, the data acquisition request being for requesting acquisition of data responsive to the first attribute data;
and the updating module is configured to update the page content displayed on the interactive interface according to the second attribute data when the second attribute data corresponding to the data acquisition request appears in the first data channel, wherein the second attribute data is used for representing attribute change information generated by the interactive interface in a response link of the interactive event.
In some embodiments of the present application, based on the above technical solutions, the interaction event includes a page skip event from a first page to a second page, and the update module includes:
the analysis module is configured to analyze the second attribute data to obtain a navigation link of the second page;
The acquirable module is configured to acquire page configuration data of the second page according to the navigation link, wherein the page configuration data is used for representing page display content and page display effect of the second page;
And the first display module is configured to display the second page on the interactive interface according to the page configuration data.
In some embodiments of the present application, based on the above technical solution, the obtaining module further includes:
The initial acquisition module is configured to acquire initial page data of the second page according to the navigation link, wherein the initial page data comprises data for carrying out initial configuration on the second page;
a first acquisition module configured to acquire first page sharing data including data shared by the first page to the second page;
A first write module configured to write the first page shared data to a second data channel for transferring data between different pages;
And the first fusion module is configured to fuse the initial page data with the first page sharing data according to the fusion instruction when the fusion instruction corresponding to the first page sharing data occurs in the second data channel, so as to obtain page configuration data of the second page.
In some embodiments of the present application, based on the above technical solution, the interaction event further includes a page return event for returning the second page to the first page, and the update module further includes:
A second acquisition module configured to acquire second page sharing data including page data shared by the second page to the first page;
a second write module configured to write the second page sharing data to the second data channel;
The second fusion module is configured to fuse the second page sharing data with the initial page data of the first page according to the fusion instruction when a fusion instruction corresponding to the second page sharing data occurs in the second data channel, so as to obtain page updating data of the first page;
And the second display module is configured to display the first page on the interactive interface according to the page update data of the first page.
In some embodiments of the present application, based on the above technical solutions, the first display module further includes:
A view creation module configured to create a second view controller for managing a presentation process of the second page;
A view pushing module configured to push the second view controller to a top of a navigation stack for managing a page hierarchy presented on the interactive interface;
And the view display module is configured to display the second page on the interactive interface according to the second view controller and the page configuration data.
In some embodiments of the present application, based on the above technical solution, the interaction event further includes a page return event for returning the first page from the second page, and the second display module further includes:
A view removal module configured to remove the second view controller from the top of the navigation stack, resulting in a first view controller located below the second view controller, the first view controller for managing a presentation process of the first page;
and the view updating module is configured to display the first page on the interactive interface according to the first view controller and page updating data of the first page.
In some embodiments of the present application, based on the above technical solution, the page interaction device further includes:
A first function calling module configured to call an observer registration function executing the first data channel, the observer registration function being configured to register an attribute object held by the first data channel as an observed person, the observed person being configured to send a notification to the observer when an attribute changes;
And the second function calling module is configured to call and execute an observer callback function when the attribute of the observed person changes, wherein the observer callback function is used for triggering a notification to the observed person and acquiring the attribute change information of the observed person according to the notification.
In some embodiments of the present application, based on the above technical solution, the observer registration function includes the following fields:
a key value path for indicating an attribute object registered as an observed person;
an observation option for indicating the content of the notification sent by the observed person when the attribute changes;
and the context parameter is used for calling back an identifier to the observer, and the identifier is used for distinguishing different attribute parameters of the observed person.
In some embodiments of the present application, based on the above technical solution, the page interaction device further includes:
And a third function calling module configured to call an observer removing function for executing the first data channel, the observer removing function being used for canceling an observed registration operation for the first data channel.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a page interaction method as in the above technical solution.
According to one aspect of the embodiment of the application, the electronic device comprises a processor and a memory, wherein the memory is used for storing executable instructions of the processor, and the processor is configured to execute the executable instructions to realize the page interaction method in the technical scheme.
According to an aspect of an embodiment of the present application, there is provided a computer program product, including a computer program, which when executed by a processor implements a page interaction method as in the above technical solution.
In the technical scheme provided by the embodiment of the application, when the user performs operations on the interactive interface to generate the interactive event, the system captures attribute change information generated by the operations and writes the information into the first data channel as first attribute data. A data acquisition request may be sent to the data source based on the first attribute data requesting to acquire data that is responsive to the attribute changes. When the first data channel receives second attribute data corresponding to the data acquisition request, page content displayed on the interactive interface can be updated according to the second attribute data. Therefore, the first data channel serves as a data transmission link between different data processing links, and smooth data transmission of various functional modules is ensured. According to the technical scheme provided by the embodiment of the application, in the processing process of the interaction event, the point-to-point data communication in the application program is reduced, and the frequent data transmission among a large number of functional modules is not needed, so that the interaction flow of the application program can be simplified to a great extent, the interaction efficiency and the data processing efficiency of the application program are improved, the response effect of the interaction interface is also enhanced, and the response speed of the interaction interface is improved.
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. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a block diagram of an exemplary system architecture to which the technical solution of the present application is applied.
Fig. 2 shows an application scenario of the method for executing page interaction by a terminal device according to an embodiment of the present application.
FIG. 3 shows a flow chart of a page interaction method in one embodiment of the application.
FIG. 4 illustrates a flow chart for updating page content based on page jump events in one embodiment of the application.
Fig. 5 shows a schematic diagram of a framework structure for forward transferring cross-page shared data in an application scenario according to an embodiment of the present application.
FIG. 6 illustrates a flow diagram for updating page content based on page return events in one embodiment of the application.
Fig. 7 is a schematic diagram of a framework structure for reversely transferring cross-page shared data in an application scenario according to an embodiment of the present application.
Fig. 8 schematically shows a block diagram of a page interaction device according to an embodiment of the present application.
Fig. 9 schematically shows a block diagram of a computer system suitable for use in implementing embodiments of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the examples set forth herein, but rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
In the present embodiment, the term "module" or "unit" refers to a computer program or a part of a computer program having a predetermined function and working together with other relevant parts to achieve a predetermined object, and may be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Also, a processor (or multiple processors or memories) may be used to implement one or more modules or units. Furthermore, each module or unit may be part of an overall module or unit that incorporates the functionality of the module or unit.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
Fig. 1 shows a block diagram of an exemplary system architecture to which the technical solution of the present application is applied.
As shown in fig. 1, system architecture 100 may include a terminal device 110, a network 120, and a server 130. Terminal device 110 may include various electronic devices such as smart phones, tablet computers, notebook computers, desktop smart speakers, smart wearable devices, smart vehicle devices, smart payment terminals, and the like. The server 130 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms, and the like. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, and may be, for example, a wired communication link or a wireless communication link.
The system architecture in embodiments of the present application may have any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 130 may be a server group composed of a plurality of server devices. In addition, the technical solution provided in the embodiment of the present application may be executed by the terminal device 110, or may be implemented by the terminal device 110 and the server 130 together, which is not limited in particular by the present application.
Fig. 2 shows an application scenario of the method for executing page interaction by a terminal device according to an embodiment of the present application.
As shown in fig. 2, in the application scenario, the terminal device is a smart phone held by a user, and various application clients, such as instant messaging software, audio/video playing software, online shopping software, network payment software, and the like, can be installed on the terminal device. In order to realize various application functions of the application program, a plurality of functional modules can be configured inside the application program, and a complete interaction event processing flow can be realized through mutual collaboration among the functional modules. Wherein each functional module may be responsible for executing one or more data processing links.
Via the interactive interface of the terminal equipment, the view pages of various application programs can be presented to the user, and the interactive operation of the user can be accepted, so that the display content and the display effect of the view pages can be adjusted according to the interactive operation.
As shown in fig. 2, in the application scenario, the interactive interface of the terminal device may implement an interactive function through a plurality of functional modules such as a view 201, a view controller 202, and a view model 203.
View 201 refers to the presentation layer of the interactive interface that is responsible for exposing data from the view model and collecting user input. View 201 does not contain business logic, but rather connects the data in the view model with the elements presented on the interactive interface by data binding. View 201 is responsible for receiving user interactions, such as clicking on a button, entering text, etc., which may trigger corresponding data processing commands defined in the view model and used to execute the corresponding business logic. Since view 201 does not contain business logic, it can be more easily reused in different applications or contexts, and view 201 can be more easily unit tested due to its simplicity and separation from business logic.
View controller 202 is a functional module responsible for managing the interaction process between view 201 and view model 203. View controller 202 typically creates and initializes a view model at view loading, responsible for instantiating and passing the view model to the view. The view controller 202 is also responsible for setting data bindings between views and view models, including, for example, user interface elements that bind attributes of the view model to the views, and data processing commands that bind interaction events (e.g., button click events) of the views to the view model. The view controller 202 may manage the full lifecycle of the views, including creation, display, hiding, and destruction of the views.
View model 203 serves as a bridge between views and models, and the main purpose is to separate business logic and data processing from view layers, making the views more compact and manageable. View model 203 contains business logic associated with the user interface that is responsible for handling the acquisition, processing, and updating of data, as well as the response to user interactions. The view model 203 provides the data needed for the view, which can be automatically updated into the view by a data binding mechanism. When changes occur to the data in the view model 203, the view will automatically update to reflect these changes. View model 203 is also responsible for converting the data in the model into a format that the view can understand and display, possibly including data formatting, unit conversion, and so forth. View model 203 decouples the views from the model so that the views can be developed and tested independent of business logic, while also allowing the model to be developed independent of the user interface.
In some alternative embodiments, the view model 203 may store the data in a locally stored database of the terminal device, or may store the data in a remote database of the server. When the data is stored on the server, the view model 203 may be in network communication with the server to obtain the data from the server.
When a user triggers an interaction operation on the interaction interface through view 201, view controller 202 may process the user's interactions with view 201 and forward these interactions to view model 203. For example, when a user clicks a button, the view controller 202 invokes a corresponding data processing command in the view model 203, and after completing a data processing process based on the data processing command, the data processing result is displayed to the user through the view 201.
In the technical solution provided in the embodiment of the present application, the first data channel 204 corresponding to the current view page may be created through the view model 203, and each functional module may transfer data between different data processing links through the first data channel 204. A data channel, which may be referred to as a pipeline, is a data-streaming architecture in which data is transmitted through a series of processing steps or stages, each of which may process a different portion of the data in parallel. The data channel allows data to flow between different processing units without waiting for all operations to be completed by the previous processing unit.
Taking the example of an online shopping application, the application has a complex interactive interface that allows the user to browse items, view details, add to the shopping cart, and make purchases.
When a user clicks on an item on the interactive interface, the clicking action is an interactive event that triggers the following sequence of operations.
The writing of the first attribute data the view 201 captures the interaction event of the user clicking on the merchandise and generates the first attribute data which may include information such as the ID of the merchandise, the timestamp of the user click, the type of device clicked, etc. This information is written to the first data channel 204 for transfer between the different data processing links of the application.
Sending of data acquisition request the view model 203 sends a data acquisition request to the server requesting to acquire detailed information related to the commodity clicked by the user, such as commodity description, price, stock status, etc.
And receiving the second attribute data and updating the page content, namely sending detailed information of the commodity back to the view model 203 as the second attribute data after the server processes the request. When the data arrives at the view 201 through the first data channel 204, the view 201 updates the page content presented on the interactive interface according to the second attribute data. For example, the product detail page may show information such as a high definition picture, detailed description, user rating, etc. of the product.
The page interaction method, the page interaction device, the computer readable medium, the electronic device and the computer program product provided by the application are described in detail below with reference to the specific embodiments.
Fig. 3 shows a flow chart of a page interaction method in an embodiment of the application, which may be performed by the terminal device shown in fig. 1 or may be performed jointly by the terminal device and the server. The embodiment of the application is described by taking a page interaction method executed by terminal equipment as an example. As shown in fig. 3, the page interaction method may include the following steps S310 to S330.
And S310, writing first attribute data into a first data channel according to an interaction event triggered on the interaction interface, wherein the interaction event comprises a plurality of data processing links, the first data channel is used for transmitting data among different data processing links, and the first attribute data is used for representing attribute change information generated by the interaction interface at an initiating link of the interaction event.
An interactive interface refers to an interface through which information is exchanged between a user and a terminal device, and may include a Graphical User Interface (GUI), a Command Line Interface (CLI), a Conversational User Interface (CUI), or the like. The interaction event includes an operation performed by the user on the interaction interface, such as clicking, sliding, entering text, and so forth.
When a user uses the application software on the terminal device, the terminal device presents a view page of the application software to the user through the interactive interface, and meanwhile, can receive interactive operations executed by the user on the view page of the application software through the interactive interface.
For example, functionality controls for implementing different operational functions, such as virtual buttons, input boxes, or sliding wheels, etc., are typically distributed on view pages of application software. In addition, interface elements for carrying different media contents, such as video, audio, pictures or texts, etc., are distributed on the view page.
The user performs interactive operations such as clicking, sliding and the like on the interactive interface, and can interact with the functional controls or interface elements distributed on the view page to initiate corresponding interactive events. Triggering of the interaction event will cause a corresponding change in the attribute of the interaction interface, which may include a change in the view presentation content or a change in the view presentation effect on the interaction interface. For example, one view page displayed on the interactive interface jumps to another view page, shows the animation effect of the page jump, the animation effect of the current page closing and the animation effect of the new page loading, adjusts the size of the current page, and so on.
In the initiation link of the interaction event, attribute change information of the interaction interface can be collected to obtain first attribute data, and the first attribute data is further written into the first data channel. So that the first attribute data can be passed on to the next data processing link.
In one embodiment of the application, two adjacent data processing elements may be executed on the same functional module or may be executed on different functional modules.
For example, one interaction event may include an initiation link, a response link, and a presentation link. Taking the plurality of functional modules shown in fig. 2 as an example, the initiating link of the interaction event may include receiving, through the view 201, an interaction operation triggered by a user, the responding link may include converting, through the view controller 202, the interaction operation received by the view 201 into an executable operation command, and executing the operation command through the view model 203 to obtain response data for responding to the interaction operation from a data source, and the presenting link may include converting, through the view controller 202, the response data obtained by the view model 203 into presentable content data, and presenting, through the view 201, a view page containing the above content data on the interaction interface.
And S320, sending a data acquisition request to a data source, wherein the data acquisition request is used for requesting to acquire data responding to the first attribute data.
A data source refers to a system, device or service unit that stores data, and may be, for example, a database, a file system, an API interface, etc. The data source defines location information of the data, user authentication information, and configuration required for interaction with the data. The data source in the embodiment of the application can comprise a database configured locally at the terminal equipment and can also comprise a database configured on a remote server.
Taking an application scene of page skip as an example, when a user triggers a page skip operation on an interactive interface, a first page which is currently displayed is initiated to skip to display a second page, and the second page and the first page have different content data. In response to the page skip operation, a data acquisition request may be initiated to the data source to acquire content data of the second page. Wherein the data source may comprise one or more. For example, the application program may first search for whether the cached data of the second page exists in the cache of the terminal device, if the searching in the cache fails, may continue to search for whether the client local configuration data of the second page exists in the local hard disk of the terminal device, and if the searching in the local hard disk fails, may continue to perform data communication with the remote server, thereby obtaining the content data of the second page stored on the remote server.
In one embodiment of the application, the data sources include a first data source that does not provide a connection pool and a second data source that provides a connection pool. The first data source may include DriverManagerDataSource of Spring, for example, which creates a new database connection for each connection request and destroys the connection after use. The second data source may include Apache Commons DBCP, C3P0, hikariCP, and so on, for example, which creates a number of database connections in advance and stores these connections in a pool for multiplexing by the application. The connection pool technique can significantly improve performance and reduce the overhead of connection creation and destruction.
In the Spring framework, the configuration of the data source can be implemented through an XML file or a Java configuration class. For example, when using the C3P0 connection pool, a data source type POOLED may be specified in the XML configuration file of Spring, and point to the configuration file of C3P0, where various parameters of the connection pool are defined, such as maximum connection number, minimum connection number, idle time, etc. The Spring Boot further simplifies the configuration of the data source, and provides the function of automatically configuring the data source. Without an explicit configuration data source, the Spring Boot would automatically choose to use HikariCP, tomcat a connection pool or Commons DBCP2 depending on the library under the class path. If a particular data source is required to be used, it may be specified in the application.properties file, for example, when using C3P0, spring.datasource.type=com.mchange.v2.c3p0.combopooleddatasource may be set. The configuration of the data source may include not only connection information but also configuration information concerning security, performance optimization, and high availability. For example, timeout times for connections, query caches, transaction isolation levels, etc. may be included.
The embodiment of the application adopts the first data source and the second data source to cooperate, thereby realizing configuration complementation under different application scenes. The first data source without the connection pool is suitable for the scene with less database interaction, can simplify application configuration and reduce resource occupation, and the second data source with the connection pool is introduced to remarkably improve the interaction performance of the high-frequency database, reduce the cost of connection creation and destruction by multiplexing persistent connection, optimize resource utilization rate and enhance the response speed and stability of an application program in a high concurrency environment.
And S330, when second attribute data corresponding to the data acquisition request appears in the first data channel, updating page content displayed on the interactive interface according to the second attribute data, wherein the second attribute data is used for representing attribute change information generated by the interactive interface in a response link of the interactive event.
After the application client sends the data acquisition request to the data source, the data source may return second attribute data as response data to the application client, where the second attribute data is used to represent attribute change information generated by the interactive interface in a response link of the interactive event. The second attribute data returned by the data source is written into the first data channel, so that the view controller and the view can monitor the second attribute data, and further the page content displayed on the interactive interface can be updated according to the second attribute data.
In one embodiment of the present application, the interaction event includes a page skip event from the first page to the second page, and the corresponding second attribute data may include page content to be displayed after the skip, that is, page content of the second page. The page jump event in the embodiment of the application can comprise closing the first page and opening the second page on the interactive interface, and can also comprise displaying the second page above the first page in other modes such as a floating window or a popup full-screen window.
FIG. 4 illustrates a flow chart for updating page content based on page jump events in one embodiment of the application. As shown in fig. 4, on the basis of the above embodiment, updating the page content shown on the interactive interface according to the second attribute data in step S330 may further include the following steps S331 to S333.
S331, analyzing the second attribute data to obtain a navigation link of the second page.
By analyzing the second attribute data, the navigation link of the second page carried in the navigation link can be obtained. The navigation link of the second page refers to the address of the second page in the background storage space. For example, after the data source returns the response data to the application client, the page configuration data for displaying the second page may be loaded into the memory, where the navigation link of the second page is the memory address corresponding to the stored page configuration data.
In some alternative embodiments, the navigation link of the second page may also be a uniform resource identifier URI or uniform resource locator URL pointing to the page resource, for requesting to acquire the corresponding page resource.
And S332, acquiring page configuration data of the second page according to the navigation link, wherein the page configuration data is used for representing page display content and page display effect of the second page.
The HTML, CSS, javaScript file of the second page, and possibly page configuration data, may be obtained from the navigation link. Page configuration data refers to a data structure for defining page layout, style, content and behavior, for representing page presentation content and page presentation effects of a second page, typically stored in JSON, XML or other format, that can be dynamically loaded by server-side rendering or client-side scripting.
S333, displaying a second page on the interactive interface according to the page configuration data.
And the application program client renders the page layout and style according to the page configuration data by analyzing the HTML, CSS and JavaScript of the second page, so that the page content of the second page is displayed on the interactive interface.
According to the embodiment of the application, the second attribute data is analyzed efficiently to obtain the navigation link, so that the accurate control of the second page content and the display effect is ensured, and the dynamic and flexible page rendering is realized. According to the embodiment of the application, the content is rapidly loaded and displayed through the page configuration data defined in advance, the response speed and interaction efficiency of the application program are also improved, the user interface can be dynamically adjusted according to the preset configuration, high maintainability and expandability are supported, and convenience is provided for subsequent content updating and function expansion.
In one embodiment of the application, the method for acquiring the page configuration data of the second page according to the navigation link can further comprise the steps of acquiring initial page data of the second page according to the navigation link, wherein the initial page data comprises data for initializing the second page, acquiring first page sharing data, the first page sharing data comprises data shared by the first page to the second page, writing the first page sharing data into a second data channel, the second data channel is used for transmitting data among different pages, and when a fusion instruction corresponding to the first page sharing data occurs in the second data channel, carrying out fusion processing on the initial page data and the first page sharing data according to the fusion instruction to obtain the page configuration data of the second page.
The page configuration data of the second page in the embodiment of the application comprises initial page data of the second page and page sharing data of the first page. The initial page data of the second page is page data which can be independently loaded and rendered independent of other pages, and the page sharing data of the first page refers to data which needs to be displayed on the second page depending on the page configuration of the first page.
For example, if the user does not perform any input operation related to the second page on the first page, when the user triggers to skip the second page, the page configuration may be directly completed according to the initial page data of the second page, so as to display the second page with initialized content and effects.
Conversely, if the user performs an input operation on the first page that is associated with the second page, account login is accomplished, for example, by entering user identity information. At this time, if the user triggers to jump to the second page, the first page sharing data needs to be collected and transferred to the second page, so that the page configuration is completed according to the initial page data and the first page sharing data of the second page, so as to display the second page according with the content and the effect of the user input operation. For example, the user may be presented with private data that is only viewable after the account login is completed.
The fuse instruction may include an identifier for triggering page fusion, e.g., the first page may write the first page shared data to the second data channel in the form of a data stream, at the end of which an identifier representing the fuse instruction may be written. When the second page completes receiving the second page shared data and identifies the identifier, it may be determined that the first page has completed data transfer, and then page fusion may be triggered.
In some alternative embodiments, the fusing instruction may further include a notification message for triggering page fusing, for example, the first page may write the first page sharing data into the second data channel in a data stream form, after the first page sharing data is completely written, a notification message representing the fusing instruction may be written into the second data channel, where the notification message may include summary information of the first page sharing data, for example, including a starting position and a capacity of the first page sharing data, and when the second page completes receiving the second page sharing data and receives the notification message, it may be determined whether the first page has completed data transfer according to the notification message, and may trigger page fusing after confirming that the first page sharing data is completely received.
Fig. 5 shows a schematic diagram of a framework structure for forward transferring cross-page shared data in an application scenario according to an embodiment of the present application.
As shown in fig. 5, a second data channel 503 for transferring data across pages is arranged between the first page 501 and the second page 502. When the first page 501 needs to transfer the first page shared data to the second page 502, the first page shared data may be written into the second data channel 503, and after the write operation of the first page shared data is completed, a fusion instruction is written into the second data channel 503. The second page 502 may receive the first page sharing data through the second data channel 503, and after receiving the fusion instruction, perform fusion processing on the first page sharing data and its own initial page data, to obtain updated page configuration data, so as to display the second page on the interactive interface according to the updated page configuration data.
According to the embodiment of the application, the cross-page data is intelligently acquired and processed, so that efficient and dynamic data sharing and fusion among pages are realized. The embodiment of the application firstly extracts the initial configuration data of the second page from the navigation link, then collects necessary shared data from the first page, and safely transmits the data across pages through the second data channel. After receiving the corresponding fusion instruction, the initial data and the shared data can be skillfully combined to generate complete page configuration, so that the second page can dynamically render content and interface layout according to the latest data, and the overall interactivity and data consistency of the application program are improved. In addition, the data fusion strategy also supports the modular design of the application program, so that the page updating and the function expansion are more flexible and efficient.
In one embodiment of the application, the interaction event further comprises a page return event that returns the first page from the second page.
FIG. 6 illustrates a flow diagram for updating page content based on page return events in one embodiment of the application. As shown in fig. 6, on the basis of the above embodiment, updating the page content shown on the interactive interface according to the second attribute data in step S330 may further include steps S334 to S337 as follows.
S334, collecting second page sharing data, wherein the second page sharing data comprises page data shared by the second page to the first page.
And S335, writing the second page sharing data into a second data channel.
And S336, when a fusion instruction corresponding to the second page sharing data occurs in the second data channel, carrying out fusion processing on the second page sharing data and the initial page data of the first page according to the fusion instruction to obtain page updating data of the first page.
And S337, displaying the first page on the interactive interface according to the page update data of the first page.
Fig. 7 is a schematic diagram of a framework structure for reversely transferring cross-page shared data in an application scenario according to an embodiment of the present application.
As shown in fig. 7, a second data channel 503 for transferring data across pages is arranged between the first page 501 and the second page 502. When the second page 502 needs to transfer the second page sharing data to the first page 501, the second page sharing data may be written into the second data channel 503, and after the write operation of the second page sharing data is completed, a fusion instruction is written into the second data channel 503. The first page 501 may receive the second page sharing data through the second data channel 503, and after receiving the fusion instruction, perform fusion processing on the second page sharing data and its initial page data, to obtain page update data of the first page, so that the first page is displayed on the interactive interface according to the update data.
The implementation manner and implementation effect of each method step in the embodiment of the present application may refer to the scheme of forward transfer of cross-page shared data in the above embodiment, which is not described herein again.
In one embodiment of the application, the method for displaying the second page on the interactive interface according to the page configuration data can further comprise the steps of creating a second view controller, pushing the second view controller to the top of a navigation stack, wherein the navigation stack is used for managing the page hierarchical structure displayed on the interactive interface, and displaying the second page on the interactive interface according to the second view controller and the page configuration data.
In one embodiment of the application, the interactive event further comprises a page return event for returning the first page by the second page, and the method for displaying the second page on the interactive interface according to the page configuration data after displaying the second page on the interactive interface according to the second view controller and the page configuration data can further comprise removing the second view controller from the top of the navigation stack to obtain a first view controller positioned below the second view controller, wherein the first view controller is used for managing the display process of the first page, and displaying the first page on the interactive interface according to the first view controller and the page update data of the first page.
The navigation stack is used for managing the navigation flow of the user between different view pages. In a mobile application or Web application, the navigation stack may be used to record the page path that the user has traversed from the application launch to the current location, as well as the view controller for each page.
The navigation stack maintains a hierarchical list of pages, each of which is an instance of a view controller. When the user enters a new page, the corresponding view controller is pushed onto the top of the stack, and when the user returns to the previous page, the view controller of the current page pops off the stack. The navigation stack follows the Last In First Out (LIFO) principle, i.e. the last to push view controller to the stack will be the first to pop up, which matches the navigation order of the user in the application. The user may trigger a navigation rollback operation via a back button or other interface element that causes the current view controller to pop off the stack, displaying the last view controller in the stack.
The embodiment of the application optimizes the page management by creating the special second view controller, thereby ensuring the high efficiency and order of the second page display process. By pushing the view controller into the navigation stack, the embodiment of the application skillfully utilizes the last-in first-out characteristic of the stack to maintain the page hierarchical structure, so that the page navigation is visual and easy to manage. In addition, by combining the page configuration data, the embodiment of the application can ensure that the display of the second page is consistent with the user expectation and the application design, thereby improving the consistency of user experience and the responsiveness of an interactive interface. The embodiment of the application not only enhances the navigation logic of the application, but also provides strong support for dynamic content display and interface update, and improves the smoothness and operation consistency of interface interaction.
In one embodiment of the application, an observer may be registered for the first data channel before writing the first attribute data to the first data channel, thereby listening for attribute changes on the first data channel based on the observer pattern. Specifically, the embodiment of the application can call an observer registration function executing the first data channel, wherein the observer registration function is used for registering an attribute object held by the first data channel as an observed person, the observed person is used for sending a notification to the observed person when the attribute changes, and when the observed person has the attribute changes, an observer callback function is called and executed, and the observer callback function is used for triggering the notification to the observed person and acquiring the attribute change information of the observed person according to the notification.
The embodiment of the application realizes the efficient management and response of the data state change by designing the observer mode. Firstly, the attribute object held by the first data channel is registered as an observed person by calling an observer registration function, so that once the attribute of the object changes, all registered observers can receive timely notification. This mechanism not only improves the transparency and real-time of data processing, but also enhances the response capability of the system. When the attribute of the observed person changes, an observer callback function is triggered, and is responsible for sending a notice to the observed person and acquiring the latest attribute change information so as to allow the observed person to update the state of the observed person or execute related operations according to the information. The embodiment of the application simplifies the communication flow among the components, reduces the coupling degree, makes the system more modularized and easy to maintain, and improves the flexibility and the user experience of the application.
In one embodiment of the application, the observer registration function includes a plurality of fields, such as a key path, an observation option, and a context parameter. The key value path is used for indicating an attribute object registered as an observed person, the observation option is used for indicating the observed person to send the content of a notification when the attribute changes, the context parameter is used for transmitting an identifier to the callback function of the observed person, and the identifier is used for distinguishing different attribute parameters of the observed person.
For example, the observer registration function in the embodiment of the present application may be expressed as addObserver: forKeyPath:options:context.
ForKeyPath represents a key path, which is a string of characters representing a key path (key path) of an attribute to be observed. The key path is a point-separated path for specifying attributes in an object. For example, if an attribute object person is held in the first data channel, the attribute object has an attribute parameter address, and the address further includes an attribute parameter city, where the attribute to be observed may be specified using the key path address.
Options represent observation options, some of which specify observation attributes, which are a bitmask that may include a combination of values of one or more fields as follows.
NSKeyValueObservingOptionNew providing new values of the attributes in the callback.
NSKeyValueObservingOptionOld providing the old value of the attribute in the callback.
NSKeyValueObservingOptionInitial a notification is sent immediately at the beginning of the observation, whether or not the value changes.
NSKeyValueObservingOptionPrior a notification is sent before the attribute value actually changes.
Context represents a context parameter, which is a pointer to any type, that is passed back to the observer callback method, allowing discrimination of which attribute changed when multiple attributes are observed using the same callback method. Context parameters may be used to convey an identifier or custom data in general.
The observer callback function in the embodiment of the present application may be expressed as observeValueForKeyPath: ofObject:change:context, for example. The context parameter is used to identify which attribute of the observer is triggered, and even if a plurality of attributes are observed by using the same callback method, the observer can identify which attribute is changed.
In one embodiment of the application, after updating the page content presented on the interactive interface according to the second attribute data, an observer removing function is invoked that executes the first data channel, the observer removing function being used to cancel the observed registration operation for the first data channel.
For example, the observer removal function in an embodiment of the present application may be represented as removeObserver: forKeyPath. Where observer is a pointer to the observer, i.e. the same object that was used when the observer was added before. This object needs to implement NSKeyValueObserving protocol and rewrite observeValueForKeyPath: ofObject:change:context:method to receive the observed changes. keyPath is a key path string that specifies an attribute to stop observing, which is identical to the key path used when the observer was added before.
The embodiment of the application can call the observer removing function to remove the observer when the observer (such as the view controller) is about to be destroyed or does not need to observe the change of a certain attribute, so as to avoid potential memory leakage and unnecessary observer callback.
Based on the description of the above embodiments and application scenarios, the present application utilizes the first data channel configured longitudinally and the second data channel configured transversely to realize efficient data transfer between different data processing links and different view pages, and in the processing process of the interaction event, the peer-to-peer data communication in the application program is reduced, and frequent data transfer between a large number of functional modules is not required, so that the interaction flow of the application program can be simplified to a great extent, the interaction efficiency and the data processing efficiency of the application program are improved, the response effect of the interaction interface is also enhanced, and the response speed of the interaction interface is also improved.
It should be noted that although the steps of the methods of the present application are depicted in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
The following describes an embodiment of the apparatus of the present application, which may be used to execute the page interaction method in the foregoing embodiment of the present application. Fig. 8 schematically shows a block diagram of a page interaction device according to an embodiment of the present application. As shown in fig. 8, the page interaction device 800 includes:
A writing module 810 configured to write first attribute data into a first data channel according to an interaction event triggered on an interaction interface, the interaction event including a plurality of data processing links, the first data channel being used to transfer data between different data processing links, the first attribute data being used to represent attribute change information generated by the interaction interface at an initiation link of the interaction event;
A transmitting module 820 configured to transmit a data acquisition request to a data source, the data acquisition request requesting acquisition of data responsive to the first attribute data;
the updating module 830 is configured to update, when second attribute data corresponding to the data acquisition request occurs in the first data channel, page content displayed on the interactive interface according to the second attribute data, where the second attribute data is used to represent attribute change information generated by the interactive interface in a response link of the interactive event.
In some embodiments of the present application, based on the above technical solutions, the interaction event includes a page skip event from a first page to a second page, and the update module 830 includes:
the analysis module is configured to analyze the second attribute data to obtain a navigation link of the second page;
The acquirable module is configured to acquire page configuration data of the second page according to the navigation link, wherein the page configuration data is used for representing page display content and page display effect of the second page;
And the first display module is configured to display the second page on the interactive interface according to the page configuration data.
In some embodiments of the present application, based on the above technical solution, the obtaining module further includes:
The initial acquisition module is configured to acquire initial page data of the second page according to the navigation link, wherein the initial page data comprises data for carrying out initial configuration on the second page;
a first acquisition module configured to acquire first page sharing data including data shared by the first page to the second page;
A first write module configured to write the first page shared data to a second data channel for transferring data between different pages;
And the first fusion module is configured to fuse the initial page data with the first page sharing data according to the fusion instruction when the fusion instruction corresponding to the first page sharing data occurs in the second data channel, so as to obtain page configuration data of the second page.
In some embodiments of the present application, based on the above technical solutions, the interaction event further includes a page return event for returning the first page from the second page, and the update module 830 further includes:
A second acquisition module configured to acquire second page sharing data including page data shared by the second page to the first page;
a second write module configured to write the second page sharing data to the second data channel;
The second fusion module is configured to fuse the second page sharing data with the initial page data of the first page according to the fusion instruction when a fusion instruction corresponding to the second page sharing data occurs in the second data channel, so as to obtain page updating data of the first page;
And the second display module is configured to display the first page on the interactive interface according to the page update data of the first page.
In some embodiments of the present application, based on the above technical solutions, the first display module further includes:
A view creation module configured to create a second view controller for managing a presentation process of the second page;
A view pushing module configured to push the second view controller to a top of a navigation stack for managing a page hierarchy presented on the interactive interface;
And the view display module is configured to display the second page on the interactive interface according to the second view controller and the page configuration data.
In some embodiments of the present application, based on the above technical solution, the interaction event further includes a page return event for returning the first page from the second page, and the second display module further includes:
A view removal module configured to remove the second view controller from the top of the navigation stack, resulting in a first view controller located below the second view controller, the first view controller for managing a presentation process of the first page;
and the view updating module is configured to display the first page on the interactive interface according to the first view controller and page updating data of the first page.
In some embodiments of the present application, based on the above technical solutions, the page interaction device 800 further includes:
A first function calling module configured to call an observer registration function executing the first data channel, the observer registration function being configured to register an attribute object held by the first data channel as an observed person, the observed person being configured to send a notification to the observer when an attribute changes;
And the second function calling module is configured to call and execute an observer callback function when the attribute of the observed person changes, wherein the observer callback function is used for triggering a notification to the observed person and acquiring the attribute change information of the observed person according to the notification.
In some embodiments of the present application, based on the above technical solution, the observer registration function includes the following fields:
a key value path for indicating an attribute object registered as an observed person;
an observation option for indicating the content of the notification sent by the observed person when the attribute changes;
and the context parameter is used for calling back an identifier to the observer, and the identifier is used for distinguishing different attribute parameters of the observed person.
In some embodiments of the present application, based on the above technical solutions, the page interaction device 800 further includes:
And a third function calling module configured to call an observer removing function for executing the first data channel, the observer removing function being used for canceling an observed registration operation for the first data channel.
Specific details of the page interaction device provided in each embodiment of the present application have been described in the corresponding method embodiments, and are not described herein.
Fig. 9 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the application.
It should be noted that, the computer system 900 of the electronic device shown in fig. 9 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 9, the computer system 900 includes a central processing unit 901 (Central Processing Unit, CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory 902 (ROM) or a program loaded from a storage portion 908 into a random access Memory 903 (Random Access Memory, RAM). In the random access memory 903, various programs and data required for system operation are also stored. The cpu 901, the rom 902, and the ram 903 are connected to each other via a bus 904. An Input/Output interface 905 (i.e., an I/O interface) is also connected to bus 904.
Connected to the input/output interface 905 are an input section 906 including a keyboard, a mouse, and the like, an output section 907 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and the like, and a speaker, and the like, a storage section 908 including a hard disk, and the like, and a communication section 909 including a network interface card such as a local area network card, a modem, and the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the input/output interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. When executed by the central processor 901, performs various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (13)

1.一种页面交互方法,其特征在于,包括:1. A page interaction method, characterized by comprising: 根据在交互界面上触发的交互事件,将第一属性数据写入第一数据通道,所述交互事件包括多个数据处理环节,所述第一数据通道用于在不同的数据处理环节之间传递数据,所述第一属性数据用于表示所述交互界面在所述交互事件的发起环节产生的属性变化信息;Writing first attribute data into a first data channel according to an interaction event triggered on the interaction interface, wherein the interaction event includes a plurality of data processing links, the first data channel is used to transfer data between different data processing links, and the first attribute data is used to represent attribute change information generated by the interaction interface in the initiation link of the interaction event; 向数据源发送数据获取请求,所述数据获取请求用于请求获取对所述第一属性数据做出响应的数据;Sending a data acquisition request to a data source, wherein the data acquisition request is used to request to acquire data that responds to the first attribute data; 当所述第一数据通道中出现与所述数据获取请求对应的第二属性数据时,根据所述第二属性数据更新所述交互界面上展示的页面内容,所述第二属性数据用于表示所述交互界面在所述交互事件的响应环节产生的属性变化信息。When second attribute data corresponding to the data acquisition request appears in the first data channel, the page content displayed on the interactive interface is updated according to the second attribute data, and the second attribute data is used to represent the attribute change information generated by the interactive interface in the response phase of the interactive event. 2.根据权利要求1所述的页面交互方法,其特征在于,所述交互事件包括由第一页面向第二页面跳转的页面跳转事件;根据所述第二属性数据更新所述交互界面上展示的页面内容,包括:2. The page interaction method according to claim 1, wherein the interaction event comprises a page jump event from a first page to a second page; and updating the page content displayed on the interaction interface according to the second attribute data comprises: 解析所述第二属性数据,得到所述第二页面的导航链接;Parsing the second attribute data to obtain a navigation link of the second page; 根据所述导航链接获取所述第二页面的页面配置数据,所述页面配置数据用于表示所述第二页面的页面展示内容和页面展示效果;Acquire page configuration data of the second page according to the navigation link, wherein the page configuration data is used to represent page display content and page display effect of the second page; 根据所述页面配置数据在所述交互界面上展示所述第二页面。The second page is displayed on the interactive interface according to the page configuration data. 3.根据权利要求2所述的页面交互方法,其特征在于,根据所述导航链接获取所述第二页面的页面配置数据,包括:3. The page interaction method according to claim 2, wherein obtaining the page configuration data of the second page according to the navigation link comprises: 根据所述导航链接获取所述第二页面的初始页面数据,所述初始页面数据包括用于对所述第二页面进行初始化配置的数据;Acquire initial page data of the second page according to the navigation link, wherein the initial page data includes data for initializing configuration of the second page; 采集第一页面共享数据,所述第一页面共享数据包括由所述第一页面向所述第二页面共享的数据;Collecting first page shared data, where the first page shared data includes data shared from the first page to the second page; 将所述第一页面共享数据写入第二数据通道,所述第二数据通道用于在不同的页面之间传递数据;Writing the first page shared data into a second data channel, where the second data channel is used to transfer data between different pages; 当所述第二数据通道中出现与所述第一页面共享数据对应的融合指令时,根据所述融合指令将所述初始页面数据与所述第一页面共享数据进行融合处理,得到所述第二页面的页面配置数据。When a fusion instruction corresponding to the first page shared data appears in the second data channel, the initial page data is fused with the first page shared data according to the fusion instruction to obtain page configuration data of the second page. 4.根据权利要求2所述的页面交互方法,其特征在于,所述交互事件包括由第二页面返回第一页面的页面返回事件;根据所述第二属性数据更新所述交互界面上展示的页面内容,包括:4. The page interaction method according to claim 2, wherein the interaction event comprises a page return event of returning from the second page to the first page; and updating the page content displayed on the interaction interface according to the second attribute data comprises: 采集第二页面共享数据,所述第二页面共享数据包括由所述第二页面向所述第一页面共享的页面数据;Collecting second page shared data, where the second page shared data includes page data shared by the second page to the first page; 将所述第二页面共享数据写入所述第二数据通道;Writing the second page shared data into the second data channel; 当所述第二数据通道中出现与所述第二页面共享数据对应的融合指令时,根据所述融合指令将所述第二页面共享数据与所述第一页面的初始页面数据进行融合处理,得到所述第一页面的页面更新数据;When a fusion instruction corresponding to the second page shared data appears in the second data channel, the second page shared data is fused with the initial page data of the first page according to the fusion instruction to obtain page update data of the first page; 根据所述第一页面的页面更新数据在所述交互界面上展示所述第一页面。The first page is displayed on the interactive interface according to the page update data of the first page. 5.根据权利要求2所述的页面交互方法,其特征在于,根据所述页面配置数据在所述交互界面上展示所述第二页面,包括:5. The page interaction method according to claim 2, characterized in that displaying the second page on the interaction interface according to the page configuration data comprises: 创建第二视图控制器,所述第二视图控制器用于管理所述第二页面的展示过程;Creating a second view controller, where the second view controller is used to manage the display process of the second page; 将所述第二视图控制器推入导航堆栈的顶部,所述导航堆栈用于管理在所述交互界面上展示的页面层次结构;Pushing the second view controller to the top of a navigation stack, the navigation stack being used to manage a hierarchy of pages displayed on the interactive interface; 根据所述第二视图控制器和所述页面配置数据在所述交互界面上展示所述第二页面。The second page is displayed on the interactive interface according to the second view controller and the page configuration data. 6.根据权利要求5所述的页面交互方法,其特征在于,所述交互事件还包括由所述第二页面返回所述第一页面的页面返回事件;在根据所述第二视图控制器和所述页面配置数据在所述交互界面上展示所述第二页面之后,所述方法还包括:6. The page interaction method according to claim 5, wherein the interaction event further comprises a page return event in which the second page returns to the first page; after displaying the second page on the interaction interface according to the second view controller and the page configuration data, the method further comprises: 从所述导航堆栈的顶部移除所述第二视图控制器,得到位于所述第二视图控制器下方的第一视图控制器,所述第一视图控制器用于管理所述第一页面的展示过程;Remove the second view controller from the top of the navigation stack to obtain a first view controller located below the second view controller, where the first view controller is used to manage the display process of the first page; 根据所述第一视图控制器和所述第一页面的页面更新数据在所述交互界面上展示所述第一页面。The first page is displayed on the interactive interface according to the first view controller and the page update data of the first page. 7.根据权利要求1至6中任意一项所述的页面交互方法,其特征在于,在将第一属性数据写入第一数据通道之前,所述方法还包括:7. The page interaction method according to any one of claims 1 to 6, characterized in that before writing the first attribute data into the first data channel, the method further comprises: 调用执行所述第一数据通道的观察者注册函数,所述观察者注册函数用于将所述第一数据通道持有的属性对象注册为被观察者,所述被观察者用于在属性变化时向观察者发送通知;Calling and executing an observer registration function of the first data channel, wherein the observer registration function is used to register the attribute object held by the first data channel as an observer, and the observer is used to send a notification to the observer when the attribute changes; 当所述被观察者出现属性变化时,调用执行观察者回调函数,所述观察者回调函数用于向所述观察者触发通知并根据所述通知获取所述被观察者的属性变化信息。When the observed object has a property change, the observer callback function is called and executed, and the observer callback function is used to trigger a notification to the observer and obtain the property change information of the observed object according to the notification. 8.根据权利要求7所述的页面交互方法,其特征在于,所述观察者注册函数包括如下字段:8. The page interaction method according to claim 7, characterized in that the observer registration function includes the following fields: 键值路径,用于指示注册为被观察者的属性对象;The key value path is used to indicate the property object registered as the observer; 观察选项,用于指示所述被观察者在属性变化时发送通知的内容;Observation options, used to indicate the content of the notification sent by the observed object when the attribute changes; 上下文参数,用于向所述观察者回调函数传递标识符,所述标识符用于区分所述被观察者的不同属性参数。The context parameter is used to pass an identifier to the observer callback function, where the identifier is used to distinguish different attribute parameters of the observed object. 9.根据权利要求7所述的页面交互方法,其特征在于,在根据所述第二属性数据更新所述交互界面上展示的页面内容之后,所述方法还包括:9. The page interaction method according to claim 7, characterized in that after updating the page content displayed on the interaction interface according to the second attribute data, the method further comprises: 调用执行所述第一数据通道的观察者移除函数,所述观察者移除函数用于取消针对所述第一数据通道的被观察者注册操作。An observer removal function of the first data channel is called and executed, where the observer removal function is used to cancel an observer registration operation for the first data channel. 10.一种页面交互装置,其特征在于,包括:10. A page interaction device, comprising: 写入模块,被配置为根据在交互界面上触发的交互事件,将第一属性数据写入第一数据通道,所述交互事件包括多个数据处理环节,所述第一数据通道用于在不同的数据处理环节之间传递数据,所述第一属性数据用于表示所述交互界面在所述交互事件的发起环节产生的属性变化信息;a writing module, configured to write first attribute data into a first data channel according to an interaction event triggered on the interaction interface, wherein the interaction event includes a plurality of data processing links, the first data channel is used to transfer data between different data processing links, and the first attribute data is used to represent attribute change information generated by the interaction interface during the initiation link of the interaction event; 发送模块,被配置为向数据源发送数据获取请求,所述数据获取请求用于请求获取对所述第一属性数据做出响应的数据;a sending module, configured to send a data acquisition request to a data source, wherein the data acquisition request is used to request to acquire data that responds to the first attribute data; 更新模块,被配置为当所述第一数据通道中出现与所述数据获取请求对应的第二属性数据时,根据所述第二属性数据更新所述交互界面上展示的页面内容,所述第二属性数据用于表示所述交互界面在所述交互事件的响应环节产生的属性变化信息。The update module is configured to update the page content displayed on the interactive interface according to the second attribute data when the second attribute data corresponding to the data acquisition request appears in the first data channel, and the second attribute data is used to represent the attribute change information generated by the interactive interface in the response phase of the interactive event. 11.一种计算机可读介质,其特征在于,所述计算机可读介质上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至9中任意一项所述的页面交互方法。11. A computer-readable medium, characterized in that a computer program is stored on the computer-readable medium, and when the computer program is executed by a processor, the page interaction method according to any one of claims 1 to 9 is implemented. 12.一种电子设备,其特征在于,包括:12. An electronic device, comprising: 处理器;以及Processor; and 存储器,用于存储所述处理器的可执行指令;A memory, configured to store executable instructions of the processor; 其中,所述处理器配置为执行所述可执行指令以实现如权利要求1至9中任意一项所述的页面交互方法。Wherein, the processor is configured to execute the executable instructions to implement the page interaction method as described in any one of claims 1 to 9. 13.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任意一项所述的页面交互方法。13. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the page interaction method according to any one of claims 1 to 9 is implemented.
CN202411288667.6A 2024-09-13 2024-09-13 Page interaction method, device, medium, electronic device and program product Pending CN119201494A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411288667.6A CN119201494A (en) 2024-09-13 2024-09-13 Page interaction method, device, medium, electronic device and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411288667.6A CN119201494A (en) 2024-09-13 2024-09-13 Page interaction method, device, medium, electronic device and program product

Publications (1)

Publication Number Publication Date
CN119201494A true CN119201494A (en) 2024-12-27

Family

ID=94050410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411288667.6A Pending CN119201494A (en) 2024-09-13 2024-09-13 Page interaction method, device, medium, electronic device and program product

Country Status (1)

Country Link
CN (1) CN119201494A (en)

Similar Documents

Publication Publication Date Title
US11740891B2 (en) Providing access to a hybrid application offline
US7490167B2 (en) System and method for platform and language-independent development and delivery of page-based content
JP5363506B2 (en) Methods, systems, and computer programs for customizing and distributing existing applications using browser-based proxy servers (browser-based proxy servers for customizing and distributing existing applications)
CN105051686B (en) System and method for integrated recommendation
CN113261023A (en) Remote access to metadata for a collaborative document
US20070100844A1 (en) System and method for dynamically updating web pages using messaging-oriented middleware
US20140282371A1 (en) Systems and methods for creating or updating an application using a pre-existing application
WO2023040443A1 (en) Method and device for drawing canvas
US20230060787A1 (en) System and Method for Real-Time, Dynamic Creation, Delivery, and Use of Customizable Web Applications
US20120166977A1 (en) User programming access to data model in user interface design
WO2020143557A1 (en) Method and device for displaying information
WO2020216310A1 (en) Method used for generating application, terminal device, and computer readable medium
Chandiramani et al. Management of Django web development in Python
US20200007959A1 (en) Method and apparatus for publishing information, and method and apparatus for processing information
US20130031166A1 (en) Processing content in a plurality of languages
KR20160022362A (en) Synchronization points for state information
US20140337284A1 (en) Synchronizing folders using a shadow folder hierarchy
JP2024500300A (en) Information interaction methods, devices, and equipment
CN102142004B (en) Service processing method and service engine
CN115081412A (en) Table content processing method, device, equipment and storage medium
CN101140561B (en) Course data processing system and method
US11983483B2 (en) Web site preview generation with action control
CN119201494A (en) Page interaction method, device, medium, electronic device and program product
US11960817B2 (en) Web site preview based on client presentation state
CN113806650A (en) Webpage application processing method and device, storage medium and electronic equipment

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