Sharing method and device, electronic equipment and storage medium
By determining and sending the target search identifier to update the search conditions in the URL, the user information leakage caused by the parameters in the URL containing privacy information is solved, and the encryption of user privacy and the stability of the URL is achieved.
Patent Information
- Application Number
- CN202411544701.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, parameters in the URL may contain user's privacy information or important information, resulting in user information being leaked when sharing the URL or encountering cross-site network attacks.
By obtaining the first search information sent by the first device, including the first search condition and the first user ID, the target search identifier is determined, and the target search identifier is sent to the first device, so that it updates the search conditions in the URL, thereby raising the first device, thereby The second device shares the updated URL.
It implements encryption of user privacy, prevents user information from being leaked when sharing URLs or cross-site network attacks, and simplifies search conditions in URLs and avoids URL failure problems caused by excessive search conditions.
Smart Images

Figure CN119474568A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of browser technology, and in particular to a sharing method, device, electronic device and storage medium. Background Art
[0002] At present, the method of sharing search conditions using the uniform resource locator (URL) of the browser generally involves sharing the URL generated based on the search conditions with the second user after the first user enters the search conditions. The second user enters the obtained URL into the browser and can browse to the same browsing interface as the first user.
[0003] However, since the parameters in the URL may include the user's private information or important information, when the first user shares the URL with the second user, or is attacked by a cross-site request forgery, the user information may be leaked. Therefore, it is urgent to propose a new method to solve the above problem. Summary of the invention
[0004] The present invention provides a sharing method, device, electronic device and storage medium, which solves the problem in the prior art that parameters in a URL may include a user's private information or important information, thereby causing the user information to be leaked when the URL is shared or encounters a cross-site network attack, and realizes the encryption of user privacy.
[0005] According to one aspect of the present invention, there is provided a sharing method, the method comprising:
[0006] Acquire first search information sent by the first device, wherein the first search information includes a first search condition and a first user identifier;
[0007] Determine a target search identifier according to the first search condition and the first user identifier;
[0008] The target search identifier is sent to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0009] According to another aspect of the present invention, there is provided a sharing device, the device comprising:
[0010] An acquisition module, configured to acquire first search information sent by the first device, wherein the first search information includes a first search condition and a first user identifier;
[0011] A determination module, configured to determine a target search identifier according to a first search condition and a first user identifier;
[0012] The sending module is used to send the target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the sharing method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sharing method described in any embodiment of the present invention when executed.
[0018] The sharing method provided by the embodiment of the present invention obtains the first search information sent by the first device; determines the target search identifier according to the first search condition and the first user identifier; sends the target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device. In the above technical scheme, on the one hand, the user's search condition is converted into a search identifier, and the user's search condition is encrypted in the form of the search identifier, thereby realizing the protection of user privacy. At the same time, since the target search identifier is determined after screening and merging the condition fields in the first search condition, the target search identifier can be more concise and clear compared to the first search condition. On the other hand, the first search condition in the original URL is replaced by the target search identifier, which solves the problem in the prior art that the parameters in the URL may include the user's privacy information or important information, thereby causing the leakage of user information when sharing the URL or encountering a cross-site network attack, thereby realizing the encryption of user privacy.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A schematic diagram of a flow chart of a sharing method provided by an embodiment of the present invention;
[0022] Figure 2 A flowchart of another sharing method provided by an embodiment of the present invention;
[0023] Figure 3 An example diagram of a project management system provided by an embodiment of the present invention;
[0024] Figure 4 Another example diagram of a project management system provided by an embodiment of the present invention;
[0025] Figure 5 Another example diagram of a project management system provided by an embodiment of the present invention;
[0026] Figure 6 A flowchart of another sharing method provided by an embodiment of the present invention;
[0027] Figure 7 A structural schematic diagram of a sharing device provided by an embodiment of the present invention;
[0028] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Figure 1 The present invention provides a flow chart of a sharing method according to an embodiment of the present invention. This embodiment is applicable to a case where a first user shares a uniform resource locator URL with a second user. The method can be executed by a sharing device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. In this embodiment, the electronic device can be a computer, a server or a terminal, and can interact with a first device of the first user and a second device of the second user. Figure 1 As shown, the method includes:
[0032] S101. Obtain first search information sent by a first device.
[0033] The first search information includes the first search condition and the first user identifier. In this embodiment, the first device may be a terminal device of the first user, such as a mobile phone or a personal computer, or may be a device other than the first user, such as a public computer. In addition, in this embodiment, the first user identifier is a user identifier corresponding to the first user currently using the first device. The first search condition is a search condition entered by the first user in the first device.
[0034] Specifically, when the first user browses a web page, an online office system or other browser interface that generates a URL through the first device, if the first user enters a search condition in the browser interface, the first device will send the first search information to the sharing device. The first search information is obtained by the first device packaging the search condition entered by the first user in the browser interface with the user identifier of the first user, that is, the first search information includes the first search condition and the first user identifier.
[0035] For example, after the first user logs in to the first device, he uses the first device to browse a certain browser interface and enters a "search condition" in the interface. At this time, the first device can determine the first user identifier according to the login information of the first user, and generate the first search condition according to the "search condition" entered by the first user in the interface.
[0036] S102: Determine a target search identifier according to the first search condition and the first user identifier.
[0037] Specifically, in one implementation, a sharing device stores historical search records. The historical search records record multiple users and historical search conditions corresponding to the multiple users. Among them, one user may correspond to one or more historical search conditions, and a search identifier is determined based on a historical search condition. Therefore, based on the first search condition and the first user identifier, the historical user corresponding to the first user identifier can be found from the historical search records, and based on the historical user corresponding to the first user identifier, the historical search condition consistent with the first search condition can be determined. After the historical search condition consistent with the first search condition is determined, the search identifier determined by the historical search condition can be obtained, and this search identifier is the target search identifier.
[0038] In another implementation, if the sharing device does not store historical search records, or the historical user that is consistent with the first search condition or corresponding to the first user identifier cannot be determined from the historical search records according to the above method, the target search identifier can be directly determined according to the first search condition. For example, the condition field corresponding to this condition can be determined according to the first search condition. This condition field is screened and merged with the same type of condition fields related to the condition field to obtain a merged result, and the target search identifier corresponding to the merged result is obtained. And, if after obtaining the target search identifier, the first user changes the first search condition, for example, the corresponding condition field determined by the changed first search condition is the same type of condition field as the corresponding condition field determined by the first search condition before the change, then the condition field in the merged result corresponding to the target search condition can be directly updated, thereby completing the update of the merged result corresponding to the target search identifier without changing the target search identifier itself.
[0039] In this embodiment, the target search identifier is determined according to the first search condition and the first user identifier. That is, the user's search condition is converted into a search identifier, and the user's search condition is encrypted in the form of a search identifier, thereby protecting the user's privacy. At the same time, since the target search identifier is determined after screening and merging the condition fields in the first search condition, the target search identifier can be more concise and clear compared to the first search condition.
[0040] S103: Send a target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0041] The second device is a device used by the second user. In this embodiment, the second device can be the same device as the first device, such as a public device, or can be a private device of the second user, such as a mobile phone, computer, or notebook.
[0042] Specifically, after determining the target search identifier, the target search identifier can be sent to the first device. After receiving the target search identifier, the first device replaces the first search condition in the original URL generated by the first user when logging into the current browsing interface with the target search identifier. At this time, the first user can send the updated URL to the second device of the second user through the first device or other devices, so that the first user can share the updated URL with the second user.
[0043] The first search condition of the original URL may be empty, or may be the privacy information of the first user and the information of the currently browsed page.
[0044] For example, the first search condition of the original URL is empty, which may be the main interface or login interface of a certain browsing page in practice. The first search condition of the original URL is the privacy information of the first user, which may be the user login interface of a certain browsing page in practice. The first search condition of the original URL is the information of the current browsing page, which may be the next interface of the main interface after the first user enters from a link in the main interface of a certain browsing page in practice.
[0045] In this embodiment, a target search identifier is sent to the first device so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, that is, the first search condition in the original URL is replaced with the target search identifier, which solves the problem in the prior art that the parameters in the URL may include the user's privacy information or important information, thereby causing the user information to be leaked when sharing the URL or encountering a cross-site network attack, and realizes the encryption of user privacy.
[0046] The sharing method provided by the embodiment of the present invention obtains the first search information sent by the first device; determines the target search identifier according to the first search condition and the first user identifier; sends the target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device. In the above technical scheme, on the one hand, the user's search condition is converted into a search identifier, and the user's search condition is encrypted in the form of the search identifier, thereby realizing the protection of user privacy. At the same time, since the target search identifier is determined after screening and merging the condition fields in the first search condition, the target search identifier can be more concise and clear compared to the first search condition. On the other hand, the first search condition in the original URL is replaced by the target search identifier, which solves the problem in the prior art that the parameters in the URL may include the user's privacy information or important information, thereby causing the leakage of user information when sharing the URL or encountering a cross-site network attack, thereby realizing the encryption of user privacy.
[0047] Figure 2 A flow chart of another sharing method provided for an embodiment of the present invention. Based on the above embodiment and other optional schemes, this embodiment takes a certain project management system as an example to elaborate on the steps of "determining the target search identifier according to the first search condition and the first user identifier", the step of "after determining the target search identifier" and other optional schemes.
[0048] In the introduction Figure 2 Before describing the sharing method, a brief introduction to the current existing technology is given.
[0049] At present, for relatively complex and collaborative systems such as project management systems, documents, projects, pages corresponding to projects, and even search conditions selected by users need to be options that can be shared and collaborated. For example, a first user hopes to share his search conditions in a project management system with a second user in front of a remote conference or other device. For example, the first user enters "project A and project B" in real time in the project management system, and continues to enter "show sub-projects a, b, and c in project A" to enable the first user and the second user to see real-time, consistent data or pages through the shared search conditions, thereby facilitating discussion and collaboration. In the prior art, this function is usually achieved by the first user copying the browser URL, sharing the URL with the second user, and then sharing the web page interface between the first user and the second user. However, the parameters in the currently shared URL may contain other information related to the privacy of the first user, such as the search conditions of the first user, the project to which the first user belongs, and the authorization information (access token) of the first user. This will lead to the leakage of the privacy of the first user. Also, when the first user's search criteria are long or complex, the URL shared with the second user may become invalid due to the length of the URL being limited. Furthermore, since some URLs are time-limited, if the first user shares a URL with the second user and the second user does not have time to use the shared URL, once the corresponding underlying browser data in the URL changes, the URL will become invalid.
[0050] Based on the above introduction, continue to refer to Figure 2 As shown in the method. Figure 2 As shown, the method includes:
[0051] S201. Obtain first search information sent by a first device.
[0052] Specifically, after the first user logs in to the project management system through the first device, if the first user enters search conditions in the browser interface that generates the URL, the first device will send the first search information to the sharing device.
[0053] For example, Figure 3 This is an example diagram of a project management system provided by an embodiment of the present invention. Figure 3 As shown, after the first user logs in to the project management system through the first device, the current browser interface will automatically generate an original URL, such as Figure 3The URL shown in . In order to ensure privacy, the URL parameters shown here are simply represented by A, x, y, and 12345. For example, the URL is: https: / A.com.cn / x / y / myProject / base? projectld=12345. When the first user logs in to the project management system for the first time using the first device, that is, the search condition has not been entered, for example Figure 3 When the first user enters a search condition (ie, a first search condition) through the first device, for example Figure 4 The interface shown in . Figure 4 Another example diagram of a project management system provided by an embodiment of the present invention. Figure 4 In the example, when the first user selects a project through "v" of "belonging project", the selected "project A" is the first search condition. At this time, the first device can combine the first search condition and the first user identifier of the first user into the first search information and send it to the sharing device. Then, the sharing device can obtain the first search information sent by the first device.
[0054] S202: Determine a summary parameter according to the first search condition and the first user identifier.
[0055] Specifically, before sending the first search identifier to the sharing device, the first device places the complex data structure included in the first search condition, such as an array or JS key-value pair data (JavaScript Object Notation, JSON), in the request body and sends it to the sharing device together with the first user identifier. Therefore, after the sharing device receives the first search information sent by the first device, a summary parameter can be calculated based on the first search condition and the first user identifier in the first search information, for example, using a hash function to calculate the hash value of the first search condition and the first user identifier.
[0056] S203, determining whether there is a historical summary parameter with the same value as the summary parameter in the historical data table; if so, executing S204; if not, executing S205.
[0057] The historical summary parameter is generated based on the historical search condition, and one historical summary parameter corresponds to one historical search identifier. The historical data table is a data record table of historical search records stored in the sharing device. In this embodiment, the historical data table stores different historical summary parameters determined based on different historical search conditions and historical user identifiers. And, each historical search condition corresponds to one historical search identifier.
[0058] Specifically, since the historical data table stores historical search conditions, historical user identifiers, and historical summary parameters corresponding to the historical search conditions and the historical user identifiers, it is possible to determine based on the historical data table whether the value of the summary parameter calculated based on the first search condition and the first user identifier exists in a historical summary parameter that is the same as the value of the historical summary parameter stored in the historical data table. If so, it means that the historical search conditions of the first user in the historical process may be consistent with the first search conditions. Therefore, S204 can be executed. If not, it means that the historical search conditions of the first user in the historical process may be inconsistent with the first search conditions, or the first user did not perform any search in the historical process. Therefore, S205 needs to be executed.
[0059] S204: Determine a target search identifier according to the historical summary parameter having the same value as the summary parameter and the first search condition.
[0060] Specifically, since the historical data table also stores the historical search identifier corresponding to each historical search condition, after determining that there is a historical summary parameter with the same value as the summary parameter in the historical data table, it is possible to first determine whether the historical search condition corresponding to the historical summary parameter is the same as the first search condition. When the historical search condition is the same as the first search condition, the historical search identifier corresponding to the historical search condition can be directly used as the target search identifier.
[0061] Exemplarily, this step may determine the target search identifier according to the following process:
[0062] (1) Determine whether the historical search condition that generates the historical summary parameter having the same value as the summary parameter is completely consistent with the first search condition.
[0063] Specifically, since the first device places the first search condition in the request body before sending the first search identifier to the sharing device, when it is determined that the value of the historical summary parameter is the same as the value of the currently calculated summary parameter, it can be determined whether the first search condition in the request body is completely consistent with the historical search condition corresponding to the historical summary parameter stored in the historical data table.
[0064] For example, the first search condition may be presented in a request body as follows: {"projectIds":["query project identifier"], "searchConditions":[{"displayName":"query field name", "fieldType":"query field type", "values":["query value"]}]}. Among them, "value" is defined as a json object, which can receive various values or complex content. Therefore, it can be determined based on each part in the request body whether the first search condition is completely consistent with the historical search condition.
[0065] (2-1) If they are completely consistent, a historical search identifier corresponding to a historical summary parameter having the same value as the summary parameter is generated as the target search identifier.
[0066] Specifically, if the historical search condition is completely consistent with the first search condition, the historical search identifier corresponding to the historical search condition in the historical data table can be directly used as the target search identifier.
[0067] (2-2) If they are not completely consistent, a target search identifier is generated according to the first search condition.
[0068] Specifically, if the historical search condition is not completely consistent with the first search condition, it is necessary to generate a target search identifier according to the first search condition.
[0069] In this embodiment, the summary parameter is calculated by the first search condition and the first user identifier, and it is determined from the historical data table whether there is a historical summary parameter consistent with the calculated summary parameter according to the summary parameter, and after it is determined that there is a historical summary parameter consistent with the summary parameter, it is determined whether the historical search condition corresponding to the historical summary parameter is completely consistent with the first search condition, thereby determining whether the historical search identifier can be directly used as the target search identifier. That is, by using the corresponding relationship between the user identifier, the search condition and the search identifier, it is possible to quickly determine and obtain the target search identifier.
[0070] S205: Generate a target search identifier according to the first search condition.
[0071] Specifically, if there is no historical summary parameter with the same value as the summary parameter in the historical data table, it is necessary to directly generate a target search identifier according to the first search condition.
[0072] Exemplarily, generating a target search identifier according to the first search condition may be performed according to the following steps:
[0073] (1) Obtain a target field group and split the target field group to obtain at least two candidate fields;
[0074] The first search condition includes at least one sub-condition. The target field group is the request body including the first search condition.
[0075] For example, if the first search condition is "project options", the target field group that can be obtained according to the first search condition is as follows:
[0076]
[0077] "displayName" is the display name. "fieldName" is the field group name, that is, the name of the target field group. "values" is the content. In this embodiment, displayName is the total display name of the current project, that is, the corresponding Figure 3 "Project: Please select a project" in the text box. fieldName is the name of all fields of the same type or name corresponding to the current display name, such as "A (each project has this option), B (Project 1 option), C (Project 2 option), and D (Project 3 option)". And, after the first user selects the drop-down option, fieldName is the name of the option selected by the first user, such as Figure 4 "Project A" in the example. values are all the fields of the same type or name that correspond to the current display name, such as "A (each project has this option), B (Project 1 option), C (Project 2 option), and D (Project 3 option)".
[0078] For example, by splitting the target field group, we can get:
[0079]
[0080]
[0081] Among them, by splitting the target field group, we can get the target field of "D (item 3 option)", the target field of "C (item 2 option)" and the target field of "B (item 1 option)".
[0082] (2) Filter the target field from the candidate fields.
[0083] Among them, one sub-condition corresponds to one target field.
[0084] For example, if the first search condition is "option C and option D", the target field of ""D(option for item 3)"" and the target field of ""C(option for item 2)"" obtained by splitting as shown above can be screened out. Among them, the candidate fields are the target field of ""D(option for item 3)"", the target field of ""C(option for item 2)"" and the target field of ""B(option for item 1)"", and the target field can be determined as the target field of ""D(option for item 3)"" and the target field of ""C(option for item 2)"" according to the sub-conditions.
[0085] (3) Merge all target fields to obtain the target search identifier.
[0086] Exemplarily, after determining the target field ""D(Project 3 Option)"" and the target field ""C(Project 2 Option)"", the target field ""D(Project 3 Option)"" and the target field corresponding to the target field ""C(Project 2 Option)"" can be merged to obtain a target search identifier. The content of the target search identifier is as shown in each of the above target fields, and the target search identifier itself is the string shown in ""fieldId"" in the above target field. For example, if the first search condition is only "D Project", the target search identifier finally obtained can be "d78ab67f26f84ac9ad63508ae6dd167a".
[0087] In this embodiment, since the field content corresponding to the target search identifier can be filtered, changed and merged according to the sub-conditions and the target fields, it can be ensured that when the sub-conditions corresponding to the first search condition are fields of the same type or name, there is no need to change the target search identifier itself, but directly update the target field in the field content corresponding to the target search identifier.
[0088] S206: Determine the search result corresponding to the target search identifier, and send the search result to the first device.
[0089] Specifically, after determining the target search identifier, the search results corresponding to the target search identifier may be determined, and the search results may be sent to the first device so that the first user may browse the search results.
[0090] For example, Figure 3 and Figure 4 As shown, if the first user is Figure 3 In the "Select an item" of the "Enter the first search condition" as "Item A". After generating the target search identifier as shown above, the sharing device can determine the corresponding search result according to the target search identifier and send the search result to the first device so that the first user can see the result as shown above. Figure 4 The interface shown.
[0091] S207: Send a target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0092] Specifically, after determining the target search identifier, the target search identifier can be sent to the first device. After receiving the target search identifier, the first device replaces the first search condition in the original URL generated by the first user when logging into the current browsing interface with the target search identifier. At this time, the first user can send the updated URL to the second device of the second user through the first device or other devices, so that the first user can share the updated URL with the second user.
[0093] For example, Figure 5 This is another example diagram of a project management system provided by an embodiment of the present invention. Figure 5 As shown, after the sharing device sends the target search identifier to the first device, the first device updates the URL. Figure 5 The updated contents are:
[0094] “&searchld=cb5a7777d34099bd7fdec23af9a99”. That is, since the original URL corresponds to the main interface of the project management system, the first device only adds updated content to the original URL based on the target search identifier.
[0095] For example, Figure 5 The current interface of the first user is shown. If the first user changes the "belonging project" through the first device, that is, the first user clicks the drop-down button and changes "Project A" to "Project C". At this time, the first device will update the first search condition and send it to the sharing device again. The sharing device will directly update the content in the target search identifier, that is, update the target field in the target field group, but will not change the target search identifier. That is, when the added custom field or the value of the custom field of the business object associated with the target search identifier changes, the target search identifier remains unchanged, and only the target field in the content of the target search identifier will be updated, and the URL updated using the target search identifier will not change.
[0096] It is worth noting that due to Figure 3-Figure 5 What is displayed is from the main interface of the project management system to the sub-interface of the main interface, so Figure 3 and Figure 4 The "search condition" of the URL in the method is relatively short. However, in actual situations, if the user is in a sub-interface or using other browsers, the "first search condition" entered is relatively complex or long. In this case, the "search condition" of the original URL will be very long. The "target search identifier" obtained by this method will be concise and clear.
[0097] In this embodiment, based on the sub-conditions included in the first search condition and the target field group corresponding to the first search condition, the target field corresponding to the sub-condition is screened and determined from the target field obtained by splitting the target field group, and the target field is merged into the content corresponding to the target search identifier to obtain the target search identifier. That is, the query string corresponding to the first search condition, which may be very long, is replaced by a short target search identifier, which solves the problem that the URL arrangement exceeds the length limit and becomes invalid due to the long first search condition, and replaces the parameters corresponding to the first search condition in the URL with a relatively short and refined target search identifier, ensuring that the URL will not become invalid due to the length exceeding the limit. At the same time, it can also ensure the stability and availability of the URL when the search conditions are relatively complex or there are a large number of complex data structure parameters. In addition, since the target search identifier in the updated URL will not be updated due to the change of the first search condition, only the field content corresponding to the target search identifier will be changed, therefore, the updated URL will not be invalidated by the change of the original data, and the shared link can still obtain the query results, reducing the problem of the URL becoming invalid due to the change of the original data.
[0098] The sharing method provided by the embodiment of the present invention, on the one hand, calculates the summary parameter through the first search condition and the first user identifier, and determines from the historical data table whether there is a historical summary parameter consistent with the calculated summary parameter according to the summary parameter, and after determining that there is a historical summary parameter consistent with the summary parameter, determines whether the historical search condition corresponding to the historical summary parameter is completely consistent with the first search condition, so as to determine whether the historical search identifier can be directly used as the target search identifier. That is, by the corresponding relationship between the user identifier, the search condition and the search identifier, it is realized to quickly determine and obtain the target search identifier. On the other hand, since the field content corresponding to the target search identifier can be screened, changed and merged according to the sub-condition and the target field, it can be ensured that when the sub-condition corresponding to the first search condition is a field of the same type or the same name, it is not necessary to change the target search identifier itself, but directly update the target field in the field content corresponding to the target search identifier. Finally, based on the sub-condition included in the first search condition, the target field group corresponding to the first search condition, the target field corresponding to the sub-condition is screened and determined from the target field obtained by splitting the target field group, and the target field is merged into the content corresponding to the target search identifier to obtain the target search identifier. That is, the query string corresponding to the first search condition, which may be very long, is replaced with a short target search identifier, which solves the problem of the URL as a whole exceeding the length limit and becoming invalid due to the long first search condition, and replaces the parameters corresponding to the first search condition in the URL with a relatively short and refined target search identifier, ensuring that the URL will not become invalid due to excessive length. At the same time, it can also ensure the stability and availability of the URL when the search conditions are more complex or there are a large number of complex data structure parameters. In addition, since the target search identifier in the updated URL will not be updated due to changes in the first search condition, only the field content corresponding to the target search identifier will be changed. Therefore, the updated URL will not be invalidated by changes in the original data, and the shared link can still obtain the query results, reducing the problem of the URL becoming invalid due to changes in the original data.
[0099] Figure 6 This is a flow chart of another sharing method provided by an embodiment of the present invention. Based on the above embodiments and other optional solutions, this embodiment describes in detail the process in which the second user uses the second device to browse to the same browsing interface as the first user after receiving the updated URL shared by the first user. Figure 6 As shown, the method includes:
[0100] S601. Obtain first search information sent by a first device.
[0101] Specifically, after the first user logs in to the project management system through the first device, if the first user enters search conditions in the browser interface that generates the URL, the first device will send the first search information to the sharing device.
[0102] S602: Determine a target search identifier according to the first search condition and the first user identifier.
[0103] Specifically, the target search identifier may be determined in the manner described in the above embodiment, which will not be described in detail herein.
[0104] S603: Send a target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0105] Specifically, after determining the target search identifier, the target search identifier can be sent to the first device. After receiving the target search identifier, the first device replaces the first search condition in the original URL generated by the first user when logging into the current browsing interface with the target search identifier. At this time, the first user can send the updated URL to the second device of the second user through the first device or other devices, so that the first user can share the updated URL with the second user.
[0106] S604: Obtain second search information sent by the second device based on the updated URL.
[0107] The second search information at least includes a target search identifier.
[0108] Specifically, after the first user shares the updated URL with the second device of the second user based on the first device, the second device can parse the URL and obtain the target search identifier. And after obtaining the target search identifier, the second device sends the target search identifier or the second user identifier of the second user to the sharing device. At this time, the sharing device can obtain the second search information.
[0109] S605: Determine the search result corresponding to the target search identifier.
[0110] Specifically, since the search results corresponding to the target search identifier are also stored in the historical data table, the sharing device can directly determine the search results corresponding to the target search identifier from the historical data table based on the target search identifier.
[0111] For example, if the second user is a random user, after obtaining a URL shared by any user (which may not be a URL updated by this method), the second device is used to send the second search information to the sharing device. At this time, the sharing device will first determine whether there is a record corresponding to the search identifier or search condition in the second search information in the historical data table. If not, an error report will be directly fed back to the second device.
[0112] S606: Obtain a first search condition corresponding to the target search identifier.
[0113] Specifically, the second search information also includes a second user identifier, so the second user's authority can be determined based on the second user identifier, thereby filtering the search results according to the second user's authority. In order to determine whether the second user has the authority to browse all search results, the first search condition corresponding to the target search identifier needs to be obtained first.
[0114] S607: Use the second user identifier to filter the first search condition to determine the second search condition.
[0115] The second user identifier is an identifier used to determine the authority of the second user.
[0116] Specifically, since the first search condition can determine the target field included in the target field group, the fields in the target field group determined by the first search condition can be screened according to the second user identifier, thereby updating the target field and determining the second search condition.
[0117] For example, the first search condition is "Project C and Project D", and the sub-conditions of the first search condition are Project C and Project D. At this time, the target search identifier generated according to the first search condition includes the target fields of Project C and Project D. If the second user does not have the permission to view Project D, then at this time, the first search condition can be filtered according to the second user identifier, and the second search condition obtained is "Project C".
[0118] S608: Filter the search results using the second search condition.
[0119] Specifically, in one implementation, the target search identifier is directly updated using the second search condition. In this implementation, the target search identifier may change. In another implementation, based on the second search condition, all target fields included in the content of the current target search identifier are rescreened, and the screened target fields are re-merged. At this time, although the content of the target search identifier has changed, the target search identifier itself (the parameters of the target search identifier) will not change. In addition, after the target search identifier is updated, or the content of the target search identifier is updated, the search results corresponding to the target search identifier will also be filtered synchronously.
[0120] In this embodiment, the first search condition is filtered according to the second user identifier, thereby filtering the search results according to the authority of the user currently using the URL, and increasing the access authority when using the URL to share the website page.
[0121] S609: Send the search results to the second device.
[0122] Specifically, after filtering the search results using the second search condition, the sharing device sends the search results to the second device, so that the second device displays the search results after the permission filtering to the second user.
[0123] In the sharing method provided by the embodiment of the present invention, after the second user receives the updated URL shared by the first user, when the second user uses the second device to browse the same browsing interface as the first user, the sharing device obtains the second search information sent by the second device based on the updated URL; determines the search results corresponding to the target search identifier; obtains the first search condition corresponding to the target search identifier; uses the second user identifier to filter the first search condition to determine the second search condition; uses the second search condition to filter the search results; and sends the search results to the second device. In the above technical solution, the first search condition is filtered according to the second user identifier, so that the search results are filtered according to the authority of the user currently using the URL, and the access authority is increased when the URL is used to share the website page.
[0124] Figure 7 A structural diagram of a sharing device provided by an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0125] An acquisition module 701 is configured to acquire first search information sent by a first device, wherein the first search information includes a first search condition and a first user identifier;
[0126] A determination module 702, configured to determine a target search identifier according to a first search condition and a first user identifier;
[0127] The sending module 703 is configured to send the target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
[0128] Optionally, the determination module 702 is specifically configured to:
[0129] Determine a summary parameter according to a first search condition and a first user identifier; determine whether there is a historical summary parameter with the same value as the summary parameter in the historical data table, wherein the historical summary parameter is generated based on the historical search condition and one historical summary parameter corresponds to one historical search identifier; if so, determine a target search identifier according to the historical summary parameter with the same value as the summary parameter and the first search condition; if not, generate a target search identifier according to the first search condition.
[0130] Optionally, the first search condition includes at least one sub-condition; and the target search identifier is generated according to the first search condition, and the determination module 702 is specifically used to:
[0131] A target field group is obtained and split to obtain at least two candidate fields; a target field is filtered from the candidate fields, wherein one sub-condition corresponds to one target field; and all target fields are merged to obtain a target search identifier.
[0132] Optionally, after determining the target search identifier, the sending module 703 is further used to:
[0133] Determine the search result corresponding to the target search identifier, and send the search result to the first device.
[0134] Optionally, the device further includes: a second determining module; the second determining module is specifically configured to:
[0135] Obtain second search information sent by the second device based on the updated URL, wherein the second search information at least includes a target search identifier; determine a search result corresponding to the target search identifier, and send the search result to the second device.
[0136] Optionally, the second search information further includes a second user identifier; before sending the search results to the second device, the second determination module is further configured to:
[0137] A first search condition corresponding to the target search identifier is obtained, wherein the first search condition includes at least one sub-condition; the first search condition is screened using the second user identifier to determine a second search condition; and the search results are filtered using the second search condition.
[0138] The sharing device provided in the embodiment of the present invention can execute the sharing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0139] Figure 8A schematic diagram of the structure of an electronic device 8 provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0140] like Figure 8 As shown, the electronic device 8 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 8 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0141] A number of components in the electronic device 8 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 8 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0142] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the sharing method.
[0143] In some embodiments, the sharing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 8 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sharing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the sharing method in any other appropriate manner (e.g., by means of firmware).
[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0145] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0146] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A sharing method, characterized in that: The method comprises: Acquire first search information sent by the first device, wherein the first search information includes a first search condition and a first user identifier; Determine a target search identifier according to the first search condition and the first user identifier; The target search identifier is sent to the first device, so that the first device updates the first search condition included in a uniform resource locator (URL) to the target search identifier, and shares the updated URL with the second device.
2. The sharing method according to claim 1, characterized in that: The step of determining a target search identifier according to the first search condition and the first user identifier includes: Determining summary parameters according to the first search condition and the first user identifier; Determine whether there is a historical summary parameter in the historical data table that has the same value as the summary parameter, wherein the historical summary parameter is generated based on the historical search condition, and one historical summary parameter corresponds to one historical search identifier; If so, determining the target search identifier according to the historical summary parameter having the same value as the summary parameter and the first search condition; If not present, the target search identifier is generated according to the first search condition.
3. The sharing method according to claim 2, characterized in that: The step of determining the target search identifier according to the historical summary parameter having the same value as the summary parameter and the first search condition includes: Determining whether a historical search condition for generating the historical summary parameter having the same value as the summary parameter is completely consistent with the first search condition; If they are completely consistent, a historical search identifier corresponding to the historical summary parameter having the same value as the summary parameter is generated as the target search identifier; If they are not completely consistent, the target search identifier is generated according to the first search condition.
4. The sharing method according to claim 2 or 3, characterized in that: The first search condition includes at least one sub-condition; and generating the target search identifier according to the first search condition includes: Obtain a target field group, and split the target field group to obtain at least two candidate fields; Filtering a target field from the candidate fields, wherein one sub-condition corresponds to one target field; All target fields are combined to obtain the target search identifier.
5. The sharing method according to claim 1, characterized in that: After determining the target search identifier, it also includes: Determine a search result corresponding to the target search identifier, and send the search result to the first device.
6. The sharing method according to claim 1, characterized in that: The method further comprises: Acquire second search information sent by the second device based on the updated URL, wherein the second search information at least includes the target search identifier; Determine a search result corresponding to the target search identifier, and send the search result to the second device.
7. The sharing method according to claim 6, characterized in that: The second search information further includes a second user identifier; and before sending the search result to the second device, the method further includes: Acquire the first search condition corresponding to the target search identifier, wherein the first search condition includes at least one sub-condition; Using the second user identifier to filter the first search condition to determine a second search condition; The search results are filtered using the second search condition.
8. A sharing device, characterized in that: include: An acquisition module, configured to acquire first search information sent by a first device, wherein the first search information includes a first search condition and a first user identifier; A determination module, configured to determine a target search identifier according to the first search condition and the first user identifier; The sending module is used to send the target search identifier to the first device, so that the first device updates the first search condition included in the uniform resource locator URL to the target search identifier, and shares the updated URL with the second device.
9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the sharing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sharing method according to any one of claims 1 to 7 when executed.