CN112929398B - Data sharing method, device, server and storage medium - Google Patents

Data sharing method, device, server and storage medium Download PDF

Info

Publication number
CN112929398B
CN112929398B CN201911241233.XA CN201911241233A CN112929398B CN 112929398 B CN112929398 B CN 112929398B CN 201911241233 A CN201911241233 A CN 201911241233A CN 112929398 B CN112929398 B CN 112929398B
Authority
CN
China
Prior art keywords
sharing
target
data
node
style
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
CN201911241233.XA
Other languages
Chinese (zh)
Other versions
CN112929398A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201911241233.XA priority Critical patent/CN112929398B/en
Publication of CN112929398A publication Critical patent/CN112929398A/en
Application granted granted Critical
Publication of CN112929398B publication Critical patent/CN112929398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The disclosure relates to a data sharing method, a data sharing device, a server and a storage medium, and belongs to the technical field of computers. In the process, the sharing style of the data is determined based on the sharing request and the target hierarchical relationship, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, logic of the sharing path does not need to be written into codes, code collision is avoided, and maintenance cost of a sharing configuration system is reduced.

Description

Data sharing method, device, server and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data sharing method and apparatus, a server, and a storage medium.
Background
With the development of computer technology and the diversification of terminal functions, more and more applications are coming out. The method includes the steps that when data are shared, a server can traverse all sections of codes in a sharing configuration system based on a sharing request of a user, configuration information corresponding to shared data is obtained, and data sharing steps are executed based on a sharing style indicated by the configuration information.
In the current data sharing mode, one sharing logic corresponds to a section of code in the sharing configuration system, when a new sharing logic is added, for example, a short video is newly shared in a friend circle in a linked manner, the new sharing logic needs to be converted into a code and added to the original sharing configuration system, however, with the increase of the sharing logic, more and more new codes are added, the new codes may conflict with the original codes, more time is consumed for adding the new codes and solving the code conflict, and the maintenance cost of the sharing configuration system is higher and higher.
Disclosure of Invention
The present disclosure provides a data sharing method, an apparatus, a computer device, and a computer-readable storage medium, so as to at least solve the problems of long maintenance time and high maintenance cost of a sharing configuration system in the related art. The technical scheme of the disclosure is as follows:
According to a first aspect of the embodiments of the present disclosure, a data sharing method is provided, which includes
Receiving a sharing request, wherein the sharing request is used for requesting to share target data through a target sharing path;
matching the sharing request with a target hierarchy relationship, and determining at least one candidate sharing style corresponding to the target data, wherein the target hierarchy relationship comprises a plurality of hierarchies from top to bottom, one hierarchy comprises at least one node, the target hierarchy relationship is used for recording sharing styles corresponding to different sharing paths based on the connection relationship among the nodes of different hierarchies, and one lowest node in the target hierarchy relationship corresponds to one candidate sharing style;
when the target data meets the data limitation condition in any lowest node, determining a candidate sharing style corresponding to any lowest node as the sharing style of the target data;
and sharing the target data based on the sharing style.
In one possible implementation manner, the matching the sharing request with the target hierarchical relationship, and determining at least one candidate sharing style corresponding to the target data includes:
when the data information indicated by the uppermost node in any hierarchical relationship is matched with the application identifier of the target application program, determining any hierarchical relationship as the target hierarchical relationship;
Matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
In one possible implementation manner, the determining, based on the matching result, at least one candidate sharing style corresponding to the target data includes:
acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
In one possible implementation manner, the sharing the target data based on the sharing style includes:
determining sharing style information of the target data based on the style identification of the sharing style;
and analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
In one possible implementation, the method further comprises:
acquiring a newly added sharing path;
and adding a new node in the target level of the target level relation based on the newly added sharing path.
According to a second aspect of the embodiments of the present disclosure, there is provided a data sharing apparatus, including:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive a sharing request, and the sharing request is used for requesting to share target data through a target sharing path;
the matching unit is configured to match the sharing request with a target hierarchy relationship, and determine at least one candidate sharing style corresponding to the target data, wherein the target hierarchy relationship comprises a plurality of hierarchies from top to bottom, one hierarchy comprises at least one node, the target hierarchy relationship is used for recording sharing styles corresponding to different sharing paths based on connection relationships among nodes of different hierarchies, and a lowest node in the target hierarchy relationship corresponds to one candidate sharing style;
the sharing style determining unit is configured to determine a candidate sharing style corresponding to any lowest node as the sharing style of the target data when the target data meets the data limitation condition in the any lowest node;
A sharing unit configured to share the target data based on the sharing style.
In one possible implementation, the matching unit is configured to:
when the data information indicated by the uppermost node in any hierarchical relationship is matched with the application identifier of the target application program, determining any hierarchical relationship as the target hierarchical relationship;
matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
In one possible implementation, the matching unit is configured to:
acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
In one possible implementation, the sharing unit is configured to:
Determining sharing style information of the target data based on the style identification of the sharing style;
and analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
In one possible implementation, the apparatus further includes:
an obtaining unit configured to obtain a newly added sharing path;
and the node adding unit is configured to add a new node in the target level of the target level relation based on the newly added sharing path.
The technical solution provided by the embodiments of the present disclosure is to receive a sharing request, where the sharing request is used to request to share target data through a target sharing path, match the sharing request with a target hierarchical relationship, determine at least one candidate sharing style corresponding to the target data, where the target hierarchical relationship is used to record sharing styles corresponding to different sharing paths based on a connection relationship between nodes of different hierarchies, where a lowest node in the target hierarchical relationship corresponds to one candidate sharing style, when the target data satisfies a data restriction condition in any lowest node, determine the candidate sharing style corresponding to any lowest node as the sharing style of the target data, perform sharing on the target data based on the sharing style, and in the above data sharing process, based on a matching result of the request and the target hierarchical relationship, the sharing style of the target data is determined, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, logic of the sharing paths does not need to be written into codes, code collision is avoided, and maintenance cost of the sharing configuration system is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of data sharing in accordance with an exemplary embodiment;
FIG. 2 is a schematic diagram illustrating an implementation environment for data sharing in accordance with an illustrative embodiment;
FIG. 3 is a flowchart illustrating a specific implementation of a data sharing method according to an exemplary embodiment;
FIG. 4 is a diagram illustrating a target hierarchy relationship structure in accordance with an illustrative embodiment;
FIG. 5 is a diagram illustrating a card sharing style, according to an example embodiment;
FIG. 6 is a schematic diagram illustrating data interaction of a server with a sharing configuration system in accordance with an illustrative embodiment;
FIG. 7 is a block diagram illustrating a data sharing arrangement according to an exemplary embodiment;
FIG. 8 is a block diagram illustrating a computer device in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a data sharing method according to an exemplary embodiment, where the data sharing method is used in a server, as shown in fig. 1, and includes the following steps.
In step 101, a sharing request for requesting to share target data through a target sharing path is received.
In step 102, the sharing request is matched with a target hierarchical relationship, and at least one candidate sharing style corresponding to the target data is determined, where the target hierarchical relationship includes a plurality of hierarchical levels from top to bottom, one of the hierarchical levels includes at least one node, the target hierarchical relationship is used for recording sharing styles corresponding to different sharing paths based on connection relationships between nodes of different hierarchical levels, and a lowest node in the target hierarchical relationship corresponds to one candidate sharing style.
In step 103, when the target data meets the data limitation condition in any lowest node, the candidate sharing style corresponding to the any lowest node is determined as the sharing style of the target data.
In step 104, the target data is shared based on the sharing style.
The embodiment provided by the disclosure includes receiving a sharing request, where the sharing request is used to request to share target data through a target sharing path, matching the sharing request with a target hierarchical relationship, determining at least one candidate sharing style corresponding to the target data, where the target hierarchical relationship is used to record sharing styles corresponding to different sharing paths based on a connection relationship between nodes of different hierarchies, where a lowest node in the target hierarchical relationship corresponds to one candidate sharing style, determining a candidate sharing style corresponding to any lowest node as a sharing style of the target data when the target data meets a data limitation condition in any lowest node, sharing the target data based on the sharing style, and in the data sharing process, based on a matching result of the sharing request and the target hierarchical relationship, the sharing style of the target data is determined, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, logic of the sharing paths does not need to be written into codes, code collision is avoided, and maintenance cost of the sharing configuration system is reduced.
In a possible implementation manner, the matching the sharing request with the target hierarchical relationship, and the determining at least one candidate sharing style corresponding to the target data includes:
when the data information indicated by the uppermost node in any hierarchical relationship is matched with the application identifier of the target application program, determining any hierarchical relationship as the target hierarchical relationship;
matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
In one possible implementation manner, the determining, based on the matching result, at least one candidate sharing style corresponding to the target data includes:
acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
In one possible implementation manner, the sharing the target data based on the sharing style includes:
determining sharing style information of the target data based on the style identification of the sharing style;
and analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
In one possible implementation, the method further comprises:
acquiring a newly added sharing path;
and adding a new node in the target level of the target level relation based on the newly added sharing path.
The above-described embodiments are merely a brief introduction to embodiments of the disclosure and a brief introduction to various possible implementations.
Fig. 2 is a schematic diagram illustrating an implementation environment of data sharing according to an exemplary embodiment, and as shown in fig. 2, the implementation environment may include a terminal 201 and a server 202. The terminal 201 may be installed and run with an application program supporting a data sharing function, the application program may be a social class application program, an information class application program, a short video class application program, and the like, and the terminal 201 may be at least one of a smart phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4) player, a laptop portable computer, and a desktop computer. The server 202 may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center, where the server 202 may be configured to provide a background service for the application, and the server 202 may be mounted with a sharing configuration system for processing a data sharing task, and the server 202 provides sharing configuration information of data, but the sharing configuration system may also be mounted on another server 203, and the server 202 requests the sharing configuration information of data from the server 203, which is not limited in the embodiment of the present disclosure.
Each terminal and the server can be connected through a wired network or a wireless network, so that data interaction can be performed between each terminal and the server.
Those skilled in the art will appreciate that the number of terminals described above may be greater or fewer. For example, the number of the terminals may be only one, or several tens or hundreds of the terminals, or more. The number of terminals and the type of the device are not limited in the embodiments of the present disclosure.
Fig. 3 is a flowchart illustrating a specific implementation of a data sharing method according to an exemplary embodiment, where the method may be applied to the implementation environment shown in fig. 2, and referring to fig. 3, the method may specifically include the following steps:
in step 301, a server receives a request for sharing target data.
The server may be loaded with a sharing configuration system, and the sharing configuration system may be configured to provide sharing configuration information of data.
In the embodiment of the disclosure, the sharing request is used to request the server to share the target data through the target sharing path, in a possible implementation manner, the sharing request may be triggered based on a sharing operation of the user on the target data on any terminal, and the terminal may be installed and run with a target application program having a data sharing function. Specifically, in a possible implementation manner, when the terminal detects a trigger operation of a user on the sharing control, the terminal may acquire shared data as target data, send a sharing request of the target data to a server corresponding to the target application program, and request, by the server, sharing configuration information of the target data from the sharing configuration system. The trigger operation may be a click operation, a long-time press operation, and the like, which is not limited in this disclosure. In this disclosure, the sharing request may include an application identifier of a target application program, data information of the target data, and a platform identifier of a target sharing platform, where one platform identifier may be used to uniquely indicate one sharing platform, and one application identifier may be used to uniquely indicate one application program, where the data information of the target data may include a data type, a data size, and the like. Of course, the sharing request may further include information such as a client version identifier of the target application program running on the terminal, which is not limited in this disclosure.
In step 302, the server determines a target hierarchical relationship based on the sharing request.
In the embodiment of the disclosure, the sharing configuration system may include a plurality of hierarchical relationships, one hierarchical relationship may be represented as a tree structure such as a decision tree, one hierarchical relationship may include a plurality of levels from top to bottom, one level includes at least one node, one hierarchical relationship may be used to record sharing styles corresponding to different sharing paths based on connection relationships between nodes of different levels, in one possible implementation, the data information indicated by the uppermost node in a hierarchical relationship may include an application identifier of an application program, the server may match the application identification in the sharing request with the data information indicated by the uppermost node in each hierarchical relationship, when the data information indicated by the uppermost node in any hierarchical relationship matches the application identifier of the target application program, the server may determine the any hierarchical relationship as the target hierarchical relationship. Specifically, taking the hierarchical relationship as a decision tree as an example, the uppermost node is a root node of the decision tree, that is, the server may match the application identifier with data information in the root node of each decision tree, and determine a target decision tree, that is, a target hierarchical relationship based on a matching result.
In step 303, the server matches each data in the sharing request with data information indicated by nodes in layers except the lowest layer in the target hierarchical relationship, so as to obtain a matching result.
In the target hierarchical relationship, the data categories of the data information indicated by each node belonging to the same hierarchy are the same, one data category may correspond to one weight, and the weight is positively correlated with the hierarchy where the data category is located, that is, the higher the weight is, the higher the hierarchy where the data category is located is, where the weight of each data category may be set by a developer, which is not limited in the embodiments of the present disclosure. Fig. 4 is a schematic diagram illustrating a target hierarchical relationship structure according to an exemplary embodiment, as shown in fig. 4, the target hierarchical relationship may include six hierarchies, and the data categories corresponding to the first hierarchy to the sixth hierarchy are respectively an application identifier, a client version, a data type of shared data, a sharing platform, a sharing style, and condition information, based on weights of the data categories.
In one possible implementation manner, the server may match each data in the sharing request with the target hierarchical relationship in a hierarchical order from top to bottom, for example, match the sharing request with each node in a hierarchy, the server may obtain a first data belonging to the data category in the sharing request based on the data category corresponding to the hierarchy, match the first data with data information in each node of the hierarchy, when the first data is successfully matched with the target node in the hierarchy, entering the next hierarchy for matching, the server acquires second data in the sharing request based on the data type of the next level, and matches the second data with data information indicated by at least one child node of the target node until all data in the sharing request are matched. Specifically, taking the target hierarchical relationship structure shown in fig. 4 as an example, the server may obtain a client version identifier in the sharing request, where the client version identifier may be an android version, match the client version identifier with client version information indicated by two nodes in the second hierarchy, determine that the client version identifier matches with the node a successfully, then, the server may obtain a data type of target data in the sharing request, match with the third hierarchy, that is, match with data type information indicated by a plurality of child nodes of the node a, when the data type is a video, the server may determine that the data type matches with the node C successfully, and finally, the server may obtain a platform identifier of a target sharing platform in the sharing request, match with the fourth hierarchy, that is, match with platform information indicated by a plurality of child nodes of the node C, when the target sharing platform is a WeChat friend, the server can determine that the platform identifier is successfully matched with the node F.
After the data of each data category in the sharing request is completely matched with the target hierarchical relationship, the server ends the data matching process, and generates a matching result, where the matching result may include a plurality of nodes respectively belonging to different hierarchies.
In step 304, the server determines at least one candidate sharing style corresponding to the target data based on the matching result.
In a possible implementation manner, the server may obtain a node with a lowest hierarchy from a plurality of nodes included in the matching result as a target node, obtain at least one child node of the target node from a node of a next hierarchy of the target node, and use a sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern. Taking the target hierarchical relationship structure shown in fig. 4 as an example, when the data included in the sharing request is an android version, video data, and a wechat friend, the matching result may include a node a, a node C, and a node F, where a node with a lowest hierarchy is the node F, and the sharing style indicated by a plurality of sub-nodes of the node F is a plurality of candidate sharing styles of the target data, for example, the candidate sharing style of the target data may include a card, an applet, a link, a picture, and the like.
It should be noted that, in the above steps 303, 303 and 304, the sharing request is matched with a target hierarchical relationship, and at least one candidate sharing pattern corresponding to the target data is determined, where the target hierarchical relationship includes a plurality of hierarchical levels from top to bottom, one of the hierarchical levels includes at least one node, the target hierarchical relationship is used for recording sharing patterns corresponding to different sharing paths based on a connection relationship between nodes of different hierarchical levels, and a lowest node in the target hierarchical relationship corresponds to a candidate sharing pattern.
In step 305, when the target data meets the data constraint condition in any lowest node, the server determines a candidate sharing style corresponding to the any lowest node as the sharing style of the target data.
In a possible implementation manner, the server may traverse the condition information in the at least one lowermost node, obtain corresponding data information from the sharing request based on each condition information, and determine whether the data information satisfies a data limitation condition, specifically, taking a lowermost node as an example, the data limitation condition in the lowermost node may be that "the number of times of forwarding the target data is greater than 5000 times", the candidate sharing style corresponding to the lowermost node may be a "card", the server may obtain the number of times of forwarding the target data from the sharing request based on the data limitation condition, determine the "card" style as the sharing style of the target data when the number of times of forwarding the target data is greater than 5000 times, and continue to perform the determination based on the condition information in the next lowermost node when the number of times of forwarding the target data is less than 5000 times, until the condition information in any of the lowermost nodes matches the data information of the target data. The data restriction condition may be set by a developer, and is not limited in this disclosure.
In a possible implementation manner, after the sharing request is matched with the target hierarchical relationship, and the sharing style of the target data is determined, the configuration result of the target data may be generated, where the configuration result may include a style identifier of the sharing style of the target data, a platform identifier of the target sharing platform, and the like, and may further include a data type, a client version, and the like, that is, the configuration result may include data information corresponding to each node that is successfully matched with the sharing request.
In step 306, the server shares the target data based on the sharing style.
In one possible implementation manner, the server may determine, based on a style identifier of the sharing style, sharing style information of the target data, parse and configure the target data based on the sharing style information, and share the configured target data to a target sharing platform, where one style identifier may be used to uniquely indicate one sharing style, and one sharing style corresponds to one sharing style information, and the sharing style information may be used to define a display style of the target data, for example, the sharing style information may be a program code for indicating a display style of the target data, and may define a document, a picture, and the like corresponding to the target data, and in an embodiment of the present disclosure, the sharing style information may include a plurality of fields, for example, each field may be used to indicate a sharing title, a sharing description, an address of a sharing picture, and the like, the sharing style information may further include typesetting information of the content displayed by the card, such as sharing titles, sharing descriptions, position information of sharing pictures, transparency, and the like. The server can analyze and configure the target data based on each field, so that the target data can be displayed in a form indicated by the sharing style after being shared to the target sharing platform. Taking the sharing style as a card style for illustration, referring to fig. 5, fig. 5 is a schematic diagram of a card sharing style shown according to an exemplary embodiment, as shown in a card 501, in a possible implementation manner, the server may parse the target data, obtain a title in the target data, as the sharing title, obtain a keyword or a keyword sentence in the target data, as the sharing description, use a picture in the target data as the sharing picture, configure the sharing title, the sharing description, and a display position of the sharing picture based on the layout information, specifically, the server may configure the sharing content in the card based on fields of position coordinates, font information, element size, and the like in the sharing style information, to configure the display style of the picture as an example, the server may configure the size of the sharing picture set in the sharing style information, adjusting the picture size of the shared picture, and determining the display position of the shared picture in the card based on the displacement reference point and the position coordinate corresponding to the shared picture, for example, the displacement reference point may be set to be "bottom and left side", the position coordinate is set to be (100 ), the position of the shared picture is the position deviating from the bottom and left side of the card, and the X-axis coordinate and the Y-axis coordinate are both 100 pixels. Certainly, the sharing title, the sharing description, and the sharing picture are also contents preset by the developer, which is not specifically limited in this embodiment, and after the server shares the configured target data, the target data is displayed in the target sharing platform in a card style.
In the disclosed embodiment, the server may adjust the target hierarchical relationship when a new sharing path is added, and in one possible implementation, the server may obtain a new sharing path, add a new node in a target level of the target level relationship based on the new sharing path, and, in particular, the server can match each data in the newly added sharing path with the data information indicated by each node in the target hierarchical relationship, obtain a data failed in matching in the newly added sharing path, based on the data type of the data and the data type corresponding to each hierarchy in the target hierarchical relationship, and determining a target level to which the data belongs in the target level relationship, and adding a new node in the target level, wherein the data information of the new node comprises the data. In the embodiment of the disclosure, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, and when a new sharing path is added, only a new node needs to be added in a target hierarchical relationship, that is, a matching item needs to be added in a sharing configuration system, and a logic code corresponding to the new sharing path does not need to be written in, so that code collision can be effectively avoided, and the maintenance efficiency of the sharing configuration system is improved.
The technical solution provided by the embodiments of the present disclosure is to receive a sharing request, where the sharing request is used to request to share target data through a target sharing path, match the sharing request with a target hierarchical relationship, determine at least one candidate sharing style corresponding to the target data, where the target hierarchical relationship is used to record sharing styles corresponding to different sharing paths based on a connection relationship between nodes of different hierarchies, where a lowest node in the target hierarchical relationship corresponds to one candidate sharing style, when the target data satisfies a data restriction condition in any lowest node, determine the candidate sharing style corresponding to any lowest node as the sharing style of the target data, perform sharing on the target data based on the sharing style, and in the above data sharing process, based on a matching result of the request and the target hierarchical relationship, the sharing style of the target data is determined, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, logic of the sharing paths does not need to be written into codes, code collision is avoided, and maintenance cost of the sharing configuration system is reduced.
Fig. 6 is a schematic diagram illustrating data interaction between a server and a sharing configuration system according to an exemplary embodiment, where as shown in fig. 6, the server may send a sharing request carrying related parameters to the sharing configuration system, and the sharing configuration system may return configuration information based on the sharing request, where the configuration information may include a platform identifier of a sharing platform, style information of shared data, and the like. In the sharing configuration system, the sharing logic is abstracted to construct a tree structure, that is, a hierarchical relationship, each node in the hierarchical relationship may correspond to one judgment condition, and one sharing logic may correspond to at least one node in the hierarchical relationship. Because a top node in the hierarchical relationship may include a program identifier of an application program, when a new application program accesses, a new hierarchical relationship may be established, and the hierarchical relationship is associated with sharing style information, which may be a code for indicating a data display style, and when a new sharing logic is added to an application program, only a node needs to be added to the hierarchical relationship corresponding to the application program, that is, only the configuration file of the application program needs to be modified without modifying the underlying code, for example, when a new sharing style is added, only a new node needs to be added to the hierarchy for indicating the sharing style, at least one node is added to a next layer of the sharing style hierarchy, and the node serves as a child node of the newly added node, and the condition information corresponding to the sharing style is added to at least one newly added child node, when a new data category is added, a level may be added to the hierarchical relationship. In the data sharing process, the sharing configuration system is applied, so that data abstraction can be performed on sharing logic, sharing configuration of various types of data in different sharing scenes can be efficiently managed, various configuration conditions are dynamically supported, and development cost and system maintenance cost are saved.
Fig. 7 is a block diagram illustrating a data sharing arrangement in accordance with an example embodiment. Referring to fig. 7, the apparatus includes a receiving unit 701, a matching unit 702, a sharing pattern determining unit 703, and a sharing unit 704.
A receiving unit 701 configured to receive a sharing request, where the sharing request is used to request to share target data through a target sharing path;
a matching unit 702, configured to match the sharing request with a target hierarchical relationship, and determine at least one candidate sharing style corresponding to the target data, where the target hierarchical relationship includes multiple hierarchical levels from top to bottom, and one of the hierarchical levels includes at least one node, the target hierarchical relationship is used to record sharing styles corresponding to different sharing paths based on a connection relationship between nodes of different hierarchical levels, and a lowest node in the target hierarchical relationship corresponds to one candidate sharing style;
a sharing style determining unit 703 configured to determine, when the target data satisfies a data limitation condition in any one of the lowest level nodes, a candidate sharing style corresponding to the any one of the lowest level nodes as a sharing style of the target data;
a sharing unit 704 configured to share the target data based on the sharing style.
In one possible implementation, the matching unit 702 is configured to:
when the data information indicated by the uppermost node in any hierarchical relationship is matched with the application identification of the target application program, determining any hierarchical relationship as the target hierarchical relationship;
matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
In one possible implementation, the matching unit 702 is configured to:
acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
In one possible implementation, the sharing unit 704 is configured to:
determining sharing style information of the target data based on the style identification of the sharing style;
And analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
In one possible implementation, the apparatus further includes:
an obtaining unit configured to obtain a newly added sharing path;
and the node adding unit is configured to add a new node in the target level of the target level relation based on the newly added sharing path.
The device provided by the embodiment of the disclosure, by receiving a sharing request, the sharing request being used for requesting to share target data through a target sharing path, matching the sharing request with a target hierarchical relationship, determining at least one candidate sharing style corresponding to the target data, the target hierarchical relationship being used for recording sharing styles corresponding to different sharing paths based on a connection relationship between nodes of different hierarchies, one lowest node in the target hierarchical relationship corresponding to one candidate sharing style, when the target data satisfies a data limitation condition in any one lowest node, determining the candidate sharing style corresponding to any one lowest node as the sharing style of the target data, performing the sharing on the target data based on the sharing style, in the above data sharing process, based on a matching result of the sharing request and the target hierarchical relationship, the sharing style of the target data is determined, a plurality of sharing paths are constructed into a hierarchical relationship, one sharing path corresponds to a plurality of nodes in the hierarchical relationship, logic of the sharing paths does not need to be written into codes, code collision is avoided, and maintenance cost of the sharing configuration system is reduced.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
FIG. 8 is a block diagram illustrating a server in accordance with an exemplary embodiment. The server 800 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 801 to implement the data sharing method provided by the above-described method embodiments. Certainly, the server may further have a wired or wireless network interface, a keyboard, an input/output interface, and other components to facilitate input and output, and the server may further include other components for implementing functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of a server to perform the above method. Alternatively, the storage medium may be a non-transitory storage medium, for example, which may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method for sharing data, comprising:
receiving a sharing request, wherein the sharing request is used for requesting to share target data through a target sharing path;
matching the sharing request with a target hierarchy relationship, and determining at least one candidate sharing pattern corresponding to the target data, wherein the target hierarchy relationship comprises a plurality of hierarchies from top to bottom, one hierarchy comprises at least one node, the target hierarchy relationship is used for recording sharing patterns corresponding to different sharing paths based on connection relationships among nodes of different hierarchies, and one lowest node in the target hierarchy relationship corresponds to one candidate sharing pattern;
When the target data meets the data limitation condition in any lowest node, determining a candidate sharing pattern corresponding to the any lowest node as the sharing pattern of the target data;
and sharing the target data based on the sharing style.
2. The data sharing method according to claim 1, wherein the matching the sharing request with a target hierarchical relationship and the determining at least one candidate sharing style corresponding to the target data comprises:
when data information indicated by the uppermost node in any hierarchical relationship is matched with an application identifier of a target application program, determining any hierarchical relationship as the target hierarchical relationship;
matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
3. The data sharing method according to claim 2, wherein the determining, based on the matching result, at least one candidate sharing style corresponding to the target data includes:
Acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
4. The data sharing method according to claim 1, wherein the sharing the target data based on the sharing style includes:
determining sharing style information of the target data based on the style identification of the sharing style;
and analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
5. The data sharing method according to claim 1, further comprising:
acquiring a newly added sharing path;
and adding a new node in the target level of the target level relation based on the newly added sharing path.
6. A data sharing apparatus, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive a sharing request, and the sharing request is used for requesting to share target data through a target sharing path;
The matching unit is configured to match the sharing request with a target hierarchy relationship, and determine at least one candidate sharing style corresponding to the target data, wherein the target hierarchy relationship comprises a plurality of hierarchies from top to bottom, one hierarchy comprises at least one node, the target hierarchy relationship is used for recording sharing styles corresponding to different sharing paths based on connection relationships among nodes of different hierarchies, and a lowest node in the target hierarchy relationship corresponds to one candidate sharing style;
the sharing style determining unit is configured to determine a candidate sharing style corresponding to any lowest node as a sharing style of the target data when the target data meets a data limitation condition in the any lowest node;
a sharing unit configured to share the target data based on the sharing style.
7. The data sharing apparatus according to claim 6, wherein the matching unit is configured to:
when data information indicated by the uppermost node in any hierarchical relationship is matched with an application identifier of a target application program, determining any hierarchical relationship as the target hierarchical relationship;
Matching each data in the sharing request with data information indicated by nodes in each layer except the lowest layer in the target hierarchical relationship to obtain a matching result, wherein the matching result comprises a plurality of nodes belonging to different levels respectively;
and determining at least one candidate sharing style corresponding to the target data based on the matching result.
8. The data sharing apparatus according to claim 7, wherein the matching unit is configured to:
acquiring a node with the lowest hierarchy from a plurality of nodes contained in the matching result as a target node;
and acquiring at least one child node of the target node from the node of the next level of the target node, and taking the sharing pattern indicated by the at least one child node as the at least one candidate sharing pattern.
9. The data sharing apparatus according to claim 6, wherein the sharing unit is configured to:
determining sharing style information of the target data based on the style identification of the sharing style;
and analyzing and configuring the target data based on the sharing style information, and sharing the configured target data to a target sharing platform.
10. The data sharing apparatus according to claim 6, wherein the apparatus further comprises:
an obtaining unit configured to obtain a newly added sharing path;
and the node adding unit is configured to add a new node in a target level of the target level relationship based on the newly added sharing path.
11. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data sharing method of any one of claims 1 to 5.
12. A computer-readable storage medium whose instructions, when executed by a processor of a server, enable the server to perform a data sharing method as claimed in any one of claims 1 to 5.
CN201911241233.XA 2019-12-06 2019-12-06 Data sharing method, device, server and storage medium Active CN112929398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911241233.XA CN112929398B (en) 2019-12-06 2019-12-06 Data sharing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911241233.XA CN112929398B (en) 2019-12-06 2019-12-06 Data sharing method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN112929398A CN112929398A (en) 2021-06-08
CN112929398B true CN112929398B (en) 2022-07-29

