CN115150350A - Resource content sharing method and system - Google Patents

Resource content sharing method and system Download PDF

Info

Publication number
CN115150350A
CN115150350A CN202210744496.8A CN202210744496A CN115150350A CN 115150350 A CN115150350 A CN 115150350A CN 202210744496 A CN202210744496 A CN 202210744496A CN 115150350 A CN115150350 A CN 115150350A
Authority
CN
China
Prior art keywords
resource content
dynamic link
link
actual
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210744496.8A
Other languages
Chinese (zh)
Inventor
张胜超
徐军
朱雨
黄山成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210744496.8A priority Critical patent/CN115150350A/en
Publication of CN115150350A publication Critical patent/CN115150350A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

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

Abstract

The application discloses a resource content sharing method, which comprises the following steps: receiving a request of a user for sharing resource content, generating a dynamic link according to a plurality of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content; and receiving dynamic link access, performing matching logic processing on the dynamic link, and redirecting to the corresponding actual link to display the resource content. The application also discloses a resource content sharing system, an electronic device and a computer readable storage medium. Therefore, the probability of shielding and blocking the shared resource content can be reduced, the sharing success rate is improved, and the display rate after successful sharing is improved.

Description

Resource content sharing method and system
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, a system, an electronic device, and a computer-readable storage medium for sharing resource content.
Background
With the popularization and development of computer technology, users can share ideas with other users (such as individuals or groups of friends, crowd friends, fans and the like) when discovering interesting or valuable resource contents in the participation of internet activities, especially in the browsing of network content activities. Currently, there are many ways for a user to share resource content to a friend, such as third-party channels like WeChat, QQ, microblog, and most of the cases are to share a fixed link of the resource content through different channels.
However, in the process of sharing content through a fixed connection, there may be a third party channel that masks or blocks the shared content. The third-party channel can realize the shielding and the blocking of the shared content only by processing the fixed link. Meanwhile, the sharing times and the sharing frequency of the same fixed link may be limited.
Therefore, the scheme has the risk of being unable to share, and the use experience of the user is influenced.
Disclosure of Invention
The present application mainly aims to provide a resource content sharing method, system, electronic device and computer readable storage medium, and aims to solve the problem of how to avoid that content resources cannot be successfully shared due to fixed links.
In order to achieve the above object, an embodiment of the present application provides a resource content sharing method, where the method includes:
receiving a request of a user for sharing resource content, generating a dynamic link according to a plurality of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content;
and receiving dynamic link access, performing matching logic processing on the dynamic link, and redirecting to the corresponding actual link to display the resource content.
Optionally, the generating a dynamic link according to a plurality of items of preset information corresponding to the resource content includes:
registering a plurality of domain names and completing the record so as to create a domain name pool;
and generating the dynamic link according to the domain name, the time, the random value, the user information and the hash value.
Optionally, the generating the dynamic link according to the domain name, the time, the random value, the user information, and the hash value includes:
randomly acquiring a domain name from the domain name pool;
acquiring a current time value;
generating a random number;
acquiring user information requesting to share the resource content;
respectively writing the domain name, the time value, the random number and the user information into the first four sections of information of the dynamic link;
and adding a preset value to the value formed by the first four sections of information to perform hash operation to obtain a hash value, and writing the hash value into the fifth section of information of the dynamic link.
Optionally, the recording the binding relationship between the dynamic link and the actual link of the resource content includes:
and recording the binding relation between the hash value and the actual link.
Optionally, the performing matching logic processing, and redirecting to the corresponding actual link includes:
legality verification is carried out on the dynamic link;
after the verification is passed, acquiring the actual link corresponding to the dynamic link according to the binding relationship;
redirecting the dynamic link onto the actual link.
Optionally, the legally verifying the dynamic link includes:
judging whether the domain name of the dynamic link is effective or not;
when the domain name is valid, judging whether the dynamic link conforms to a preset format;
when the dynamic link conforms to the format, verifying whether the dynamic link is tampered;
and when the dynamic link is not tampered, the legal verification is passed.
Optionally, the verifying whether the dynamic link is tampered includes:
adding a preset value to a value composed of the domain name, the time, the random value and the user information in the dynamic link to perform hash operation;
and when the operation result is equal to the hash value in the dynamic link, determining that the dynamic link is not tampered.
Optionally, the obtaining the actual link corresponding to the dynamic link according to the binding relationship includes:
reading the hash value in the dynamic link;
and inquiring the corresponding actual link from the binding relation according to the hash value.
Optionally, the querying, according to the hash value, the corresponding actual link from the binding relationship includes:
inquiring whether the hash value exists from the binding relation;
when the hash value exists, acquiring an actual link corresponding to the hash value from the binding relationship;
judging whether the actual link is still valid;
and when the actual link is still valid, determining that the actual link corresponding to the hash value is successfully inquired.
In addition, to achieve the above object, an embodiment of the present application further provides a resource content sharing system, where the system includes:
the generation module is used for receiving a request of a user for sharing resource content, generating a dynamic link according to a plurality of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content;
and the matching module is used for receiving dynamic link access, performing matching logic processing on the dynamic link, and redirecting to the corresponding actual link to display the resource content.
In order to achieve the above object, an embodiment of the present application further provides another resource content sharing method, which is applied to a second client, and the method includes:
receiving a dynamic link shared by a first client, wherein the dynamic link is generated according to a plurality of preset information corresponding to resource content to be shared by the first client;
sending an access request to the dynamic link to a server;
and receiving and displaying the resource content corresponding to the dynamic link returned by the server, wherein the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
In order to achieve the above object, an embodiment of the present application further provides another resource content sharing system, which is applied to a second client, where the system includes:
the receiving module is used for receiving a dynamic link shared by a first client, wherein the dynamic link is generated according to a plurality of preset information corresponding to resource content to be shared by the first client;
the request module is used for sending an access request to the dynamic link to a server;
and the display module is used for receiving and displaying the resource content corresponding to the dynamic link returned by the server, wherein the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
In order to achieve the above object, an embodiment of the present application further provides an electronic device, including: the system comprises a memory, a processor and a resource content sharing program which is stored on the memory and can run on the processor, wherein when the resource content sharing program is executed by the processor, the resource content sharing method is realized.
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where a resource content sharing program is stored on the computer-readable storage medium, and when executed by a processor, the resource content sharing method is implemented.
The resource content sharing method, the resource content sharing system, the electronic device and the computer-readable storage medium can provide a security sharing scheme based on dynamic domain name links, different dynamic links are generated according to a plurality of preset information (domain names, time, random values, user information and five segments of hash value information) for sharing when a user requests to share certain resource content each time, and after the dynamic links are shared, the dynamic links are redirected to corresponding actual links through matching logic processing processes corresponding to the generation processes, so that the resource content is displayed to the shared user. Due to the dynamic sharing link used in sharing, the probability of shielding and forbidding shared resource content can be reduced, the sharing success rate is improved, the display rate after successful sharing is improved, and the use experience of users is improved.
Drawings
FIG. 1 is a diagram of an application environment architecture in which various embodiments of the present application may be implemented;
fig. 2 is a flowchart of a resource content sharing method according to a first embodiment of the present disclosure;
FIG. 3 is a detailed flowchart of step S200 in FIG. 2;
FIG. 4 is a schematic diagram of rules for dynamic linking;
FIG. 5 is a detailed flowchart of step S202 in FIG. 2;
FIG. 6 is a flow chart of another form of the resource content sharing method;
fig. 7 is a flowchart of a resource content sharing method according to a second embodiment of the present application;
fig. 8 is a schematic hardware architecture diagram of an electronic device according to a third embodiment of the present application;
fig. 9 is a schematic block diagram of a resource content sharing system according to a fourth embodiment of the present disclosure;
fig. 10 is a block diagram of a resource content sharing system according to a fifth embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a diagram illustrating an application environment architecture for implementing various embodiments of the present application. The application can be applied to application environments including, but not limited to, a first client 2, a server 4, and a second client 6.
The first client 2 refers to a client corresponding to a user (first user) sharing resource content, and is configured to share the resource content to other users through a third-party channel. The second client 6 refers to a client corresponding to a user (a second user) who is shared with the resource content, and is configured to receive sharing (corresponding link) of the resource content through a third-party channel, open the link, and display the resource content. The client may be a terminal device such as a PC (Personal Computer), a mobile phone, a tablet Computer, a portable Computer, and a wearable device.
The server 4 is configured to provide data and technical support for the client 2, for example, generate a dynamic link for the resource content that the first client 2 needs to share, and perform corresponding matching logic processing when the link is opened by the second client 6, so as to display the resource content. The server 4 may be a rack server, a blade server, a tower server, a cabinet server, or other computing devices, may be an independent server, or may be a server cluster formed by a plurality of servers.
The server 4 and a plurality of the clients are connected through network communication so as to carry out data transmission and interaction. The network may be an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, or other wireless or wired network.
This application mainly falls into two processes: generating links and link matches. The link generation process is performed each time the first client 2 requests to share a certain resource content, and the server 4 generates a dynamic link according to a plurality of items of preset information (domain name, time, random value, user information, hash value) corresponding to the resource content, and records a binding relationship between the dynamic link (hash value) and an actual link of the resource content. The first client 2 may then share the resource content to the second client 6 using the dynamic link. And the link matching process is carried out when the second client 6 requests to open the dynamic link shared by the first client 2, and the server 4 carries out matching logic processing on the dynamic link and redirects the dynamic link to the corresponding actual link, so that the resource content can be displayed to the user of the second client 6. By implementing these two part processes, the availability of dynamic links is guaranteed. Based on the characteristic of the dynamic link, the display rate of the resource content can be obviously and effectively improved in the sharing process and after sharing.
Example one
Fig. 2 is a flowchart of a resource content sharing method according to a first embodiment of the present application. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. Some steps in the flowchart may be added or deleted as desired. The method is described below with the server as the executing agent.
The method comprises the following steps:
s200, when a request of a user (a first user) for sharing certain resource content is received, generating a dynamic link according to a plurality of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content.
In the present embodiment, the process of generating links is mainly to manufacture M URL addresses (dynamic links) and redirect to the source URL (actual link) according to the actual link, i.e. URL (uniform resource locator) address, of the resource content page (including video, file, website page, etc.), and M is not an infinite number theoretically. The same or different resource contents are loaded by dynamic routing (dynamic linking) through dynamic processing of format data describing resource content information in the URL.
The dynamic processing refers to generating dynamic links according to a plurality of items of preset information corresponding to the resource content. Specifically, the preset information mainly includes five pieces of information, namely, a domain name, time, a random value, user information, and a hash value.
Further referring to fig. 3, a detailed flow diagram of the step S200 is shown. It is to be understood that the flow chart is not intended to limit the order in which the steps are performed. Some steps in the flowchart may be added or deleted as desired. In this embodiment, the step S200 specifically includes:
s2000, registering a plurality of domain names and completing the record to create a domain name pool.
First, a plurality of domain names are registered and filed, and the domain names are resolved to (different) servers so that the servers can access resource contents, thereby creating a domain name pool by using the domain names.
And S2002, generating the dynamic link according to the domain name, the time, the random value, the user information and the hash value.
Fig. 4 is a schematic diagram illustrating the rule making of the dynamic link. As shown in fig. 4, the dynamic link is composed of five pieces of information, each piece of information has a corresponding actual rule, which includes:
the first piece of information: a domain name. And randomly extracting a domain name from the domain name pool for use each time.
And a second section of information: time of day. The current time value may be taken, for example, in the form of "20220330124040".
And a third section of information: random (random value). A currently generated random number is used.
And a fourth piece of information: user (user information). The information of the sharing user (first user) is used as supplement and explanation.
And a fifth piece of information: resource (hash value). And adding a preset value to the whole URL value formed by the first four pieces of information to generate a hash value by hash operation. The hash value and the resource content (actual link) are stored in a binding relationship, and then the hash value is put into the fifth piece of information (resource bit), so that the user is prevented from randomly tampering the value of any piece of information in the dynamic link.
Therefore, when a user (a first user) requests to share the resource content each time, a specific process of generating the dynamic link includes:
(1) And randomly acquiring a domain name from the domain name pool, and writing the domain name into the first section of information of the dynamic link.
(2) And acquiring the current time value, and writing the current time value into the second section of information of the dynamic link.
(3) And generating a random number, and writing the random number into the third section of information of the dynamic link.
(4) And acquiring user information requesting to share the resource content, and writing the user information into the fourth section of information of the dynamic link.
(5) And adding a preset value to the value formed by the first four sections of information to perform hash operation to obtain a hash value, and writing the hash value into the fifth section of information of the dynamic link.
It should be noted that, the order of the five pieces of information in the dynamic link may be exchanged (for example, positions between the first four pieces of information are arbitrarily exchanged, and for example, a hash value is put into the first piece of information, and the like), or one or more pieces of information may also be replaced with other similar information (for example, user information is replaced with an IP of the first client), or some pieces of information may be reduced (for example, user information is removed, only a domain name, a time, a random value, and a hash value calculated based on the three pieces of information are retained), and a corresponding dynamic link may still be generated in a manner similar to the above process, which is not limited herein.
And S2004, recording the binding relation between the hash value and the actual link.
The binding relationship between the hash value and the actual link may represent the relationship between the dynamic link and the resource content. After the hash value is calculated, the binding relationship is recorded in a database, and the dynamic link can be redirected to the actual link through the binding relationship subsequently, so that the resource content corresponding to the actual link is displayed to the shared user (a second user).
When a user (a first user) requests to share the content resource, the logic operation of the values of the five pieces of information is repeated, the binding relationship is stored, so that no repetition is caused, and a dynamic URL link of the content resource is generated for the user (the first user) to use when sharing.
Returning to fig. 2, S202, when the dynamic link is opened, performing matching logic processing, and redirecting to a corresponding actual link to display the resource content.
After the user (first user) shares the generated dynamic link to various third-party channels, the shared user (second user) opens the dynamic link to request to access the resource content. And the server receives the dynamic link access, performs matching logic processing corresponding to the link generation process on the dynamic link, and redirects the dynamic link to a corresponding actual link, so as to display the resource content to a user (a second user) according to the actual link.
Specifically, further refer to fig. 5, which is a schematic view of the detailed flow of step S202. It is to be understood that the flow chart is not intended to limit the order in which the steps are performed. Some steps in the flowchart may be added or deleted as desired. In this embodiment, the step S202 specifically includes:
and S2020, performing legal verification on the dynamic link.
In this embodiment, the steps mainly include:
(1) And judging whether the dynamically linked domain name is valid.
(2) And when the domain name is valid, judging whether the dynamic link conforms to a preset (URL) format.
(3) And when the dynamic link conforms to the format, verifying whether the dynamic link is tampered.
(4) And when the dynamic link is not tampered, the legal verification is passed.
(5) When the domain name is invalid, the dynamic link is out of format, or is tampered with, the legitimacy verification is not passed.
The method for verifying whether the dynamic link is tampered comprises the following steps: and repeating the logic calculation work of the fifth segment of information during the generation of the link, and adding a preset value (the same as the link generation process) to the value formed by the first four segments of information (domain name, time, random value and user information) in the dynamic link to perform hash operation. And then comparing whether the operation result is the same as the hash value of the resource bit in the dynamic link. And when the operation result is equal to the hash value in the dynamic link, determining that the dynamic link is not tampered. And when the operation result is not equal to the hash value in the dynamic link, determining that the dynamic link is tampered.
S2022, after the verification is passed, obtaining the actual link corresponding to the dynamic link according to the binding relationship.
And reading the hash value of the resource in the dynamic link, and inquiring the corresponding actual link from the binding relationship according to the hash value. Firstly, whether the hash value exists in the binding relationship is inquired. And when the hash value exists, acquiring the actual link corresponding to the hash value from the binding relationship. It is then determined whether the actual link is still valid. And when the actual link is still valid, determining that the actual link corresponding to the hash value is successfully inquired. And when the hash value does not exist in the binding relationship or the actual link is invalid, determining that the query fails and the link cannot be opened to display the resource content.
S2024, redirecting the dynamic link to the actual link.
And after the actual link corresponding to the hash value is successfully inquired, redirecting the dynamic link to the actual link, so that the resource content corresponding to the actual link is opened as a result of the operation of opening the dynamic link by a user (a second user). Thus, the resource content is successfully shared from the first user to the second user.
Fig. 6 is a flowchart of another form of the resource content sharing method. The specific processes of the steps in fig. 5 have been described above, and are not described again here.
The resource content sharing method provided in this embodiment may provide a security sharing scheme based on dynamic domain name links, where when a user requests to share a resource content, different dynamic links are generated according to five pieces of information, namely, a domain name, time, a random value, user information, and a hash value, instead of fixed links, and ideally, the dynamic links generated by different users at each sharing are different. And after the dynamic link is shared, redirecting the dynamic link to a corresponding actual link through a matching logic processing process corresponding to the generation process, so that the resource content is displayed to the shared user. Due to the dynamic sharing link, the method can reduce the probability of shielding and forbidding the shared resource content, improve the sharing success rate, and improve the display rate after successful sharing, thereby improving the use experience of users.
In order to explain the above steps of the method more thoroughly, specific embodiments are described as examples below. Those skilled in the art will appreciate that the following detailed description is not intended to limit the inventive concepts of the present invention and that appropriate content distribution and extensions can be readily devised by those skilled in the art in light of the following detailed description of the embodiments.
(1) Server a registers and records a plurality of domain names, resolves these domain names to (different) servers, and enables them to access resource contents, thereby creating a domain name pool with these domain names.
(2) After seeing the resource content X (the actual link X) through the client B, the user B wants to share the resource content X with the user C and the user D through WeChat, and sends a request to the server a.
(3) For a request for sharing resource content X to user C, the server generates a dynamic link Y according to a domain name, time, a random value, user information, and a hash value (hash value Y).
For a request for sharing resource content X to user D, the server also generates a dynamic link Z according to the domain name, time, random value, user information, and hash value (hash value Z).
Meanwhile, the server A records the binding relationship between the hash value Y and the actual link X, and the binding relationship between the hash value Z and the actual link X in the database.
(4) And the user B shares the dynamic link Y with the client C of the user C through the client B, and shares the dynamic link Z with the client D of the user D.
(5) When the user C opens the dynamic link Y, the server a (or another server) performs the validity verification on the dynamic link Y. After the verification is passed, according to the hash value Y in the dynamic link Y, the corresponding actual link X is inquired from the binding relation in the database, and the dynamic link Y is redirected to the actual link X, so that the resource content X corresponding to the actual link X is displayed to the user C.
(6) And when the user D opens the dynamic link Z, the server A carries out legal verification on the dynamic link Z. After the verification is passed, according to the hash value Z in the dynamic link Z, the corresponding actual link X is inquired from the binding relation in the database, and the dynamic link Z is redirected to the actual link X, so that the resource content X corresponding to the actual link X is displayed to the user D.
Example two
Fig. 7 is a flowchart illustrating a resource content sharing method according to a second embodiment of the present application. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. Some steps in the flowchart may be added or deleted as desired. The method is described below with the second client as the execution subject.
The method comprises the following steps:
s300, receiving the dynamic link shared by the first client.
The dynamic link is generated according to a plurality of preset information corresponding to resource content (including videos, files, website pages and the like) to be shared by the first client.
When a request of a first client for sharing certain resource content is received, a server generates a dynamic link according to a plurality of preset information corresponding to the resource content, and records the binding relationship between the dynamic link and an actual link of the resource content.
Specifically, the preset information mainly includes five pieces of information, namely domain name, time, random value, user information and hash value. The binding relationship between the hash value and the actual link may represent the relationship between the dynamic link and the resource content. And after the hash value is calculated, recording the binding relationship in a database, and subsequently redirecting the dynamic link to the actual link through the binding relationship.
After the dynamic link is generated, the first client (first user) may share the generated dynamic link through various third-party channels, for example, to the second client (second user). The second client receives the dynamic link.
S302, sending an access request to the dynamic link to a server.
The second user opens the dynamic link in the second client, i.e. sends a request to the server to access the dynamic link (corresponding to the resource content).
S304, receiving and displaying the resource content corresponding to the dynamic link returned by the server.
And the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
After receiving the dynamic link access request, the server performs matching logic processing (including legal verification and obtaining the actual link corresponding to the dynamic link according to the binding relationship) corresponding to the link generation process on the dynamic link, redirects the dynamic link to the corresponding actual link, and returns the resource content obtained from the actual link to the second client.
And after receiving the resource content returned by the server, the second client displays the resource content to a user (a second user) for viewing. Therefore, the result corresponding to the operation of opening the dynamic link by the user (second user) is to open the resource content corresponding to the actual link. Thus, the resource content is successfully shared from the first user to the second user.
The display mode can be correspondingly processed according to the specific form of the resource content. For example, assuming that the resource content is a video, the video is played in a video playing window; and if the resource content is a website page, opening and displaying the content of the website page in the browser, and the like.
The resource content sharing method provided by the embodiment can enable users to share resource content through dynamic links. When the dynamic link is shared to a second client from the first client and the second client requests to access the dynamic link, the dynamic link can be redirected to a corresponding actual link through a matching logic processing process of the server to the dynamic link, so that the resource content is displayed to a second user. Due to the dynamic sharing link, the method can reduce the probability of shielding and forbidding the shared resource content, improve the sharing success rate, and improve the display rate after successful sharing, thereby improving the use experience of users.
EXAMPLE III
Fig. 8 is a schematic diagram of a hardware architecture of an electronic device 20 according to a third embodiment of the present application. In the present embodiment, the electronic device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23, which are communicatively connected to each other through a system bus. It is noted that fig. 8 only shows the electronic device 20 with components 21-23, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. In this embodiment, the electronic device 20 may be the server 4 or the second client 6.
The memory 21 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 21 may be an internal storage unit of the electronic device 20, such as a hard disk or a memory of the electronic device 20. In other embodiments, the memory 21 may also be an external storage device of the electronic apparatus 20, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the electronic apparatus 20. Of course, the memory 21 may also include both an internal storage unit and an external storage device of the electronic apparatus 20. In this embodiment, the memory 21 is generally used for storing an operating system installed in the electronic device 20 and various application software, such as program codes of the resource content sharing system 60. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is generally used to control the overall operation of the electronic device 20. In this embodiment, the processor 22 is configured to run the program codes stored in the memory 21 or process data, for example, run the resource content sharing system 60.
The network interface 23 may include a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing a communication connection between the electronic apparatus 20 and other electronic devices.
Example four
Fig. 9 is a schematic block diagram of a resource content sharing system 60 according to a fourth embodiment of the present invention. The resource content sharing system 60 may be partitioned into one or more program modules, which are stored on a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of each program module in the embodiments.
In this embodiment, the resource content sharing system 60 is applied in the server 4, and includes:
the generating module 600 is configured to generate a dynamic link according to multiple preset information corresponding to a resource content and record a binding relationship between the dynamic link and an actual link of the resource content whenever a request for sharing the resource content by a user (a first user) is received.
The preset information mainly comprises five pieces of information including domain names, time, random values, user information and hash values. Specifically, the process of generating the dynamic link specifically includes:
(1) Multiple domain names are registered and the docketing is completed to create a domain name pool.
(2) When a user (a first user) requests to share the resource content each time, a dynamic link is generated according to a domain name, time, a random value, user information and a hash value, and the method comprises the following steps:
(2-1) randomly acquiring a domain name from the domain name pool, and writing the domain name into the first section of information of the dynamic link.
And (2-2) acquiring the current time value and writing the current time value into the second section of information of the dynamic link.
(2-3) generating a random number, and writing the random number into the third section of information of the dynamic link.
And (2-4) acquiring user information requesting to share the resource content, and writing the user information into the fourth section of information of the dynamic link.
And (2-5) adding a preset value to the value formed by the four sections of information to perform hash operation to obtain a hash value, and writing the hash value into the fifth section of information of the dynamic link.
(3) And recording the binding relation between the hash value and the actual link.
It should be noted that the order of the five pieces of information in the dynamic link may be exchanged, or one or more pieces of information may also be replaced by other similar information, or some pieces of information may be reduced, and the corresponding dynamic link may still be generated in a manner similar to the above process, which is not limited herein.
A matching module 602, configured to perform matching logic processing when the dynamic link is opened, and redirect the dynamic link to a corresponding actual link to display the resource content.
After the user (first user) shares the generated dynamic link to various third-party channels, the shared user (second user) opens the dynamic link to request to access the resource content. The matching module 602 receives the dynamic link access, performs matching logic processing corresponding to the link generation process on the dynamic link, and redirects the dynamic link to a corresponding actual link, so as to display the resource content to a user (a second user) according to the actual link.
Specifically, the process of matching links specifically includes:
(1) And legally verifying the dynamic link, which comprises the following steps:
(1-1) judging whether the domain name of the dynamic link is effective.
(1-2) when the domain name is valid, judging whether the dynamic link conforms to a preset (URL) format.
(1-3) verifying whether the dynamic link has been tampered with when the dynamic link conforms to the format.
(1-4) when the dynamic link is not tampered, the legal verification is passed.
(1-5) when the domain name is invalid, the dynamic link is out of format, or is tampered with, the legitimacy verification is not passed.
The method for verifying whether the dynamic link is tampered comprises the following steps: and repeating the logic calculation work of the fifth segment of information during the generation of the link, and adding a preset value (the same as the link generation process) to the value formed by the first four segments of information (domain name, time, random value and user information) in the dynamic link to perform hash operation. And then comparing whether the operation result is the same as the hash value of the resource bit in the dynamic link. And when the operation result is equal to the hash value in the dynamic link, determining that the dynamic link is not tampered. And when the operation result is not equal to the hash value in the dynamic link, determining that the dynamic link is tampered.
(2) And after the verification is passed, acquiring the actual link corresponding to the dynamic link according to the binding relationship.
And reading the hash value of the resource in the dynamic link, and inquiring the corresponding actual link from the binding relationship according to the hash value. Firstly, whether the hash value exists in the binding relationship is inquired. And when the hash value exists, acquiring the actual link corresponding to the hash value from the binding relationship. It is then determined whether the actual link is still valid. And when the actual link is still valid, determining that the actual link corresponding to the hash value is successfully inquired. And when the hash value does not exist in the binding relationship or the actual link is invalid, determining that the query fails and the link cannot be opened to display the resource content.
(3) Redirecting the dynamic link onto the actual link.
And after the actual link corresponding to the hash value is successfully inquired, redirecting the dynamic link to the actual link, so that the resource content corresponding to the actual link is opened as a result of the operation of opening the dynamic link by a user (a second user). Thus, the resource content is successfully shared from the first user to the second user.
The resource content sharing system provided by this embodiment may generate different dynamic links for sharing according to five pieces of information, that is, a domain name, time, a random value, user information, and a hash value, when a user requests to share a certain resource content, instead of a fixed link, and ideally, the dynamic links generated by different users at each time of sharing are different. And after the dynamic link is shared, redirecting the dynamic link to a corresponding actual link through a matching logic processing process corresponding to the generation process, so that the resource content is displayed to the shared user. Due to the dynamic sharing link, the method can reduce the probability of shielding and blocking the shared resource content, improve the sharing success rate, improve the display rate after successful sharing, and improve the use experience of the user.
EXAMPLE five
Fig. 10 is a block diagram of a resource content sharing system 60 according to a fifth embodiment of the present invention. The resource content sharing system 60 may be partitioned into one or more program modules, which are stored on a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments capable of performing specific functions, and the following description will specifically describe the functions of each program module in the embodiments.
In this embodiment, the resource content sharing system 60 is applied in the second client 6, and includes:
the receiving module 604 is configured to receive the dynamic link shared by the first client. The dynamic link is generated according to a plurality of preset information corresponding to resource content to be shared by the first client.
A request module 606, configured to send an access request for the dynamic link to a server.
And the display module 608 is configured to receive and display the resource content corresponding to the dynamic link returned by the server. And the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
For the specific functions of the modules, reference is made to the second embodiment, and details are not described herein.
The resource content sharing system provided by the embodiment can enable users to share resource content through dynamic links. When the dynamic link is shared to a second client from the first client and the second client requests to access the dynamic link, the dynamic link can be redirected to a corresponding actual link through a matching logic processing process of the server to the dynamic link, so that the resource content is displayed to a second user. Due to the dynamic sharing link, the method can reduce the probability of shielding and forbidding the shared resource content, improve the sharing success rate, and improve the display rate after successful sharing, thereby improving the use experience of users.
EXAMPLE six
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing a resource content sharing program, where the resource content sharing program is executable by at least one processor to cause the at least one processor to execute the steps of the resource content sharing method as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications that can be made by the use of the equivalent structures or equivalent processes in the specification and drawings of the present application or that can be directly or indirectly applied to other related technologies are also included in the scope of the present application.

