CN111414560B - Shared information processing method and device, related equipment and storage medium - Google Patents

Shared information processing method and device, related equipment and storage medium Download PDF

Info

Publication number
CN111414560B
CN111414560B CN201910008876.3A CN201910008876A CN111414560B CN 111414560 B CN111414560 B CN 111414560B CN 201910008876 A CN201910008876 A CN 201910008876A CN 111414560 B CN111414560 B CN 111414560B
Authority
CN
China
Prior art keywords
target
image
information
sharing
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910008876.3A
Other languages
Chinese (zh)
Other versions
CN111414560A (en
Inventor
黄明虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910008876.3A priority Critical patent/CN111414560B/en
Publication of CN111414560A publication Critical patent/CN111414560A/en
Application granted granted Critical
Publication of CN111414560B publication Critical patent/CN111414560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a shared information processing method, a shared information processing device, related equipment and a storage medium, wherein the method comprises the following steps: when a page information sharing request is received, acquiring target sharing information according to the page information sharing request, and acquiring a target cover image of a target page where the target sharing information is located; acquiring original resource address information of a target page, acquiring target address information with a redirection mapping relation with the original resource address information, and generating a target address identification image according to the target address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information; and combining the target sharing information, the target cover image and the target address identification image into a sharing file. By adopting the method and the device, the information sharing efficiency can be improved.

Description

Shared information processing method and device, related equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for processing shared information, and related devices and storage media.
Background
Today, in the rapid development of information technology, the Internet (Internet) has become an important channel for people to rapidly acquire, distribute and spread information, and plays an important role in various aspects such as economy, life and the like. The information transmission on the Internet is realized mainly through web pages, and users can achieve the purpose of information transmission by sharing the whole web page or the characters, pictures, audio and the like in the web page.
When a user needs to share a web page link of a web page and part of content (e.g., text or pictures) in the web page, the specific process of the existing method is as follows: the user copies the webpage links of the webpage to be shared, and the terminal sends the copied webpage links to the sharing object; and then the user performs copying operation on the webpage content to be shared in the webpage, and the terminal sends the copied webpage content to the sharing object again.
As can be seen from the above, when the web page links and the web page contents in the web page need to be shared at the same time, the user needs to repeatedly perform the copy operation on the web page links and the web page contents, which is complicated in operation, thereby reducing the efficiency of information sharing.
Disclosure of Invention
The embodiment of the invention provides a shared information processing method and device, related equipment and storage medium, which can improve information sharing efficiency.
An aspect of the present invention provides a method for processing shared information, including:
when a page information sharing request is received, acquiring target sharing information, a target cover image of a target page where the target sharing information is located and original resource address information of the target page according to the page information sharing request;
Acquiring target address information with a redirection mapping relation with the original resource address information, and generating a target address identification image according to the target address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
and combining the target sharing information, the target cover image and the target address identification image into a sharing file.
The target sharing information, the target cover image and the target address identification image are stored in a sharing cache;
The combining the target sharing information, the target cover image and the target address identification image into a sharing file includes:
when a request for sending a sharing file aiming at a target sharing object is received, combining the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file according to the request for sending the sharing file;
and sending the sharing file to the terminal bound with the target sharing object.
The step of combining the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file according to the request for sending the sharing file includes:
according to the request for sending the sharing file, acquiring a file template associated with the identity attribute of the target sharing object, and acquiring target title information of the target page;
Determining an area identifier of at least one area in the file template, and acquiring area identifiers corresponding to the target sharing information, the target cover image, the target address identifier image and the target title information respectively;
and respectively adding the target title information, the target sharing information in the sharing cache, the target cover image and the target address identification image to the areas with the same area identification in the file template according to the area identification, so as to obtain the sharing file.
The obtaining the target sharing information according to the page information sharing request includes:
Acquiring a target view object corresponding to a page triggering the page sharing request; the target view object comprises the target sharing information; the target sharing information is stored in a sharing record of the target view object; the sharing record refers to a storage space for storing the target sharing information when the sharing operation behavior aiming at the target sharing information is detected;
And reading the target sharing information from the sharing record of the target view object, and storing the read target sharing information into the sharing cache.
The obtaining the target cover image of the target page where the target sharing information is located includes:
Determining a page where the target sharing information is located as the target page;
acquiring a target page object corresponding to the target page, extracting a target image list from the target page object, and selecting a target cover image from the target image list; the target image list comprises a plurality of image data for rendering the target page, and a list address of each image data in the target image list;
And reading the target cover image from the target image list according to the list address, and storing the read target cover image into the sharing cache.
Wherein the selecting the target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
and selecting the target cover image from the images to be determined according to the image size of the images to be determined and the list address of the images to be determined.
Wherein the selecting the target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
Performing feature coding processing on the image to be determined based on a convolutional neural network model to obtain feature coding information, and performing semantic decoding processing on the feature coding information based on the convolutional neural network model to obtain image semantic information;
And taking the image semantic information with the largest semantic association with the target sharing information as target image semantic information, and taking the image to be determined associated with the target image semantic information as the target cover image.
Wherein the selecting the target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
Acquiring an image area of the image to be determined in the target page, and determining a target area of the target sharing information in the target page;
And acquiring the page distance between the image area and the target area, and taking an image to be determined corresponding to the minimum page distance in the acquired page distance as the target cover image.
The obtaining the target cover image of the target page where the target sharing information is located includes:
Determining a page where the target sharing information is located as the target page;
Analyzing the target page to obtain image resource address information of an image belonging to the target page, and selecting target image resource address information from the obtained image resource address information;
Sending an image resource acquisition request to a resource server indicated by the target image resource address information;
And receiving an image corresponding to the target image resource address information returned by the resource server in response to the image resource acquisition request, serving as the target cover image, and storing the target cover image into the sharing cache.
The obtaining the target address information with the redirection mapping relation with the original resource address information includes:
transmitting the original resource address information to the address server, so that the address server converts character strings contained in the original resource address information into target address character strings, combines the target address character strings with domain name information of the address server to form target address information, and establishes the redirection mapping relation for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed;
And receiving the target address information sent by the address server.
Wherein the target address identification image belongs to a two-dimensional code image;
The generating a target address identification image according to the target address information comprises the following steps:
according to a character index table, converting each character contained in the target address information into a numerical index respectively, and dividing the converted numerical index into a plurality of numerical index groups;
carrying out binary conversion on the numerical indexes contained in each numerical index group to obtain index character strings respectively corresponding to each numerical index group, generating head code character strings according to the number of characters contained in the target address information, and combining the index character strings and the head code character strings into data codes;
dividing the data code into a plurality of data code blocks, generating error correction codes for each data code block, and acquiring an initial two-dimensional code image;
And interleaving and filling the data codes in the data code blocks and the error correction codes into pixel points in the initial two-dimensional code image, performing mask processing on the filled initial two-dimensional code image to obtain the target address identification image, and storing the target address identification image into the sharing cache.
Wherein, still include:
And acquiring a target waiting animation according to the request for sending the sharing file, playing the target waiting animation, and closing the target waiting animation when the completion of the sharing file combination is detected.
Another aspect of the embodiment of the present invention provides a shared information processing apparatus, including:
The first acquisition module is used for acquiring target sharing information according to the page information sharing request when the page information sharing request is received;
The second acquisition module is used for acquiring a target cover image of a target page where the target sharing information is located;
the third acquisition module is used for acquiring the original resource address information of the target page;
a fourth obtaining module, configured to obtain target address information having a redirection mapping relationship with the original resource address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
the generation module is used for generating a target address identification image according to the target address information;
and the combination module is used for combining the target sharing information, the target cover image and the target address identification image into a sharing file.
The target sharing information, the target cover image and the target address identification image are stored in a sharing cache;
The combination module comprises:
the combination unit is used for combining the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file according to the sharing file sending request when receiving the sharing file sending request aiming at the target sharing object;
and the sending unit is used for sending the sharing file to the terminal bound with the target sharing object.
Wherein the combination unit includes:
the first acquisition subunit is used for acquiring a file template associated with the identity attribute of the target sharing object according to the request for sending the sharing file and acquiring target title information of the target page;
the first determining subunit is used for determining the area identifier of at least one area in the file template and acquiring the area identifiers respectively corresponding to the target sharing information, the target cover image, the target address identifier image and the target title information;
And the combining subunit is used for respectively adding the target title information, the target sharing information in the sharing cache, the target cover image and the target address identification image to the areas with the same area identification in the file template according to the area identification to obtain the sharing file.
Wherein, the first acquisition module includes:
The acquisition unit is used for acquiring a target view object corresponding to the page triggering the page sharing request; the target view object comprises the target sharing information; the target sharing information is stored in a sharing record of the target view object; the sharing record refers to a storage space for storing the target sharing information when the sharing operation behavior aiming at the target sharing information is detected;
And the first reading unit is used for reading the target sharing information from the sharing record of the target view object and storing the read target sharing information into the sharing cache.
Wherein, the second acquisition module includes:
the determining unit is used for determining the page where the target sharing information is located as the target page;
The determining unit is further used for obtaining a target page object corresponding to the target page and extracting a target image list from the target page object; the target image list comprises a plurality of image data for rendering the target page, and a list address of each image data in the target image list;
A searching unit, configured to select a target cover image from the target image list;
And the reading unit is used for reading the target cover image from the target image list according to the list address and storing the read target cover image into the sharing cache.
Wherein, the searching unit includes:
a first searching subunit, configured to use image data in the target image list as an image to be determined;
And the first selecting subunit is used for selecting the target cover image from the images to be determined according to the image size of the images to be determined and the list address of the images to be determined.
Wherein, the searching unit includes:
The second searching subunit is used for taking the image data in the target image list as an image to be determined;
the second searching subunit is further configured to perform feature encoding processing on the image to be determined based on a convolutional neural network model to obtain feature encoding information, and perform semantic decoding processing on the feature encoding information based on a convolutional neural network model to obtain image semantic information;
The second selecting subunit is used for taking the image semantic information with the largest semantic relevance with the target sharing information as target image semantic information, and taking the image to be determined associated with the target image semantic information as the target cover image.
Wherein, the searching unit includes:
A third searching subunit, configured to use the image data in the target image list as an image to be determined;
the third searching subunit is further configured to obtain an image area of the image to be determined in the target page, and determine a target area of the target sharing information in the target page;
and the third selecting subunit is used for acquiring the page distance between the image area and the target area, and taking the image to be determined corresponding to the minimum page distance in the acquired page distance as the target cover image.
Wherein, the second acquisition module includes:
the analysis unit is used for determining the page where the target sharing information is located as the target page;
The analyzing unit is further used for analyzing the target page to obtain image resource address information of an image belonging to the target page, and selecting target image resource address information from the obtained image resource address information;
a first request unit, configured to send an image resource acquisition request to a resource server indicated by the target image resource address information;
The first receiving unit is used for receiving an image corresponding to the target image resource address information returned by the resource server in response to the image resource acquisition request, serving as the target cover image, and storing the target cover image into the sharing cache.
Wherein the fourth acquisition module includes:
The second request unit is used for sending the original resource address information to the address server so that the address server converts character strings contained in the original resource address information into target address character strings, combines the target address character strings and domain name information of the address server into target address information, and establishes the redirection mapping relation for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed;
and the second receiving unit is used for receiving the target address information sent by the address server.
Wherein the target address identification image belongs to a two-dimensional code image;
The generating module comprises:
The dividing unit is used for respectively converting each character contained in the target address information into numerical indexes according to a character index table, and dividing the converted numerical indexes into a plurality of numerical index groups;
The conversion unit is used for carrying out binary conversion on the numerical indexes contained in each numerical index group to obtain index character strings respectively corresponding to each numerical index group, generating head code character strings according to the number of characters contained in the target address information, and combining the index character strings and the head code character strings into data codes;
The dividing unit is further used for dividing the data code into a plurality of data code blocks, generating error correction codes for each data code block and acquiring an initial two-dimensional code image;
And the filling unit is used for filling the data codes in the data code blocks and the error correction codes into pixel points in the initial two-dimensional code image in an interleaving manner, performing mask processing on the filled initial two-dimensional code image to obtain the target address identification image, and storing the target address identification image into the sharing cache.
Wherein, still include:
And the playing animation module is used for acquiring a target waiting animation according to the request sent by the sharing file, playing the target waiting animation, and closing the target waiting animation when the completion of the sharing file combination is detected.
Another aspect of an embodiment of the present invention provides an electronic device, including: a processor and a memory;
The processor is connected to a memory, wherein the memory is configured to store program code, and the processor is configured to invoke the program code to perform a method as in one aspect of an embodiment of the present invention.
Another aspect of the embodiments of the present invention provides a computer storage medium storing a computer program comprising program instructions which, when executed by a processor, perform a method as in one aspect of the embodiments of the present invention.
According to the embodiment of the invention, the cover image of the page where the information to be shared is located is obtained, the original resource address information of the page is converted into the target address information which is shorter in byte length and has the redirection mapping relation, the target address information is converted into the address identification image, and finally the information to be shared, the cover image and the address identification image are combined into the shared file. The above-mentioned method can be used for capturing the images belonging to the page where the information to be shared is located, and for subsequent combination into the sharing file, so that the variety of the elements contained in the sharing file can be enriched, and the variety of information sharing is enriched; because the address identification image is converted from address information with shorter byte length, the information contained in the address identification image is less, the definition of the image is higher, and the efficiency of identifying the address identification image can be improved subsequently; furthermore, the sharing file simultaneously contains the information to be shared and the address identification image, so that page contents and page links can be shared to the sharing object simultaneously only through the sharing file, the copying operation does not need to be repeatedly executed by manpower, the human participation can be reduced, and the information sharing efficiency is further improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a system architecture diagram for sharing information processing according to an embodiment of the present invention;
FIGS. 2 a-2 b are schematic diagrams illustrating a scenario for sharing information processing according to an embodiment of the present invention;
FIG. 3 is a block diagram of a shared information processing system according to an embodiment of the present invention;
fig. 4 is a flow chart of a method for processing shared information according to an embodiment of the present invention;
FIG. 5 is an interactive schematic diagram of sharing information processing according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for acquiring a target cover image according to an embodiment of the present invention;
FIG. 7 is a flowchart of another method for acquiring a target cover image according to an embodiment of the present invention;
FIG. 8 is a flowchart of another method for acquiring a target cover image according to an embodiment of the present invention;
FIG. 9 is a flowchart of another method for acquiring a target cover image according to an embodiment of the present invention;
Fig. 10 is a schematic structural diagram of a shared information processing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a system architecture diagram for sharing information processing according to an embodiment of the present invention. Address server 10e provides short-chain generation services to a cluster of user terminals (which may include user terminal 10a, user terminal 10b, user terminal 10 c) via switch 10 d; the communication server 10g provides data forwarding services to the user terminal clusters through the switch 10 f.
Taking the user terminal 10a as an example, when the user browses a web page through the user terminal 10a and selects a part of the page content in the page for information sharing, the user terminal 10a obtains a long chain URL (Uniform Resource Locator ) of the page and sends the long chain URL (Uniform Resource Locator ) to the address server 10e through the switch 10 d. The address server 10e converts the long-chain URL into a short-chain URL and returns it to the user terminal 10a. The user terminal 10a then generates an address identification picture from the short URL, locally captures a picture belonging to the web page, and combines the captured picture, the address identification picture and the page content selected by the user into a shared file. The combined shared file is sent to the communication server 10g through the switch 10f, and the communication server 10g forwards the shared file to the user terminal bound by the shared object. The following will specifically describe how the user terminal 10a generates the shared file.
The user terminals 10a, 10b, 10c shown in fig. 1 may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID, mobile INTERNET DEVICE), a wearable device (e.g., a smart watch, a smart bracelet, etc.), and so on.
Fig. 2 a-fig. 2b are schematic diagrams illustrating a scenario of sharing information processing according to an embodiment of the present invention. As shown in fig. 2a, when a user browses a web page through a browser of the user terminal 10a and needs to share a link of the web page and a section of text in the web page with friends, the user selects text information 20a to be shared in the web page to be shared, clicks a "share" button, and the user terminal 10a generates a sharing request. According to the sharing request, a memory space (referred to as a sharing cache) is opened up in the running memory of the user terminal 10a, for storing the intermediate data generated in response to the sharing request. Meanwhile, the text information 20a to be shared selected by the user is obtained according to the sharing request, and the text information 20a is stored in the sharing cache.
Since the web page to be shared is currently being displayed in the screen, one or more image data may be selected from an image list to which image data (which may also be called browser kernel data) for rendering and typesetting the web page to be shared belongs. The selection may be made according to a list address of the image data in the image list, or according to a distance between the image data and title information of the web page to be shared. As shown in fig. 2a, an image 20b is selected from the image list, and the image 20b is read from the image list into the sharing buffer. At this time, the shared cache includes text information 20a and images 20b.
The user terminal 10a obtains the URL (referred to as long-chain URL) of the web page to be shared, and may directly generate a two-dimensional code image from the long-chain URL, and when the other user terminals scan the two-dimensional code image and parse the two-dimensional code image, the user terminal may access the page indicated by the long-chain URL, that is, may access the shared web page.
In order to improve the success rate and efficiency of resolving the two-dimensional code image and further improve the display effect of the two-dimensional code image, the user terminal 10a may send the long-chain URL to the address translation server, the address translation server may use a self-increasing sequence algorithm (also called never repeated algorithm) to convert the long-chain URL into the short-chain URL, and the address translation server may further obtain the short-chain URL by splitting the information digest value of the long-chain URL, where the byte length of the short-chain URL is smaller than the byte length of the long-chain URL. In the address translation server, it is also necessary to store the long-chain URL transmitted by the user terminal 10a and the converted short-chain URL in a file of the address translation server, and when storing, the long-chain URL may be stored according to a key-value pair (key), and when storing by using a key-value pair, the long-chain URL is used as a key (key) in the key-value pair, and the short-chain URL is used as a value (value) in the key-value pair. And when the short-chain URL is accessed, redirecting and jumping from the address conversion server corresponding to the short-chain URL to the server corresponding to the long-chain URL, and requesting the server corresponding to the long-chain URL for the web page resource of the corresponding web page so as to access the web page corresponding to the long-chain URL. After receiving the short URL sent by the address server, the user terminal 10a generates the two-dimensional code image 20c from the short URL. Similarly, the two-dimensional code image 20c is also stored in the sharing buffer, and the sharing buffer includes: text information 20a, an image 20b, and a two-dimensional code image 20c.
The definition of the two-dimensional code image generated by the short-chain URL is higher than that of the two-dimensional code image generated by the long-chain URL (under the condition of the same two-dimensional code size version), because the length of the data code corresponding to the short-chain URL is smaller than that of the data code corresponding to the long-chain URL, after the data code is filled into the pixel points in the initial two-dimensional code image, the pixel points in the obtained two-dimensional code image are sparse, and the two-dimensional code image generated by the short-chain URL is clearer from the aspect of expression.
The two steps of reading the image 20b from the image list and generating the two-dimensional code image 20c may be serial or parallel without a front-back relation.
The user terminal 10a obtains a file template, adds the text information 20a, the image 20b and the two-dimensional code image 20c in the sharing cache to the file template, and also adds the title information of the page to be shared to the file template to obtain the sharing file 20d. It can be known that the sharing file 20d includes the sharing content selected by the user (i.e., the text information 20 a), the image of the page where the text information 20a is located (i.e., the image 20 b), and the two-dimensional code image corresponding to the URL of the page (i.e., the two-dimensional code image 20 c).
As shown in the interface 20e of fig. 2b, when the user terminal 10a receives the above-described sharing request, a waiting animation may be acquired and played on the screen. The steps of acquiring the text information 20a, acquiring the image 20b, and the like described above may be synchronously performed in the background of the user terminal 10 a. When the user terminal 10a detects the composition of the shared file 20d, the waiting animation is turned off, and the composed shared file 20d is displayed on the screen of the user terminal 10 a. As shown in the interface 20f, when the user selects the sharing object, the sharing interface may be invoked to send the sharing file 20d to the communication server, and the communication server forwards the file 20d to the terminal corresponding to the sharing object.
The specific processes of acquiring the cover image (such as the image 20b in the embodiment corresponding to fig. 2 a), generating the address identification image (such as the two-dimensional code image 20c in the embodiment corresponding to fig. 2 a), and synthesizing the shared file may be referred to as the embodiments corresponding to fig. 3 to 9 below.
Before the specific description of the method for processing the shared information, the components involved in rendering (displaying) the page by the terminal and the browser kernel are described. Fig. 3 is a component architecture diagram for sharing information processing according to an embodiment of the present invention. As shown in fig. 3, the application layer in the terminal (which may be the user terminal 10a in the corresponding embodiment of fig. 2 a) includes an Activity component (active component), which may detect, process and respond to an event of a user. ViewGroup (view container object) is included in the Activity component, which is used to manage all pages.
The X5 kernel (also called browser kernel) in the terminal is used to interpret the syntax of the page and render (display) the web page. The browser kernel mainly comprises 3 objects, namely: x5 WebView object (Page display object), page object (Page object), webViewChromuim object (view object). Each page generates the above objects and the association relationship between the objects when parsed, rendered and typeset by the browser kernel. The association relationship between the objects means that the X5 WebView object contains WebViewChromuim objects, and the WebViewChromuim object also contains Page objects. Each object may contain object properties and object methods.
The Page object includes two object attributes, namely an image list and a resource address information record. The image list comprises image data for rendering the page, and an image corresponding to the image data is displayed in the page after rendering. The resource address information records a URL for recording a page. The WebViewChromuim object includes a sharing record, where the sharing record is used to store the text or image to be shared selected by the user. The browser kernel is also customized with 3 interfaces, namely an image interface, an address interface and a sharing record interface, wherein the image interface is used for reading image data from an image list; the address interface is a URL for reading a page from the resource address information record; the sharing record interface is used for reading the text or the image to be shared selected by the user from the sharing record.
The browsing and sharing service in the terminal comprises a cover generator, a sharing service module, a sharing file display module and a sharing file synthesizer. The terminal and the address server interact through a network, and the address server provides short chain generation service for the terminal.
Referring to fig. 3 and fig. 4 together, fig. 4 is a flow chart of a method for processing shared information according to an embodiment of the present invention. As shown in fig. 4, the shared information processing method may include:
step S101, when a page information sharing request is received, acquiring target sharing information according to the page information sharing request.
When the user selects page information (referred to as target sharing information, such as text information 20a in the embodiment corresponding to fig. 2 a) in the currently browsed page, and clicks the "share" button, the Activity component generates a page information sharing request, for example, the user presses the screen for a long time to select text or images in the page. The target sharing information can be text, pictures and the like.
And the sharing file display module in the browsing and sharing service calls a sharing record interface in the browser kernel according to the page information sharing request, and the sharing record interface acquires a view object (WebViewChromium) of a page triggering the page information sharing request from the browser kernel (namely, from the obtained browser kernel resource data after the browser kernel analyzes the current page), and the acquired view object is called a target view object. The target view object comprises a sharing record, and the sharing record comprises target sharing information selected by a user. And the sharing record interface reads the target sharing information from the sharing record of the target view object, and returns the read target sharing information to the sharing file display module. And the sharing file display module stores the target sharing information into the sharing cache. The sharing cache is a section of memory space applied by the terminal to the running memory (Random Access Memory, RAM) of the terminal according to the page information sharing request, and is used for storing intermediate data responding to the page information sharing request.
When a user selects target sharing information in a page and clicks a "sharing" button, the Activity component can detect a sharing operation behavior aiming at the target sharing information, and the browser kernel invokes a setting method set in a target view object to add the target sharing information into a sharing record in the target view object. It can be known that the sharing record belongs to the object attribute of the target view object, and the setting method set belongs to the object method of the target view object.
Step S102, obtaining a target cover image of a target page where the target sharing information is located.
Specifically, a cover generator in the browsing sharing service calls an image interface in a browser kernel, the image interface takes a Page where target sharing information is located as a target Page, acquires a Page object (Page) of the target Page, and refers to the acquired Page object as a target Page object. The image interface extracts an image list (called a target image list) from the target page object, wherein the target image list comprises image data for rendering the target page, and the image data in the target image list belong to the target page. The image interface selects one or more image data in the target image list as the target cover image (e.g., image 20b in the embodiment corresponding to fig. 2a described above). The image interface reads the target cover image from the target image list and returns the read target cover image to the cover generator. The cover generator stores the target cover image into the sharing cache, and as the target page is displayed in the screen of the terminal, the target image list and the sharing cache corresponding to the target page are both in the running memory of the terminal, and the running memory has the characteristic of data high-speed reading, so that the speed from reading the target cover image from the target image list to sharing cache is very high; meanwhile, since the target cover image can be directly rendered, there is no problem of compatibility when the target cover image is read and when the target cover image is displayed later.
The cover generator directly acquires the target cover image from the target image list or reads the target cover image from the running memory of the terminal; a callback interface (WebViewClient) can be customized in the browser kernel, the cover generator calls the callback interface, the callback interface analyzes the target page, and image resource address information of an image belonging to the target page is obtained, wherein the image resource address information can be a URL. The resource address information is used for identifying the position of the corresponding file in the network, and the resource address information of each file is unique, that is to say, the file and the corresponding resource address information have a single mapping relation; the callback interface may also obtain a page program of the target page, where the page program may be a program in HTML (HyperText Markup Language ) format, and the callback interface may obtain a URL belonging to the image type (i.e., a URL of an image belonging to the target page) from the page program. The callback interface selects a target URL from the acquired URLs and returns the target URL to the cover generator. The cover generator sends an image resource acquisition request to a server corresponding to the target URL, receives an image corresponding to the target URL returned by the server, takes the image returned by the server as a target cover image, and similarly, stores the received target cover image in a sharing cache.
Step S103, the original resource address information of the target page is obtained.
Step S104, obtaining target address information with a redirection mapping relation with the original resource address information, and generating a target address identification image according to the target address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information.
Specifically, a sharing service module in the browsing and sharing service invokes an address interface in a browser kernel, the address interface acquires a resource address information record from a target page object, extracts resource address information (called original resource address information, which may be URL) of the target page from the record, and returns the extracted original resource address information to the sharing service module. The sharing service module sends the original resource address information to an address server (the address server may be an address server in the embodiment corresponding to fig. 3 or an address conversion server in the embodiment corresponding to fig. 2a, where the address server/address conversion server is used to provide a short-chain generation service for a terminal), the address server converts a character string included in the original resource address information into a target address character string, and the address server combines the converted target address character string and domain name information of the address server into target address information and returns the target address information to the terminal. The byte length of the bytes contained in the destination address information converted by the address server is smaller than the byte length of the bytes contained in the original resource address information. The smaller the byte length is, the clearer the target address identification image generated by the target address information is, and the accuracy and efficiency of identifying the target address identification image can be improved.
And the address server stores the target address information and the original resource address information in a file of the address server in an associated mode, and establishes a redirection mapping relation between the target address information and the original resource address information. The redirection mapping relation is used for accessing an address server where the target address information is located according to the access request when the access request is generated based on the target address information, searching original resource address information with the redirection mapping relation with the target address information in a file by the address server, and redirecting and jumping from the address server to a server indicated by the original resource address information according to the searched original resource address information, namely the server where the target page is located. Thus, the access to the target address information and the access to the original resource address information can be ensured to reach the same server (namely the server corresponding to the target page), and the access to the target page is ensured.
The sharing file synthesizer in the browsing and sharing service generates a target address identification image (such as the two-dimensional code image 20c in the embodiment corresponding to fig. 2 a) according to the returned target address information (the byte length of the target address information is smaller than the byte length of the original resource address information), and stores the target address identification image in the sharing cache. The target address identification image may be a two-dimensional code image or a bar code image. The target address information and the target address identification image are in one-to-one correspondence, and other terminals can access the server where the target page is located through scanning and analyzing the target address identification image, so that the target page is displayed. The following describes how the shared file synthesizer generates a two-dimensional code image from the target address information:
In a preset character index table, respectively searching numerical indexes corresponding to each character (including $,%, +, -,/and blank) contained in the target address information, wherein the character index table comprises a plurality of tuples, and each tuple comprises a character and the numerical index corresponding to the character. For example, the tuples contained in the character index table are: (K- - -20), wherein "K" represents a character and "20" represents a numerical index, the numerical index being a numerical value ranging from 0 to 44, and the character is case-insensitive, that is, in the character index table, both uppercase K and lowercase K correspond to the numerical index 20. The corresponding numerical indexes are divided into a group of numerical indexes according to the front-back sequence of each character in the target address information, and the numerical indexes are called as numerical index groups. The numerical indexes contained in each numerical index group are converted into 11bits of binary numbers, the obtained binary numbers can be called index strings, if the last numerical index group only contains one numerical index, the rest numerical index is converted into 6bits of binary numbers, the binary numbers are also called index strings, and each numerical index group has an index string corresponding to the binary numbers. The method comprises the steps of obtaining the character quantity of characters contained in target address information, converting a numerical value corresponding to the character quantity into a binary character string, wherein the binary character string converted from the character quantity is called a head code character string, and combining the head code character string and all index character strings into a data code.
For example, the target address information includes a string of: AC-42, searching the numerical indexes corresponding to the 5 characters from the character index table as follows: 10,12,41,4,2; grouping all the searched numerical indexes in pairs to obtain 3 numerical index groups: (10, 12), (41,4), (2).
For the numerical index group "(10, 12)", the numerical index contained in the numerical index group is converted into a binary number of 11bits as an index string: (10, 12), 10×45+12=462 is converted into: 00111001110;
For the numerical index group "(41,4)", the numerical index contained in the numerical index group is converted into a binary number of 11bits as an index string: (41,4), 41×45+4=1849 to convert to: 11100111001;
For the numerical index group "(2)", the numerical index contained in the numerical index group is converted into a binary number of 6bits as an index string: (2), 2 into: 000010.
The number of characters included in the target address information is 5, and the numerical value 5 is converted into binary as a header character string: 000000101;
Combining the header string and the index string into a data code by using a code identifier (0010 indicates a binary code scheme): 0010 000000101 00111001110 11100111001 000010.
After the data codes are determined, all the data codes are divided into a plurality of data code blocks, and each data code block can be divided into one data code block according to 8 bits, namely, each 8 bits is taken as one data code block. If the length of the data code is not a multiple of 8, a value of 0 may be added at the end until the length of the added data code is a multiple of 8. Based on the Reed-solomon error correction algorithm (Reed-Solomon error correction), a corresponding error correction code is generated for each data code block, and the types of error correction codes may include an L-level type (7% of the codes may be corrected), an M-level type (15% of the codes may be corrected), a Q-level type (25% of the codes may be corrected), and an H-level type (30% of the codes may be corrected).
An initial two-dimensional code image is acquired, wherein the initial two-dimensional code image comprises a position check mark (Position Detection), a calibration graph (ALIGNMENT PATTERN) and a timing template (TIMING PATTERN). Interleaving and filling the data codes in the data code blocks and the generated error correction codes into pixel points in the initial two-dimensional code image, and filling the pixel points in the two-dimensional code image into black when the data or the error correction codes are 1 in value; and when the data code or the error correction code is a value 0, filling the pixel points in the two-dimensional code image into white. The initial two-dimensional code image after filling may have uneven conditions, that is, a large-area blank or black block may appear in the two-dimensional code image after filling, which may increase the difficulty of subsequent recognition of the two-dimensional code image. And performing Masking (Masking) on the filled two-dimensional code image, wherein the Masking is to perform OR logic operation (XOR) between the filled initial two-dimensional code image and the mask template, and the target address identification image can be obtained after Masking. Likewise, the generated target address identification image is stored in the shared cache.
According to the method, after the shorter data codes are filled into the initial two-dimensional code image, the definition of the two-dimensional code image is higher, so that the difficulty of subsequently identifying the two-dimensional code image can be reduced, and the identification efficiency is improved.
Optionally, after the original resource address information is converted into the target address information with shorter byte length, a corresponding target address identification image is generated. Of course, the address identification image can also be directly generated from the original resource address information, and the specific process can be seen from the description of generating the target address identification image through the target address information.
Step S105, combining the target sharing information, the target cover image and the target address identification image into a sharing file.
Specifically, the user selects a sharing object, called a target sharing object, in the friend list, and the Activity component correspondingly generates a sharing file sending request for the target sharing object. And a sharing file synthesizer in the browsing sharing service determines the identity attribute of the target object according to the request sent by the sharing file, wherein the identity attribute can comprise gender, age, social relationship and the like. And the sharing file synthesizer determines a file template according to the identity attribute of the target object. For example, if the target object is female, the document template may be a lively style template; if the age of the target object is greater than a preset age threshold, the file template may be a serious style template. The file template comprises a plurality of blank areas to be filled, each blank area is provided with a corresponding area identifier, and the area identifiers are used for identifying the blank areas in the file template, which can be filled with corresponding resources. The sharing file synthesizer may also obtain target title information for the target page.
The sharing file synthesizer obtains the region identification of the target title information, the region identification of the target sharing information, the region identification of the target cover image and the region identification of the target address identification image, adds the target title information, the target sharing information in the sharing cache, the target cover image and the target address identification image to the region with the same region identification in the file template respectively according to the region identification of each region in the file template and the region identification of the region identification, and takes the added file as a sharing file. The sharing file display module in the browsing sharing service can display the sharing file in the screen. The terminal bound with the target object in the sending of the sharing file can be used later, for example, the terminal logged in by the account of the target object is the terminal bound with the target object.
Optionally, after the terminal generates the request for sending the sharing file for the target sharing object, the target waiting animation is obtained, the target waiting animation is played on the screen of the terminal, and when the target waiting animation is played, the terminal may not respond to any operation behavior of the user. And closing the target waiting animation when the terminal detects that the sharing file combination is completed.
Fig. 5 is an interaction schematic diagram of sharing information processing according to an embodiment of the present invention. The sharing interface (Qrshare) module comprises the cover generator and the sharing file synthesizer; the browser kernel in the foregoing includes a rendering engine (X5 Core) module, a kernel Selection (Selection) module, and a Selection view (SelectionView) module.
As shown in fig. 5, the shared information processing method includes the steps of:
step S201, selecting target sharing information, and detecting a sharing operation behavior.
Step S202, a target cover image of a target page is acquired.
Step S203, a target cover image is acquired from the target image list.
When the Activity module detects that a user selects a sharing operation behavior of target sharing information in a target page, the Activity module triggers a rendering engine (X5 Core) module to call a sharing interface (Qrshare) module to acquire an image in the target page as a target cover image, wherein the sharing interface (Qrshare) module acquires the target cover image from a kernel resource (target image list) of the page. The specific process of the sharing interface (Qrshare) module to acquire the target image may refer to step S102 in the corresponding embodiment of fig. 4.
Step S204, generating target address information according to the original resource address information.
In step S205, the target address information is acquired through network interaction with the address server.
The rendering engine (X5 Core) module invokes the sharing service (Qrshare) module to generate target address information having a redirection mapping relationship with the original resource address information of the target page, wherein the sharing service (Qrshare) module generates the target address information from the address server by sending the original resource address information to the address server, and returns the target address information. The specific process of the sharing service (Qrshare) module to obtain the target address information may refer to step S103-step S104 in the corresponding embodiment of fig. 4.
Step S206, obtaining target sharing information.
Step S207, displaying a target sharing information selection interface.
The rendering engine (X5 Core) module calls a kernel Selection (Selection) module to acquire target sharing information to be shared selected by a user, and the kernel Selection (Selection) module calls a Selection view (SelectionView) module to display a target sharing information Selection interface in a screen. The specific process of obtaining the target sharing information by the kernel Selection (Selection) may be referred to as step S101 in the corresponding embodiment of fig. 4.
Step S208, selecting a target sharing object and clicking to share.
Step S209, generating a target address identification image according to the target address information.
When a user selects a target sharing object and clicks a "sharing" button, an Activity (Activity) module triggers a selection view (SelectionView) module to call a sharing interface (Qrshare) module to generate a target address identification image corresponding to target address information
In step S210, the target sharing information, the target cover image and the target address identification image are combined into a sharing file.
Step S211, sending the sharing file.
The selection view (SelectionView) module invokes the sharing interface (Qrshare) module, combines the target sharing information, the target cover image and the target address identification image into a sharing file, and sends the sharing file to the terminal where the target sharing object is located. The specific process of generating the target address identification image and generating the shared file by the sharing interface (Qrshare) module may be referred to as step S104-step S105 in the corresponding embodiment of fig. 4.
The above-mentioned method can be used for capturing the images belonging to the page where the information to be shared is located, and for subsequent combination into the sharing file, so that the variety of the elements contained in the sharing file can be enriched, and the variety of information sharing is enriched; because the address identification image is converted from address information with shorter byte length, the information contained in the address identification image is less, the definition of the image is higher, and the efficiency of identifying the address identification image can be improved subsequently; furthermore, the sharing file simultaneously contains the information to be shared and the address identification image, so that page content and page links can be shared to the sharing object simultaneously only through the sharing file in the follow-up process, the copying operation does not need to be repeatedly executed by manpower, the manual participation can be reduced, and the information sharing efficiency is improved.
Fig. 6 is a schematic flow chart of acquiring a target cover image according to an embodiment of the invention. As shown in fig. 6, the specific process of acquiring the target cover image includes the following steps S301 to S303, and steps S301 to S303 are one specific embodiment of step S102 in the embodiment corresponding to fig. 4:
Step S301, determining the page where the target sharing information is located as the target page.
Specifically, in the terminal, each page corresponds to a view (view), and the terminal can detect the behavior of the user in the corresponding view through the view. And when the application program with the target sharing information opens a plurality of pages (views), determining the view with the sharing operation behavior as the target view. The sharing operation behavior is a behavior that a user performs a sharing operation on target sharing information (for example, the user selects the target sharing information and clicks a "sharing" button), that is, a view in which the sharing operation behavior is detected is taken as a target view. And the terminal takes the page mapped by the target view as a target page.
Step S302, a target page object corresponding to the target page is obtained, a target image list is extracted from the target page object, and a target cover image is selected from the target image list; the target image list includes a plurality of image data for rendering the target page, and a list address of each image data in the target image list.
Specifically, the terminal obtains a target Page object (Page) corresponding to the target Page in a browser kernel (i.e. after the browser kernel analyzes the target Page), and obtains a target image list from the target Page object, wherein the target image list comprises image data for rendering the target Page and a list address of each image data in the target image list. And the terminal takes the image data in the target image list as the image to be determined.
As shown in fig. 6, the target page is page 2, the images to be determined are image 1, image 2, & gt, image 8, and the list addresses of the 8 images to be determined are respectively: 000. 001.
If the number of the images to be determined is only one in the target image list, directly taking the images to be determined as target cover images; if the number of the images to be determined is more than one, the size of each image to be determined is obtained, the image to be determined with the size larger than the size threshold is taken as a first auxiliary image, the first auxiliary image corresponding to the list address with the highest priority is taken as the target cover image according to the list addresses of all the first auxiliary images, and the terminal can determine the priority order according to the value corresponding to the list address, for example, the smaller the value corresponding to the list address is, the higher the priority order is.
As shown in fig. 6, among the list addresses of the 8 images to be determined, the list address of image 1 corresponds to the smallest value, and thus the list address of image 1 has the highest priority, i.e., image 1 is the target jacket image.
Step S303, reading the target cover image from the target image list according to the list address, and storing the read target cover image in the sharing buffer.
Specifically, the terminal reads the target cover image from the target image list according to the determined list address of the target cover image, and stores the target cover image in the sharing cache, as shown in fig. 6, reads the image 1 from the target image list, and stores the image 1 in the sharing cache. Since the target cover image is used for rendering the target page in the target image list, the format of the target cover image in the target image list is WebImage object format, and when the target cover image in WebImage object format is read and stored in the sharing cache, the target cover image in WebImage object format needs to be converted into an image in Bitmap object format and stored in the sharing cache.
The image conversion interface can be customized in the browser kernel, the above-mentioned format conversion step is completed by the image conversion interface, and only by calling the image conversion interface, the WebImage object format image can be converted into the Bitmap object format image.
Optionally, the determining step includes determining the target cover image in the plurality of images to be determined based on the size of the image to be determined and the list address of the target image list where the image to be determined is located; the image understanding can be carried out on the images to be determined (the image understanding can be based on a convolutional neural network CNN algorithm and a cyclic neural network RNN algorithm), the image semantic information of each image to be determined is generated, and the image with the highest relevance with the target sharing information is selected from a plurality of images to be determined to be used as the target cover image.
Fig. 7 is a schematic flow chart of another method for acquiring a target cover image according to an embodiment of the invention. As shown in fig. 7, the target page is still page 2, and in the target image list, the images to be determined corresponding to page 2 are image 1, image 2, image 3, and image 4. The following describes in detail how to determine the image semantic information of one image to be determined (for example, image 1), and all the other images to be determined can determine the image semantic information corresponding to the other images to be determined in the same manner.
The image 1 is input to an input layer in a convolutional neural network model (the convolutional neural network model may include an input layer, a convolutional layer, a pooling layer, a fully connected layer), and the size of the image 1 is adjusted to a fixed size at the input layer. After the size is adjusted, a convolution layer is entered, a small block in the image 1 is selected randomly as a sample, some characteristic information is learned from the small sample, and then the sample is used as a window to sequentially slide through all pixel areas of the image 1, that is, the characteristic information learned from the sample is convolved with the image 1, so that the most obvious characteristic information on different positions of the image 1 is obtained. After the convolution operation is completed, the feature information of the image 1 is already extracted, but the number of features extracted only through the convolution operation is large, so that in order to reduce the calculation amount, pooling operation is needed, that is, the feature information extracted from the image 1 through the convolution operation is transmitted to a pooling layer, aggregation statistics is carried out on the extracted feature information, and the order of magnitude of the statistical feature information is far lower than that of the feature information extracted through the convolution operation. The common pooling method mainly comprises an average pooling operation method and a maximum pooling operation method. The average pooling operation method is to calculate an average characteristic information in a characteristic information set to represent the characteristic of the characteristic information set; the maximum pooling operation is to extract the maximum characteristic information from a characteristic information set to represent the characteristic of the characteristic information set. By the convolution processing of the convolution layer and the pooling processing of the pooling layer, the static structural feature information of the image 1 can be extracted. The convolution layer in the convolution neural network can be only one layer or multiple layers, and the pooling layer can be only one layer or multiple layers. Finally, the static structural feature information of the image 1 is subjected to full connection processing, so that feature coding information of the image 1 can be obtained, and the feature coding processing of the image 1 is completed.
And decoding the feature coding information based on the cyclic neural network model to obtain the image semantic information of the image 1. The calculation formula of the recurrent neural network model can be abbreviated as: the feature coding information of the image 1+the vector of the nth word=the vector of the n+1th word, and finally mapping all the obtained word vectors into corresponding words, so that the image semantic information of the image 1 can be determined. Firstly, characteristic coding information is used as an initial hidden state vector h 0 of the cyclic neural network model, the initial hidden state vector h 0 (namely characteristic coding information) and an initial word vector x 0 (word vector x 0 can correspond to a word: start) are input into the cyclic neural network model, and the hidden state vector h 1 is calculated according to a formula (1):
Wherein, sigma (·) in formula (1) is a sigma function, i, f, o represent an input gate, a forget gate, an output gate, respectively. All W represent the weight between two gates.
Identifying a word c 0 closest to the hidden state vector h 1 based on a classifier in the cyclic neural network model, and acquiring a word vector x 1 corresponding to the word c 0; combining the hidden state vector h 1 and the initial hidden state vector h 0 into a vector h 11, inputting the vector h 11 and the word vector x 1 into a cyclic neural network model, calculating the hidden state vector h 2 according to the formula (1), identifying the word c 1 closest to the hidden state vector h 2 based on a classifier in the cyclic neural network model, and acquiring the word vector x 2 corresponding to the word c 1. The steps are repeated until the last word c n is determined (word vector c n may correspond to word: end), and finally word c 0, word c 1, word c 2, word c n are combined to obtain the image semantic information of image 1.
For the rest images to be determined, the convolution neural network model and the cyclic neural network model can be adopted to determine the corresponding image semantic information. As shown in fig. 7, the terminal may acquire image semantic information corresponding to the image 1, image semantic information of the image 2, image semantic information of the image 3, and image semantic information of the image 4.
For an image to be determined, determining keywords in corresponding image semantic information, respectively detecting whether the keywords belong to target sharing information, and counting the number of the keywords belonging to the target sharing information. Determining semantic relevance between the image semantic information and the target sharing information according to the counted number, wherein the greater the counted number is, the greater the semantic relevance between the image semantic information and the target sharing information is; if the counted number is smaller, the semantic relevance between the image semantic information and the target sharing information is smaller. And the terminal selects an image to be determined with the maximum semantic relevance with the target sharing information as a target cover image. And the terminal reads the target cover image from the target image list according to the determined list address of the target cover image, and stores the target cover image in the sharing cache. As shown in fig. 7, the semantic relevance between the image semantic information of the image 4 and the target sharing information is the largest, that is, the image 4 is the target cover image, and the image 4 is read from the target image list and stored in the sharing buffer.
Optionally, the determining the target cover image based on the size of the image to be determined and the list address of the image to be determined, and selecting the target cover image from the plurality of images to be determined based on the image semantic information of the image to be determined. The target cover image may also be selected from all the images to be determined based on a page distance between an area of the image to be determined in the target page and an area of the target sharing information in the target page.
Fig. 8 is a schematic flow chart of another method for acquiring a target cover image according to an embodiment of the invention. As shown in fig. 8, the target page is still page 2, and in the target image list, the images to be determined corresponding to page 2 are image 1, image 2, image 3, and image 4. The terminal queries offsetTop, offsetLeft, offsetWidth and offsetHeigh attributes of the target sharing information, where the four attributes respectively represent an abscissa and an ordinate of an upper left corner of the region where the target sharing information is located (referred to as a target region) relative to an object (target page) of the parent container offsetParent, and a region length and a region width, and the coordinates at this time are relative coordinates. Likewise, the offsetTop attribute, offsetLeft attribute, offsetWidth attribute, and offsetHeigh attribute of each image to be determined are respectively queried, and the abscissa and ordinate of the upper left corner of the image area where each image to be determined is located relative to the target page, and the area length and the area width can be determined. From the upper left corner coordinates of the target area and the upper left corner coordinates of the target page (the upper left corner coordinates of the target page may be (0, 0)), a first distance between the target area and the upper left corner position of the target page may be calculated; and then, according to the left upper corner coordinate of the image to be determined and the left upper corner coordinate of the target page, calculating a second distance between the image area and the left upper corner position of the target page. And taking the difference value between the second distance and the first distance as the page distance between the target area and the image, wherein each image to be determined has the corresponding page distance. And taking the image to be determined with the minimum page distance as a target cover image in all the page distances. And the terminal reads the target cover image from the target image list according to the determined list address of the target cover image, and stores the target cover image in the sharing cache. As shown in fig. 8, the page distance of the image 4 is the smallest, so the image 4 is the target cover image, and the image 4 is read from the target image list and stored in the sharing buffer.
The page distance between the two areas is calculated by the distance between the upper left corner coordinates of the image area and the upper left corner coordinates of the target page respectively, or the page distance between the two areas can be calculated by the distance between the central coordinates of the two areas and the upper left corner coordinates of the target page respectively.
For example, the 4 region attributes (offsetTop attribute, offsetLeft attribute, offsetWidth attribute, and offsetHeigh attribute) of the queried target sharing information are (3,5,20,20), respectively; the attributes of the 4 areas of the image A to be determined are respectively (6,6,50,50); the 4 area attributes of the image B to be determined are respectively (4,9,100,100), if the left upper corner coordinate of the target page is (0, 0). The first distance between the target area where the target sharing information is located and the left upper corner position of the target page is as follows: the second distance between the image area where the image A to be determined is located and the upper left corner position of the target page is as follows: /(I) The second distance between the image area where the image B to be determined is located and the upper left corner position of the target page is: therefore, the page distance between the image area of the image a to be determined and the target area is: 8.4-5.8|=2.6. The page distance between the image area of the image B to be determined and the target area is: 9.8-5.8|=4.
The above-mentioned method can be used for capturing the images belonging to the page where the information to be shared is located, so that the types of information sharing can be enriched; the address identification image converted from the address information with shorter byte length has less information, so that the definition of the address identification image is higher, and the efficiency of identifying the image can be improved subsequently; meanwhile, the sharing file simultaneously contains the information to be shared and the address identification image, so that the webpage content and the webpage link can be shared to the sharing object only by sending the sharing file at the follow-up time, the copy operation is not required to be executed for many times, the manual participation can be reduced, and the information sharing efficiency is further improved.
Fig. 9 is a schematic flow chart of another method for acquiring a target cover image according to an embodiment of the invention. As shown in fig. 9, the specific process of acquiring the target cover image includes the following steps S401 to S404, and the steps S401 to S404 are one specific embodiment of the step S102 in the embodiment corresponding to fig. 4:
Step S401, determining the page where the target sharing information is located as the target page.
Specifically, the method includes selecting a target cover image from a target image list in a browser kernel, and then reading the target cover image from the target image list and storing the target cover image in a sharing cache. The image resources may also be re-requested over the network to obtain the target cover image.
The terminal determines the page where the target sharing information is located as the target page, and the specific process of determining the target page may refer to step S301 in the corresponding embodiment of fig. 6.
Step S402, analyzing the target page to obtain image resource address information of an image belonging to the target page, and selecting target image resource address information from the obtained image resource address information.
Specifically, the terminal analyzes the target page, and can obtain the resource address information of various types of resource data in the target page. The terminal takes the resource address information belonging to the image type as the image resource address information. If the number of the image resource address information is only one, the image resource address information can be directly used as target image resource address information; if there are a plurality of image resource address information, the target image resource address information can be selected according to the region of the image corresponding to each image resource address information in the target page and the region where the target sharing information is located (see step S303 in the embodiment corresponding to fig. 6 for a specific process); or selecting the image resource address information with the highest priority as the target image resource address information (for example, the closer the image corresponding to the image resource address information is to the starting position of the target page, the higher the priority of the image resource address information is); or randomly selecting target image resource address information from all the image resource address information.
Step S403, sending an image resource acquisition request to the resource server indicated by the target image resource address information.
Specifically, after the terminal acquires the target image resource address information, a resource acquisition request is sent to a resource server indicated by the target image resource address information, and the resource server returns an image requested by the request to the terminal, namely, returns an image indicated by the target image resource address information.
Step S404, receiving an image corresponding to the target image resource address information returned by the resource server in response to the image resource obtaining request, as the target cover image, and storing the target cover image in the sharing cache.
Specifically, the terminal receives the image returned by the resource server as a second auxiliary image, and decodes the second auxiliary image (for example, jpg or png format image is converted into bmp format image, and then bmp format image is converted into Bitmap object format image). And the terminal determines the decoded image as a target cover image and stores the target cover image in a sharing cache. The decoding process is performed to reduce the space occupied by the image in the memory and to display the image directly.
The above-mentioned method can be used for capturing the images belonging to the page where the information to be shared is located, and for subsequent combination into the sharing file, so that the variety of the elements contained in the sharing file can be enriched, and the variety of information sharing is enriched; because the address identification image is converted from address information with shorter byte length, the information contained in the address identification image is less, the definition of the image is higher, and the efficiency of identifying the address identification image can be improved subsequently; furthermore, the sharing file simultaneously contains the information to be shared and the address identification image, so that page contents and page links can be shared to the sharing object simultaneously only through the sharing file, the copying operation does not need to be repeatedly executed by manpower, the human participation can be reduced, and the information sharing efficiency is further improved.
Further, please refer to fig. 10, which is a schematic diagram illustrating a structure of a shared information processing apparatus 1 according to an embodiment of the present invention. As shown in fig. 10, the shared information processing apparatus 1 may be applied to the terminal in the corresponding embodiment of fig. 3 to 9, and the shared information processing apparatus 1 may include: a first acquisition module 11, a second acquisition module 12, a third acquisition module 13, a fourth acquisition module 14, a generation module 15 and a combination module 16.
The first obtaining module 11 is configured to obtain target sharing information according to a page information sharing request when receiving the page information sharing request;
The second obtaining module 12 is configured to obtain a target cover image of a target page where the target sharing information is located;
a third obtaining module 13, configured to obtain original resource address information of the target page;
a fourth obtaining module 14, configured to obtain target address information having a redirection mapping relationship with the original resource address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
A generating module 15, configured to generate a target address identification image according to the target address information;
And the combination module 16 is configured to combine the target sharing information, the target cover image and the target address identification image into a sharing file.
The specific functional implementation manners of the first acquiring module 11, the second acquiring module 12, the third acquiring module 13, the fourth acquiring module 14, the generating module 15 and the combining module 16 may be referred to the step S101-step S105 in the corresponding embodiment of fig. 4, and will not be described herein.
Referring to fig. 10, the target sharing information, the target cover image and the target address identification image are stored in a sharing cache;
the combining module 16 may include: combining section 161, and transmitting section 162.
A combining unit 161, configured to, when receiving a request for sending a sharing file for a target sharing object, combine, according to the request for sending the sharing file, the target sharing information in the sharing cache, the target cover image, and the target address identification image into the sharing file;
And the sending unit 162 is configured to send the sharing file to the terminal bound to the target sharing object.
The specific function implementation manner of the combining unit 161 and the transmitting unit 162 may refer to step S105 in the corresponding embodiment of fig. 4, which is not described herein.
Referring to fig. 10, the combining unit 161 may include: a first acquisition subunit 1611, a first determination subunit 1612, and a combination subunit 1613.
A first obtaining subunit 1611, configured to obtain, according to the request for sending the sharing file, a file template associated with an identity attribute of the target sharing object, and obtain target title information of the target page;
A first determining subunit 1612, configured to determine an area identifier of at least one area in the file template, and obtain area identifiers corresponding to the target sharing information, the target cover image, the target address identifier image, and the target title information respectively;
And a combining subunit 1613, configured to add the target title information and the target sharing information, the target cover image, and the target address identification image in the sharing buffer to the regions with the same region identification in the file template according to the region identification, so as to obtain the sharing file.
The specific functional implementation manners of the first acquiring subunit 1611, the first determining subunit 1612, and the combining subunit 1613 may refer to step S105 in the corresponding embodiment of fig. 4, which is not described herein.
Referring to fig. 10, the first acquisition module 11 may include: an acquisition unit 111, a first reading unit 112.
An obtaining unit 111, configured to obtain a target view object corresponding to a page triggering the page sharing request; the target view object comprises the target sharing information; the target sharing information is stored in a sharing record of the target view object; the sharing record refers to a storage space for storing the target sharing information when the sharing operation behavior aiming at the target sharing information is detected;
the first reading unit 112 is configured to read the target sharing information from the sharing record of the target view object, and store the read target sharing information in the sharing cache.
The specific function implementation manner of the acquiring unit 111 and the first reading unit 112 may refer to step S101 in the corresponding embodiment of fig. 4, which is not described herein.
Referring to fig. 10, the second acquisition module 12 may include: a determining unit 121, a finding unit 122, a reading unit 123.
A determining unit 121, configured to determine a page where the target sharing information is located as the target page;
A determining unit 121, configured to obtain a target page object corresponding to the target page, and extract a target image list from the target page object; the target image list comprises a plurality of image data for rendering the target page, and a list address of each image data in the target image list;
a search unit 122 for selecting a target cover image in the target image list;
and a reading unit 123, configured to read the target cover image from the target image list according to the list address, and store the read target cover image in the sharing cache.
The specific functional implementation manners of the determining unit 121, the searching unit 122, and the reading unit 123 may refer to step S301 to step S303 in the corresponding embodiment of fig. 6, which are not described herein.
Referring to fig. 10, the lookup unit 122 may include: a first search subunit 1221, a first selection subunit 1222.
A first search subunit 1221, configured to use image data in the target image list as an image to be determined;
A first selecting subunit 1222 for selecting the target cover image from the images to be determined according to the image size of the images to be determined and the list address of the images to be determined.
The specific functional implementation manner of the first search subunit 1221 and the first selection subunit 1222 may refer to step S302 in the corresponding embodiment of fig. 6, which is not described herein.
Referring to fig. 10, the lookup unit 122 may include: a second search sub-unit 1223, a second selection sub-unit 1224.
A second search subunit 1223, configured to use the image data in the target image list as an image to be determined;
The second search subunit 1223 is further configured to perform feature encoding processing on the image to be determined based on a convolutional neural network model to obtain feature encoding information, and perform semantic decoding processing on the feature encoding information based on a convolutional neural network model to obtain image semantic information;
the second selecting subunit 1224 is configured to use, as target image semantic information, image semantic information with the greatest semantic association with the target sharing information, and use, as the target cover image, an image to be determined associated with the target image semantic information.
The specific functional implementation manner of the second search subunit 1223 and the second selection subunit 1224 may refer to step S303 in the corresponding embodiment of fig. 6, which is not described herein.
Referring to fig. 10, the lookup unit 122 may include: a third search sub-unit 1225, a third selection sub-unit 1226.
A third search subunit 1225, configured to use the image data in the target image list as an image to be determined;
The third search subunit 1225 is further configured to obtain an image area of the image to be determined in the target page, and determine a target area of the target sharing information in the target page;
A third selecting subunit 1226, configured to obtain a page distance between the image area and the target area, and use, as the target cover image, an image to be determined corresponding to the minimum page distance in the obtained page distances.
The specific functional implementation manner of the third search subunit 1225 and the third selection subunit 1226 may refer to step S303 in the corresponding embodiment of fig. 6, which is not described herein.
It should be appreciated that the terminal, when determining the target cover image through the first search sub-unit 1221, the first selection sub-unit 1222, will not determine the target cover image through the second search sub-unit 1223, the second selection sub-unit 1224, and the third search sub-unit 1225, the third selection sub-unit 1226; conversely, when the terminal determines the target cover image through the second search sub-unit 1223 and the second selection sub-unit 1224, the terminal will not determine the target cover image through the first search sub-unit 1221, the first selection sub-unit 1222, the third search sub-unit 1225 and the third selection sub-unit 1226; conversely, when the terminal determines the target cover image through the third search sub-unit 1225 and the third selection sub-unit 1226, the terminal will not determine the target cover image through the first search sub-unit 1221, the first selection sub-unit 1222, the second search sub-unit 1223, and the second selection sub-unit 1224.
Referring to fig. 10, the second acquisition module 12 may include: parsing unit 124, first requesting unit 125, first receiving unit 126.
The parsing unit 124 is configured to determine a page where the target sharing information is located as the target page;
The parsing unit 124 is further configured to parse the target page to obtain image resource address information of an image belonging to the target page, and select target image resource address information from the obtained image resource address information;
a first request unit 125 configured to send an image resource acquisition request to a resource server indicated by the target image resource address information;
The first receiving unit 126 is configured to receive, as the target cover image, an image corresponding to the target image resource address information returned by the resource server in response to the image resource obtaining request, and store the target cover image in the sharing cache.
The specific functional implementation manners of the parsing unit 124, the first requesting unit 125, and the first receiving unit 126 may refer to step S401 to step S404 in the corresponding embodiment of fig. 9, which are not described herein.
It should be understood that the terminal will not acquire the target cover image through the parsing unit 124, the first requesting unit 125, the first receiving unit 126 when acquiring the target cover image through the determining unit 121, the searching unit 122, the reading unit 123; in contrast, when the terminal acquires the target cover image through the parsing unit 124, the first requesting unit 125, and the first receiving unit 126, the terminal will not acquire the target cover image through the determining unit 121, the searching unit 122, and the reading unit 123.
Referring to fig. 10, the fourth acquisition module 14 may include: a second requesting unit 141, a second receiving unit 142.
A second request unit 141, configured to send the original resource address information to the address server, so that the address server converts a character string included in the original resource address information into a target address character string, combines the target address character string and domain name information of the address server into the target address information, and establishes the redirection mapping relationship for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed;
a second receiving unit 142, configured to receive the target address information sent by the address server.
The specific functional implementation manner of the second requesting unit 141 and the second receiving unit 142 may refer to step S104 in the corresponding embodiment of fig. 4, which is not described herein.
Referring to fig. 10, the target address identification image belongs to a two-dimensional code image;
the generating module 15 may include: a dividing unit 151, a converting unit 152, and a filling unit 153.
A dividing unit 151, configured to convert each character included in the target address information into a numerical index according to a character index table, and divide the converted numerical index into a plurality of numerical index groups;
a conversion unit 152, configured to perform a binary conversion on the numerical indexes included in each numerical index group, obtain index strings corresponding to each numerical index group, generate a header codeword string according to the number of characters included in the target address information, and combine the index strings and the header codeword string into a data code;
The dividing unit 151 is further configured to divide the data code into a plurality of data code blocks, generate an error correction code for each data code block, and obtain an initial two-dimensional code image;
And the filling unit 153 is configured to stagger and fill the data codes in the data code blocks and the error correction codes to pixel points in the initial two-dimensional code image, perform mask processing on the filled initial two-dimensional code image to obtain the target address identification image, and store the target address identification image in the sharing buffer.
The specific functional implementation manner of the dividing unit 151, the converting unit 152, and the filling unit 153 may refer to step S104 in the corresponding embodiment of fig. 4, which is not described herein.
Referring to fig. 10, the shared information processing apparatus 1 may include: a first acquisition module 11, a second acquisition module 12, a third acquisition module 13, a fourth acquisition module 14, a generation module 15, and a combination module 16; may further include: the animation module 17 is played.
And the playing animation module 17 is used for acquiring a target waiting animation according to the request sent by the sharing file, playing the target waiting animation, and closing the target waiting animation when the completion of the sharing file combination is detected.
The specific functional implementation of the play animation module 17 may refer to step S105 in the corresponding embodiment of fig. 4, which is not described herein.
Further, please refer to fig. 11, which is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The terminal in the foregoing corresponding embodiment of fig. 3 to fig. 9 may be an electronic device 1000, as shown in fig. 11, where the electronic device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. Signal receiver 1016 is used to receive or transmit data via cellular interface 1010, WIFI interface 1012, a. The encoder 1006 encodes the received data into a computer-processed data format. The memory 1008 has stored therein a computer program, by which the processor 1004 is arranged to perform the steps of any of the method embodiments described above. The memory 1008 may include volatile memory (e.g., dynamic random access memory, DRAM) and may also include non-volatile memory (e.g., one-time programmable read only memory, OTPROM). In some examples, the memory 1008 may further include memory located remotely from the processor 1004, which may be connected to the electronic device 1000 over a network. The user interface 1002 may include: a keyboard 1018 and a display 1020.
In the electronic device 1000 shown in fig. 11, the processor 1004 may be configured to invoke the storage of a computer program in the memory 1008 to implement:
when a page information sharing request is received, acquiring target sharing information, a target cover image of a target page where the target sharing information is located and original resource address information of the target page according to the page information sharing request;
Acquiring target address information with a redirection mapping relation with the original resource address information, and generating a target address identification image according to the target address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
and combining the target sharing information, the target cover image and the target address identification image into a sharing file.
In one embodiment, the target sharing information, the target cover image and the target address identification image are stored in a sharing cache;
The processor 1004, when executing the combination of the target sharing information, the target cover image and the target address identification image into a shared file, specifically executes the following steps:
when a request for sending a sharing file aiming at a target sharing object is received, combining the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file according to the request for sending the sharing file;
and sending the sharing file to the terminal bound with the target sharing object.
In one embodiment, when executing the request for sending the sharing file, the processor 1004 combines the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file, specifically executes the following steps:
according to the request for sending the sharing file, acquiring a file template associated with the identity attribute of the target sharing object, and acquiring target title information of the target page;
Determining an area identifier of at least one area in the file template, and acquiring area identifiers corresponding to the target sharing information, the target cover image, the target address identifier image and the target title information respectively;
and respectively adding the target title information, the target sharing information in the sharing cache, the target cover image and the target address identification image to the areas with the same area identification in the file template according to the area identification, so as to obtain the sharing file.
In one embodiment, the processor 1004, when executing the obtaining the target sharing information according to the page information sharing request, specifically executes the following steps:
Acquiring a target view object corresponding to a page triggering the page sharing request; the target view object comprises the target sharing information; the target sharing information is stored in a sharing record of the target view object; the sharing record refers to a storage space for storing the target sharing information when the sharing operation behavior aiming at the target sharing information is detected;
And reading the target sharing information from the sharing record of the target view object, and storing the read target sharing information into the sharing cache.
In one embodiment, the processor 1004, when executing the acquisition of the target cover image of the target page where the target sharing information is located, specifically executes the following steps:
Determining a page where the target sharing information is located as the target page;
acquiring a target page object corresponding to the target page, extracting a target image list from the target page object, and selecting a target cover image from the target image list; the target image list comprises a plurality of image data for rendering the target page, and a list address of each image data in the target image list;
And reading the target cover image from the target image list according to the list address, and storing the read target cover image into the sharing cache.
In one embodiment, the processor 1004, when executing the selection of the target cover image in the target image list, specifically executes the following steps:
Taking the image data in the target image list as an image to be determined;
and selecting the target cover image from the images to be determined according to the image size of the images to be determined and the list address of the images to be determined.
In one embodiment, the processor 1004, when executing the selection of the target cover image in the target image list, specifically executes the following steps:
Taking the image data in the target image list as an image to be determined;
Performing feature coding processing on the image to be determined based on a convolutional neural network model to obtain feature coding information, and performing semantic decoding processing on the feature coding information based on the convolutional neural network model to obtain image semantic information;
And taking the image semantic information with the largest semantic association with the target sharing information as target image semantic information, and taking the image to be determined associated with the target image semantic information as the target cover image.
In one embodiment, the processor 1004, when executing the selection of the target cover image in the target image list, specifically executes the following steps:
Taking the image data in the target image list as an image to be determined;
Acquiring an image area of the image to be determined in the target page, and determining a target area of the target sharing information in the target page;
And acquiring the page distance between the image area and the target area, and taking an image to be determined corresponding to the minimum page distance in the acquired page distance as the target cover image.
In one embodiment, the processor 1004, when executing the acquisition of the target cover image of the target page where the target sharing information is located, specifically executes the following steps:
Determining a page where the target sharing information is located as the target page;
Analyzing the target page to obtain image resource address information of an image belonging to the target page, and selecting target image resource address information from the obtained image resource address information;
Sending an image resource acquisition request to a resource server indicated by the target image resource address information;
And receiving an image corresponding to the target image resource address information returned by the resource server in response to the image resource acquisition request, serving as the target cover image, and storing the target cover image into the sharing cache.
In one embodiment, the processor 1004, when executing the obtaining the target address information having the redirection mapping relation with the original resource address information, specifically executes the following steps:
transmitting the original resource address information to the address server, so that the address server converts character strings contained in the original resource address information into target address character strings, combines the target address character strings with domain name information of the address server to form target address information, and establishes the redirection mapping relation for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed;
And receiving the target address information sent by the address server.
In one embodiment, the target address identification image belongs to a two-dimensional code image;
The processor 1004, when executing the generation of the target address identification image according to the target address information, specifically executes the following steps:
according to a character index table, converting each character contained in the target address information into a numerical index respectively, and dividing the converted numerical index into a plurality of numerical index groups;
carrying out binary conversion on the numerical indexes contained in each numerical index group to obtain index character strings respectively corresponding to each numerical index group, generating head code character strings according to the number of characters contained in the target address information, and combining the index character strings and the head code character strings into data codes;
dividing the data code into a plurality of data code blocks, generating error correction codes for each data code block, and acquiring an initial two-dimensional code image;
And interleaving and filling the data codes in the data code blocks and the error correction codes into pixel points in the initial two-dimensional code image, performing mask processing on the filled initial two-dimensional code image to obtain the target address identification image, and storing the target address identification image into the sharing cache.
In one embodiment, the processor 1004 further performs the steps of:
And acquiring a target waiting animation according to the request for sending the sharing file, playing the target waiting animation, and closing the target waiting animation when the completion of the sharing file combination is detected.
It should be understood that the electronic device 1000 described in the embodiment of the present invention may perform the description of the method for processing the shared information in the embodiment corresponding to fig. 3 to 9, and may also perform the description of the apparatus 1 for processing the shared information in the embodiment corresponding to fig. 10, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present invention further provides a computer storage medium, in which the aforementioned computer program executed by the sharing information processing apparatus 1 is stored, and the computer program includes program instructions, when executed by the processor, can execute the description of the sharing information processing method in the embodiment corresponding to fig. 3 to 9, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer storage medium according to the present invention, please refer to the description of the method embodiments of the present invention.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (14)

