CN111258670A - Management method and device of component data, electronic equipment and storage medium - Google Patents

Management method and device of component data, electronic equipment and storage medium Download PDF

Info

Publication number
CN111258670A
CN111258670A CN202010018505.6A CN202010018505A CN111258670A CN 111258670 A CN111258670 A CN 111258670A CN 202010018505 A CN202010018505 A CN 202010018505A CN 111258670 A CN111258670 A CN 111258670A
Authority
CN
China
Prior art keywords
component
data
attribute data
request
refreshed
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.)
Granted
Application number
CN202010018505.6A
Other languages
Chinese (zh)
Other versions
CN111258670B (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010018505.6A priority Critical patent/CN111258670B/en
Publication of CN111258670A publication Critical patent/CN111258670A/en
Application granted granted Critical
Publication of CN111258670B publication Critical patent/CN111258670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

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

Abstract

The embodiment of the disclosure discloses a management method, a management device, electronic equipment and a storage medium of component data, wherein the method comprises the following steps: acquiring a component refreshing request of a target page; determining a component data model corresponding to the component refreshing request; obtaining refreshed component attribute data from a server through a component data model, and sending the component attribute data to each associated component to refresh the component; the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data. According to the method and the device for processing the component data, the splitting granularity of the component data model is finer, and only the related component is notified when the component attribute data in each component data model changes, so that the rendering times of the component are greatly reduced, the resources are saved, and the efficiency of component data management is improved.

Description

Management method and device of component data, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of data processing, and in particular, to a management method and device of component data, an electronic device, and a storage medium.
Background
With the continuous development of the intelligent terminal, people can realize the processing of more and more work and study tasks through the intelligent terminal.
In the prior art, there is a complex single-page application, in which a page may have a plurality of different tasks, one task may correspond to a plurality of different users, and the corresponding relationship between the task and the user is many-to-many. For the complex page, one page may have a plurality of head portraits or names of the same user, and when one of the head portraits or names of the user changes, the corresponding component needs to be requested for many times to change all the head portraits or names.
Currently, the component attribute data of all components included in a page are generally gathered in a component data model (Store) through a read + reduce application framework, when the component attribute data of any one of the components is changed, the component requests the component data model, and the component data model informs each component of the current page to refresh. However, in this way, due to the serious data nesting, each component is notified of all changes in the component data model, resulting in multiple renderings of each component, but not every notification is necessary for each component, resulting in many unnecessary renderings when a component depends only on a small part of the component data model, resulting in a waste of resources and a reduction in the efficiency of data management.
Disclosure of Invention
The embodiment of the disclosure provides a management method and device of component data, electronic equipment and a storage medium, so as to optimize a management scheme of the component data in a client page and improve data management efficiency.
In a first aspect, an embodiment of the present disclosure provides a method for managing component data, including:
acquiring a component refreshing request of a target page;
determining a component data model corresponding to the component refreshing request;
obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
In a second aspect, an embodiment of the present disclosure further provides a device for managing component data, including:
the request acquisition module is used for acquiring a component refreshing request of a target page;
the model determining module is used for determining a component data model corresponding to the component refreshing request;
the component refreshing module is used for acquiring refreshed component attribute data from a server through the component data model and sending the component attribute data to each associated component so as to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing executable instructions;
the executable instructions, when executed by the one or more processors, cause the one or more processors to implement a method of managing component data as described above.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the management method of component data as described above.
The method comprises the steps of determining a component data model corresponding to a component refreshing request by obtaining the component refreshing request of a target page, obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component; the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data. According to the technical scheme, one page is set to correspond to the plurality of component data models, each component data model is associated with at least one component, so that the splitting granularity of the component data models is finer, and only the associated component is notified when the component attribute data in each component data model changes, so that the rendering times of the components are greatly reduced, the resources are saved, and the efficiency of component data management is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow chart of a method for managing component data in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a target page in an embodiment of the disclosure;
FIG. 3 is a flow chart of another method of managing component data in an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for managing component data according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a management method for component data in an embodiment of the present disclosure, where the embodiment is applicable to a case of managing component data in a client page, and the method is applied to a client, where the method may be executed by a management apparatus for component data, the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be configured in an electronic device, such as a server or a terminal device, where a typical terminal device includes a mobile terminal, and specifically includes a mobile phone, a computer, or a tablet computer. As shown in fig. 1, the method may specifically include:
and S110, acquiring a component refresh request of the target page.
The target page may be a page in a task management application in the client, where the target page includes at least two components having the same component attribute data, for example, each component in one page has the same user avatar, the avatar is one of the component attribute data, and the type of the component attribute data is not limited in this scheme. Referring to fig. 2, fig. 2 is a schematic diagram of a target page in the embodiment of the present disclosure, where the target page includes multiple components, and a task component and a file component in the diagram are merely examples, where the task component corresponds to a user a and a user B, the file component corresponds to a user C, a user a, and a user B, and data such as an avatar and a name of the user a and the user B are the same in the task component and the file component.
The component attribute data is related data stored in a component, one component may correspond to a plurality of component attribute data, and component attribute data corresponding to different components may be different or the same component attribute information may exist. For example, the component attribute data in the user component may be user information, the component attribute information in the task component may be task information, and the user component and the task component may have one and the same component attribute data, such as a user name or a user avatar.
Specifically, after a user modifies one component attribute data corresponding to one component in a target page, it is determined to obtain a component refresh request of the target page, where the component refresh request is directed to other components having the same component attribute data in the target page. The component is a refreshed component and the component attribute data is refreshed component attribute data.
And S120, determining a component data model corresponding to the component refreshing request.
The component data model (Store) may be a storage space set in the client, and in the prior art, component attribute data of all components in one page may be stored through one component data model. In the scheme, the number of the component data models corresponding to one page is at least two, each component data model is associated with at least one component, and the number of the specific component data models and the number of the components associated with each component data model can be set according to actual conditions.
Specifically, after the component refresh request of the target page is acquired, since the component refresh request includes the component identifier of the refreshed component, the component data model associated with the refreshed component can be determined by searching and matching according to the component identifier.
S130, obtaining the refreshed component attribute data from the server side through the component data model, and sending the component attribute data to each associated component to refresh the component.
The number and kinds of components included in the target page are not limited in the present scheme, and for example, the components may include at least one of a user component, a task component, a file component, a schedule component, a group chat component, and a statistics component.
Specifically, obtaining the refreshed component attribute data from the server through the component data model, and sending the component attribute data to each associated component may include: acquiring refreshed component attribute data from a server through a component data model according to the component identifier of the refreshed component; and sending the component attribute data to each associated component through the component data model according to the pre-established association relationship between the component data model and the component identifier.
The incidence relation between the component data model and the component identification can be stored through formats such as an incidence relation table or an array, the component identification of each component associated with the component data model can be determined through searching the incidence relation, the component attribute data is sent to each component according to the component identification, and each component replaces the previous component attribute data with the component attribute data to finish component refreshing.
The method comprises the steps of determining a component data model corresponding to a component refreshing request by obtaining the component refreshing request of a target page, obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component; the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data. According to the technical scheme, one page is set to correspond to the plurality of component data models, each component data model is associated with at least one component, so that the splitting granularity of the component data models is finer, and only the associated component is notified when the component attribute data in each component data model changes, so that the rendering times of the components are greatly reduced, the resources are saved, and the efficiency of component data management is improved.
Fig. 3 is a flowchart of another management method for component data in the embodiment of the present disclosure. On the basis of the above embodiments, the present embodiment further optimizes the management method of the component data. Correspondingly, as shown in fig. 3, the method of the embodiment specifically includes:
s210, obtaining a component refreshing request of the target page.
And S220, determining a component data model corresponding to the component refreshing request.
The number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
Specifically, after the component refresh request of the target page is acquired, since the component refresh request includes the component identifier of the refreshed component, the component data model associated with the refreshed component can be determined by searching and matching according to the component identifier.
And S230, acquiring the refreshed component attribute data from the server through the component data model, and sending the component attribute data to each associated component to refresh the component.
Specifically, according to the component identification of the refreshed component, obtaining the refreshed component attribute data from the server through a component data model; and sending the component attribute data to each associated component through the component data model according to the association relationship between the pre-established component data model and the component identifier so as to refresh the component. The components in the scheme can comprise at least one of a user component, a task component, a file component, a schedule component, a group chat component and a statistic component.
And S240, displaying the refreshed components in the target page.
Specifically, through a view model built in each component, the attribute data of each component is subjected to format conversion and then displayed to a user. Among them, a View Model (View Model) is a tool provided in each component for data format conversion. The components can store data by adopting lists, the data structure in the lists is an array, elements in the array can comprise IDs, and because the data stored in the component data model is metadata and the data structure is different from that of the components, after the component data model sends the component attribute data to each component, each component needs to convert the format of the component attribute data through a built-in view model so as to accord with the local data structure. And the view models corresponding to different components are different, namely the view models correspond to the components.
In addition, the present solution may further include S250-S260 (not shown in the figure), that is, the management method of the component data may include S210-S240 and/or S250-S260, in the present solution, only S210-S240 or S250-S260 may be executed, or S210-S240 and S250-S260 may be executed, the execution sequence is not limited, S210-S240 may be executed first, then S250-S260 may be executed, or S250-S260 may be executed first, then S210-S240 may be executed.
Specifically, the method comprises the following steps:
and S250, acquiring a component data processing request of the target component.
The component data processing request may be an instruction for processing one component attribute data of a target component in one page, and an obtaining manner of the component data processing request is not limited in this embodiment, for example, if an operation of a setting key by a user is detected, it may be determined that the component data processing request is obtained. The component data processing request may include target component attribute data, the target component attribute data being component attribute data to be processed, and the component processing request may include a component data addition request, a component data modification request, or a component data deletion request, for a request type.
And S260, processing the attribute data of the target component through the processing logic packaged in the component data model corresponding to the target component in advance.
Wherein, the processing logic in the component data model and the corresponding component attribute data can be packaged together through the RxJS programming framework in an associated mode. RxJS is a responsive programming framework, mainly for asynchronous data streams, which can package all data, such as hypertext Transfer Protocol (HTTP) requests, Document Object Model (DOM) events, or general data, into a stream form, and then process the stream using powerful and rich operators, so that a user can process asynchronous data in a synchronous programming manner and combine different operators to implement a desired function.
Specifically, after the component data processing request of the target component is obtained, the component data model corresponding to the target component may be determined, the corresponding processing logic in the component data model is determined based on the target component attribute data, and the target component attribute data is processed through the processing logic. Each piece of component attribute data corresponds to one processing logic, and the component attribute data and the corresponding processing logic are packaged in the component data model, so that external processing logic does not need to be called during data processing, and the efficiency is improved.
For example, if a deletion request for a user avatar in a user component is acquired, after a component data model corresponding to the user component is determined, corresponding processing logic in the component data model is determined based on the user avatar, and the user avatar is deleted through the processing logic.
The method comprises the steps of determining a component data model corresponding to a component refreshing request by obtaining the component refreshing request of a target page, obtaining refreshed component attribute data from a server through the component data model, sending the component attribute data to related components for component refreshing, and displaying the refreshed components in the target page; and acquiring a component data processing request of the target component, and processing the attribute data of the target component through the processing logic packaged in advance in the component data model corresponding to the target component. According to the technical scheme of the embodiment, one page is set to correspond to a plurality of component data models, each component data model is associated with at least one component, so that the splitting granularity of the component data models is finer, and only the associated component is notified when the component attribute data in each component data model is changed, so that the rendering times of the component are greatly reduced, the resources are saved, and the component data management efficiency is improved; in addition, format conversion can be carried out on the component attribute data transmitted by the component data model through the view models arranged in the components in the scheme so as to be displayed for a user, and the component attribute data and the corresponding processing logic can be packaged together in the component data model so that the external processing logic does not need to be called during data processing, the efficiency is improved, the data flow direction is clearer, and the code maintenance is more convenient.
Fig. 4 is a schematic structural diagram of a device for managing component data in an embodiment of the present disclosure, which is applicable to a case of managing component data in a client page in the embodiment. The management device for the component data provided by the embodiment of the disclosure can execute the management method for the component data provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
The apparatus specifically includes a request obtaining module 310, a model determining module 320, and a component refreshing module 330, where:
a request obtaining module 310, configured to obtain a component refresh request of a target page;
a model determining module 320, configured to determine a component data model corresponding to the component refresh request;
the component refreshing module 330 is configured to obtain refreshed component attribute data from a server through the component data model, and send the component attribute data to each associated component to perform component refreshing;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
Optionally, the model determining module 320 is specifically configured to:
determining the component data model associated with the refreshed component according to the component identification of the refreshed component in the component refresh request.
Optionally, the component refresh module 330 is specifically configured to:
obtaining refreshed component attribute data from a server through the component data model according to the component identifier of the refreshed component;
and sending the component attribute data to each associated component through the component data model according to the pre-established association relationship between the component data model and the component identifier.
Optionally, the apparatus further comprises:
and the component display module is used for acquiring the refreshed component attribute data from the server through the component data model and sending the component attribute data to each associated component so as to display each refreshed component in the target page after the component is refreshed.
Optionally, the component display module is specifically configured to:
and performing format conversion on the attribute data of each component through a view model built in each component, and displaying the attribute data of each component to a user, wherein the view model corresponds to the component.
Optionally, the apparatus further includes a component data processing module, where the component data processing module is specifically configured to:
acquiring a component data processing request of a target component, wherein the component data processing request comprises target component attribute data, and the component processing request comprises a component data adding request, a component data modifying request or a component data deleting request;
and processing the attribute data of the target component through the processing logic packaged in advance in the component data model corresponding to the target component.
Optionally, the processing logic in the component data model and the corresponding component attribute data are packaged together by associating through an RxJS programming framework.
Optionally, the component includes at least one of a user component, a task component, a file component, a calendar component, a group chat component, and a statistics component.
The management device for the component data provided by the embodiment of the disclosure can execute the management method for the component data provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure. Referring now specifically to fig. 4, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 400 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and fixed terminals such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the 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 (EPROM or 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 present disclosure, 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a component refreshing request of a target page; determining a component data model corresponding to the component refreshing request; obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component; the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 disclosure. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 (EPROM or 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.
According to one or more embodiments of the present disclosure, there is provided a method for managing component data, including:
acquiring a component refreshing request of a target page;
determining a component data model corresponding to the component refreshing request;
obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
According to one or more embodiments of the present disclosure, in a management method of component data provided by the present disclosure, determining a component data model corresponding to the component refresh request includes:
determining the component data model associated with the refreshed component according to the component identification of the refreshed component in the component refresh request.
According to one or more embodiments of the present disclosure, in the management method of component data provided by the present disclosure, acquiring refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component, the method includes:
obtaining refreshed component attribute data from a server through the component data model according to the component identifier of the refreshed component;
and sending the component attribute data to each associated component through the component data model according to the pre-established association relationship between the component data model and the component identifier.
According to one or more embodiments of the present disclosure, in the management method of component data provided by the present disclosure, obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component, so as to perform component refresh, the method further includes:
and displaying the refreshed components in the target page.
According to one or more embodiments of the present disclosure, in a management method of component data provided by the present disclosure, displaying each refreshed component in the target page includes:
and performing format conversion on the attribute data of each component through a view model built in each component, and displaying the attribute data of each component to a user, wherein the view model corresponds to the component.
According to one or more embodiments of the present disclosure, the method for managing component data provided by the present disclosure further includes:
acquiring a component data processing request of a target component, wherein the component data processing request comprises target component attribute data, and the component processing request comprises a component data adding request, a component data modifying request or a component data deleting request;
and processing the attribute data of the target component through the processing logic packaged in advance in the component data model corresponding to the target component.
According to one or more embodiments of the present disclosure, in the management method of component data provided by the present disclosure, processing logic in the component data model and corresponding component attribute data are packaged together by associating with the RxJS programming framework.
According to one or more embodiments of the present disclosure, the present disclosure provides a method for managing component data, wherein the component includes at least one of a user component, a task component, a file component, a schedule component, a group chat component, and a statistics component.
According to one or more embodiments of the present disclosure, there is provided a management apparatus of component data, including:
the request acquisition module is used for acquiring a component refreshing request of a target page;
the model determining module is used for determining a component data model corresponding to the component refreshing request;
the component refreshing module is used for acquiring refreshed component attribute data from a server through the component data model and sending the component attribute data to each associated component so as to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, the model determining module is specifically configured to:
determining the component data model associated with the refreshed component according to the component identification of the refreshed component in the component refresh request.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, the component refreshing module is specifically configured to:
obtaining refreshed component attribute data from a server through the component data model according to the component identifier of the refreshed component;
and sending the component attribute data to each associated component through the component data model according to the pre-established association relationship between the component data model and the component identifier.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, the apparatus further includes:
and the component display module is used for acquiring the refreshed component attribute data from the server through the component data model and sending the component attribute data to each associated component so as to display each refreshed component in the target page after the component is refreshed.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, the component display module is specifically configured to:
and performing format conversion on the attribute data of each component through a view model built in each component, and displaying the attribute data of each component to a user, wherein the view model corresponds to the component.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, the apparatus further includes a component data processing module, where the component data processing module is specifically configured to:
acquiring a component data processing request of a target component, wherein the component data processing request comprises target component attribute data, and the component processing request comprises a component data adding request, a component data modifying request or a component data deleting request;
and processing the attribute data of the target component through the processing logic packaged in advance in the component data model corresponding to the target component.
According to one or more embodiments of the present disclosure, in the management apparatus for component data provided by the present disclosure, processing logic in the component data model and corresponding component attribute data are packaged together by associating with the RxJS programming framework.
According to one or more embodiments of the present disclosure, the present disclosure provides a management apparatus of component data, wherein the component includes at least one of a user component, a task component, a file component, a schedule component, a group chat component, and a statistics component.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a storage device for storing executable instructions;
the executable instructions, when executed by the one or more processors, cause the one or more processors to implement a method of managing component data as any one of the components provided by the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of managing component data as any one of the methods provided by the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (11)

1. A method for managing component data, comprising:
acquiring a component refreshing request of a target page;
determining a component data model corresponding to the component refreshing request;
obtaining refreshed component attribute data from a server through the component data model, and sending the component attribute data to each associated component to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
2. The method of claim 1, wherein determining the component data model to which the component refresh request corresponds comprises:
determining the component data model associated with the refreshed component according to the component identification of the refreshed component in the component refresh request.
3. The method of claim 2, wherein obtaining the refreshed component attribute data from the server through the component data model, and sending the component attribute data to the associated components comprises:
obtaining refreshed component attribute data from a server through the component data model according to the component identifier of the refreshed component;
and sending the component attribute data to each associated component through the component data model according to the pre-established association relationship between the component data model and the component identifier.
4. The method of claim 1, wherein the obtaining of the refreshed component attribute data from the server through the component data model and the sending of the component attribute data to the associated components further comprises, after component refreshing:
and displaying the refreshed components in the target page.
5. The method of claim 4, wherein presenting the refreshed components in the target page comprises:
and performing format conversion on the attribute data of each component through a view model built in each component, and displaying the attribute data of each component to a user, wherein the view model corresponds to the component.
6. The method of claim 1, further comprising:
acquiring a component data processing request of a target component, wherein the component data processing request comprises target component attribute data, and the component processing request comprises a component data adding request, a component data modifying request or a component data deleting request;
and processing the attribute data of the target component through the processing logic packaged in advance in the component data model corresponding to the target component.
7. The method of claim 6, wherein the processing logic in the component data model is packaged together with corresponding component attribute data via an RxJS programming framework association.
8. The method of any of claims 1-7, wherein the component comprises at least one of a user component, a task component, a file component, a calendar component, a group chat component, and a statistics component.
9. An apparatus for managing component data, comprising:
the request acquisition module is used for acquiring a component refreshing request of a target page;
the model determining module is used for determining a component data model corresponding to the component refreshing request;
the component refreshing module is used for acquiring refreshed component attribute data from a server through the component data model and sending the component attribute data to each associated component so as to refresh the component;
the number of the component data models is at least two, each component data model is associated with at least one component, and the target page comprises at least two components with the same component attribute data.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing executable instructions;
the executable instructions, when executed by the one or more processors, cause the one or more processors to implement a method of managing component data as recited in any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of managing component data according to any one of claims 1 to 8.
CN202010018505.6A 2020-01-08 2020-01-08 Method and device for managing component data, electronic equipment and storage medium Active CN111258670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010018505.6A CN111258670B (en) 2020-01-08 2020-01-08 Method and device for managing component data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010018505.6A CN111258670B (en) 2020-01-08 2020-01-08 Method and device for managing component data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111258670A true CN111258670A (en) 2020-06-09
CN111258670B CN111258670B (en) 2023-09-22

Family

ID=70946828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010018505.6A Active CN111258670B (en) 2020-01-08 2020-01-08 Method and device for managing component data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111258670B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015551A1 (en) * 2003-07-18 2005-01-20 Microsoft Corporation Methods, computer readable mediums and systems for requesting, retrieving and delivering metadata pages
US20050132348A1 (en) * 2003-12-15 2005-06-16 Meulemans Michael E. System and method for managing and communicating software updates
US20060122970A1 (en) * 2004-12-02 2006-06-08 Eugen Paval System and method for implementing a management component that exposes attributes
US20110055816A1 (en) * 2009-08-28 2011-03-03 International Business Machines Corporation Method to derive software use and software data object use characteristics by analyzing attributes of related files
CN102096694A (en) * 2009-08-23 2011-06-15 美国银行公司 Display rendering system with supporting components
US20130231093A1 (en) * 2012-03-05 2013-09-05 Enterproid Hk Ltd Enhanced deployment of applications
US9323504B1 (en) * 2014-03-19 2016-04-26 Amazon Technologies, Inc. Template-driven data access
CN108304201A (en) * 2017-09-14 2018-07-20 腾讯科技(深圳)有限公司 Object updating method, device and equipment
CN109032587A (en) * 2018-07-19 2018-12-18 武汉斗鱼网络科技有限公司 A kind of data stream management frame, method, terminal device and storage medium
CN109101310A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of page furbishing method and device
CN109739604A (en) * 2018-12-28 2019-05-10 北京城市网邻信息技术有限公司 Page rendering method, apparatus, server and storage medium
CN109918060A (en) * 2019-01-29 2019-06-21 深圳点猫科技有限公司 A kind of switching method and device for realizing multi-tag page under single window
CN110362771A (en) * 2019-07-26 2019-10-22 北京明略软件系统有限公司 Method and device, storage medium and the electronic device of page cache
US20190333572A1 (en) * 2018-04-25 2019-10-31 Seagate Technology Llc Reduced latency i/o in multi-actuator device
CN110515683A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 A kind of method, apparatus and storage medium of front end Vue page visual configuration

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050015551A1 (en) * 2003-07-18 2005-01-20 Microsoft Corporation Methods, computer readable mediums and systems for requesting, retrieving and delivering metadata pages
US20050132348A1 (en) * 2003-12-15 2005-06-16 Meulemans Michael E. System and method for managing and communicating software updates
US20060122970A1 (en) * 2004-12-02 2006-06-08 Eugen Paval System and method for implementing a management component that exposes attributes
CN102096694A (en) * 2009-08-23 2011-06-15 美国银行公司 Display rendering system with supporting components
US20110055816A1 (en) * 2009-08-28 2011-03-03 International Business Machines Corporation Method to derive software use and software data object use characteristics by analyzing attributes of related files
US20130231093A1 (en) * 2012-03-05 2013-09-05 Enterproid Hk Ltd Enhanced deployment of applications
US9323504B1 (en) * 2014-03-19 2016-04-26 Amazon Technologies, Inc. Template-driven data access
CN108304201A (en) * 2017-09-14 2018-07-20 腾讯科技(深圳)有限公司 Object updating method, device and equipment
US20190333572A1 (en) * 2018-04-25 2019-10-31 Seagate Technology Llc Reduced latency i/o in multi-actuator device
CN109032587A (en) * 2018-07-19 2018-12-18 武汉斗鱼网络科技有限公司 A kind of data stream management frame, method, terminal device and storage medium
CN109101310A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of page furbishing method and device
CN109739604A (en) * 2018-12-28 2019-05-10 北京城市网邻信息技术有限公司 Page rendering method, apparatus, server and storage medium
CN109918060A (en) * 2019-01-29 2019-06-21 深圳点猫科技有限公司 A kind of switching method and device for realizing multi-tag page under single window
CN110515683A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 A kind of method, apparatus and storage medium of front end Vue page visual configuration
CN110362771A (en) * 2019-07-26 2019-10-22 北京明略软件系统有限公司 Method and device, storage medium and the electronic device of page cache

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
辣爷: "react redux|能够或者需要创建多个store吗?可以自己直接import store,用在组件上吗?", pages 1 - 5 *

Also Published As

Publication number Publication date
CN111258670B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN112272226B (en) Picture loading method and device and readable storage medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN112965673A (en) Content printing method, device, equipment and storage medium
CN111163336A (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN110910469A (en) Method, device, medium and electronic equipment for drawing handwriting
CN112053286A (en) Image processing method, image processing device, electronic equipment and readable medium
CN111596992A (en) Navigation bar display method and device and electronic equipment
CN111241137A (en) Data processing method and device, electronic equipment and storage medium
CN111209432A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN112131832A (en) Method and device for reminding task state of online document and electronic equipment
CN111680754A (en) Image classification method and device, electronic equipment and computer-readable storage medium
CN111399730A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium
CN111258582A (en) Window rendering method and device, computer equipment and storage medium
CN111291254A (en) Information processing method and device
CN111787043A (en) Data request method and device
CN112311840A (en) Multi-terminal data synchronization method, device, equipment and medium
CN110941683A (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN112422600A (en) Information synchronous publishing method, server, system 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
GR01 Patent grant
GR01 Patent grant