Claims (14)

1. A resource content sharing method is characterized by comprising the following steps:
receiving a request of a user for sharing resource content, generating a dynamic link according to a plurality of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content;
and receiving dynamic link access, performing matching logic processing on the dynamic link, and redirecting to the corresponding actual link to display the resource content.
2. The method according to claim 1, wherein the generating a dynamic link according to a plurality of preset information items corresponding to the resource content comprises:
registering a plurality of domain names and completing record to create a domain name pool;
and generating the dynamic link according to the domain name, the time, the random value, the user information and the hash value.
3. The resource content sharing method according to claim 2, wherein the generating the dynamic link according to a domain name, a time, a random value, user information, and a hash value includes:
randomly acquiring a domain name from the domain name pool;
acquiring a current time value;
generating a random number;
acquiring user information requesting to share the resource content;
respectively writing the domain name, the time value, the random number and the user information into the first four sections of information of the dynamic link;
and adding a preset value to the value formed by the first four sections of information to perform hash operation to obtain a hash value, and writing the hash value into the dynamically linked fifth section of information.
4. The resource content sharing method according to claim 2 or 3, wherein the recording of the binding relationship between the dynamic link and the actual link of the resource content comprises:
and recording the binding relation between the hash value and the actual link.
5. The resource content sharing method according to any one of claims 1 to 4, wherein the performing matching logic processing and redirecting to the corresponding actual link includes:
legality verification is carried out on the dynamic link;
after the verification is passed, acquiring the actual link corresponding to the dynamic link according to the binding relationship;
redirecting the dynamic link onto the actual link.
6. The resource content sharing method according to claim 5, wherein the legally verifying the dynamic link comprises:
judging whether the domain name of the dynamic link is effective or not;
when the domain name is valid, judging whether the dynamic link conforms to a preset format;
when the dynamic link conforms to the format, verifying whether the dynamic link is tampered;
and when the dynamic link is not tampered, the legal verification is passed.
7. The resource content sharing method according to claim 6, wherein the verifying whether the dynamic link is tampered with comprises:
adding a preset value to a value composed of the domain name, the time, the random value and the user information in the dynamic link to perform hash operation;
and when the operation result is equal to the hash value in the dynamic link, determining that the dynamic link is not tampered.
8. The resource content sharing method according to claim 6 or 7, wherein the obtaining the actual link corresponding to the dynamic link according to the binding relationship includes:
reading the hash value in the dynamic link;
and inquiring the corresponding actual link from the binding relation according to the hash value.
9. The resource content sharing method according to claim 8, wherein the querying the corresponding actual link from the binding relationship according to the hash value includes:
inquiring whether the hash value exists from the binding relation;
when the hash value exists, acquiring an actual link corresponding to the hash value from the binding relationship;
judging whether the actual link is still valid;
and when the actual link is still valid, determining that the actual link corresponding to the hash value is successfully inquired.
10. A resource content sharing system, the system comprising:
the generation module is used for receiving a request of a user for sharing resource content, generating a dynamic link according to a plurality of items of preset information corresponding to the resource content, and recording a binding relationship between the dynamic link and an actual link of the resource content;
and the matching module is used for receiving dynamic link access, performing matching logic processing on the dynamic link, and redirecting to the corresponding actual link to display the resource content.
11. A resource content sharing method is applied to a second client, and is characterized by comprising the following steps:
receiving a dynamic link shared by a first client, wherein the dynamic link is generated according to a plurality of preset information corresponding to resource content to be shared by the first client;
sending an access request to the dynamic link to a server;
and receiving and displaying the resource content corresponding to the dynamic link returned by the server, wherein the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
12. A resource content sharing system applied to a second client is characterized by comprising:
the receiving module is used for receiving a dynamic link shared by a first client, wherein the dynamic link is generated according to a plurality of preset information corresponding to resource content to be shared by the first client;
the request module is used for sending an access request to the dynamic link to a server;
and the display module is used for receiving and displaying the resource content corresponding to the dynamic link returned by the server, wherein the resource content is obtained by redirecting to the actual link after matching logic processing is carried out according to the binding relationship between the dynamic link and the actual link of the resource content.
13. An electronic device, comprising: a memory, a processor, and a resource content sharing program stored on the memory and executable on the processor, the resource content sharing program when executed by the processor implementing the resource content sharing method according to any one of claims 1 to 9 or claim 11.
14. A computer-readable storage medium, having a resource content sharing program stored thereon, the resource content sharing program, when executed by a processor, implementing the resource content sharing method according to any one of claims 1 to 9 or claim 11.
CN202210744496.8A 2022-06-27 2022-06-27 Resource content sharing method and system Pending CN115150350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210744496.8A CN115150350A (en) 2022-06-27 2022-06-27 Resource content sharing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210744496.8A CN115150350A (en) 2022-06-27 2022-06-27 Resource content sharing method and system