1. The shared information processing method is characterized by comprising the following steps of:
When a page information sharing request is received, according to the page information sharing request, a sharing record interface in a browser kernel is called to acquire target sharing information, an image interface in the browser kernel is called to acquire a target cover image of a target page where the target sharing information is located, and an address interface in the browser kernel is called to acquire original resource address information of the target page;
Acquiring target address information with a redirection mapping relation with the original resource address information, and generating a target address identification image according to the target address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
combining the target sharing information, the target cover image and the target address identification image into a sharing file;
The obtaining the target address information with the redirection mapping relation with the original resource address information includes:
Transmitting the original resource address information to an address server, so that the address server converts character strings contained in the original resource address information into target address character strings by adopting a self-increasing sequence algorithm, combines the target address character strings with domain name information of the address server to form target address information, and establishes the redirection mapping relation for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed; storing the original resource address information and the target address information in the address server according to a key value pair, wherein the original resource address information is used as a key in the key value pair, and the target address information is used as a value in the key value pair;
And receiving the target address information sent by the address server.
2. The method of claim 1, wherein the target sharing information, the target cover image, and the target address identification image are stored in a sharing cache;
The combining the target sharing information, the target cover image and the target address identification image into a sharing file includes:
when a request for sending a sharing file aiming at a target sharing object is received, combining the target sharing information, the target cover image and the target address identification image in the sharing cache into the sharing file according to the request for sending the sharing file;
and sending the sharing file to the terminal bound with the target sharing object.
3. The method of claim 2, wherein the combining the target sharing information, the target cover image, and the target address identification image in the sharing cache according to the request for sending the sharing file into the sharing file includes:
according to the request for sending the sharing file, acquiring a file template associated with the identity attribute of the target sharing object, and acquiring target title information of the target page;
Determining an area identifier of at least one area in the file template, and acquiring area identifiers corresponding to the target sharing information, the target cover image, the target address identifier image and the target title information respectively;
and respectively adding the target title information, the target sharing information in the sharing cache, the target cover image and the target address identification image to the areas with the same area identification in the file template according to the area identification, so as to obtain the sharing file.
4. The method for processing the sharing information according to claim 2, wherein the step of calling the sharing record interface in the browser kernel to obtain the target sharing information according to the page information sharing request includes:
according to the page information sharing request, a sharing record interface in a browser kernel is called to acquire a target view object corresponding to a page triggering the page sharing request; the target view object comprises the target sharing information; the target sharing information is stored in a sharing record of the target view object; the sharing record refers to a storage space for storing the target sharing information when the sharing operation behavior aiming at the target sharing information is detected;
And reading the target sharing information from the sharing record of the target view object, and storing the read target sharing information into the sharing cache.
5. The method for processing the shared information according to claim 2, wherein the step of calling the image interface in the browser kernel to obtain the target cover image of the target page where the target shared information is located includes:
Calling an image interface in a browser kernel, and determining a page where the target sharing information is located as the target page;
acquiring a target page object corresponding to the target page, extracting a target image list from the target page object, and selecting a target cover image from the target image list; the target image list comprises a plurality of image data for rendering the target page, and a list address of each image data in the target image list;
And reading the target cover image from the target image list according to the list address, and storing the read target cover image into the sharing cache.
6. The shared information processing method as claimed in claim 5, wherein the selecting a target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
and selecting the target cover image from the images to be determined according to the image size of the images to be determined and the list address of the images to be determined.
7. The shared information processing method as claimed in claim 5, wherein the selecting a target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
Performing feature coding processing on the image to be determined based on a convolutional neural network model to obtain feature coding information, and performing semantic decoding processing on the feature coding information based on the convolutional neural network model to obtain image semantic information;
And taking the image semantic information with the largest semantic association with the target sharing information as target image semantic information, and taking the image to be determined associated with the target image semantic information as the target cover image.
8. The shared information processing method as claimed in claim 5, wherein the selecting a target cover image in the target image list includes:
Taking the image data in the target image list as an image to be determined;
Acquiring an image area of the image to be determined in the target page, and determining a target area of the target sharing information in the target page;
And acquiring the page distance between the image area and the target area, and taking an image to be determined corresponding to the minimum page distance in the acquired page distance as the target cover image.
9. The method for processing the shared information according to claim 2, wherein the step of calling the image interface in the browser kernel to obtain the target cover image of the target page where the target shared information is located includes:
Calling an image interface in a browser kernel, and determining a page where the target sharing information is located as the target page;
Analyzing the target page to obtain image resource address information of an image belonging to the target page, and selecting target image resource address information from the obtained image resource address information;
Sending an image resource acquisition request to a resource server indicated by the target image resource address information;
And receiving an image corresponding to the target image resource address information returned by the resource server in response to the image resource acquisition request, serving as the target cover image, and storing the target cover image into the sharing cache.
10. The shared information processing method according to claim 2, wherein the target address identification image belongs to a two-dimensional code image;
The generating a target address identification image according to the target address information comprises the following steps:
according to a character index table, converting each character contained in the target address information into a numerical index respectively, and dividing the converted numerical index into a plurality of numerical index groups;
carrying out binary conversion on the numerical indexes contained in each numerical index group to obtain index character strings respectively corresponding to each numerical index group, generating head code character strings according to the number of characters contained in the target address information, and combining the index character strings and the head code character strings into data codes;
dividing the data code into a plurality of data code blocks, generating error correction codes for each data code block, and acquiring an initial two-dimensional code image;
And interleaving and filling the data codes in the data code blocks and the error correction codes into pixel points in the initial two-dimensional code image, performing mask processing on the filled initial two-dimensional code image to obtain the target address identification image, and storing the target address identification image into the sharing cache.
11. The shared information processing method as claimed in claim 2, further comprising:
And acquiring a target waiting animation according to the request for sending the sharing file, playing the target waiting animation, and closing the target waiting animation when the completion of the sharing file combination is detected.
12. A shared information processing apparatus, comprising:
the first acquisition module is used for calling a sharing record interface in a browser kernel to acquire target sharing information according to the page information sharing request when the page information sharing request is received;
the second acquisition module is used for calling an image interface in the browser kernel to acquire a target cover image of a target page where the target sharing information is located;
the third acquisition module is used for calling an address interface in the browser kernel to acquire the original resource address information of the target page;
a fourth obtaining module, configured to obtain target address information having a redirection mapping relationship with the original resource address information; the byte length corresponding to the target address information is smaller than the byte length corresponding to the original resource address information;
the generation module is used for generating a target address identification image according to the target address information;
the combination module is used for combining the target sharing information, the target cover image and the target address identification image into a sharing file;
wherein the fourth acquisition module includes:
The second request unit is used for sending the original resource address information to an address server, so that the address server converts character strings contained in the original resource address information into target address character strings by adopting a self-increasing sequence algorithm, combines the target address character strings with domain name information of the address server to form target address information, and establishes the redirection mapping relation for the original resource address information and the target address information; the redirection mapping relation is used for redirecting and jumping from the address server to the server indicated by the original resource address information when the address server indicated by the target address information is accessed; storing the original resource address information and the target address information in the address server according to a key value pair, wherein the original resource address information is used as a key in the key value pair, and the target address information is used as a value in the key value pair;
and the second receiving unit is used for receiving the target address information sent by the address server.
13. An electronic device, comprising: a processor and a memory;
The processor being connected to a memory, wherein the memory is adapted to store program code, the processor being adapted to invoke the program code to perform the method according to any of claims 1-11.
14. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any of claims 1-11.
CN201910008876.3A 2019-01-04 2019-01-04 Shared information processing method and device, related equipment and storage medium Active CN111414560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008876.3A CN111414560B (en) 2019-01-04 2019-01-04 Shared information processing method and device, related equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008876.3A CN111414560B (en) 2019-01-04 2019-01-04 Shared information processing method and device, related equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111414560A CN111414560A (en) 2020-07-14
CN111414560B true CN111414560B (en) 2024-05-24

