Disclosure of Invention
In view of the above, the embodiment of the application provides an information sharing method and device, which can solve the problems that the prior different items need to be configured for multiple times to access different social plug-ins and the process is complicated.
In order to achieve the above object, according to an aspect of the embodiments of the present application, there is provided an information sharing method, including:
Receiving an information sharing request, and acquiring sharing parameters in the information sharing request;
calling a preset service interface, and generating a service page based on the sharing parameters;
Calling a sharing plug-in, capturing a service page, and generating a card link;
Sharing the card links.
Optionally, generating the service page includes:
and calling a preset service interface, mapping sharing parameters to the page, and generating a hypertext markup language page which accords with the sharing plug-in grabbing open map marks.
Optionally, generating the card link includes:
Acquiring a service address of a service page, and extracting a sharing parameter value;
and calling a sharing plug-in to capture a corresponding open map mark from the service page based on the sharing parameter value, and generating a card link.
Optionally, sharing the card link includes:
Acquiring a sharing channel identifier in an information sharing request;
determining a sharing channel based on the sharing channel identification;
The sharing card links to the sharing channel.
Optionally, the information sharing method further includes:
And receiving a card link access request, jumping to a service page, acquiring a source link address, generating a corresponding jumping code based on a preset automatic refreshing frequency, and executing the jumping code to jump to a page corresponding to the source link address.
In addition, the application also provides an information sharing device, which comprises:
the receiving unit is configured to receive the information sharing request and acquire sharing parameters in the information sharing request;
The service page generation unit is configured to call a preset service interface and generate a service page based on the sharing parameters;
the card link generation unit is configured to call the sharing plug-in, grasp the service page and generate a card link;
And the sharing unit is configured to share the card links.
Optionally, the service page generation unit is further configured to:
and calling a preset service interface, mapping sharing parameters to the page, and generating a hypertext markup language page which accords with the sharing plug-in grabbing open map marks.
Optionally, the card link generation unit is further configured to:
Acquiring a service address of a service page, and extracting a sharing parameter value;
and calling a sharing plug-in to capture a corresponding open map mark from the service page based on the sharing parameter value, and generating a card link.
Optionally, the sharing unit is further configured to:
Acquiring a sharing channel identifier in an information sharing request;
determining a sharing channel based on the sharing channel identification;
The sharing card links to the sharing channel.
Optionally, the information sharing device further includes an access unit configured to:
And receiving a card link access request, jumping to a service page, acquiring a source link address, generating a corresponding jumping code based on a preset automatic refreshing frequency, and executing the jumping code to jump to a page corresponding to the source link address.
In addition, the application also provides the information sharing electronic equipment, which comprises one or more processors and a storage device, wherein the storage device 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 realize the information sharing method.
In addition, the application also provides a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the information sharing method as described above.
The embodiment of the application has the advantages that the service pages for the different sharing plugins to capture are generated based on the sharing parameters in the received information sharing request, so that the information required by the sharing plugins is not required to be configured for many times when different projects are accessed to the sharing plugins, and the sharing process is simplified. And the sharing plug-in which can be compatible with various sharing channels is directly called, the generated service page is grabbed, and the card link can be quickly generated and shared. And when the shared card style or content needs to be modified, the corresponding service page is generated by uniformly modifying the sharing parameters once, the modification is not needed one by one, the workload is reduced, and the sharing efficiency is improved. In addition, when the sharing plug-in captures the content of the service page, the capturing can directly generate the content of the card link instead of the link domain name of the source page, so that the required card link can be generated more simply and conveniently, and the user experience is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered 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 application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of an information sharing method according to a first embodiment of the present application, and as shown in fig. 1, the information sharing method includes:
Step S101, an information sharing request is received, and sharing parameters in the information sharing request are obtained.
In this embodiment, an execution body (for example, a server or a processor) of the information sharing method may receive, by a wired connection or a wireless connection, an information sharing request initiated by a user through a terminal device, for example, a terminal device such as a smart phone, a tablet computer, a laptop, a desktop computer, or the like. For example, when a user opens shopping software on a smart phone and wants to share a certain or a plurality of browsed shopping pages with instant messaging software installed on a smart phone of family or friends, the user can trigger a page sharing process by clicking a sharing control on a current page, so as to send an information sharing request corresponding to a page to be shared to an execution subject. The executing body can acquire the sharing parameters in the information sharing request. Specifically, the sharing parameters may include, but are not limited to, a sharing title tit, a sharing description des, a sharing picture src, and a source link URL of the page to be shared.
Step S102, a preset service interface is called, and a service page is generated based on the sharing parameters.
After the executing body acquires the sharing parameters in the sharing request, the executing body can call a preset service interface to transmit the acquired sharing parameters to the preset service. The preset service may be a service for generating a service for capturing by the sharing plug-in, and is configured to generate a hypertext markup language HTML page, i.e. a service page, according to the sharing parameters transmitted by the preset service interface. The preset service may be a type of application running in the background and may provide the user with functionality to generate corresponding HTML pages, such as client/server applications, web servers, database servers, and other server-based applications, both locally and over a network. Only the information for the different sharing plug-ins to capture the card link content is in the service page.
In particular, HTML is a markup language that marks individual parts of a web page to be displayed by markup symbols. The webpage file is a text file, and the content (such as how words are processed, how pictures are arranged, how pictures are displayed and the like) in the webpage file can be correctly displayed by adding a marker in the text file. The browser reads the web page files in sequence, interprets and displays the marked content according to the markers, does not indicate the error of the marked mark when writing errors, does not stop the interpretation and execution process, and the user can only analyze the error reasons and the error positions through the display effect. It should be noted, however, that for different browsers, the same marker may not be interpreted identically, and thus may have different display effects. The HT ML service page may be a page to be displayed marked by a marking symbol. The HTML markup symbols can be represented by codes, which can have 2 representations. I.e. character codes (named entities) and numerical codes (numbered entities). The character code starts with "&" symbol and ends with a semicolon "& gt, with a character name such as R in between. The numerical code also starts with "& #" symbol, starts with a semicolon ";" ends with a number therebetween, e.g. a number
And step S103, calling a sharing plug-in, capturing a service page and generating a card link.
The execution body may configure a template based on an address of a preset service and a preset link parameter while generating a service page,
To configure parameter values corresponding to the parameters tit, des, src, url to be shared in the link parameter configuration template.
I.e. the parameter values may be changed according to the different pages the user is to share. When users want to share different pages, the unified modification of generated card links can be realized by only modifying the parameter values corresponding to different shared pages in the preset link parameter configuration template. It will be appreciated that the content presented on the card link may also be uniformly modified. For example, the parameter values corresponding to the parameters can be modified by modifying the preset link parameter configuration template to increase or decrease the parameters, so that the uniform modification of the shared card style or content can be realized.
Specifically, the configured parameter value may be used to indicate information such as a position of an open map label corresponding to each parameter to be shared in a service page.
Specifically, when a plurality of pages are required to call the sharing plug-in to serve as a sharing function, the executing body does not need to repeatedly configure information required by the sharing plug-in, and only needs to splice the sharing parameters (including the sharing parameter names and the sharing parameter values) corresponding to the pages to be shared by the preset service addresses, further share the sharing parameters to the corresponding sharing plug-in, and the sharing plug-in directly grabs the service pages generated by the service to generate card links, so that the function of generating the sharing cards in different sharing plug-ins can be realized.
After configuring each parameter to be shared in the link parameter configuration template, the execution subject can generate a link of the service page corresponding to the page to be shared based on each newly configured parameter,
After the execution body configures the link, the sharing plug-in can be called, and based on the service page pointed by the link, the open map mark corresponding to the link is grabbed from the service page, so that a card link is generated for sharing. The open atlas token may be a page that conforms to the sharing plugin grabbing.
The card links may be corresponding links
Is a card of (a). The card has a link access function and is therefore referred to as a card link. The card link may be displayed in the form of a card, and the user clicking on the displayed card may jump to the source link address corresponding to the displayed card.
Source links-links of the original pages to be shared.
The card link may display a shared title tit, a shared description des, and a shared picture src on the displayed card. The sharing plug-in can be compatible with various sharing channels. The sharing channel can comprise instant messaging software, and can be WeChat and QQ. The sharing channel may also be a QQ space, a circle of friends, etc. The card link can be a commodity card generated by sharing commodity detail pages in the shopping client to the instant messaging software.
Step S104, sharing the card links.
After the execution body generates the card link, the execution body can share the card link to the instant messaging software designated by the information sharing request. It can be appreciated that the executing body may also share the generated card link to the client itself where the page to be shared is located. For example, when browsing a shopping page in the client a, a user shares the page B to a preset family member in the client a, clicks a sharing control, and sends an information sharing request to the execution body. After receiving the sharing request of the user, the executing body generates a card link corresponding to the B page based on the card link generation mode described in the above embodiment, and shares the card link to the family group member preset in the client A. It can be understood that the executing body can share the card link to the C instant messaging software or the D client, and the application does not limit the target sharing channel of the card link.
According to the embodiment, the service page for the different sharing plugins to grasp is generated based on the sharing parameters in the received information sharing request, so that when different projects are accessed to the sharing plugins, the information required by the sharing plugins is not required to be configured for many times, and the sharing process is simplified. And the sharing plug-in which can be compatible with various sharing channels is directly called, the generated service page is grabbed, and the card link can be quickly generated and shared. And when the shared card style or content needs to be modified, the corresponding service page is generated by uniformly modifying the sharing parameters once, the modification is not needed one by one, the workload is reduced, and the sharing efficiency is improved. In addition, when the sharing plug-in captures the content of the service page, the capturing can directly generate the content of the card link instead of the link domain name of the source page, so that the required card link can be generated more simply and conveniently, and the user experience is improved.
Fig. 2 is a main flow chart of an information sharing method according to a second embodiment of the present application, and as shown in fig. 2, the information sharing method includes:
step S201, receiving an information sharing request, and obtaining a sharing parameter in the information sharing request.
Step S202, a preset service interface is called, and a service page is generated based on the sharing parameters.
The principle of step S202 is similar to that of step S102, and will not be described here again.
Specifically, step S202 may also be implemented by step S2021:
Step S2021, call the preset service interface, map the sharing parameters to the page, and generate the hypertext markup language page conforming to the sharing plug-in grabbing open map mark.
After the executing body acquires the sharing parameters in the information sharing request, a preset service interface can be called, and the sharing parameters are mapped into corresponding hypertext markup languages on the page so as to generate the hypertext markup language page which accords with the grabbing open map mark of the sharing plug-in.
According to the embodiment, the sharing parameters are mapped into the corresponding hypertext markup language on the page by calling the preset service interface, so that the sharing plug-in can be directly grabbed to generate the card link, further configuration of information required by the corresponding sharing plug-in is not needed when each page to be shared is shared, the sharing path is simplified, and the sharing efficiency is improved.
Step S203, calling a sharing plug-in, capturing a service page and generating a card link.
The principle of step S203 is similar to that of step S103, and will not be described here again.
Specifically, step S203 may be further implemented by step S2031 to step S2032:
Step S2031, obtaining the service address where the service page is located, and extracting the sharing parameter value.
After or while generating the service page, the executing body can acquire the address of the service page, and after acquiring the service address of the service page, the executing body can call the sharing plug-in to extract the sharing parameter value corresponding to the sharing parameter in the address,
Step S2032, call the sharing plug-in to capture the corresponding open map label from the service page based on the sharing parameter value, and generate the card link.
In step S204, the card links are shared.
After extracting the shared parameter value, the execution subject can grasp the newly configured parameter value from the service page based on the service page pointed by the address where the service page is located
And the corresponding open map marks are used for generating card links for sharing.
According to the embodiment, the sharing plug-in is called, and the open map mark to be grabbed is determined and grabbed based on the service address of the service page, so that the card link is directly generated, and the plug-in is not required to be specifically configured. When the sharing plug-in captures the service page, the captured open map mark of the card link can be directly generated instead of the link domain name of the source page, so that the process of generating the card link is faster and more accurate.
The principle of step S204 is similar to that of step S104, and will not be described here.
Specifically, step S204 may be further implemented by steps S2041 to S2043:
in step S2041, a sharing channel identifier in the information sharing request is obtained.
The information sharing request may include a sharing channel identifier. The sharing channel can be various instant messaging software, such as WeChat, facebook, etc. The sharing channel identifier may be an acronym of each instant messaging software, for example, the sharing channel identifier corresponding to the WeChat may be WX or wX. The sharing channel identifier corresponding to Facebook may be Fb. The sharing channel identifier corresponding to Twitter may be Tt. The application does not limit the naming of the sharing channel identifier corresponding to each instant messaging software.
Step S2042, based on the sharing channel identification, determines the sharing channel.
In step S2043, the sharing cards are linked to the sharing channels.
After the executive body obtains the sharing channel identifier, the executive body can determine the sharing channel corresponding to the sharing channel identifier according to the corresponding relation between the preset sharing channel identifier and the sharing channel. And the generated card links can be shared to the determined sharing channels.
According to the method and the device for sharing the page information, the card links are shared to the sharing channels corresponding to the sharing channel identifiers through the sharing channel identifiers in the information sharing request, and therefore accurate page information sharing can be achieved.
Step S205, receiving a card link access request, jumping to a service page, acquiring a source link address, generating a corresponding jumping code based on a preset automatic refresh frequency, and executing the jumping code to jump to the page corresponding to the source link address.
After the card is intercepted and shared, the executing body can share the card with family members of a local client, for example, after the family members click on the card link, the executing body receives the card link access request and triggers the card link access process. And then firstly jumping to the service page corresponding to the link, and further obtaining the source link address,
And further, generating a corresponding jump code based on the source link address and a preset auto-refresh frequency, for example, the code may be a code generated by using a function of auto-refreshing a webpage of a meta tag, and the code may enable the jumped current service page to automatically jump to a page corresponding to the URL after 2 seconds. Wherein 2 in the code represents a set interval time (in seconds), the corresponding preset auto-refresh frequency is 0.5, and the parameter value of the parameter content in the code is determined according to the preset auto-refresh frequency. The URL is the address of the web page that automatically jumps after a specified interval. The application does not limit the specific value of the preset automatic refresh frequency and does not limit the set interval time.
The execution body executes the jump code to imperceptibly jump from the current service page to the page corresponding to the source link address.
It will be appreciated that the executing entity may also share card links to other instant messaging software, such as WeChat. At this time, the execution body may be a server connecting the client or terminal where the page to be shared is located and other instant messaging software. The server receives card link access requests sent by other instant messaging software, jumps to a service page, acquires a source link address, generates a corresponding jump code based on a preset automatic refresh frequency, and executes the jump code to jump to the page corresponding to the source link address.
According to the embodiment, the jump code generated based on the source link address and the preset automatic refresh frequency can enable a user to jump from the service page to the sharing page corresponding to the source address without perception when accessing the card link, and user experience is improved.
Fig. 3 is an application scenario diagram of an information sharing method according to a third embodiment of the present application. The information sharing method is applied to a scene that a plurality of pages need to be accessed into a sharing plug-in so as to share page contents. As shown in fig. 3, a server or processor 304 receives an information sharing request 302 for a page 301, and obtains sharing parameters 303 in the information sharing request 302. The server or processor 304 invokes the preset service interface 305 to generate a service page 307 based on the sharing parameters 303. The server or processor 304 invokes the sharing plug-in 306, crawling the service page 307, and generating a card link 308. The server or processor 304 shares a card link 308.
Fig. 4 is a schematic diagram of main modules of an information sharing device according to an embodiment of the application. As shown in fig. 4, the information sharing apparatus includes a receiving unit 401, a service page generating unit 402, a card link generating unit 403, and a sharing unit 404.
The receiving unit 401 is configured to receive the information sharing request, and obtain the sharing parameters in the information sharing request.
The service page generating unit 402 is configured to invoke a preset service interface and generate a service page based on the sharing parameter.
The card link generation unit 403 is configured to call the sharing plugin, grab the service page, and generate a card link.
The sharing unit 404 is configured to share card links.
In some embodiments, the service page generation unit 402 is further configured to invoke a preset service interface, map the sharing parameters to the page, and generate a hypertext markup language page conforming to the sharing plug-in crawling opengraph markup.
In some embodiments, the card link generation unit 403 is further configured to obtain a service address where the service page is located, extract a sharing parameter value, and call the sharing plug-in to capture a corresponding open map label from the service page based on the sharing parameter value, and generate a card link.
In some embodiments, the sharing unit 404 is further configured to obtain a sharing channel identifier in the information sharing request, determine a sharing channel based on the sharing channel identifier, and link the sharing card to the sharing channel.
In some embodiments, the information sharing apparatus further includes an access unit, not shown in fig. 4, configured to receive a card link access request, skip to a service page, obtain a source link address, generate a corresponding skip code based on a preset auto-refresh frequency, and further execute the skip code to skip to a page corresponding to the source link address.
It should be noted that, in the information sharing method and the information sharing apparatus of the present application, there is a corresponding relationship between the implementation contents, so the repeated contents will not be described.
Fig. 5 illustrates an exemplary system architecture 500 to which the information sharing method or apparatus of the embodiments of the present application may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be a variety of electronic devices that may log into a shopping website and support web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (by way of example only) that provides support for information sharing requests submitted by users using the terminal devices 501, 502, 503. The background management server can receive an information sharing request, acquire sharing parameters in the information sharing request, call a preset service interface, generate a service page based on the sharing parameters, call a sharing plug-in, capture the service page, generate a card link, and share the card link.
It should be noted that, the information sharing method provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the information sharing device is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing an embodiment of the present application. The terminal device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the computer system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Connected to the I/O interface 605 are an input section 606 including a keyboard, a mouse, and the like, an output section 607 including a Cathode Ray Tube (CRT), a liquid crystal credit authorization query processor (LCD), and the like, and a speaker, and the like, a storage section 608 including a hard disk, and the like, and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are performed when the computer program is executed by the central processing unit (CP U) 601.
The computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (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 context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example a processor may be described comprising a receiving unit, a service page generating unit, a card link generating unit and a sharing unit. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As a further aspect, the application also provides a computer readable medium which may be comprised in the device described in the above embodiments or may be present alone without being fitted into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by one device, the device receives an information sharing request, acquires sharing parameters in the information sharing request, invokes a preset service interface, generates a service page based on the sharing parameters, invokes a sharing plug-in, grabs the service page, generates a card link, and shares the card link.
According to the technical scheme provided by the embodiment of the application, the service page for the different sharing plugins to grasp is generated based on the sharing parameters in the received information sharing request, so that when different projects access the sharing plugins, the information required by the sharing plugins is not required to be configured for many times, and the sharing process is simplified. And the sharing plug-in which can be compatible with various sharing channels is directly called, the generated service page is grabbed, and the card link can be quickly generated and shared. And when the shared card style or content needs to be modified, the corresponding service page is generated by uniformly modifying the sharing parameters once, the modification is not needed one by one, the workload is reduced, and the sharing efficiency is improved. In addition, when the sharing plug-in captures the content of the service page, the capturing can directly generate the content of the card link instead of the link domain name of the source page, so that the required card link can be generated more simply and conveniently, and the user experience is improved.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.