Publications (1)

Publication Number Publication Date
CN115150350A true CN115150350A (en) 2022-10-04

Family

ID=83410282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210744496.8A Pending CN115150350A (en) 2022-06-27 2022-06-27 Resource content sharing method and system

Country Status (1)

Country Link
CN (1) CN115150350A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992594A (en) * 2005-12-31 2007-07-04 中兴通讯股份有限公司 URL extension method for streaming media system
CN107391587A (en) * 2017-06-23 2017-11-24 努比亚技术有限公司 Link is shared and access method, server, terminal and computer-readable storage medium
CN109919683A (en) * 2019-03-17 2019-06-21 中国建设银行股份有限公司 A kind of system of advertisement pushing, method and device
CN110032895A (en) * 2019-04-22 2019-07-19 湖南快乐阳光互动娱乐传媒有限公司 Request processing method, processing unit and requests verification method, verifying device
CN113056735A (en) * 2018-12-31 2021-06-29 电子湾有限公司 Dynamic link preview generation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992594A (en) * 2005-12-31 2007-07-04 中兴通讯股份有限公司 URL extension method for streaming media system
CN107391587A (en) * 2017-06-23 2017-11-24 努比亚技术有限公司 Link is shared and access method, server, terminal and computer-readable storage medium
CN113056735A (en) * 2018-12-31 2021-06-29 电子湾有限公司 Dynamic link preview generation
CN109919683A (en) * 2019-03-17 2019-06-21 中国建设银行股份有限公司 A kind of system of advertisement pushing, method and device
CN110032895A (en) * 2019-04-22 2019-07-19 湖南快乐阳光互动娱乐传媒有限公司 Request processing method, processing unit and requests verification method, verifying device