Family

ID=76162386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911241233.XA Active CN112929398B (en) 2019-12-06 2019-12-06 Data sharing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112929398B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9330116B2 (en) * 2013-03-15 2016-05-03 Oracle International Corporation Determining hierarchical paths to nodes
CN105049290B (en) * 2015-08-11 2018-04-27 精硕科技(北京)股份有限公司 Page access monitoring method and device
CN108153797A (en) * 2016-12-02 2018-06-12 北京国双科技有限公司 The recognition methods of target object and device
CN108268521A (en) * 2016-12-30 2018-07-10 北京国双科技有限公司 Propagation path map generalization method and device
CN106909286A (en) * 2017-02-28 2017-06-30 宇龙计算机通信科技(深圳)有限公司 A kind of information sharing method and device based on terminal
CN108289057B (en) * 2017-12-22 2020-01-21 北京达佳互联信息技术有限公司 Video editing method and device and intelligent mobile terminal

Also Published As

Publication number Publication date
CN112929398A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
Krishnaraj et al. An efficient radix trie‐based semantic visual indexing model for large‐scale image retrieval in cloud environment
CN111427766B (en) Request processing method and device and proxy server
CN111901294A (en) Method for constructing online machine learning project and machine learning system
JP7397094B2 (en) Resource configuration method, resource configuration device, computer equipment, and computer program
CN112800095B (en) Data processing method, device, equipment and storage medium
TWI682335B (en) Data object display method and device
CN111163072B (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN110784498A (en) Personalized data disaster tolerance method and device
CN109343962A (en) Data processing method, device and distribution service
US20140365960A1 (en) Method and apparatus for page view switching
CN110737425B (en) Method and device for establishing application program of charging platform system
CN112650804B (en) Big data access method, device, system and storage medium
CN112929398B (en) Data sharing method, device, server and storage medium
US11205092B2 (en) Clustering simulation failures for triage and debugging
JP2020129359A (en) Method, apparatus, facility, and medium for managing knowledge base
CN112691382B (en) Resource processing method, device and computer readable storage medium
US10523591B2 (en) Discovering resource availability across regions
CN112148461A (en) Application scheduling method and device
CN113608737A (en) Page generation method, device, equipment and medium
CN113726855A (en) Service aggregation method, device, electronic equipment and computer-readable storage medium
US8554757B2 (en) Determining a score for a product based on a location of the product
CN114374595B (en) Event node attribution analysis method, device, electronic equipment and storage medium
CN108737133A (en) Method and device for CDN static network reparations
CN113642295B (en) Page typesetting method, device and computer program product
KR20170111104A (en) Method and system for managing business card using hash tag

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