CN113535185A - Sharing implementation method and device - Google Patents

Sharing implementation method and device Download PDF

Info

Publication number
CN113535185A
CN113535185A CN202010274528.3A CN202010274528A CN113535185A CN 113535185 A CN113535185 A CN 113535185A CN 202010274528 A CN202010274528 A CN 202010274528A CN 113535185 A CN113535185 A CN 113535185A
Authority
CN
China
Prior art keywords
sharing
sharing channel
channel
dependent
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010274528.3A
Other languages
Chinese (zh)
Inventor
尹华东
徐记军
于学良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010274528.3A priority Critical patent/CN113535185A/en
Publication of CN113535185A publication Critical patent/CN113535185A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a sharing implementation method and device, and relates to the technical field of computers. One embodiment of the method comprises: initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components; calling a sharing method provided by the basic component to display the selected sharing channel; after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish sharing operation. According to the embodiment, the sharing channel can be freely selected on the basis of saving development access cost and maintenance cost, a user can customize the sharing channel, the problem that the sharing channel provided by the existing sharing component is fixed is solved, the size of the compiling package is reduced, and the situation that the auditing is not passed because the size of the installation package exceeds the limit of an application platform is prevented.

Description

Sharing implementation method and device
Technical Field
The invention relates to the technical field of computers, in particular to a sharing implementation method and device.
Background
A mature market-oriented application generally includes a sharing function, and a user can conveniently promote a product or enrich application use. At present, sharing channels are various, such as WeChat, Xin Lang, QQ and the like, each sharing channel shares an SDK (software development kit) of the sharing channel, the SDK is used for access calling for supply, methods of different channels need to be called when different sharing channels are used, and when some SDKs of the channels are updated, the corresponding channels need to be simultaneously updated and accessed. Sharing components with packaged sharing channels are also called by people, sharing methods are unified into one method, specific sharing channels are judged through logic inside, and corresponding channel methods are called.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
and after the sharing channel official SDK is maintained or the corresponding SDK is updated, the user needs to update the corresponding SDK or code to ensure that the sharing method is available, so that the access and maintenance cost is increased.
According to the existing packaged sharing component, an application cannot select a sharing channel from the sharing component and only can be packaged and fully received, so that redundancy exists in an application compiling package, the compiling package is enlarged, the sharing channel cannot be defined by users, and if the sharing channel exceeds the limitation of an application platform, the risk that auditing is not passed exists.
Disclosure of Invention
In view of this, embodiments of the present invention provide a sharing implementation method and apparatus, which can freely select a sharing channel on the basis of saving development access cost and maintenance cost, and a user can customize the sharing channel, so as to solve the problem that the sharing channel provided by an existing sharing component is fixed, reduce the size of a compiled package, and prevent that an installation package size exceeds the application platform limit and cannot be checked.
To achieve the above object, according to an aspect of an embodiment of the present invention, a sharing implementation method is provided.
A sharing implementation method comprises the following steps: initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components; calling a sharing method provided by the basic component to display the selected sharing channel; after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish sharing operation.
Optionally, the initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components includes: respectively initializing the one or more dependent components, wherein when each dependent component is initialized, calling a registration channel method provided by the basic component to add the sharing channel corresponding to the dependent component into a sharing channel array, so that the sharing channel corresponding to the dependent component is selected.
Optionally, before the initializing one or more dependent components, the method includes: in each dependent component, establishing a subclass of a sharing channel corresponding to the dependent component, wherein the subclass inherits a base class to which a sharing method provided by the basic component belongs; and realizing the sharing method of the sharing channel corresponding to the dependent component in the subclass.
Optionally, before the selected sharing channel is displayed, according to the subclass of the sharing channel corresponding to the dependent component, it is determined that the sharing channel corresponding to the dependent component is the sharing channel supported by the basic component.
Optionally, the method further comprises: a sharing callback method of a corresponding sharing channel is realized in the dependent component; after the sharing operation is completed, the method further comprises: and executing the sharing callback method of the target sharing channel.
According to another aspect of the embodiments of the present invention, an apparatus for implementing sharing is provided.
A sharing implementation apparatus, comprising: the sharing channel selection module is used for initializing one or more dependent components so as to select a sharing channel corresponding to the one or more dependent components; the sharing channel display module is used for calling the sharing method provided by the basic component to display the selected sharing channel; and the sharing operation execution module is used for executing the sharing method of the target sharing channel after receiving a sharing instruction of a user to the target sharing channel in the displayed sharing channels so as to finish the sharing operation.
Optionally, the sharing channel selection module is further configured to: respectively initializing the one or more dependent components, wherein when each dependent component is initialized, calling a registration channel method provided by the basic component to add the sharing channel corresponding to the dependent component into a sharing channel array, so that the sharing channel corresponding to the dependent component is selected.
Optionally, a dependent component implementation module is further included, configured to: in each dependent component, establishing a subclass of a sharing channel corresponding to the dependent component, wherein the subclass inherits a base class to which a sharing method provided by the basic component belongs; and realizing the sharing method of the sharing channel corresponding to the dependent component in the subclass.
Optionally, the display device further comprises a sharing channel verifying module, configured to confirm that the sharing channel corresponding to the dependency component is the sharing channel supported by the base component according to the subclass of the sharing channel corresponding to the dependency component before the selected sharing channel is displayed.
Optionally, the dependent component implementation module is further configured to: a sharing callback method of a corresponding sharing channel is realized in the dependent component; the sharing operation execution module is further configured to: and after the sharing operation is completed, executing a sharing callback method of the target sharing channel.
According to yet another aspect of an embodiment of the present invention, an electronic device is provided.
An electronic device, comprising: one or more processors; the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the sharing realization method provided by the embodiment of the invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a sharing implementation method provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components; calling a sharing method provided by the basic component to display the selected sharing channel; and after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish the sharing operation. The sharing method and the device have the advantages that the sharing channels can be freely selected on the basis of saving development access cost and maintenance cost, users can customize the sharing channels, the problem that the sharing channels provided by existing sharing assemblies are fixed is solved, the size of a compiling package is reduced, and the situation that auditing is not passed due to the fact that the size of an installation package exceeds the limit of an application platform is avoided.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of main steps of a sharing implementation method according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a sharing implementation according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main blocks of a sharing implementation apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a framework of a sharing implementation apparatus according to an embodiment of the present invention;
FIG. 5 is a flow diagram illustrating an implementation of a sharing module of the base portion according to an embodiment of the invention;
FIG. 6 is a flow diagram illustrating implementation of a dependency according to one embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram illustrating main steps of a sharing implementation method according to an embodiment of the present invention.
As shown in fig. 1, the sharing implementation method according to an embodiment of the present invention mainly includes the following steps S101 to S103.
Step S101: one or more dependent components are initialized, so that the sharing channels corresponding to the one or more dependent components are selected.
Step S102: and calling a sharing method provided by the basic component to display the selected sharing channel.
Step S103: and after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish the sharing operation.
Wherein a sharing method and a registration channel method are provided in the base component. The sharing method provided by the basic component of the embodiment of the invention is a uniform sharing method, and aims to reduce access cost and maintenance cost, the basic component of the embodiment of the invention does not comprise any SDK of a sharing channel, only a base class of the sharing channel is added in addition to the uniform sharing method, the base class has the function of providing identity identification of the sharing channel, and as long as the base class inherits the protocol, the sharing channel corresponding to the class can be represented as the sharing channel supported by the basic component.
And processing functions such as sharing data types, sharing panel state acquisition, sharing cancellation, interception of jump methods among APPs (application programs) and the like which can be supported are also provided in the basic component.
The dependent components are in one-to-one correspondence with the sharing channels. When the sharing channel is customized, only the corresponding dependent component needs to be customized, the strongly dependent basic component is needed in the dependent component, a subclass is newly built, the subclass inherits the base class of the sharing method provided by the basic component, and the related sharing method is realized.
When one or more sharing channels are selected from the defined sharing channels, only the corresponding dependent components need to be initialized.
In one embodiment, initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components includes: respectively initializing one or more dependent components, wherein when each dependent component is initialized, a registration channel method provided by a basic component is called so as to add a sharing channel corresponding to the dependent component into a sharing channel array, and thus the sharing channel corresponding to the dependent component is selected.
In one embodiment, before one or more dependent components are initialized, a subclass of a sharing channel corresponding to the dependent component is established in each dependent component, and the subclass inherits a base class to which a sharing method provided by a basic component belongs; and realizing a sharing method of the sharing channel corresponding to the dependent component in the subclass.
Before the selected sharing channel is displayed, the sharing channel corresponding to the dependent component can be confirmed as the sharing channel supported by the basic component according to the subclass of the sharing channel corresponding to the dependent component. Specifically, if the subclass inherits the corresponding base class in the base component, the subclass indicates that the sharing channel is the sharing channel supported by the base component.
In one embodiment, a sharing callback method of a corresponding sharing channel may also be implemented in the dependency component.
After the sharing operation is completed, a sharing callback method of the target sharing channel can be executed.
Fig. 2 is a schematic diagram of a sharing implementation flow according to an embodiment of the present invention.
As shown in fig. 2, the sharing implementation process according to an embodiment of the present invention includes steps S201 to S207.
Step S201: initializing a sharing channel array;
the sharing channels in the sharing channel array are initially added through the dependent components.
The basic assembly can be divided into three small modules according to functions: the system comprises a channel module, a data module and a sharing module, wherein the channel module provides a sustainable base class which provides data returning to the current channel and a sharing callback method, and the channel module can be used as a sharing channel as long as a subclass is newly established and a parent class method (related methods of the base class, such as a sharing method and the like) is realized; the data module is used for providing the shared data types which can be supported; the sharing module provides interception processing of a registration channel, a unified sharing method, acquisition of a sharing panel state, cancellation of sharing and a jump method between apps.
The sharing channel array may be initialized after initializing the sharing module of the base component.
Step S202: calling a sharing method provided by the basic component;
step S203: acquiring a sharing channel array;
step S204: displaying a sharing interface;
step S205: receiving a sharing instruction of a user to a certain sharing channel in a sharing interface;
for example, when a user clicks a sharing channel button on a sharing interface, it indicates that a sharing instruction of the sharing channel is issued.
Step S206: a sharing method realized by a channel subclass is operated through a channel identifier;
the channel identifier is used for identifying the sharing channel in the sharing channel array.
Step S207: and after the sharing operation is finished, if the sharing callback method exists, calling the sharing callback method to finish the sharing process.
The sharing callback method is mainly used for realizing some actions after the sharing operation, such as a popup action for prompting a user to complete sharing, and the like.
Fig. 3 is a schematic diagram of main blocks of a sharing implementation apparatus according to an embodiment of the present invention.
As shown in fig. 3, the sharing implementation apparatus 300 according to an embodiment of the present invention mainly includes: a sharing channel selecting module 301, a sharing channel showing module 302, and a sharing operation executing module 303.
The sharing channel selecting module 301 is configured to initialize one or more dependent components to select a sharing channel corresponding to the one or more dependent components.
The sharing channel displaying module 302 is configured to invoke the sharing method provided by the base component to display the selected sharing channel.
The sharing operation executing module 303 is configured to execute a sharing method of a target sharing channel in the displayed sharing channels after receiving a sharing instruction of a user for the target sharing channel, so as to complete a sharing operation.
In one embodiment, the sharing channel selection module 301 is specifically configured to: respectively initializing one or more dependent components, wherein when each dependent component is initialized, a registration channel method provided by a basic component is called so as to add a sharing channel corresponding to the dependent component into a sharing channel array, and thus the sharing channel corresponding to the dependent component is selected.
In one embodiment, the sharing implementation apparatus 300 further includes a dependent component implementation module for: in each dependent component, establishing a subclass of a sharing channel corresponding to the dependent component, wherein the subclass inherits a base class to which a sharing method provided by a basic component belongs; and realizing a sharing method of the sharing channel corresponding to the dependent component in the subclass.
In an embodiment, the sharing implementation apparatus 300 further includes a sharing channel verifying module, configured to confirm the sharing channel corresponding to the dependent component as the sharing channel supported by the base component according to the subclass of the sharing channel corresponding to the dependent component before displaying the selected sharing channel.
In one embodiment, the dependent component implementation module may be further operable to: and realizing a sharing callback method of the corresponding sharing channel in the dependent component.
The sharing operation executing module 303 may further be configured to: and after the sharing operation is completed, executing a sharing callback method of the target sharing channel.
In addition, the specific implementation contents of the sharing implementation apparatus in the embodiment of the present invention have been described in detail in the sharing implementation method, so that repeated contents are not described herein.
Fig. 4 is a schematic diagram of a framework of a sharing implementation apparatus according to an embodiment of the present invention.
As shown in fig. 4, the sharing implementation apparatus according to an embodiment of the present invention is specifically implemented as a sharing component, where a sharing component base part (referred to as a base part) is a base component, and a sharing component dependent part (referred to as a dependent part) is a dependent component. The embodiment of the invention decouples the basic part and the dependent part of the sharing component.
The embodiment provides a uniform sharing method in the basic part, thereby reducing the access cost and the maintenance cost.
The existing sharing components are integrated with the SDK of each sharing channel, so that redundancy exists in the application compiling package, and the compiling package is increased. The basic part of the embodiment does not include the SDK of any sharing channel, and only one base class of the sharing channel is added in addition to providing a uniform sharing method, and the base class has the function of providing an identity certificate of the sharing channel, and as long as the base class inherits the protocol, the base class can represent that the base class is the sharing channel supported by the invention. The sharing component of the embodiments of the present invention overcomes the above-mentioned drawbacks of the sharing components of the prior art.
The basic portion of this embodiment may specifically include three small modules: the system comprises a channel module, a data module and a sharing module, wherein the channel module provides a sustainable base class which provides data returning to the current channel and a sharing callback method, and the channel module can be used as a sharing channel as long as a subclass is newly established and a parent class method (related methods of the base class, such as a sharing method and the like) is realized; the data module is used for providing the shared data types which can be supported; the sharing module provides interception processing of a registration channel, a unified sharing method, acquisition of a sharing panel state, cancellation of sharing and a jump method between apps.
The process of implementing the sharing module of the basic portion is shown in fig. 5, and includes: initializing a sharing module; initializing a sharing channel array; calling a sharing method (the sharing method refers to a uniform sharing method provided by a basic component); acquiring a sharing channel array; and displaying the sharing interface.
The implementation flow of the dependent part is shown in fig. 6, the dependent part in the embodiment of the present invention decouples each sharing channel, creates a subclass inheriting the base class of the channel module of the basic part in each dependent component, and implements a correlation method, where the subclass is used to enable the basic component to verify the identity, so as to represent the dependent component as one of the sharing channels supported by the basic part, thereby solving the problem that the sharing channel of the sharing component in the prior art is fixed and cannot define the sharing channel by self. According to the embodiment of the invention, the registration channel method of the sharing module of the basic component is called when the subclass is initialized, and the sharing channel is added into the sharing channel array supported by the basic component. When a user wants to add a self-defined sharing channel, the method is very convenient to realize. In the implementation of the custom dependent component, a strongly dependent basic component is needed, a subclass inheriting the basic component channel module is newly built (the dependent channel in fig. 6 represents the subclass), and a related method is implemented, wherein a sharing callback method of the subclass is a method really called by the channel, and if the sharing channel includes the SDK, a corresponding SDK is also introduced.
The user-defined sharing channel function of the embodiment of the invention is an open mode different from the sharing component in the prior art, and can enable a user to add the sharing channel needed by the user to the existing sharing channel provided by the sharing component of the embodiment of the invention. In the prior art, since no custom sharing channel is provided, for developers who have access to some sharing channels, if a new sharing channel is desired, the developers face a risk of rewriting relevant code, and may even need to reconstruct the code architecture. In the embodiment of the invention, if a user wants to increase the sharing channel, the calling method is not required to be changed in the original code, and only the self-defined channel name is required to be added during participation, so that the access cost and the maintenance cost are greatly reduced, the function of customizing the sharing channel by the user is realized, and the realization mode is more flexible.
Fig. 7 illustrates an exemplary system architecture 700 to which the sharing implementation method or the sharing implementation apparatus according to the embodiments of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the sharing implementation method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the sharing implementation device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing a terminal device or server of an embodiment of the present application. The terminal device or the server shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments 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 embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention 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 application, 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 this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a sharing channel selection module, a sharing channel display module and a sharing operation execution module. For example, the sharing channel selection module can also be described as a "module for initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components; calling a sharing method provided by the basic component to display the selected sharing channel; after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish sharing operation.
According to the technical scheme of the embodiment of the invention, one or more dependent components are initialized so as to select the sharing channels corresponding to the one or more dependent components; calling a sharing method provided by the basic component to display the selected sharing channel; and after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish the sharing operation. The sharing method and the device have the advantages that the sharing channels can be freely selected on the basis of saving development access cost and maintenance cost, users can customize the sharing channels, the problem that the sharing channels provided by existing sharing assemblies are fixed is solved, the size of a compiling package is reduced, and the situation that auditing is not passed due to the fact that the size of an installation package exceeds the limit of an application platform is avoided.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A sharing implementation method is characterized by comprising the following steps:
initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components;
calling a sharing method provided by the basic component to display the selected sharing channel;
after receiving a sharing instruction of a user to a target sharing channel in the displayed sharing channels, executing the sharing method of the target sharing channel to finish sharing operation.
2. The method of claim 1, wherein initializing one or more dependent components to select a sharing channel corresponding to the one or more dependent components comprises:
respectively initializing the one or more dependent components, wherein when each dependent component is initialized, calling a registration channel method provided by the basic component to add the sharing channel corresponding to the dependent component into a sharing channel array, so that the sharing channel corresponding to the dependent component is selected.
3. The method of claim 1, wherein prior to initializing the one or more dependent components, comprising:
in each dependent component, establishing a subclass of a sharing channel corresponding to the dependent component, wherein the subclass inherits a base class to which a sharing method provided by the basic component belongs; and realizing the sharing method of the sharing channel corresponding to the dependent component in the subclass.
4. The method according to claim 3, wherein before the displaying the selected sharing channel, the sharing channel corresponding to the dependent component is determined to be the sharing channel supported by the base component according to the subclass of the sharing channel corresponding to the dependent component.
5. The method of claim 1, further comprising: a sharing callback method of a corresponding sharing channel is realized in the dependent component;
after the sharing operation is completed, the method further comprises: and executing the sharing callback method of the target sharing channel.
6. A sharing implementation apparatus, comprising:
the sharing channel selection module is used for initializing one or more dependent components so as to select a sharing channel corresponding to the one or more dependent components;
the sharing channel display module is used for calling the sharing method provided by the basic component to display the selected sharing channel;
and the sharing operation execution module is used for executing the sharing method of the target sharing channel after receiving a sharing instruction of a user to the target sharing channel in the displayed sharing channels so as to finish the sharing operation.
7. The apparatus of claim 6, wherein the sharing channel selection module is further configured to:
respectively initializing the one or more dependent components, wherein when each dependent component is initialized, calling a registration channel method provided by the basic component to add the sharing channel corresponding to the dependent component into a sharing channel array, so that the sharing channel corresponding to the dependent component is selected.
8. The apparatus of claim 6, further comprising a dependent component implementation module to:
in each dependent component, establishing a subclass of a sharing channel corresponding to the dependent component, wherein the subclass inherits a base class to which a sharing method provided by the basic component belongs; and realizing the sharing method of the sharing channel corresponding to the dependent component in the subclass.
9. The apparatus of claim 8, further comprising a sharing channel verifying module, configured to confirm that the sharing channel corresponding to the dependent component is the sharing channel supported by the base component according to the subclass of the sharing channel corresponding to the dependent component before the displaying of the selected sharing channel.
10. The apparatus of claim 8, wherein the dependent component implementation module is further configured to: a sharing callback method of a corresponding sharing channel is realized in the dependent component;
the sharing operation execution module is further configured to: and after the sharing operation is completed, executing a sharing callback method of the target sharing channel.
11. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010274528.3A 2020-04-09 2020-04-09 Sharing implementation method and device Pending CN113535185A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010274528.3A CN113535185A (en) 2020-04-09 2020-04-09 Sharing implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010274528.3A CN113535185A (en) 2020-04-09 2020-04-09 Sharing implementation method and device