Similar Documents

Publication Publication Date Title
JP6985576B2 (en) Business process systems, business data processing methods and equipment
CN107480475B (en) Resource sharing method and system based on block chain network
US8332952B2 (en) Time window based canary solutions for browser security
TW201729121A (en) Cloud service server and method for managing cloud service server
CN107015996A (en) A kind of resource access method, apparatus and system
CN111324905A (en) Image data labeling method and device, computer equipment and storage medium
CN107239701B (en) Method and device for identifying malicious website
US8579187B2 (en) System and method to identify machine-readable codes
US10341323B1 (en) Automated method for on demand multifactor authentication
CN107135079A (en) Electronic document verification method, equipment and system
CN111460394A (en) Copyright file verification method and device and computer readable storage medium
CN105100242A (en) Data processing method and system
CN111488626A (en) Data processing method, device, equipment and medium based on block chain
CN112818371A (en) Resource access control method, system, device, equipment and medium
CN105187399A (en) Resource processing method and device
Le et al. TrustedChain: A blockchain-based data sharing scheme for supply chain
CN112541820B (en) Digital asset management method, device, computer equipment and readable storage medium
CN116915467A (en) Block chain-based data security sharing system and method
CN109408647B (en) Method and apparatus for processing information
CN111767306A (en) Shared information query system, method, device and equipment
CN115150350A (en) Resource content sharing method and system
CN115422145A (en) Digital asset processing method, device, electronic equipment and storage medium
CN110995437B (en) ETC system-based user information input method, device, equipment and storage medium
CN113032820B (en) File storage method, access method, device, equipment and storage medium
CN112417508A (en) Data desensitization method, data storage system, storage medium and server

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