Family

ID=71492630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008876.3A Active CN111414560B (en) 2019-01-04 2019-01-04 Shared information processing method and device, related equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111414560B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737031A (en) * 2020-07-23 2020-10-02 南京梦饷网络科技有限公司 Method, computing device and storage medium for managing shared information
CN112765526B (en) * 2021-02-05 2022-04-29 腾讯科技(深圳)有限公司 Page screenshot method and device, terminal equipment and medium
CN113051622B (en) * 2021-03-11 2023-05-12 杭州趣链科技有限公司 Index construction method, device, equipment and storage medium
CN113656713B (en) * 2021-08-23 2023-07-21 北京奇艺世纪科技有限公司 Network resource processing method, device and system
CN113452811B (en) * 2021-08-30 2022-01-25 阿里巴巴达摩院(杭州)科技有限公司 Data communication method, device, computer storage medium and system
CN114205680B (en) * 2021-12-01 2024-07-23 广州方硅信息技术有限公司 Video cover display method and device, equipment, medium and product thereof
CN114238924A (en) * 2021-12-17 2022-03-25 北京达佳互联信息技术有限公司 Image resource verification method and device, electronic equipment and storage medium
CN116502660B (en) * 2023-06-27 2023-08-18 人民卫生电子音像出版社有限公司 Digital resource application method and system based on two-dimension code

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103632184A (en) * 2013-12-13 2014-03-12 金蝶软件(中国)有限公司 Two-dimension code generation method, two-dimension code use method, two-dimension code generator and user equipment
CN106973075A (en) * 2016-01-14 2017-07-21 广州市动景计算机科技有限公司 Share comment method and system, domain name code-transferring method, client and server
CN107690085A (en) * 2017-04-25 2018-02-13 腾讯科技(深圳)有限公司 Data sharing method and device
CN108256897A (en) * 2017-12-25 2018-07-06 平安科技(深圳)有限公司 Marketing method, electronic device and the storage medium propagated based on H5 loose-leafs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103632184A (en) * 2013-12-13 2014-03-12 金蝶软件(中国)有限公司 Two-dimension code generation method, two-dimension code use method, two-dimension code generator and user equipment
CN106973075A (en) * 2016-01-14 2017-07-21 广州市动景计算机科技有限公司 Share comment method and system, domain name code-transferring method, client and server
CN107690085A (en) * 2017-04-25 2018-02-13 腾讯科技(深圳)有限公司 Data sharing method and device
CN108256897A (en) * 2017-12-25 2018-07-06 平安科技(深圳)有限公司 Marketing method, electronic device and the storage medium propagated based on H5 loose-leafs