Publications (1)

Publication Number Publication Date
CN113535185A true CN113535185A (en) 2021-10-22

Family

ID=78087750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010274528.3A Pending CN113535185A (en) 2020-04-09 2020-04-09 Sharing implementation method and device

Country Status (1)

Country Link
CN (1) CN113535185A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140280121A1 (en) * 2012-12-21 2014-09-18 Highspot, Inc. Interest graph-powered feed
WO2016091034A1 (en) * 2014-12-09 2016-06-16 北京奇虎科技有限公司 Method and device for providing application channel packet
US20180032636A1 (en) * 2016-07-29 2018-02-01 Newswhip Media Limited System and method for identifying and ranking trending named entities in digital content objects
CN110119277A (en) * 2019-04-18 2019-08-13 深圳壹账通智能科技有限公司 Data sharing method, device, computer equipment and storage medium
CN110166517A (en) * 2018-10-11 2019-08-23 四川彭彣彰信息科技有限公司 A kind of block chain punctuation mark cryptographic technique and its application scenarios
CN110457045A (en) * 2019-08-16 2019-11-15 百度在线网络技术(北京)有限公司 Modularization merges Compilation Method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140280121A1 (en) * 2012-12-21 2014-09-18 Highspot, Inc. Interest graph-powered feed
WO2016091034A1 (en) * 2014-12-09 2016-06-16 北京奇虎科技有限公司 Method and device for providing application channel packet
US20180032636A1 (en) * 2016-07-29 2018-02-01 Newswhip Media Limited System and method for identifying and ranking trending named entities in digital content objects
CN110166517A (en) * 2018-10-11 2019-08-23 四川彭彣彰信息科技有限公司 A kind of block chain punctuation mark cryptographic technique and its application scenarios
CN110119277A (en) * 2019-04-18 2019-08-13 深圳壹账通智能科技有限公司 Data sharing method, device, computer equipment and storage medium
CN110457045A (en) * 2019-08-16 2019-11-15 百度在线网络技术(北京)有限公司 Modularization merges Compilation Method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
石惠娴;钟宏君;: "多渠道信息平台中多渠道发布子***的设计", 计算机工程与设计, no. 10, 28 May 2006 (2006-05-28) *
陈忠;艾兴政;: "双渠道信息共享与收益分享合同选择", ***工程理论与实践, no. 12, 15 December 2008 (2008-12-15) *

Similar Documents

Publication Publication Date Title
CN109981719A (en) Information processing method and its system, computer system and computer readable medium
CN111309216A (en) List page display method and device, computer equipment and storage medium
CN111881392A (en) Page display method and device
CN113821352A (en) Remote service calling method and device
CN111831461A (en) Method and device for processing business process
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN114500481A (en) Service request processing method, system and device
CN111125503A (en) Method and apparatus for generating information
CN110795328A (en) Interface testing method and device
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
US20220245581A1 (en) Method and apparatus for sharing delivery box
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111030900A (en) Authentication-free login method and device and electronic equipment
CN111124523A (en) Method and apparatus for initializing applications
CN113535185A (en) Sharing implementation method and device
CN115617420A (en) Application program generation method, device, equipment and storage medium
CN113779122B (en) Method and device for exporting data
CN112860447B (en) Interaction method and system between different applications
CN113254825A (en) Page generation method and device, electronic equipment and storage medium
CN113709171A (en) Method and device for cross-component state communication
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN113760727A (en) Interface regression testing method and device
CN113760487A (en) Service processing method and device
CN113448602A (en) Version updating method and device
CN113741862A (en) Communication system and method for mobile terminal expansion development

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