CN112527422B - View updating method, device, equipment and storage medium - Google Patents

View updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN112527422B
CN112527422B CN201910878170.2A CN201910878170A CN112527422B CN 112527422 B CN112527422 B CN 112527422B CN 201910878170 A CN201910878170 A CN 201910878170A CN 112527422 B CN112527422 B CN 112527422B
Authority
CN
China
Prior art keywords
view
target
proxy
service
updating
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.)
Active
Application number
CN201910878170.2A
Other languages
Chinese (zh)
Other versions
CN112527422A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910878170.2A priority Critical patent/CN112527422B/en
Publication of CN112527422A publication Critical patent/CN112527422A/en
Application granted granted Critical
Publication of CN112527422B publication Critical patent/CN112527422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a view updating method, a device, equipment and a storage medium; the method comprises the following steps: acquiring a view adding request sent by a target service; determining a target view corresponding to the view adding request; if the target view is added to other services, determining state information of the target view; creating a proxy view according to the state information of the target view; and adding the proxy view to the target service. By adding the proxy view created based on the state information of the target view into the target service, the target view added into other services is added into a plurality of different services, and consistency among different services and accuracy of view display are improved.

Description

View updating method, device, equipment and storage medium
Technical Field
The present invention relates to the field of view technologies, and in particular, to a method, an apparatus, a device, and a storage medium for updating views.
Background
In the related art, since one view in an operating system cannot be added to a plurality of services at the same time, when one service needs to add a view which has been added to another service, the view needs to be removed from the other service before the view is added to the service; however, for multiple independent services, since other service logic is not known between the services, if a certain view is added to service a first, a certain view needs to be taken out of service a when service B adds the certain view; when returning again to service a, display or run logic errors are caused because service a does not know that a view has been taken away.
Disclosure of Invention
The embodiment of the invention provides a view updating method, a device, equipment and a storage medium, which can improve the consistency among different services and the accuracy of view display by adding a target view added in other services into a plurality of different services.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a view updating method, including:
acquiring a view adding request sent by a target service;
determining a target view corresponding to the view adding request;
if the target view is added to other services, determining state information of the target view;
creating a proxy view according to the state information of the target view;
and adding the proxy view to the target service.
In a second aspect, an embodiment of the present invention provides a view updating apparatus, including:
the first acquisition module is used for acquiring a view adding request sent by the target service;
the first determining module is used for determining a target view corresponding to the view adding request;
a second determining module, configured to determine state information of the target view if the target view is already added to other services;
The first creating module is used for creating a proxy view according to the state information of the target view;
and the first adding module is used for adding the proxy view to the target service.
In a third aspect, an embodiment of the present invention provides a device for updating a view, including:
a memory for storing executable instructions;
and the processor is used for realizing the view updating method when executing the executable instructions stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a storage medium storing executable instructions for implementing the view updating method provided by the embodiment of the present invention when the storage medium is used to cause a processor to execute the executable instructions.
The embodiment of the invention has the following beneficial effects: firstly, obtaining a view adding request sent by a target service; determining a target view corresponding to the view adding request; then, if the target view is already added on other services, determining state information of the target view; creating a proxy view according to the state information of the target view; and finally, adding the proxy view to the target service. When a view adding request of adding one view to the target service is acquired, the proxy view created based on the state information of the target view is added to the target service, so that the target view added to other services is added to a plurality of different services, and consistency among different services and accuracy of view display are improved.
Drawings
FIG. 1 is a schematic diagram of an alternative architecture of a view update system provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a system for view update provided by an embodiment of the present invention;
FIG. 3A is a schematic diagram of an implementation flow of a view update method according to an embodiment of the present invention;
FIG. 3B is a flowchart illustrating another implementation of a view update method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another implementation of a view update method according to an embodiment of the present invention;
FIG. 5A is a schematic diagram of an application scenario of a view update method according to an embodiment of the present invention;
fig. 5B is a logic block diagram of an embodiment of the present invention implementing a view update method.
Detailed Description
The present invention will be further described in detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present invention more apparent, and the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the invention described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before describing embodiments of the present invention in further detail, the terms and terminology involved in the embodiments of the present invention will be described, and the terms and terminology involved in the embodiments of the present invention will be used in the following explanation.
1) Views (views), which are base classes of all controls in the operating system, are views, whether simple Text views (Text views), buttons (buttons) or complex Linear Layout (Linear Layout) and List views (List views), the common base classes of which are views; the view is an abstraction of a control of the interface layer, representing a control
2) The main states of the view include: a pressed state, a non-pressed state, a focus-focusing state, a non-focus-focusing state, a selected state, a non-selected state an active state, an inactive state, a checkable state, an uncheckable state, a checked state, and an unchecked state.
3) Single instance mode, a common software design mode that is of the creation type. The class created by the method of the single instance mode has only one instance in the current process;
4) In the single-case view and the single-case mode tool class view, the class method and the object method need to be provided simultaneously so as to be used as interfaces by others, since the single-case mode tool class view is the single-case mode, naturally, only one object in the whole class is returned, and when the objects are displayed and removed, the same object is operated, and the same object can be taken by a single case in different methods.
5) Mount (mount) refers to a process by which a computer file and directory on a storage device (such as a hard disk or shared resource) is made available to a user for access through the computer's file system by the operating system. Typically, when the computer is shut down, each mounted storage will undergo an uninstallation to ensure that all queued data is written to and to ensure the integrity of the on-media file system structure.
In the related art, the operating system does not allow one view to be added to a plurality of services, so that a certain view needs to be mounted from one service view, and the view needs to be removed from the service to which the view belongs before, so that the view can be added to the current service, but for a plurality of independent services, because other service logics are not known between the services, if the service A first adds the view, the service B needs to remove a single instance view from the service A when adding the view, and when returning to the service A again, the service A may not know that the view has been removed, thereby causing display or operation logic errors.
In view of the technical problems described above, embodiments of the present invention provide a view updating method, a terminal, and a storage medium, by creating a proxy view according to a target view that needs to be multiplexed when a service needs to multiplex the target view, and adding the proxy view to the service, so as to implement adding views in the same state to multiple different views.
The following describes exemplary applications of the device for view update provided by the embodiments of the present invention, where the device provided by the embodiments of the present invention may be implemented as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), and other various types of user terminals, and may also be implemented as a server. In the following, an exemplary application when the device is implemented as a terminal or a server will be described.
Referring to fig. 1, fig. 1 is an optional architecture diagram of a view update system provided in an embodiment of the present invention, to support an exemplary application, first, when a view addition request for adding a view sent by a service a11 is received, a target view 101 to be added is determined based on the view addition request; then, based on the identification information of the target view 101, it is determined whether the target view 101 has been added in the service B12; if the target view 101 is already added in the service B12, sending the view adding request to a first virtual view control 102 in the service A11, and adopting the first virtual view control 102 to create a proxy view 103 which is the same as the state information of the target view 101 based on the state information; thus, by creating a virtual view, when a service needs to multiplex an entity view, the virtual view creates a proxy view according to the entity view, and adds the proxy view to the service, thereby realizing that the view in the same state is added to a plurality of different services.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a view updating system provided in an embodiment of the present invention, and a terminal 400 shown in fig. 2 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable connected communication between these components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 2 as bus system 440.
The processor 410 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, a digital signal processor, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., wherein the general purpose processor may be a microprocessor or any conventional processor, etc.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable presentation of the media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, in some examples a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
Memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware terminals include solid state memory, hard drives, optical drives, and the like. Memory 450 optionally includes one or more storage terminals physically remote from processor 410.
Memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (R OM), and the volatile Memory may be a random access Memory (Random Access Memory, RAM). The memory 450 described in embodiments of the present invention is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 451 including system programs, e.g., framework layer, core library layer, driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for reaching other computing terminals via one or more (wired or wireless) network interfaces 420, the exemplary network interface 420 comprising: bluetooth, wireless compatibility authentication, and universal serial bus (Universal Serial Bus, USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., a user interface for operating a peripheral terminal and displaying content and information) via one or more output devices 431 (e.g., a display screen, speakers, etc.) associated with the user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided by the embodiments of the present invention may be implemented in software, and fig. 2 shows a server 455 for view update stored in a memory 450, which may be software in the form of a program, a plug-in, or the like, including the following software modules: a first acquisition module 4551, a first determination module 4552, a second determination module 4553, a first creation module 4554, and a first addition module 4555; these modules are logical and can thus be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be described hereinafter.
In other embodiments, the apparatus provided by the embodiments of the present invention may be implemented in hardware, and by way of example, the apparatus provided by the embodiments of the present invention may be a processor in the form of a hardware decoding processor that is programmed to perform the view updating method provided by the embodiments of the present invention, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (Application Specific Integ rated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, pld), complex programmable logic device (Complex Programmable Logic Device, CPLD), field-programmable gate array (Field-Programmable Gate Array, FPGA), or other electronic component.
The view updating method provided by the embodiment of the invention will be described in connection with the exemplary application and implementation of the terminal provided by the embodiment of the invention.
Referring to fig. 3A, fig. 3A is a schematic flowchart of an implementation of a view updating method according to an embodiment of the present invention, and is described with reference to steps shown in fig. 3A.
Step S301, a view adding request sent by a target service is acquired.
In some embodiments, the target service may be any service, such as an application. And the view adding request is a view adding request for adding views to the request sent by the target service.
Step S302, determining a target view corresponding to the view adding request.
In some embodiments, a target view of the target business request addition is determined.
Step S303, if the target view is already added to other services, determining state information of the target view.
In some embodiments, first, an identification of a target view corresponding to the view addition request is determined; then, if the target view is determined to be added to other services according to the identification of the target view, determining the state information of the target view; the status information includes at least: a pressed state, a non-pressed state, a focus-focusing state, a non-focus-focusing state, a selected state, a non-selected state an active state, an inactive state, a checkable state, an uncheckable, a checked state, or an unchecked state, etc.
Step S304, creating a proxy view according to the state information of the target view.
In some embodiments, the state information of the proxy view to be created is determined based on the state information of the target view such that the state information of the proxy view matches the proxy information of the target view. The proxy view may be understood as a newly created view that is capable of performing the same function as the target view and has state information that matches the state information of the target view.
And step S305, adding the proxy view to the target service.
In some embodiments, since the target view has been added to other services, a proxy view is created based on the state information of the target view, and the proxy view is added to the target service to achieve the same function as the target view; therefore, the views with the matched states can be multiplexed by different services, no additional operation is needed, and the use is convenient and concise.
In the embodiment of the invention, when the view adding request of the service needing to multiplex one view is acquired, the proxy view is created according to the state information of the target view, and the proxy view is added in the target service, so that the target view added in other services is added in a plurality of different services, and then the views matched with the multiplexing states of different processes and different platforms can be multiplexed, the repeated development of the same style of different platforms is reduced, the multi-terminal parallel development efficiency is improved, and the probability of display or operation logic errors is reduced.
In some embodiments, to avoid creating unnecessary proxy views, after step S302, the method further comprises:
and if the target view is not currently added on any service, adding the target view on the target service.
If the target view is not currently added to any service, it is indicated that the target view does not currently belong to any service (or the target view is not currently added to any parent view, which can be understood as a view to which the target view can be added in different services), in this case, a proxy view is not required to be created, and the target view is added to the target service, so that the requirement of the operating system for one service corresponding to the state-matched view is also met.
In some embodiments, a virtual view control is set in advance in each service, and a virtual view controller is used to create a proxy view matched with the state information of the target view, before step S304, the method includes the following steps, referring to fig. 3B, fig. 3B is a schematic flow diagram of another implementation of the view update method provided in the embodiment of the present invention, and is described in connection with fig. 3A:
and step S321, the state information of the target view is sent to a first virtual view control in the target service.
In some embodiments, the first virtual view control is a control corresponding to a virtual view created in advance, and may be understood as a virtual view used to create a proxy view.
Step S322, using the first virtual view control, creating the proxy view according to the state information of the target view.
In one specific example, the virtual view controls are in one-to-one correspondence with the proxy views. After receiving the state information of the target view, the first virtual view control generates proxy state information matched with the state information of the target view, and takes the proxy state information as the state information of the proxy view to create the proxy view.
In other embodiments, after the view addition request is obtained, the view addition request is sent to the first virtual view control; after receiving the view adding request, the first virtual view control determines the identification of the corresponding target view based on the view adding request; and if the target view is determined to be added to other services according to the identification of the target view, determining the state information of the target view by a first virtual view control, and finally, creating the proxy view according to the state information of the target view by the first virtual view control. Therefore, after the agent view is added on the target service, the target service can realize the functions of the target view, so that the target view is added on the side of the target service, the purpose that the target view with the same state information is added on different services is realized, and the views with the same state information can be multiplexed on different processes and different platforms.
In other embodiments, in order to match the state information of the created proxy view with the state information of the target view, the step S322 may be implemented by:
and a first step of determining agent state information matched with the state information of the target view by adopting the first virtual view control.
In some embodiments, after the first virtual view control determines the state information of the target view, determining proxy state information that matches the state information of the target view; in a specific example, the proxy state information may be understood that the similarity with the proxy information of the target view is greater than a similarity threshold, for example, the same number of parameters contained in the proxy state information is greater than a number threshold, that is, the same number of parameters contained in the proxy state information and the proxy information of the target view are greater, or the state information of the target view is determined as proxy state information.
And secondly, creating the proxy view according to the proxy state information.
In some embodiments, a first virtual view control creates the proxy view from the proxy state information. For example, the state information of the target view is taken as proxy state information, and based on this, a proxy view containing the proxy state information is created.
In other embodiments, in order to update the proxy view in the target service and update the target view in the other service, after step S305, the method further includes the following steps, see fig. 4, where fig. 4 is a schematic flow chart of still another implementation of the view update method provided by the embodiment of the present invention, and is described in connection with fig. 3A:
step S401, acquiring an update instruction sent by the target service to update the target view.
In some embodiments, when the target service needs to update the added target view from the service side, an update instruction is sent to a first virtual view space corresponding to the target view in the target service.
Step S402, in response to the update instruction, updates the proxy view corresponding to the target view.
In some embodiments, the update instruction is responded to update the current display interface corresponding to the proxy view, for example, the update instruction is sent to the controller of the current display interface, so that the controller redraws the current display interface to which the proxy view belongs based on the update operation required by the update instruction.
And step S403, transmitting the update information for updating the proxy view to the first virtual view control.
In some embodiments, update information that updates the current interface is communicated to the first virtual view control. For example, update information that redraws the current interface is passed to the first virtual view control to inform the first virtual view control that the proxy view has been updated.
And step S404, the first virtual view control is adopted, and the updating information is sent to a second virtual view control in the other business so as to update the added target view in the other business.
In some embodiments, the first virtual view control is adopted, the update information is carried in a cross-platform update instruction capable of being transmitted in a cross-platform manner, and the cross-platform update instruction is sent to a second virtual view control in the other business so as to update the added target view in the other business. And generating a cross-platform general cross-platform updating instruction based on the updating information by adopting the first virtual view control, carrying the updating information in the cross-platform updating instruction, and sending the updating information to a second virtual view control in other services so as to update the added target view in the other services.
The step S404 may be implemented by:
and the first step is to send the update information to the update synchronizer of the current display interface by adopting the first virtual view control.
For example, the first virtual view control is adopted, the update information is carried in a cross-platform update instruction, and the cross-platform update instruction is sent to an update synchronizer of the current display interface. And the first virtual view control sends the update information to the update synchronizer of the current display interface.
And secondly, transmitting the update information to the second virtual view controller by adopting the update synchronizer.
In a specific example, the update synchronizer is adopted to carry the update information to the second virtual view controller through a cross-platform update instruction. Firstly, determining the attribution relation between the target service and the other service; for example, the target service and the other service are included in the same process, different processes in which the target service and the other service are included in the same device, or the target service and the other service are included in different devices, etc.; then, in the update synchronizer, determining a transmission mode matched with the attribution relation; and finally, transmitting the updated information to the second virtual view control by adopting the transmission mode matched with the attribution relation. For example, if the target service and the other services are included in the same process, transmitting the cross-platform update instruction to the second virtual view control by using a message queue in the update synchronizer; if the target service and the other service are contained in different processes in the same equipment, a cross-over Cheng Tongxin device in the update synchronizer is adopted to transmit the cross-platform update instruction to the second virtual view control; and if the target service and the other services are contained in different devices, transmitting the cross-platform updating instruction to the second virtual view control by adopting a bottom socket in the updating synchronizer.
And thirdly, updating the added target view in the other services by adopting the second virtual view control according to the updating information.
In some embodiments, in response to the cross-platform update instruction, the second virtual view control is adopted, and the target view added in the other service is updated according to update information carried in the cross-platform update instruction. The second virtual view control analyzes the cross-platform updating instruction, and sends the cross-platform updating instruction to the controllers of the display interfaces of the other services, so that the controllers redraw the current display interface based on the updating information in the cross-platform updating instruction, and the updating of the added target view in the other services is realized.
In other embodiments, if the other service is not the first service to add the target view, updating the proxy view of the target view already added in the other service based on the update information in the cross-platform update instruction; therefore, synchronous updating of views in the same state in different services is realized, so that consistency of display interfaces in different scenes is improved, and disambiguation of inconsistent display interfaces caused by users is reduced.
In the following, an exemplary application of the embodiment of the present invention in an actual application scenario will be described, where two views with identical states are added to a parent view, and one view in the parent view is updated while the other view is updated as an example.
In some embodiments, views of the same state in an operating system cannot be added to different parent views at the same time (i.e., views in different services to which a target view can be added), if one view is to be implemented to be added to a different parent view, the following two ways can be used:
in one approach, two views are created to be added to different views respectively, but the two views are independent and no longer share the same state.
In the second way, if the same view is intended to be on different father views, only one father view can be guaranteed at the same time, for example, the view is added when the father view A is displayed, then the view is removed from the father view A when the father view B is displayed, and then the view is added to the father view B.
But neither of the two approaches addresses the need to fully multiplex the same view. In one mode, only the state of the current two views can be guaranteed to be consistent, and after the current two views are added to the father views of different businesses, one view is updated because the two independent views are provided, and the views in the other business are not updated synchronously. In the second mode, although the same view is used, the interface or the interface needs to be manually removed before being added to the new view when being switched, so that the coupling between logic of different services is caused, meanwhile, because no perception exists between the services, the logic assurance that the added logic is manually removed before each time the view is used can not be ensured, and therefore, the abnormal display is caused because the service is not timely notified after the view of some services is removed. Moreover, the first and second modes cannot span a process and a platform, and the same view cannot be displayed on different processes or terminals at the same time.
Based on this, the embodiment of the invention provides a view updating method, which enables a plurality of different views to share one view through communication modes such as remote proxy, cross-process communication and operating system message queues, namely, a target view containing the same state information can be added in different services, so that different applications are achieved, different services even cross-network devices can share the same view state, and the problem that a single view can be used across services, applications or devices is solved.
In a specific example, as shown in fig. 5A, from the application side, the application a 511 of the device a 51 shares one target view D53 with the application B512 and the application C521 of the device B52, and then the sub-update operation of the application a 511 on the target view D53 is synchronized with the application B512 and the application C521 of the device B52, so that the application B512 and the application C521 are as if they are using and updating the target view D53 at the same time.
The process is realized through the communication of a virtual view control and a plurality of proxy views, different proxy views are respectively used on the application A, the application B and the application C, the proxy views are synchronously sent to the virtual view control when updated, and the virtual view control is synchronously distributed to the proxy views of other views for updating. In this way, by adopting the virtual view control, each service can automatically create a proxy view from the virtual view control when adding the target view, and different services mount different proxy views, and when the proxy view is updated in operation, the proxy view is updated to other proxy views through the virtual view control, so that the target view with the same state information added by different services shows a final consistent state.
In the embodiment of the invention, a developer only needs to declare one virtual view control and point the virtual view control to an existing view. And then, returning to the proxy view of the current view through a virtual view control acquisition method when the target view needs to be multiplexed, and then mounting the proxy view on different service parties. The code is as follows:
view existview = new Imageview (mContext); % view already present;
virtualview virtual = virtualview. Set VirtualCenter (existview); % pointing the virtual view to an existing view;
view someview = Virtual, getproxy Virtual (); % a certain service needs to multiplex virtual views;
add view(someview);someview.add(xxx);
fig. 5B is a logic structure diagram for implementing a view updating method according to an embodiment of the present invention, and the following description is made with reference to fig. 5B:
service a501 and service B502 are respectively different view services.
In the embodiment of the present invention, assuming that the service a501 performs an update operation on the virtual view control, the service B502 performs an update operation in synchronization. In the embodiment of the invention, the service A and the service B are both bidirectional processes, namely, the view in the service A and the service B can be updated, and the updated content of one view can be synchronized with the views of other services.
First, when the service a501 performs an update operation on the virtual view control, the service a501 sends a service operation event (i.e., an update instruction) to the proxy view 503 corresponding to the service a.
In some embodiments, each service has an independent virtual view control that corresponds one-to-one to the proxy view, but is not visible to the development, so the development can only operate the proxy view at a time. Therefore, the same view can be multiplexed by different services, no additional operation is needed, and the use is convenient and concise. Each service multiplexing target view is actually obtained by a proxy view created by the virtual view control, and each service has an independent proxy view, so that the rule that one view only has one father view is not required by the operating system frame, and the service can smoothly run on the operating system frame.
Secondly, the controller of the proxy view 503 transmits the User Interface (UI) operation corresponding to the business operation event to the display interface controller 504 of the operating system, so that the display interface controller 504 of the operating system updates and redraws the view, and then transmits the update operation to the virtual view control 505 corresponding to the proxy view 503.
In some embodiments, when the service generates a UI update operation on the proxy view, the proxy view may have two actions, one is that the proxy view is used as a normal view, the UI operation is transmitted to the Android frame, so that the Android frame updates and redraws the view, and the other is that the UI operation is transmitted to the virtual view control.
Again, the virtual view control 505 encodes the UI operation of the proxy view 503 to form cross-platform generic UI update instructions and passes the generic user interface update instructions to the underlying UI update synchronizer 506.
In some embodiments, update synchronizer 506 (e.g., a UI update synchronizer) is comprised of a message queue 561 (e.g., a UI message queue (UI Handler)), a stride Cheng Tongxin communicator 562 (e.g., an IPC bind r communicator), and an underlying socket communicator 563.
If the update to the target view is to be synchronized with the virtual view control of the service belonging to the same process as the target service, a UI message queue 561 is adopted, and the update instruction of the UI is directly transmitted to the virtual view control of the service; if the update to the target view is to be synchronized with the virtual view control of the business of different processes belonging to the same equipment with the target business, a cross-over Cheng Tongxin device 562 is adopted, and the update instruction of the UI is transmitted to the virtual view control of different processes in a cross-process way through a cross-over Cheng Tongxin device calling technology; if the update to the target view is to be synchronized with the virtual view control of the service belonging to the different device with the target service, the update request of the UI is transmitted to the remote virtual view control through the network by the bottom socket communicator 563.
After receiving the UI update instruction fed back by the UI update synchronizer 506, the virtual view control 507 corresponding to the service B502 decodes the UI update instruction to generate a UI update operation applicable to the current platform, and transmits the UI update operation to the proxy view 508 corresponding to the virtual view control 507.
The proxy view 508 requests UI update from the display interface controller 504 of the operating system after receiving the UI update operation, so that the display interface controller 504 of the operating system redraws the proxy view 508 to finally form UI style synchronous update; thus, the final consistency of the UI in different scenes is ensured, and the ambiguity of inconsistent UI caused to the user is reduced; and the same view is multiplexed on different processes and different platforms, so that repeated development of the same style of different platforms can be reduced, and the multi-terminal parallel development efficiency is improved.
Continuing with the description below of an exemplary architecture of the view update server 455 provided by embodiments of the present invention implemented as a software module, in some embodiments, as shown in FIG. 2, the software modules stored in the view update server 455 of the memory 440 may include:
a first obtaining module 4551, configured to obtain a view addition request sent by a target service;
A first determining module 4552, configured to determine a target view corresponding to the view addition request;
a second determining module 4553, configured to determine state information of the target view if the target view has been added to another service;
a first creating module 4554, configured to create a proxy view according to the state information of the target view;
a first adding module 4555, configured to add the proxy view to the target service.
In some embodiments, the second determining module 4553 is further configured to: and if the target view is not currently added on any service, adding the target view on the target service.
In some embodiments, the first creation module 4554 is further to: transmitting the state information of the target view to a first virtual view control in the target service; correspondingly, the first virtual view control is adopted, and the proxy view is created according to the state information of the target view.
In some embodiments, the first creation module 4554 is further to: determining proxy state information matched with the state information of the target view by adopting the first virtual view control; and creating the proxy view according to the proxy state information.
In some embodiments, the first adding module 4555 is further configured to: acquiring an updating instruction for updating the target view, which is sent by the target service; responding to the update instruction, and updating the proxy view corresponding to the target view; transmitting the update information for updating the proxy view to the first virtual view control; and transmitting the update information to a second virtual view control in the other business by adopting the first virtual view control so as to update the added target view in the other business.
In some embodiments, the first adding module 4555 is further configured to: responding to the update instruction, and updating the current display interface corresponding to the proxy view; correspondingly, the updating information for updating the current interface is transmitted to the first virtual view control.
In some embodiments, the first adding module 4555 is further configured to: adopting the first virtual view control to send the update information to an update synchronizer of the current display interface; transmitting the update information to the second virtual view controller by adopting the update synchronizer; and updating the added target view in the other business according to the updating information by adopting the second virtual view control.
Embodiments of the present invention provide a storage medium having stored therein executable instructions which, when executed by a processor, cause the processor to perform the method provided by the embodiments of the present invention.
In some embodiments, the storage medium may be FRAM, ROM, PROM, EPROM, EE PROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various terminals including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (H yper Text Markup Language, HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, the executable instructions may be deployed to be executed on one on-board computing terminal or on multiple computing terminals located at one site, or on multiple computing terminals distributed across multiple sites and interconnected by a communication network.
In summary, in the embodiment of the present invention, in the process of adding the target view added in other services to the target service, first, a view adding request sent by the target service is obtained; determining a target view corresponding to the view adding request; then, if the target view is already added on other services, determining state information of the target view; creating a proxy view according to the state information of the target view; and finally, adding the proxy view to the target service. When a view adding request of adding one view to a target service is acquired, a proxy view is created according to the state information of the target view, and the proxy view is added to the service, so that the target view added to other services is added to the target service, and consistency among different services is ensured.
The foregoing is merely exemplary embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims (9)

1. A method of view updating, the method comprising:
acquiring a view adding request sent by a target service;
determining a target view corresponding to the view adding request;
if the target view is added to other services, determining state information of the target view;
creating a proxy view according to the state information of the target view by adopting a first virtual view control in the target service;
adding the proxy view to the target service;
acquiring an updating instruction for updating the target view, which is sent by the target service;
responding to the update instruction, and updating the proxy view corresponding to the target view;
transmitting the update information for updating the proxy view to the first virtual view control;
and transmitting the update information to a second virtual view control in the other business by adopting the first virtual view control so as to update the added target view in the other business.
2. The method of claim 1, wherein after the determining the target view to which the view addition request corresponds, the method further comprises:
And if the target view is not currently added on any service, adding the target view on the target service.
3. The method according to claim 1, wherein the method further comprises:
and sending the state information of the target view to a first virtual view control in the target service.
4. The method of claim 1, wherein the creating the proxy view using the first virtual view control in the target service according to the state information of the target view comprises:
determining proxy state information matched with the state information of the target view by adopting the first virtual view control;
and creating the proxy view according to the proxy state information.
5. The method of claim 1, wherein the updating the proxy view corresponding to the target view in response to the update instruction comprises:
responding to the update instruction, and updating the current display interface corresponding to the proxy view;
correspondingly, the updating information for updating the proxy view is transmitted to a first virtual view control in the target service, and the method comprises the following steps:
And transmitting the updated information for updating the current interface to the first virtual view control.
6. The method of claim 5, wherein the employing the first virtual view control to send the update information to a second virtual view control in the other service to update the target view that has been added in the other service comprises:
adopting the first virtual view control to send the update information to an update synchronizer of the current display interface;
transmitting the update information to the second virtual view control by adopting the update synchronizer;
and updating the added target view in the other business according to the updating information by adopting the second virtual view control.
7. A view updating apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a view adding request sent by the target service;
the first determining module is used for determining a target view corresponding to the view adding request;
a second determining module, configured to determine state information of the target view if the target view is already added to other services;
The first creating module is used for creating a proxy view according to the state information of the target view by adopting a first virtual view control in the target service;
the first adding module is used for adding the proxy view to the target service; acquiring an updating instruction for updating the target view, which is sent by the target service; responding to the update instruction, and updating the proxy view corresponding to the target view; transmitting the update information for updating the proxy view to the first virtual view control; and transmitting the update information to a second virtual view control in the other business by adopting the first virtual view control so as to update the added target view in the other business.
8. A view updating apparatus, comprising:
a memory for storing executable instructions;
a processor for implementing the method of any one of claims 1 to 6 when executing executable instructions stored in said memory.
9. A storage medium having stored thereon executable instructions for causing a processor to perform the method of any one of claims 1 to 6.
CN201910878170.2A 2019-09-17 2019-09-17 View updating method, device, equipment and storage medium Active CN112527422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910878170.2A CN112527422B (en) 2019-09-17 2019-09-17 View updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910878170.2A CN112527422B (en) 2019-09-17 2019-09-17 View updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112527422A CN112527422A (en) 2021-03-19
CN112527422B true CN112527422B (en) 2024-03-22

Family

ID=74974822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910878170.2A Active CN112527422B (en) 2019-09-17 2019-09-17 View updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527422B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551742A (en) * 2008-03-31 2009-10-07 上海宝信软件股份有限公司 Guidance assembly for assisting building applying system for service
CN107885570A (en) * 2017-11-16 2018-04-06 口碑(上海)信息技术有限公司 It is multiplexed the method and device of view component
CN108604245A (en) * 2016-06-22 2018-09-28 华为技术有限公司 A kind of method and device obtaining web page contents
CN108804100A (en) * 2018-05-23 2018-11-13 北京五八信息技术有限公司 Create method, apparatus, storage medium and the mobile terminal of interface element
CN108984237A (en) * 2017-05-31 2018-12-11 武汉斗鱼网络科技有限公司 A kind of control rendering method, storage medium, equipment and system
CN109670159A (en) * 2018-12-28 2019-04-23 天津字节跳动科技有限公司 The creation of view and management method, device, electronic equipment and storage medium
CN109766098A (en) * 2019-01-09 2019-05-17 腾讯科技(深圳)有限公司 Operation method, equipment and the storage medium of application program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130219307A1 (en) * 2012-02-21 2013-08-22 Artisan Mobile, Inc. System and method for runtime user interface management

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551742A (en) * 2008-03-31 2009-10-07 上海宝信软件股份有限公司 Guidance assembly for assisting building applying system for service
CN108604245A (en) * 2016-06-22 2018-09-28 华为技术有限公司 A kind of method and device obtaining web page contents
CN108984237A (en) * 2017-05-31 2018-12-11 武汉斗鱼网络科技有限公司 A kind of control rendering method, storage medium, equipment and system
CN107885570A (en) * 2017-11-16 2018-04-06 口碑(上海)信息技术有限公司 It is multiplexed the method and device of view component
CN108804100A (en) * 2018-05-23 2018-11-13 北京五八信息技术有限公司 Create method, apparatus, storage medium and the mobile terminal of interface element
CN109670159A (en) * 2018-12-28 2019-04-23 天津字节跳动科技有限公司 The creation of view and management method, device, electronic equipment and storage medium
CN109766098A (en) * 2019-01-09 2019-05-17 腾讯科技(深圳)有限公司 Operation method, equipment and the storage medium of application program

Also Published As

Publication number Publication date
CN112527422A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN110019279B (en) Online document collaborative updating method, device, equipment and storage medium
CN107341016B (en) Focus state implementation method and device under split screen mechanism, terminal and storage medium
CN110888615A (en) Multi-input equipment interaction method, device and medium for double-screen different display of Android system
CN102053871A (en) Application program image display method and device
CN106802762B (en) Synchronizing server-side keyboard layout with client-side layout in virtual session
CN109656646B (en) Remote desktop control method, device, equipment and virtualization chip
CN110688145B (en) Android MVP code automatic generation method and device, medium and electronic equipment
CN112000911A (en) Page management method and device, electronic equipment and storage medium
WO2024099134A1 (en) Method and apparatus for displaying information on instrument screen, and electronic device and vehicle
CN107168738A (en) A kind of management method of application tool, device, equipment and storage medium
WO2024109786A1 (en) Instant messaging session information processing method and apparatus, and electronic device
CN112527422B (en) View updating method, device, equipment and storage medium
CN110764864A (en) Terraform-based visual resource arrangement method
CN111135557B (en) Interaction method and device for multiple screens
CN113542323B (en) Service processing method, device, equipment and computer readable storage medium
CN114745313A (en) Terminal remote testing method and device, electronic equipment and readable medium
CN110069417B (en) A/B test method and device
CN111813407B (en) Game development method, game running device and electronic equipment
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN112817718A (en) Dual-system device, application display method thereof and storage medium
CN110609728A (en) Page generation method and device and electronic equipment
CN113835846B (en) Method and device for creating k8s cluster and computer-readable storage medium
CN111414232B (en) Virtual machine template data processing method and device
CN112688863B (en) Gateway data processing method and device and electronic equipment
WO2016000570A1 (en) Group control and management among electronic devices

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
GR01 Patent grant
GR01 Patent grant