Also Published As

Publication number Publication date
CN111414560A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN111414560B (en) Shared information processing method and device, related equipment and storage medium
US10515142B2 (en) Method and apparatus for extracting webpage information
CN104735468B (en) A kind of method and system that image is synthesized to new video based on semantic analysis
JP4248411B2 (en) Method, system, computer program and storage device for displaying a document
US20100218077A1 (en) Modifying a markup language document which includes a clickable image
US20110119298A1 (en) Method and apparatus for searching information
KR100967337B1 (en) A web browser system using proxy server of a mobile communication terminal
US20230386238A1 (en) Data processing method and apparatus, computer device, and storage medium
CN110609965B (en) Page display method, device and storage medium
US20130339840A1 (en) System and method for logical chunking and restructuring websites
JP2002108870A (en) System and method for processing information
CN104423621A (en) Pinyin string processing method and device
CN110727417B (en) Data processing method and device
CN111314388B (en) Method and apparatus for detecting SQL injection
WO2020119544A1 (en) Network transmission simulation method and apparatus, computer device and storage medium
CN116757157A (en) Acquiring font parts using a compression mechanism
CN111372141A (en) Expression image generation method and device and electronic equipment
CN113515928A (en) Electronic text generation method, device, equipment and medium
CN114924815B (en) Page rendering method and device, electronic equipment and storage medium
CN111859210B (en) Image processing method, device, equipment and storage medium
CN109241299A (en) Multimedia resource searching method, device, storage medium and equipment
CN102693237B (en) Webpage content adaptation and encapsulation system and method
CN116521990A (en) Method, apparatus, electronic device and computer readable medium for material processing
KR20140133125A (en) Method and apparatus for a client to browse a web page provided by a server
CN113448649B (en) Redis-based home page data loading server and method

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
TG01 Patent term adjustment