CN111787108B - Content sharing method, device, computer equipment and storage medium - Google Patents

Content sharing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111787108B
CN111787108B CN202010623504.4A CN202010623504A CN111787108B CN 111787108 B CN111787108 B CN 111787108B CN 202010623504 A CN202010623504 A CN 202010623504A CN 111787108 B CN111787108 B CN 111787108B
Authority
CN
China
Prior art keywords
content
shared
target
page
background server
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
CN202010623504.4A
Other languages
Chinese (zh)
Other versions
CN111787108A (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010623504.4A priority Critical patent/CN111787108B/en
Publication of CN111787108A publication Critical patent/CN111787108A/en
Application granted granted Critical
Publication of CN111787108B publication Critical patent/CN111787108B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application relates to the technical field of safety protection, and provides a content sharing method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: the first user terminal acquires current position information and uploads the position information to a background server; inquiring a second user terminal which is located at a preset distance from the position information from a background server; triggering a sharing instruction when a function button on a page of a first user terminal receives clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database; verifying whether the shared code block is changed; if the content is not changed, acquiring the content to be shared based on the shared code block; determining a target user terminal from the second user terminals; and sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server. The application realizes the safe content sharing in the operating system.

Description

Content sharing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of security protection technologies, and in particular, to a content sharing method, a content sharing device, a computer device, and a storage medium.
Background
Content sharing refers to a process in which user a perceives a need to inform user B of understanding or processing after seeing an arbitrary page (H5 page)/content (a piece of content in H5). The non-communication software refers to non-chat type working software, such as an operating system.
The main forms of information sharing of the non-chat software at present are as follows: and the user A shares a plurality of pages to the user B through a WeChat or a QQ and other third-party platforms, and the user B opens a sharing link to arouse the software to read the shared content. This form has the following disadvantages:
1. the internal information is transferred through the third party software, so that the risk of information leakage exists, and the operation is inconvenient (the working software is basically always in an open state, the information sharing also needs to pass through the third party software, and the operation steps are added).
2. If the user B does not open the message reminding function of the communication tool such as WeChat, the user A also needs to inform the user B to check or process the content in a telephone or information form, and the user A cannot process the content in time when encountering important information.
3. If the user A pushes the information to the user B, the working software of the user B is pc on line, and the H5 page cannot directly call the pc-end working software in tools such as pc-end WeChat and the like.
4. While the user A and the user B belong to the same company, when the user A and the user B face to face but are friends of non-social tools, the user A and the user B cannot push the content directly face to face, and the user A and the user B need to add social friends and then operate the user A and the user B.
In view of the above-mentioned shortcomings, a scheme is needed for effectively sharing information in an operating system which cannot directly communicate information without relying on third party software.
Disclosure of Invention
The application mainly aims to provide a content sharing method, a device, computer equipment and a storage medium, which aim to solve the defect that the content sharing cannot be safely performed in the current operating system.
In order to achieve the above object, the present application provides a content sharing method, including the following steps:
the method comprises the steps that a first user terminal obtains current position information and uploads the position information to a background server;
inquiring a second user terminal which is at a preset distance from the position information from the background server;
triggering a sharing instruction when a function button on a page of a first user terminal receives clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database;
verifying whether the shared code block is changed;
if the content is not changed, acquiring the content to be shared based on the shared code block; the content to be shared comprises a page address of the page or data content in a clipboard;
determining a target user terminal from the second user terminals;
and sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server.
Further, the step of verifying whether the shared code block is changed includes:
starting an analysis engine to analyze the shared code block into a shared code;
carrying out hash calculation on the shared codes to obtain corresponding code hash values;
judging whether the code hash value is the same as a preset hash value or not; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
if the shared code blocks are the same, judging that the shared code blocks are not changed; and if the shared code blocks are different, judging that the shared code blocks are changed.
Further, the content to be shared is a page address of the page, and the step of sending the content to be shared to the background server includes:
acquiring the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
converting the identification information into corresponding characters according to the character conversion table;
and inserting the characters into the appointed position of the page address of the page, and sending the page address after the characters are inserted to the background server.
Further, the content to be shared is text content in the clipboard;
the step of sending the content to be shared to a background server comprises the following steps:
acquiring the original position of the text content in the page;
judging whether the text content is continuous in the page or not;
if the text content is discontinuous, taking each discontinuous text content in the text content as a target content;
sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
calculating the characteristic value of each piece of target content in sequence; the characteristic value comprises a corresponding hash value;
sequentially taking the characteristic value of the previous section of target content as an encryption password of the next section of target content to encrypt the next section of target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and after the encrypted target contents are combined, the encrypted target contents and the characteristic value of the last target content are transmitted to the background server.
Further, the content to be shared is text content in the clipboard; the step of sending the content to be shared to a background server comprises the following steps:
adding the shared content to a blank layer to generate a shared picture;
acquiring the data volume of the sharing picture, and judging whether the data volume is larger than a threshold value;
if the picture is larger than the first preset value, detecting a center point of the shared picture, and taking the center point as a geometric center to form a rectangular frame;
cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame;
and respectively sending the first image and the second image to the background server.
The application also provides a content sharing device, which comprises:
the uploading unit is used for acquiring current position information by the first user terminal and uploading the position information to the background server;
the inquiring unit is used for inquiring a second user terminal which is at a preset distance from the position information from the background server;
the calling unit is used for triggering the sharing instruction when a function button on the page of the first user terminal receives the clicking operation of the user, and calling a sharing code block corresponding to the sharing instruction from a preset code database;
a verification unit, configured to verify whether the shared code block is changed;
the acquisition unit is used for acquiring the content to be shared based on the shared code block if no change occurs; the content to be shared comprises a page address of the page or data content in a clipboard;
a determining unit, configured to determine a target user terminal from the second user terminals;
and the sending unit is used for sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server.
Further, the verification unit includes:
the promoter unit is used for starting the analysis engine and analyzing the shared code block into shared codes;
a calculating subunit, configured to perform hash calculation on the shared code to obtain a corresponding code hash value;
the judging subunit is used for judging whether the code hash value is the same as a preset hash value or not; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
a judging subunit, configured to judge that the shared code block is unchanged if the shared code blocks are the same; and if the shared code blocks are different, judging that the shared code blocks are changed.
Further, the content to be shared is a page address of the page, and the sending unit is specifically configured to:
acquiring the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
converting the identification information into corresponding characters according to the character conversion table;
and inserting the characters into the appointed position of the page address of the page, and sending the page address after the characters are inserted to the background server.
Further, the content to be shared is text content in the clipboard;
the sending unit is configured to:
acquiring the original position of the text content in the page;
judging whether the text content is continuous in the page or not;
if the text content is discontinuous, taking each discontinuous text content in the text content as a target content;
sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
calculating the characteristic value of each piece of target content in sequence; the characteristic value comprises a corresponding hash value;
sequentially taking the characteristic value of the previous section of target content as an encryption password of the next section of target content to encrypt the next section of target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and after the encrypted target contents are combined, the encrypted target contents and the characteristic value of the last target content are transmitted to the background server.
Further, the content to be shared is text content in the clipboard; the sending unit is configured to:
adding the shared content to a blank layer to generate a shared picture;
acquiring the data volume of the sharing picture, and judging whether the data volume is larger than a threshold value;
if the picture is larger than the first preset value, detecting a center point of the shared picture, and taking the center point as a geometric center to form a rectangular frame;
cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame;
and respectively sending the first image and the second image to the background server.
The application also provides a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of any of the methods described above when the computer program is executed.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the preceding claims.
The application provides a content sharing method, a device, a computer device and a storage medium, comprising the following steps: the method comprises the steps that a first user terminal obtains current position information and uploads the position information to a background server; inquiring a second user terminal which is at a preset distance from the position information from the background server; triggering a sharing instruction when a function button on a page of a first user terminal receives clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database; verifying whether the shared code block is changed; if the content is not changed, acquiring the content to be shared based on the shared code block; the content to be shared comprises a page address of the page or data content in a clipboard; determining a target user terminal from the second user terminals; and sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server, thereby realizing the safe content sharing in an operating system.
Drawings
FIG. 1 is a schematic diagram illustrating steps of a content sharing method according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating a content sharing apparatus according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, in an embodiment of the present application, a content sharing method is provided, including the following steps:
step S1, a first user terminal acquires current position information and uploads the position information to a background server;
step S2, inquiring a second user terminal which is at a preset distance from the position information from the background server;
step S3, triggering a sharing instruction when a function button on a page of a first user terminal receives a clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database;
step S4, verifying whether the shared code block is changed or not;
step S5, if no change occurs, obtaining the content to be shared based on the shared code block; the content to be shared comprises a page address of the page or data content in a clipboard;
step S6, determining a target user terminal from the second user terminals;
and step S7, the content to be shared is sent to a background server so as to be pushed to the page of the target user terminal through the background server.
In this embodiment, the method is applied to the non-chat software to share the page content, and no third party software is required to transfer the content.
Specifically, the software program is installed on the user terminal, and a user of the software program starts the working software when working (app end software can be backed up to the background, so long as a process is running). It should be noted that, in this embodiment, the user terminal that needs to share the page content needs to initiate a corresponding location acquiring function, such as a GPS positioning function, a WIFI positioning function, and so on.
As described in step S1, when the position obtaining function of the first user terminal is turned on, the first user terminal is connected to the background through a socket, and then a piece of position information (the position information can be obtained from a navigator object or can be obtained by calling the positioning function of the mobile phone/computer) is reported to the background server at intervals of a preset time (for example, 5S). The background server is provided with a socket message processing code, and provides functions of position record and inquiry of nearby position sharable equipment, and the background server can search other user terminals within a nearby preset range (for example, within 5 m) according to the position information reported by the first user terminal. Therefore, the background server can push other user terminals which are searched to be within a preset range near the first user terminal to the first user terminal in a list form.
As described in step S2, the first ue may query the background server for a second ue that is at a preset distance from the location information.
As described in step S3, the software program on the first user terminal provides a sharing function, and when the user clicks a corresponding sharing function button on the page of the first user terminal, a sharing instruction is triggered, and a sharing code block corresponding to the sharing instruction is called from a preset code database, where the sharing code block is used to obtain the content to be shared of the current page.
As described in step S4 above, the security verification process is integrated, i.e. it is verified whether the underlying program is corroded by the Trojan virus, and the code file in the program must be tampered with when the Trojan virus corrodes the program. This scheme is to verify whether the code in the program has been tampered with.
If the shared code block is not changed, the page address of the current page or the data content in the clipboard is obtained as described in step S5. At this time, the page address of the page or the data content in the clipboard can be shared.
As described in the above step S6, during sharing, a target user terminal to be shared needs to be determined, and the target user terminal is selected from the second user terminals, so that the user can select a corresponding target user terminal according to the need.
And (3) sending the page address of the page or the data content in the clipboard to a background server, forwarding the data content via a background service, and pushing the content to be shared to the page of the target user terminal.
When the user of the second user terminal receives the shared content, the user can directly open and access the page address or directly look up the data content in the clipboard, thereby completing the whole sharing process.
In one embodiment, the step S4 of verifying whether the shared code block is changed includes:
step S41, starting an analysis engine to analyze the shared code block into a shared code;
step S42, carrying out hash calculation on the shared codes to obtain corresponding code hash values;
step S43, judging whether the code hash value is the same as a preset hash value; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
step S44, if the shared code blocks are the same, judging that the shared code blocks are not changed; and if the shared code blocks are different, judging that the shared code blocks are changed.
In this embodiment, in the prior art, the characteristics of the Trojan virus are usually maintained in the database, when the Trojan is checked and killed, matching is performed according to the characteristics of the Trojan virus, and whether the program contains the corresponding file is determined. In this embodiment, the corresponding shared code block is first obtained, the shared code block is resolved into the shared code, and then the hash calculation of the shared code is performed, and if any character in the shared code is changed, the corresponding generated code hash value will be changed. Therefore, a hash value obtained by performing hash calculation according to an initial shared code can be pre-stored in the database and used as a preset hash value, the calculated preset hash value is used as a judgment standard, if the code hash value generated in the verification process is different from the preset hash value, the shared code is tampered, and the security risk exists, and at this time, the sharing is not suitable to be continued.
In an embodiment, the content to be shared is a page address of the page, and the step S7 of sending the content to be shared to the background server includes:
step S7a, obtaining the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
step S7b, converting the identification information into corresponding characters according to the character conversion table;
and S7c, inserting the characters into the appointed position of the page address of the page, and sending the page address after inserting the characters to the background server.
In this embodiment, when sharing the page address, the page address is not directly shared, but tampered in the manner described above, so that the page address is changed to be unusable, and after the shared user terminal obtains the page address, the shared user terminal may analyze in the same manner to obtain the correct page address.
In this embodiment, the content to be shared is text content in the clipboard;
the step S7 of sending the content to be shared to the background server includes:
step S701, acquiring an original position of the text content in the page;
step S702, judging whether the text content is continuous in the page;
step S703, if discontinuous, using each discontinuous text content in the text content as a target content;
step S704, sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
step S705, calculating the characteristic value of each piece of target content in turn; the characteristic value comprises a corresponding hash value;
step S706, sequentially taking the characteristic value of the previous target content as the encryption password of the next target content to encrypt the next target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and step S707, after the target contents are combined after the encryption processing, the target contents and the characteristic value of the last target content are sent to the background server.
In this embodiment, in order to enhance the security of the content to be shared in the sharing process, the text content is not directly shared during sharing, but the original position of the text content in the page is obtained; judging whether the text content is continuous in the page or not; taking each discontinuous text content as a target content; sequentially sequencing the target contents according to the original positions of each section of the target contents in the page; then calculating the characteristic value of each section of target content in turn; the characteristic value comprises a corresponding hash value; and the hash value is used as an encryption password to encrypt the target content, and the encrypted target content is sent to a background server for sharing to other users. After the terminal of the shared user obtains the processed target content, the terminal can analyze the processed target content in the same mode to obtain the corresponding text content.
In this embodiment, the content to be shared is text content in the clipboard; the step S7 of sending the content to be shared to the background server includes:
adding the shared content to a blank layer to generate a shared picture;
acquiring the data volume of the sharing picture, and judging whether the data volume is larger than a threshold value;
if the picture is larger than the first preset value, detecting a center point of the shared picture, and taking the center point as a geometric center to form a rectangular frame;
cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame;
and respectively sending the first image and the second image to the background server.
In this embodiment, the content to be shared is shared to the target user terminal in the form of a picture, and if the amount of the picture data is too large during uploading the picture, the uploading is not successful easily, so that the picture needs to be cut. In this embodiment, a center point of the shared picture is detected, and a rectangular frame is made with the center point as a geometric center; cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame; the first image and the second image are respectively sent to the background server, and then when the sharing picture is required to be checked, the first image and the second image are only required to be spliced, and as the shapes of the image elements in the first image and the second image are just matched, the image confusion can be avoided during the splicing.
Referring to fig. 2, in an embodiment of the present application, there is further provided a content sharing apparatus, including:
an uploading unit 10, configured to obtain current location information, and upload the location information to a background server;
a query unit 20, configured to query, from the background server, a second user terminal located at a preset distance from the location information;
the calling unit 30 is configured to trigger a sharing instruction when a function button on a page of the first user terminal receives a click operation of a user, and call a sharing code block corresponding to the sharing instruction from a preset code database;
a verification unit 40 for verifying whether the shared code block is changed;
an obtaining unit 50, configured to obtain content to be shared based on the shared code block if no change occurs; the content to be shared comprises a page address of the page or data content in a clipboard;
a determining unit 60 for determining a target user terminal from the second user terminals;
and the sending unit 70 is configured to send the content to be shared to a background server, so that the content is pushed to a page of the target user terminal through the background server.
In one embodiment, the verification unit 40 includes:
the promoter unit is used for starting the analysis engine and analyzing the shared code block into shared codes;
a calculating subunit, configured to perform hash calculation on the shared code to obtain a corresponding code hash value;
the judging subunit is used for judging whether the code hash value is the same as a preset hash value or not; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
a judging subunit, configured to judge that the shared code block is unchanged if the shared code blocks are the same; and if the shared code blocks are different, judging that the shared code blocks are changed.
In an embodiment, the content to be shared is a page address of the page, and the sending unit is specifically configured to:
acquiring the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
converting the identification information into corresponding characters according to the character conversion table;
and inserting the characters into the appointed position of the page address of the page, and sending the page address after the characters are inserted to the background server.
In an embodiment, the content to be shared is text content in the clipboard;
the sending unit is configured to:
acquiring the original position of the text content in the page;
judging whether the text content is continuous in the page or not;
if the text content is discontinuous, taking each discontinuous text content in the text content as a target content;
sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
calculating the characteristic value of each piece of target content in sequence; the characteristic value comprises a corresponding hash value;
sequentially taking the characteristic value of the previous section of target content as an encryption password of the next section of target content to encrypt the next section of target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and after the encrypted target contents are combined, the encrypted target contents and the characteristic value of the last target content are transmitted to the background server.
In an embodiment, the content to be shared is text content in the clipboard; the sending unit is configured to:
adding the shared content to a blank layer to generate a shared picture;
acquiring the data volume of the sharing picture, and judging whether the data volume is larger than a threshold value;
if the picture is larger than the first preset value, detecting a center point of the shared picture, and taking the center point as a geometric center to form a rectangular frame;
cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame;
and respectively sending the first image and the second image to the background server.
In this embodiment, for specific implementation of the units and sub-units in the embodiment of the apparatus, please refer to the description in the embodiment of the method, and details are not repeated here.
Referring to fig. 3, in an embodiment of the present application, there is further provided a computer device, which may be a server, and an internal structure thereof may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing shared content data and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a content sharing method.
It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of a portion of the architecture in connection with the present inventive arrangements and is not intended to limit the computer devices to which the present inventive arrangements are applicable.
An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor implements a content sharing method. It is understood that the computer readable storage medium in this embodiment may be a volatile readable storage medium or a nonvolatile readable storage medium.
In summary, the content sharing method, device, computer device and storage medium provided in the embodiments of the present application include: the method comprises the steps that a first user terminal obtains current position information and uploads the position information to a background server; inquiring a second user terminal which is at a preset distance from the position information from the background server; triggering a sharing instruction when a function button on a page of a first user terminal receives clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database; verifying whether the shared code block is changed; if the content is not changed, acquiring the content to be shared based on the shared code block; the content to be shared comprises a page address of the page or data content in a clipboard; determining a target user terminal from the second user terminals; and sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server, thereby realizing the safe content sharing in an operating system.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided by the present application and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
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, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (9)

1. The content sharing method is characterized by comprising the following steps of:
the method comprises the steps that a first user terminal obtains current position information and uploads the position information to a background server;
inquiring a second user terminal which is at a preset distance from the position information from the background server;
triggering a sharing instruction when a function button on a page of a first user terminal receives clicking operation of a user, and calling a sharing code block corresponding to the sharing instruction from a preset code database;
verifying whether the shared code block is changed;
if the content is not changed, acquiring the content to be shared based on the shared code block; the content to be shared comprises data content in a clipboard;
determining a target user terminal from the second user terminals;
the content to be shared is sent to a background server, so that the content to be shared is pushed to a page of the target user terminal through the background server;
the content to be shared is text content in the clipboard;
the step of sending the content to be shared to a background server comprises the following steps:
acquiring the original position of the text content in the page;
judging whether the text content is continuous in the page or not;
if the text content is discontinuous, taking each discontinuous text content in the text content as a target content;
sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
calculating the characteristic value of each piece of target content in sequence; the characteristic value comprises a corresponding hash value;
sequentially taking the characteristic value of the previous section of target content as an encryption password of the next section of target content to encrypt the next section of target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and after the encrypted target contents are combined, the encrypted target contents and the characteristic value of the last target content are transmitted to the background server.
2. The content sharing method according to claim 1, wherein the step of verifying whether the shared code block is changed comprises:
starting an analysis engine to analyze the shared code block into a shared code;
carrying out hash calculation on the shared codes to obtain corresponding code hash values;
judging whether the code hash value is the same as a preset hash value or not; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
if the shared code blocks are the same, judging that the shared code blocks are not changed; and if the shared code blocks are different, judging that the shared code blocks are changed.
3. The content sharing method according to claim 1, wherein the content to be shared further includes a page address of the page, and the step of sending the content to be shared to a background server includes:
acquiring the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
converting the identification information into corresponding characters according to the character conversion table;
and inserting the characters into the appointed position of the page address of the page, and sending the page address after the characters are inserted to the background server.
4. The content sharing method according to claim 1, wherein the content to be shared is text content in the clipboard; the step of sending the content to be shared to a background server comprises the following steps:
adding the content to be shared into a blank layer to generate a sharing picture;
acquiring the data volume of the sharing picture, and judging whether the data volume is larger than a threshold value;
if the picture is larger than the first preset value, detecting a center point of the shared picture, and taking the center point as a geometric center to form a rectangular frame;
cutting the frame of the rectangular frame to obtain a first image in the rectangular frame and a second image outside the rectangular frame;
and respectively sending the first image and the second image to the background server.
5. A content sharing apparatus, comprising:
the uploading unit is used for acquiring the current position information and uploading the position information to the background server;
the inquiring unit is used for inquiring a second user terminal which is at a preset distance from the position information from the background server;
the calling unit is used for triggering the sharing instruction when a function button on the page of the first user terminal receives the clicking operation of the user, and calling a sharing code block corresponding to the sharing instruction from a preset code database;
a verification unit, configured to verify whether the shared code block is changed;
the acquisition unit is used for acquiring the content to be shared based on the shared code block if no change occurs; the content to be shared comprises data content in a clipboard;
a determining unit, configured to determine a target user terminal from the second user terminals;
the sending unit is used for sending the content to be shared to a background server so as to be pushed to the page of the target user terminal through the background server;
the content to be shared is text content in the clipboard;
the step of sending the content to be shared to a background server comprises the following steps:
acquiring the original position of the text content in the page;
judging whether the text content is continuous in the page or not;
if the text content is discontinuous, taking each discontinuous text content in the text content as a target content;
sequentially sequencing the target contents according to the original positions of each section of the target contents in the page;
calculating the characteristic value of each piece of target content in sequence; the characteristic value comprises a corresponding hash value;
sequentially taking the characteristic value of the previous section of target content as an encryption password of the next section of target content to encrypt the next section of target content; the characteristic value of the last section of target content is used as an encryption password of the first section of target content;
and after the encrypted target contents are combined, the encrypted target contents and the characteristic value of the last target content are transmitted to the background server.
6. The content sharing apparatus according to claim 5, wherein the authentication unit includes:
the promoter unit is used for starting the analysis engine and analyzing the shared code block into shared codes;
a calculating subunit, configured to perform hash calculation on the shared code to obtain a corresponding code hash value;
the judging subunit is used for judging whether the code hash value is the same as a preset hash value or not; the preset hash value is obtained by carrying out hash calculation in advance according to a preset sharing code;
a judging subunit, configured to judge that the shared code block is unchanged if the shared code blocks are the same; and if the shared code blocks are different, judging that the shared code blocks are changed.
7. The content sharing apparatus according to claim 5, wherein the content to be shared further includes a page address of the page, and the sending unit is specifically configured to:
acquiring the identification information of the user, and extracting a preset character conversion table; the character conversion table comprises the corresponding conversion relation between the identification information and the characters;
converting the identification information into corresponding characters according to the character conversion table;
and inserting the characters into the appointed position of the page address of the page, and sending the page address after the characters are inserted to the background server.
8. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 4.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN202010623504.4A 2020-06-30 2020-06-30 Content sharing method, device, computer equipment and storage medium Active CN111787108B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010623504.4A CN111787108B (en) 2020-06-30 2020-06-30 Content sharing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010623504.4A CN111787108B (en) 2020-06-30 2020-06-30 Content sharing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111787108A CN111787108A (en) 2020-10-16
CN111787108B true CN111787108B (en) 2023-08-22

Family

ID=72760609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010623504.4A Active CN111787108B (en) 2020-06-30 2020-06-30 Content sharing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111787108B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291758B (en) * 2020-10-29 2023-12-05 维沃移动通信有限公司 File sharing method, file sharing device and electronic equipment
CN114040006B (en) * 2021-11-01 2024-02-27 北京流通宝数据科技服务有限公司 Multi-mobile terminal data sharing method and system based on digital asset management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815316A (en) * 2016-12-23 2017-06-09 北京奇虎科技有限公司 Method, device and mobile terminal that content of pages is shared
CN106936884A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 Content share method, device and system across mobile terminal
EP3614292A1 (en) * 2018-08-23 2020-02-26 Koninklijke KPN N.V. File transfer system comprising an upload, storage and download device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936884A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 Content share method, device and system across mobile terminal
CN106815316A (en) * 2016-12-23 2017-06-09 北京奇虎科技有限公司 Method, device and mobile terminal that content of pages is shared
EP3614292A1 (en) * 2018-08-23 2020-02-26 Koninklijke KPN N.V. File transfer system comprising an upload, storage and download device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
实时路况信息共享与查询系统的设计;屈军锁 等;西安邮电大学学报(第02期);全文 *

Also Published As

Publication number Publication date
CN111787108A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
US9900416B2 (en) Information processing method, information processing device, and apparatus
US9344882B2 (en) Apparatus and methods for preventing information disclosure
EP3262552B1 (en) Methods, apparatus, and systems for identity authentication
CN111787108B (en) Content sharing method, device, computer equipment and storage medium
CN109766072B (en) Information verification input method and device, computer equipment and storage medium
CN108924258B (en) Background information pushing method and device, computer equipment and storage medium
CN104144419A (en) Identity authentication method, device and system
US20160277417A1 (en) Method and apparatus for communication number update
CN109547426B (en) Service response method and server
CN110727949B (en) Data storage method and device, computer equipment and storage medium
CN108966159B (en) Short message withdrawing method, system, computer equipment and storage medium
CN110516471B (en) Product promotion method based on information security and related equipment
CN112367164B (en) Service request processing method and device, computer equipment and storage medium
CN111586671B (en) Embedded user identification card configuration method and device, communication equipment and storage medium
CN104579667A (en) Account password management method, device and system
CN112714040B (en) Holographic message detection method, device, equipment and storage medium
CN110908778A (en) Task deployment method, system and storage medium
CN113472803A (en) Vulnerability attack state detection method and device, computer equipment and storage medium
CN108763396B (en) Access request processing method, device, computer equipment and storage medium
CN108418809B (en) Chat data processing method and device, computer equipment and storage medium
CN112541102B (en) Abnormal data filtering method, device, equipment and storage medium
WO2021169469A1 (en) Voiceprint data processing method and apparatus, computer device, and storage medium
CN108712275A (en) Data transmission methods of risk assessment, device, computer equipment and storage medium
CN110930193B (en) Advertisement conversion rate evaluation method, advertisement conversion rate evaluation device, computer equipment and storage medium
CN109933974B (en) Password initialization method, device, computer equipment and storage medium

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