Multi-dimensional real-time search and intelligent highlight group management method and device

By adopting multi-dimensional real-time search and intelligent highlighting technology in the group management system, combined with delay parameters and permission verification, the problems of inefficient group management and security risks in the existing technology are solved, and efficient, safe and flexible group management is achieved.

CN119539982BActive Publication Date: 2025-04-11ONE NETWORK INTEROPERABILITY (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510095630.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-04-11
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art is inefficient in user management and operation groups, lacks flexibility, simple and direct search functions, cannot meet the diverse needs of users, and has security risks and management inconvenience.

Method used

Using multi-dimensional real-time search and intelligent highlight group management methods, we initiate requests to the backend to obtain user-related group data through the front-end framework, sorting using sorting functions, determining delay parameters based on the characteristic values ​​of keywords, performing data filtering and highlighting, and permission verification and token management are performed when the user switches groups.

Benefits of technology

It improves the efficiency of group data acquisition and search, optimizes the user experience, enhances the security and management flexibility of the system, and ensures the convenience of user operations and data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539982B_ABST
    Figure CN119539982B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device and electronic device for group management based on multi-dimensional real-time search and intelligent highlighting, belonging to the field of data processing technology, the method comprising: user U accesses the client system, the front end requests the back end to obtain relevant group data Dit and sorts by group name to obtain Dst; the user inputs the keyword k, determines the delay parameter t0 according to its characteristic value, and screens to obtain Dft; matches k in Dft and highlights Dht as a group switching candidate list; the user selects the target group, generates a request object to obtain a token TL and stores it in local Cookies; encodes TL to obtain TBE and sets an expiration date, and the user logs in again to display the highlighted group corresponding to the last keyword. The present invention improves the flexibility and security of group management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic device based on multi-dimensional real-time search and intelligent highlight group management. Background Art

[0002] In today's era of digital information explosion, the demand for user management and group operation in various applications and systems is growing. Whether it is an internal collaborative office system, a social networking platform, or an online education application, users need to be able to efficiently find, manage, and switch between different groups to meet their diverse work and social needs.

[0003] Traditional methods of acquiring group data are often inefficient and inflexible. In many systems, when users access the system to obtain relevant group data, they often face a long waiting time. This is because the system needs to retrieve group information related to the user from a huge database, and the retrieval process may involve complex query statements and multi-table association operations, resulting in a long response time and affecting the user experience.

[0004] In addition, the obtained group data usually lacks effective organization and sorting, making it difficult for users to quickly locate the group they need. Users often need to manually browse a large number of disordered group lists, which consumes a lot of time and energy. This problem is more prominent when the number of groups a user belongs to is large.

[0005] In terms of group search functions, most existing search methods are simple and direct, lacking intelligence and efficiency. When users enter keywords to search, many systems do not take into account the frequency and real-time requirements of user input. Frequent search requests may cause system performance to degrade or even freeze.

[0006] At the same time, the existing search logic usually only supports simple string matching and cannot be flexibly adjusted according to the actual needs of users. For example, traditional search methods are difficult to meet advanced search requirements such as fuzzy search and semantic search. This makes it possible for users to fail to find the required group when searching for groups because the keywords they enter are not accurate enough, which reduces the search hit rate and user satisfaction.

[0007] When it comes to displaying search results, the traditional highlighting function also has many shortcomings. The current highlighting method often simply marks the matched keywords, lacking optimization of the user's visual experience and information presentation effect. This may cause the highlighted part to appear abrupt in the entire group name or description, making it difficult for users to quickly identify and distinguish different search results.

[0008] Moreover, existing highlighting functions usually do not support dynamic adjustment and personalization, and cannot be customized according to user preferences and search scenarios. For example, users may want to highlight search results in different colors or styles based on different keywords or search conditions, but traditional highlighting functions cannot meet these personalized needs.

[0009] In terms of group switching and permission management, traditional methods have certain security risks and inconveniences in management. When users switch groups, many systems do not strictly verify and control the user's permissions, which may lead to illegal users accessing sensitive group information, bringing security risks to the system and users.

[0010] At the same time, the existing permission management mechanism is often too complicated, and administrators need to spend a lot of time and energy to configure and maintain user permissions. Moreover, the allocation and adjustment of permissions are not flexible enough, and it is impossible to dynamically manage according to user roles, departments or business needs, which reduces the adaptability and scalability of the system.

[0011] In terms of session management and state retention, traditional methods also have some problems. Existing session management mechanisms usually rely on simple token verification. Once the token is leaked or expired, the user may be forced to log in again, interrupting the current operation process and causing great inconvenience to the user.

[0012] In addition, traditional methods lack effective strategies and mechanisms for saving and restoring user login status and operation records. When users log in on different devices or browsers, the previous operation status and search history may not be automatically restored, and users need to re-set and operate, which reduces the user experience and work efficiency.

[0013] The above problems become technical problems that need to be solved. Summary of the invention

[0014] In view of this, the embodiments of the present invention provide a method, device and electronic device based on multi-dimensional real-time search and intelligent highlight group management, which at least partially solve the problems existing in the prior art.

[0015] In a first aspect, an embodiment of the present invention provides a method for managing a group of highlights based on multi-dimensional real-time search and intelligence, including:

[0016] When the client user U accesses the client system, a request is made to the backend through the front-end framework to obtain the group data set Dit related to the user U. The sorting function is used to sort Dit according to the group name Gnm to obtain the ordered set Dst.

[0017] When the user enters a keyword k in the search box, based on the feature value of the keyword k, the delay parameter t0 required by the screening function Fs for screening data for the keyword k is determined, and based on the delay parameter t0 and the ordered set Dst, the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k is determined;

[0018] Search the group name Gnm in the filter set Dft for the group g that matches the keyword k, and then use the group g <mark>The highlight set Dht is obtained by label wrapping, and the highlight set Dht is set as the only candidate list for the user to perform a group switching operation;

[0019] When user U performs a group switching operation, the target group gtt and the group identifier gti of the target group gtt are determined in the group list of the highlight set Dht. Based on the group identifier gti, the identifier uid of user U and the request function Fq, a request object R=Fq(git,uid) is generated. After the request object is sent to the target server, the first token set TL returned by the target server is received, and the first token set TL is stored in the local Cookies.

[0020] The first token set TL stored in the local Cookies is encoded to obtain a second token set TBE, and a valid period t1 is set for the second token set TBE. When the user U logs in to the client system again within the valid period t1, the highlighted target group gtt corresponding to the keyword k entered by the user U last time in the client system is displayed.

[0021] According to a specific implementation of an embodiment of the present invention, when a client user U accesses a client system, a request is initiated to a backend through a frontend framework to obtain a group data set Dit related to the user U, including:

[0022] After the client system is initialized, user U opens the corresponding application or web page interface on the client device, triggering the system's access detection mechanism, which recognizes the access behavior of user U and passes control to the event processing module of the front-end framework;

[0023] After receiving the access event, the event processing module of the front-end framework checks the login status of user U and verifies the locally stored user login credentials to confirm whether the user is logged in and has access rights;

[0024] After confirming that user U has access rights, the front-end framework constructs a request object containing the user ID Uid according to the pre-defined API interface specification. The request object contains the target address of the request, the request method, and the request header information.

[0025] The front-end framework uses the built-in network communication module to send the constructed request object to the back-end server. After receiving the request sent by the front-end framework, the back-end server parses and verifies the request and checks the legitimacy of the request, including whether the request header information is complete and whether the user authentication information is valid. If the request verification passes, the query operation is performed in the database according to the user identifier Uid in the request;

[0026] The database query module of the backend server retrieves all group data records related to user U from the database table storing user-group association information based on the user identifier Uid, organizes these records into a data format that meets the expectations of the front-end framework, forms a group data set Dit, and returns it to the front-end framework.

[0027] According to a specific implementation of an embodiment of the present invention, the use of a sorting function to sort Dit according to the group name Gnm to obtain an ordered set Dst includes:

[0028] After receiving the group data set Dit returned by the backend server, the front-end framework passes it to the data processing module;

[0029] A sorting function is defined in the data processing module. The function accepts the Dit set as an input parameter. Inside the sorting function, each group data object in the Dit set is traversed, and the group name Gnm attribute value in each group data object is extracted and used as the basis for sorting.

[0030] During the traversal process, the extracted group name Gnm values ​​are stored in a temporary array. At the same time, the original position of the group data object corresponding to each group name Gnm value in the Dit collection is recorded so that the complete group data object can be restored after sorting;

[0031] Use the selected merge sort algorithm to sort the group name Gnm values ​​in the temporary array. During the sorting process, comparison and exchange operations are performed according to the lexicographical order rules of the string. According to the order of the group name Gnm values ​​in the sorted temporary array, the corresponding group data objects are extracted from the Dit set according to the position of the original records to form a new ordered set Dst.

[0032] According to a specific implementation of an embodiment of the present invention, determining the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k includes:

[0033] When the user enters keyword k in the search box, the input detection module of the front-end framework immediately captures the input event and passes the keyword k to the feature value analysis module;

[0034] The feature value analysis module extracts features from the keyword k and stores the extracted feature value of the keyword k in a feature value object;

[0035] Query the records matching the feature value object of the current keyword k from the pre-established feature value delay parameter mapping database. If a completely matching feature value combination is found in the mapping database, the corresponding delay parameter t0 is directly obtained. If no completely matching record is found, the interpolation algorithm is used to analyze and calculate the adjacent feature value combinations. By comparing the similarity of the feature values, linear interpolation is performed according to the delay parameter values ​​of the adjacent records to estimate the delay parameter t0 suitable for the current keyword k.

[0036] The determined delay parameter t0 is passed to the configuration module of the screening function Fs.

[0037] According to a specific implementation manner of an embodiment of the present invention, determining the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k based on the delay parameter t0 and the ordered set Dst includes:

[0038] After receiving the delay parameter t0 and the ordered set Dst, the initialization module of the screening function Fs initializes itself and sets the matching rules, matching algorithms and screening parameters of the screening;

[0039] Start a timer and set the timer delay time to t0. Before the timer is triggered, the filter function Fs enters a waiting state and continues to monitor the user's input changes in the search box. If the user modifies the keyword k within t0, the delay parameter t0 is recalculated and the timer is reset.

[0040] When the timer is triggered, the screening function Fs starts to screen the ordered set Dst, traverses each group data object in the ordered set Dst, and extracts the group name Gnm attribute value for each group data object;

[0041] According to the preset matching rules and algorithms, the extracted group name Gnm value is matched with the keyword k, and the string matching algorithm is used to find whether there is a substring in the group name Gnm that is the same as the keyword k;

[0042] If the match is successful, that is, the group name Gnm contains the keyword k, then the group data object is added to a temporary screening result set, and the next group data object in Dst is traversed;

[0043] After traversing all group data objects in the ordered set Dst, the data objects in the temporary screening result set are sorted into a final screening set Dft, and the screening set Dft is used as the group data set corresponding to the keyword k that meets the screening condition.

[0044] According to a specific implementation of the embodiment of the present invention, the group name Gnm in the screening set Dft is searched for a group g that matches the keyword k, and then the group g is used <mark>After label wrapping, the highlighted set Dht is obtained, including:

[0045] Initialize an empty highlight set Dht to store the group data objects after highlighting processing. At the same time, set a counter to record the position of the currently processed group data object in the filter set Dft;

[0046] Traverse each group data object in the filter set Dft, and extract the group name Gnm attribute value for the currently traversed group data object;

[0047] Use the string search algorithm to search for a substring matching the keyword k in the group name Gnm, and record the starting and ending positions of the matching substring in the group name Gnm;

[0048] According to the starting and ending positions of the matching substring, the group name Gnm string is split into three parts: the part before the matching substring, the matching substring itself, and the part after the matching substring;

[0049] Will <mark>The tags are inserted before and after the matching substring to form a highlighted string, and the three parts after the segmentation are reassembled into a new highlighted group name string;

[0050] The group data object containing the highlighted group name is added to the highlight set Dht, the counter is updated, and the next group data object in the filter set Dft is traversed continuously until all objects in the filter set Dft are processed, and finally a complete highlight set Dht is obtained.

[0051] According to a specific implementation of an embodiment of the present invention, based on the group identifier gti, the identifier uid of the user U and the request function Fq, a request object R=Fq(git,uid) is generated, including:

[0052] When the user selects the target group gtt in the group list of the highlight set Dht, the event capture module of the front-end framework obtains the selection event and extracts the group identifier gti of the target group gtt and the identifier uid of the user U;

[0053] The extracted group identifier gti and user identifier uid are passed to the parameter assembly module of the request function Fq, which is responsible for sorting and assembling these parameters according to the requirements of the request function Fq;

[0054] The parameter assembly module of the request function Fq first creates a basic request object framework R, which contains the general information of the request, and adds the group identifier gti and the identifier uid of the user U as request parameters to the request object R;

[0055] Add request header information to the request object R. The request header information includes the user's authentication information and the data format of the request. Verify and encapsulate the request object R. Check whether all parameters and information of the request object R are complete and the format is correct. After confirmation, prepare the request object R and wait to send it to the target server.

[0056] According to a specific implementation of an embodiment of the present invention, the encoding operation is performed on the first token set TL stored in the local Cookies to obtain the second token set TBE, including:

[0057] Use the API provided by the browser to read the data in local Cookies, use the document.cookie property to obtain all Cookies information, and then use the string parsing method to extract the Cookie data storing the first token set TL;

[0058] Decoding the extracted Cookie data containing the first token set TL, and parsing the content of the first token set TL according to a predefined data format;

[0059] Select a preset encoding algorithm to encode the first token set TL, use the window.btoa() function to convert the binary data into printable ASCII characters, and store the verified and formatted encoded data as the second token set TBE back into local Cookies.

[0060] In a second aspect, an embodiment of the present invention further provides a device for managing multi-dimensional real-time search and intelligent highlight groups, comprising:

[0061] Acquisition module: when the client user U accesses the client system, a request is made to the backend through the front-end framework to obtain the group data set Dit related to the user U, and the sorting function is used to sort Dit according to the group name Gnm to obtain the ordered set Dst;

[0062] A determination module, when a user enters a keyword k in the search box, determines the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k, and determines the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k based on the delay parameter t0 and the ordered set Dst;

[0063] The package module searches for the group g in the group name Gnm that matches the keyword k in the filter set Dft, and then uses the group g <mark>The label is wrapped to obtain a highlight set Dht after highlighting, and the highlight set Dht is set as the only candidate list for the user to perform a group switching operation;

[0064] The generation module obtains the information that the user U performs a group switching operation, determines the target group gtt and the group identifier gti of the target group gtt in the group list of the highlight set Dht, generates a request object R=Fq(git,uid) based on the group identifier gti, the identifier uid of the user U and the request function Fq, and after the request object is sent to the target server, receives the first token set TL returned by the target server, and stores the first token set TL in the local Cookies;

[0065] The display module encodes the first token set TL stored in the local Cookies to obtain the second token set TBE, sets the effective time t1 for the second token set TBE, and when the user U logs in to the client system again within the effective time t1, the highlighted target group gtt corresponding to the keyword k entered by the user U last time in the client system is displayed.

[0066] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0067] at least one processor; and,

[0068] a memory communicatively connected to the at least one processor; wherein,

[0069] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any of the first aspects or any of the implementations of the first aspect.

[0070] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in the first aspect or any implementation of the first aspect.

[0071] In the fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method described in the first aspect or any implementation of the first aspect.

[0072] The scheme in the embodiment of the present invention includes: when a client user U accesses the client system, a request is initiated to the back end through the front-end framework to obtain a group data set Dit related to the user U, and Dit is sorted according to the group name Gnm using a sorting function to obtain an ordered set Dst; when a user enters a keyword k in a search box, a delay parameter t0 required by a screening function Fs for data screening of the keyword k is determined based on a feature value of the keyword k, and a screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k is determined based on the delay parameter t0 and the ordered set Dst; a group g matching the keyword k in the group name Gnm is searched in the screening set Dft, and then the group g is used <mark>Wrap the tags to obtain the highlighted set Dht, and set the highlighted set Dht as the only candidate list for the user to switch groups; when obtaining the group switching operation of user U, determine the target group gtt and the group identifier gti of the target group gtt in the group list of the highlighted set Dht, and generate the request object R=Fq(git,uid) based on the group identifier gti, the identifier uid of user U and the request function Fq. After the request object is sent to the target server, receive the first token set TL returned by the target server, and store the first token set TL in the local Cookies; encode the first token set TL stored in the local Cookies to obtain the second token set TBE, set the effective duration t1 for the second token set TBE, and when the user U logs in to the client system again within the effective duration t1, display the highlighted target group gtt corresponding to the keyword k entered by the user U in the client system last time. This scheme has the following beneficial effects:

[0073] 1. By defining user sets and group sets, the system can accurately obtain group data related to users. The obtained group data is sorted by group name, so that users can view them in a fixed and easy-to-understand order when browsing groups later, which greatly improves the efficiency of users finding specific groups and reduces the time and effort of users to manually filter and organize groups.

[0074] 2. Back up the initially acquired group data to provide reliable protection for possible misoperation, system abnormalities or data recovery needs. This ensures that the user's original group data will not be lost under any circumstances, ensuring the integrity and stability of the system data.

[0075] 3. The introduction of the anti-shake mechanism effectively avoids system performance problems caused by users frequently entering keywords. By setting a reasonable anti-shake delay time, the system reduces unnecessary search requests while ensuring real-time response to user operations, reduces server load, and improves the overall operating efficiency of the system.

[0076] 4. Filter the sorted group data based on keywords, using case-ignoring matching logic to more accurately find groups related to the keywords entered by the user. This precise search function improves the relevance and usability of search results, allowing users to quickly locate the groups they need, improving the user experience.

[0077] 5. Highlight the filtered group data, wrap the matched keywords with specific tags, and visually highlight the key information in the search results. This allows users to quickly identify groups related to keywords among many search results, greatly improving the speed and accuracy of information acquisition.

[0078] 6. The highlighted group list is used as the only candidate list for users to switch groups, providing users with clear operation guidance. Users do not need to search and select from a large number of irrelevant groups, but can directly operate in the highlighted list, which simplifies the user operation process and improves the convenience and accuracy of the operation.

[0079] 7. When the user switches groups, the backend performs strict permission verification on the request. Only after the verification is passed will a new token set be provided to the user to ensure that only authorized users can access the corresponding group resources, effectively preventing illegal access and data leakage, and ensuring the security of the system and the privacy of user data.

[0080] 8. The verified token set is stored in local storage and Cookies, so that users do not need to repeat identity authentication in subsequent operations, maintaining the consistency and fluency of user operations. This seamless switching experience improves user satisfaction with the system and usage efficiency.

[0081] 9. Base64 encoding of token collection further improves data security. The encoded token is more difficult to crack and tamper with during transmission and storage, reducing the security risks caused by token leakage and protecting the user's login status and access rights to system resources.

[0082] 10. Set an expiration date for Cookies, and display the highlighted target group corresponding to the last keyword entered when the user logs in again, so as to maintain the user's operation status and search history. This allows users to quickly restore to the previous working status when using the system at different times and on different devices, without having to search and set again, thus improving the user's work efficiency and consistency of the user experience.

[0083] In summary, this group management solution based on multi-dimensional real-time search and intelligent highlighting has significant beneficial effects in improving system performance, optimizing user experience, ensuring data security and maintaining user operation status, and can meet the needs of modern users for an efficient, intelligent and secure group management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative work.

[0085] Figure 1 A flowchart of a method for managing multi-dimensional real-time search and intelligent highlight groups provided by an embodiment of the present invention;

[0086] Figure 2 A schematic flow chart of another method for managing multi-dimensional real-time search and intelligent highlight groups provided by an embodiment of the present invention;

[0087] Figure 3 A schematic diagram of the structure of a device for multi-dimensional real-time search and intelligent highlight group management provided by an embodiment of the present invention;

[0088] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0090] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0091] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0092] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0093] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0094] The disclosed embodiment provides a method for managing a group of multi-dimensional real-time search and intelligent highlighting. The method for managing a group of multi-dimensional real-time search and intelligent highlighting provided in the embodiment can be executed by a computing device, which can be implemented as software or a combination of software and hardware, and which can be integrated in a server, terminal device, etc.

[0095] See also Figure 1 and Figure 2 The embodiment of the present disclosure provides a method for managing multi-dimensional real-time search and intelligent highlight groups, including:

[0096] S101, when a client user U accesses the client system, a request is initiated to the backend through the frontend framework to obtain a group data set Dit related to the user U, and a sorting function is used to sort Dit according to the group name Gnm to obtain an ordered set Dst.

[0097] When the client user U accesses the client system by opening a specific application or entering the corresponding URL in the browser, the client system first performs initialization loading. The front-end framework completes the initialization configuration, including loading various necessary script files, style files, and setting event listeners.

[0098] The built-in event monitoring mechanism of the front-end framework detects the access behavior of user U. At this time, the framework constructs a request for obtaining user-related group data according to the pre-set request logic. The request contains key information, namely the unique identifier uid of user U. This identifier is generated and stored on the client during the user registration or login process, and is used to uniquely identify the user in the system.

[0099] The front-end framework uses a network communication module (such as a communication mechanism based on the HTTP protocol) to send the constructed request to the back-end server. The target address of the request is the interface set up by the back-end server specifically for processing requests to obtain user group data. When sending a request, the front-end framework will also add necessary information to the request header, such as the data format of the request (usually in JSON format to facilitate data transmission and parsing) and the user's authentication information (if the system requires user authentication, it may be the user's login token, etc.), to ensure that the back-end server can correctly understand and process the request.

[0100] After receiving the request sent by the front-end framework, the back-end server first verifies the request. The verification process includes checking whether the authentication information in the request header is valid to ensure that the request comes from a legitimate user; at the same time, checking whether the data format of the request meets the expectations. If not, a corresponding error prompt is returned.

[0101] After verification, the database access module of the backend server starts working. It performs query operations in the database table that stores the relationship between users and groups based on the user ID uid carried in the request. Assume that there is a table called "user_groups" in the database, which contains the fields "user_id" (associated with the user ID) and "group_info" (containing detailed information about the group, including the group name Gnm). The executed SQL query statement is roughly as follows: "SELECT group_info FROM user_groups WHERE user_id = uid". Through this query, all group information records related to user U are retrieved from the database, and these records constitute the group data set Dit.

[0102] The backend server organizes and formats the group data set Dit obtained by the query to make it conform to the format that can be received and processed by the front-end framework, and then returns it to the front-end framework.

[0103] After receiving the group data set Dit returned by the backend server, the front-end framework calls the predefined sorting function. The design logic of this sorting function is to sort the group data in the set according to the group name Gnm.

[0104] The sorting function first traverses each group data object in the set Dit and extracts the group name Gnm of each object. During the extraction process, in order to ensure the accuracy and consistency of the sorting, some preprocessing operations may be performed on the group name, such as converting all characters to lowercase letters to avoid inaccurate sorting caused by differences in uppercase and lowercase letters.

[0105] Then, the sorting function sorts the extracted group names using a specific sorting algorithm (such as bubble sort, insertion sort, or a more efficient quick sort, etc.) The sorting algorithm compares and swaps the group names according to the lexicographic order of the characters, and finally arranges the group names in ascending order.

[0106] According to the sorted group name sequence, the order of objects in the group data set Dit is rearranged to obtain a new ordered set Dst. This ordered set Dst facilitates users to search and browse group information later.

[0107] S102, when the user enters a keyword k in the search box, based on the feature value of the keyword k, the delay parameter t0 required for the filtering function Fs to filter data for the keyword k is determined, and based on the delay parameter t0 and the ordered set Dst, the filtering set Dft=Fs(k, t0, Dst) corresponding to the keyword k is determined.

[0108] When the user enters a keyword k in the search box of the client system, the input detection module of the front-end framework immediately captures this input event and passes the input keyword k to the feature value analysis module for processing.

[0109] The feature value analysis module performs detailed feature extraction on keyword k. It calculates the length of the keyword, counts the number and proportion of different character types (such as letters, numbers, and special characters) in the keyword, and queries the historical search records saved in the system to obtain information such as the frequency of occurrence of the keyword in historical searches.

[0110] The extracted feature values ​​are organized into a feature value object, such as an object containing attributes such as keyword length, character type ratio, historical search frequency, etc. This feature value object will serve as an important basis for determining the delay parameters later.

[0111] A feature value delay parameter mapping table is pre-established in the system. This mapping table is obtained by analyzing and experimenting with a large amount of user search behavior data, and it records the recommended delay parameters t0 corresponding to different feature value combinations.

[0112] The feature value analysis module matches the extracted feature value object of keyword k with the records in the mapping table. If a completely matching feature value combination can be found, the corresponding delay parameter t0 is directly obtained from the mapping table.

[0113] If no completely matching record can be found, the system will use an interpolation algorithm to estimate the appropriate delay parameter. The interpolation algorithm will estimate the delay parameter t0 that matches the current keyword k feature value through a linear or nonlinear calculation method based on the adjacent feature value combinations and their corresponding delay parameters.

[0114] According to the determined delay parameter t0 and the ordered set Dst, the system defines a screening function Fs. The main function of the screening function Fs is to screen out the group data that meets the conditions from the ordered set Dst according to the keyword k.

[0115] In order to avoid wasting system resources and degrading performance due to users frequently entering keywords, the filtering function Fs is combined with an anti-shake mechanism. The anti-shake mechanism will trigger the actual filtering operation t0 milliseconds after the user stops entering. During this t0 milliseconds, if the user continues to enter new keywords, the anti-shake mechanism will reset the delay time and start the timing again.

[0116] When the anti-shake mechanism triggers the filtering operation, the filtering function Fs traverses each group data object in the ordered set Dst. For each object, its group name Gnm is extracted and matched with the keyword k. The matching process can be carried out in many ways, such as string inclusion matching (checking whether the group name contains the keyword), and the matching rules can be set according to actual needs, such as whether to ignore case.

[0117] After the matching operation on all the group data objects in the ordered set Dst, the group data objects that meet the matching conditions are extracted to form a new set, namely, the screening set Dft.

[0118] S103, searching the filter set Dft for a group g in the group name Gnm that matches the keyword k, and then using <mark>The highlight set Dht is obtained after the highlighting is wrapped by the label, and the highlight set Dht is set as the only candidate list for the user to perform the group switching operation.

[0119] The system starts to traverse each group data object in the screening set Dft. For each group, the group name Gnm is extracted from the object.

[0120] Use a string search algorithm (such as a simple string traversal search or a more efficient string matching algorithm) to search for a portion of the group name Gnm that matches the keyword k. For example, if the keyword k is "example" and the group name is "Thisisanexamplegroup", the matching portion "example" can be found.

[0121] Once a match is found, the system will insert ` before and after the match. <mark>` tag. This is achieved through string operations, such as splitting the group name string according to the position of the matching part and then inserting ` <mark>`tag, and then reassemble the split string. In this way, the matching part will be` <mark>`Tag wrapping will be highlighted in a specific style (such as highlight color) when displayed on the front-end page.

[0122] After performing the above highlighting process on all group data objects in the screening set Dft, a new set, namely the highlighting set Dht, is obtained. In this set, matching keywords in all group names are highlighted, which is convenient for users to quickly identify and distinguish.

[0123] The system sets the highlight set Dht as the only candidate list for the user to switch groups. In the design of the front-end interface, the highlight set Dht is presented to the user in the form of a list. Each element in the list corresponds to a highlighted group, and the user can select the target group in the list for switching by clicking the mouse or other interactive methods.

[0124] S104, when user U performs a group switching operation, the target group gtt and the group identifier gti of the target group gtt are determined in the group list of the highlight set Dht, and a request object R=Fq(git,uid) is generated based on the group identifier gti, the identifier uid of user U and the request function Fq. After the request object is sent to the target server, the first token set TL returned by the target server is received, and the first token set TL is stored in local Cookies.

[0125] The user selects the target group gtt in the group list of the highlight set Dht by clicking the mouse or other operation methods. The event capture mechanism of the front-end framework immediately detects the user's selection operation and obtains the unique identifier gti of the target group gtt and the identifier uid of the user U.

[0126] The system defines a request function Fq, which is responsible for generating a request object R for group switching based on the obtained group identifier gti and user identifier uid.

[0127] The request function Fq first determines the basic information of the request according to the communication protocol and interface requirements of the system. For example, the request method may be POST (used to submit data to the server), and the target address of the request is the interface address on the target server that specifically handles group switching requests.

[0128] Then, the request function Fq adds the group identifier gti and the user identifier uid as request parameters to the request object. At the same time, according to the security and authentication requirements of the system, necessary information is added to the request header, such as the user's authentication token (used to verify the user's identity), the requested data format declaration, etc.

[0129] After a series of parameter settings and information filling, the request function Fq generates a complete request object R, which contains all the necessary information required for the group switching request.

[0130] The front-end framework uses the network communication module to send the generated request object R to the target server. During the sending process, the integrity and accuracy of the request data are ensured, and the protocols and specifications of the network communication are followed.

[0131] After receiving the request, the target server will fully process and verify the request. The server first checks the authentication information in the request header to verify whether the user's identity is legal and whether the user has the authority to switch to the target group.

[0132] If the request is verified, the target server generates a new first token set TL according to the system logic and configuration. This token set TL usually contains important information such as access tokens (used to access system resources within a certain period of time) and refresh tokens (used to obtain new access tokens when access tokens expire).

[0133] The target server returns the generated first token set TL to the front-end framework through the network. After receiving the first token set TL returned by the target server, the front-end framework stores it in local Cookies. Local Cookies is a storage mechanism provided by the client browser for storing a small amount of data locally.

[0134] The front-end framework operates the browser's Cookies API to store the first token set TL in a specific format in local Cookies. During the storage process, the token set may be encoded or encrypted to improve data security. At the same time, the relevant attributes of Cookies, such as expiration time, path, etc., are set to ensure that the system can read and use the token only when the conditions are met.

[0135] As an optional implementation, before the request object in step S104 is sent to the target server, the following steps S1041-1045 may also be included:

[0136] S1041, obtain the initial credential set Cf and metadata set Mf required for the client user to log in to the target server, after completing the verification of the initial credential set Cf through the first verification function, generate a first security assessment value Rf based on the initial credential set Cf and the metadata set Mf.

[0137] During the system operation, in order to ensure that the client user can log in to the target server safely, it is necessary to first obtain the initial credential set Cf and metadata set Mf required for the client user to log in to the target server. The initial credential set Cf contains the key information required for the user to log in, such as the user name, password summary, digital certificate, etc., which is the basis for verifying the user's identity. The metadata set Mf contains auxiliary information related to the user, device, and login environment, such as the device model, operating system version, and the IP address of the login location.

[0138] After obtaining the initial credential set Cf, the initial credential set Cf is verified through the first verification function. The first verification function verifies each piece of information in the initial credential set Cf one by one according to the preset verification rules and algorithms, and checks its integrity, accuracy and legality. For example, verify whether the user name exists in the system user list, whether the password summary matches the stored encrypted password, whether the digital certificate is valid and has not been revoked, etc.

[0139] After completing the verification of the initial credential set Cf, a first security assessment value Rf is generated based on the initial credential set Cf and the metadata set Mf. The process of generating the first security assessment value Rf involves complex algorithms and models, which will comprehensively consider multiple factors such as the credibility of the initial credentials and the security of the login environment reflected by the metadata. For example, if the user is using a commonly used device and the login location is consistent with the historical records, and the initial credential verification is completely passed, then the first security assessment value Rf may be relatively high; on the contrary, if the user logs in from an unfamiliar device or an abnormal location, even if the initial credential verification is passed, the first security assessment value Rf may be reduced due to these risk factors.

[0140] S1042: When the first security assessment value Rf is greater than the preset value R0, an encryption key KM is generated based on the metadata set Mf, and a secure transmission protocol TA is established between the client and the target server based on the encryption key KM. The secure transmission protocol TA is provided with an encryption function FY and a content encapsulation warehouse CT, and the encryption function FY is used to perform encryption operations on the information in the content encapsulation warehouse.

[0141] When the first security assessment value Rf is greater than the preset value R0, it means that the security of the current login meets the standard required by the system. At this time, the encryption key KM is generated based on the metadata set Mf. The algorithm for generating the encryption key KM will make full use of the information in the metadata set Mf, such as the unique identifier of the device, the specific characteristics of the user, etc., to ensure that the generated encryption key has sufficient randomness and security.

[0142] Based on the encryption key KM, a secure transmission protocol TA is established between the client and the target server. The secure transmission protocol TA is an important mechanism to ensure the security of data transmission between the client and the target server. It stipulates the format of data transmission, encryption method, and interaction process between the two communicating parties. An encryption function FY and a content encapsulation warehouse CT are provided in the secure transmission protocol TA. The encryption function FY is used to encrypt the information in the content encapsulation warehouse. The encryption function FY uses advanced encryption algorithms, such as AES (Advanced Encryption Standard), RSA, etc., to encrypt the data to be transmitted and convert the plaintext into ciphertext, thereby preventing the data from being stolen or tampered with during the transmission process. The content encapsulation warehouse CT is used to encapsulate the information to be transmitted, and integrate the encrypted data and related control information, metadata, etc. to ensure that the data can be accurately and completely transmitted to the target recipient.

[0143] S1043, obtain a first channel set V={V1,V2,…Vn} including n verification channels, select m verification channels from the first channel set V based on the first security assessment value Rf to form a second channel set V'={V'1,V'2,…V'm}, and based on the secure transmission protocol TA, set m secure transmission layers including an encryption function FY and a content encapsulation warehouse CT in the second channel set V', encrypt the verification information Mc through the encryption function FY, and send it to the user of the client through the content encapsulation warehouse CT.

[0144] A first channel set V={V1, V2, …Vn} containing n verification channels is obtained. These verification channels are different ways set by the system to further verify the user's identity and ensure communication security. Each verification channel may have different characteristics and uses. For example, some channels may focus on verifying the user's biometric information, while others may be used to verify the user's dynamic password, etc.

[0145] Based on the first security assessment value Rf, m verification channels are selected from the first channel set V to form a second channel set V'={V'1, V'2, ... V'm}. The selection process will be comprehensively considered based on the size of the first security assessment value Rf and the risk level of each verification channel, applicable scenarios and other factors. Generally speaking, the higher the first security assessment value Rf, the fewer verification channels may be selected and the verification strength is relatively low; conversely, the lower the first security assessment value Rf, the more verification channels may be selected and the verification strength is higher.

[0146] Based on the secure transmission protocol TA, m secure transmission layers including an encryption function FY and a content encapsulation warehouse CT are set in the second channel set V'. In this way, each selected verification channel has the ability to securely transmit data and can encrypt and encapsulate the information transmitted through the channel. After the verification information Mc is encrypted by the encryption function FY, it is sent to the user of the client through the content encapsulation warehouse CT. The verification information Mc contains relevant information that the system needs to provide from the user in order to further verify the user's identity, such as a one-time verification code, answers to specific questions, etc. Through the encryption and encapsulation processing of the secure transmission layer, the verification information Mc is effectively protected during the transmission process to ensure its security and integrity.

[0147] S1044, obtaining feedback information Mk returned by the user in response to the verification information Mc through the second channel set V', forming a user behavior parameter set B={b1, b2, ...bp} based on the feedback information Mk, and determining whether the user behavior is abnormal by calculating the similarity value Sm between the user behavior parameter set B and the standard behavior parameter set L={L1, L2, ...Lp}.

[0148] The feedback information Mk returned by the user for the verification information Mc is obtained through the second channel set V'. After receiving the verification information Mc, the user provides corresponding feedback information Mk as required, such as inputting a one-time verification code, answering specific questions, etc.

[0149] Based on the feedback information Mk, a user behavior parameter set B={b1, b2, ...bp} is formed. The user behavior parameter set B includes a series of parameters that can reflect the user's behavior characteristics, such as the time when the user inputs the feedback information, the input speed, the input accuracy, etc. These parameters can reflect the user's behavior habits and operation modes from different angles.

[0150] By calculating the similarity value Sm between the user behavior parameter set B and the standard behavior parameter set L={L1,L2,…Lp}, it is determined whether the user behavior is abnormal. The standard behavior parameter set L is obtained based on the statistical analysis of a large amount of normal user behavior data and represents the typical characteristics and patterns of normal user behavior.

[0151] The behavior pattern similarity function Sm(B,L) can be defined as:

[0152]

[0153] γ and σ are correction parameters;

[0154] A similarity threshold θ is set. When Sm(B,N)<θ, the user behavior is judged to be abnormal.

[0155] On the contrary, if the similarity value Sm is higher than the preset threshold, it means that the user's behavior basically conforms to the normal behavior pattern and there is no obvious abnormality.

[0156] S1045, when it is determined that there is no abnormality in the user's behavior, a session SH is established between the client user and the target server through an encryption protocol, and the user's session record Ah during the session is recorded in real time. Based on the session record Ah, it is determined whether there is an abnormality in the current session SH. When it is determined that the session SH is abnormal, the session between the client user and the target server is disconnected.

[0157] When it is determined that there is no abnormality in the user's behavior, a session SH is established between the client user and the target server through an encryption protocol. The encryption protocol uses advanced encryption technology, such as SSL (Secure Sockets Layer) or TLS (Transport Layer Security), to encrypt and protect the data during the session to ensure the confidentiality, integrity and authentication of the communication.

[0158] After the session SH is established, the user's session record Ah is recorded in real time during the session. The session record Ah contains various operation information of the user during the session, such as the user's login time, accessed resources, and performed operations. This information is crucial for monitoring user behavior and detecting session anomalies.

[0159] Based on the session record Ah, it is determined whether the current session SH has an abnormality. The judgment process will analyze and evaluate the various information in the session record Ah according to the preset abnormality detection rules and algorithms. For example, if it is detected that the user frequently performs high-risk operations in a short period of time, or accesses unauthorized resources, or has abnormal login behavior, etc., it may be determined as a session abnormality.

[0160] Specifically, judging whether the current session SH is abnormal based on the session record Ah includes:

[0161] Analyze the user's operation sequence based on the session record Ah , q is the number of operations;

[0162] Combine operation sequence A with the normal operation mode Compare and get the matching value QD:

[0163]

[0164] and are the maximum and minimum values ​​of the jth operation in the normal operation mode, respectively;

[0165] The operation mode matching threshold β is set. When QD(A,E)≥β, it is considered that the user operation conforms to the normal behavior mode and there is no abnormality in the current session SH.

[0166] When it is determined that the session SH is abnormal, in order to ensure the security of the system and the integrity of the data, the session between the client user and the target server is disconnected in time. The operation of disconnecting the session can quickly terminate the continuation of the abnormal behavior, prevent the possible security threat from spreading further, and protect the interests of the system and users.

[0167] S105, encode the first token set TL stored in local Cookies to obtain a second token set TBE, set a valid period t1 for the second token set TBE, and when the user U logs in to the client system again within the valid period t1, display the highlighted target group gtt corresponding to the keyword k entered by the user U last time in the client system.

[0168] The system reads the previously stored first token set TL from local cookies. By parsing the browser's cookies data, the value of the stored first token set TL is extracted. Since the data stored in cookies may be encoded or formatted, corresponding decoding and parsing operations are required to convert it into an object form that the system can process.

[0169] In order to further improve the security and storage efficiency of the token, the system encodes the first token set TL. The Base64 encoding algorithm is used to convert the first token set TL into a Base64-encoded string to obtain the second token set TBE. Base64 encoding can convert binary data into printable ASCII characters, which is convenient for processing in network transmission and local storage.

[0170] During the encoding process, ensure the accuracy and completeness of the encoding to avoid loss or damage of token information due to encoding errors.

[0171] The encoded second token set TBE is stored in the local Cookies again. When storing, the validity period of the Cookies is set to t1. The validity period is set to ensure that the user can use the token for related operations within a certain period of time. After the validity period, the token will become invalid and the user needs to re-authenticate or obtain a new token.

[0172] When user U logs in to the client system again within the valid time t1, the front-end framework detects the user's login behavior. It first reads the second token set TBE from the local Cookies, decodes it, and restores it to the original token information.

[0173] The front-end framework queries and obtains the keyword k entered by the user U in the client system last time and the corresponding highlighted target group gtt information based on the decoded token information and the user operation records saved in the system.

[0174] Finally, the front-end framework redisplays the highlighted target group gtt corresponding to the keyword k input by user U last time on the interface, thereby maintaining the user's operation status and providing users with a continuous and convenient usage experience.

[0175] According to a specific implementation of an embodiment of the present invention, when a client user U accesses a client system, a request is initiated to a backend through a frontend framework to obtain a group data set Dit related to the user U, including:

[0176] After the client system is initialized, user U opens the corresponding application or web page interface on the client device, triggering the system's access detection mechanism, which recognizes the access behavior of user U and passes control to the event processing module of the front-end framework;

[0177] After receiving the access event, the event processing module of the front-end framework checks the login status of user U and verifies the locally stored user login credentials to confirm whether the user is logged in and has access rights;

[0178] After confirming that user U has access rights, the front-end framework constructs a request object containing the user ID Uid according to the pre-defined API interface specification. The request object contains the target address of the request, the request method, and the request header information.

[0179] The front-end framework uses the built-in network communication module to send the constructed request object to the back-end server. After receiving the request sent by the front-end framework, the back-end server parses and verifies the request and checks the legitimacy of the request, including whether the request header information is complete and whether the user authentication information is valid. If the request verification passes, the query operation is performed in the database according to the user identifier Uid in the request;

[0180] The database query module of the backend server retrieves all group data records related to user U from the database table storing user-group association information based on the user identifier Uid, organizes these records into a data format that meets the expectations of the front-end framework, forms a group data set Dit, and returns it to the front-end framework.

[0181] According to a specific implementation of an embodiment of the present invention, the use of a sorting function to sort Dit according to the group name Gnm to obtain an ordered set Dst includes:

[0182] After receiving the group data set Dit returned by the backend server, the front-end framework passes it to the data processing module;

[0183] A sorting function is defined in the data processing module. The function accepts the Dit set as an input parameter. Inside the sorting function, each group data object in the Dit set is traversed, and the group name Gnm attribute value in each group data object is extracted and used as the basis for sorting.

[0184] During the traversal process, the extracted group name Gnm values ​​are stored in a temporary array. At the same time, the original position of the group data object corresponding to each group name Gnm value in the Dit collection is recorded so that the complete group data object can be restored after sorting;

[0185] Use the selected merge sort algorithm to sort the group name Gnm values ​​in the temporary array. During the sorting process, comparison and exchange operations are performed according to the lexicographical order rules of the string. According to the order of the group name Gnm values ​​in the sorted temporary array, the corresponding group data objects are extracted from the Dit set according to the position of the original records to form a new ordered set Dst.

[0186] According to a specific implementation of an embodiment of the present invention, determining the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k includes:

[0187] When the user enters keyword k in the search box, the input detection module of the front-end framework immediately captures the input event and passes the keyword k to the feature value analysis module;

[0188] The feature value analysis module extracts features from the keyword k and stores the extracted feature value of the keyword k in a feature value object;

[0189] Query the records matching the feature value object of the current keyword k from the pre-established feature value delay parameter mapping database. If a completely matching feature value combination is found in the mapping database, the corresponding delay parameter t0 is directly obtained. If no completely matching record is found, the interpolation algorithm is used to analyze and calculate the adjacent feature value combinations. By comparing the similarity of the feature values, linear interpolation is performed according to the delay parameter values ​​of the adjacent records to estimate the delay parameter t0 suitable for the current keyword k.

[0190] The determined delay parameter t0 is passed to the configuration module of the screening function Fs.

[0191] According to a specific implementation manner of an embodiment of the present invention, determining the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k based on the delay parameter t0 and the ordered set Dst includes:

[0192] After receiving the delay parameter t0 and the ordered set Dst, the initialization module of the screening function Fs initializes itself and sets the matching rules, matching algorithms and screening parameters of the screening;

[0193] Start a timer and set the timer delay time to t0. Before the timer is triggered, the filter function Fs enters a waiting state and continues to monitor the user's input changes in the search box. If the user modifies the keyword k within t0, the delay parameter t0 is recalculated and the timer is reset.

[0194] When the timer is triggered, the screening function Fs starts to screen the ordered set Dst, traverses each group data object in the ordered set Dst, and extracts the group name Gnm attribute value for each group data object;

[0195] According to the preset matching rules and algorithms, the extracted group name Gnm value is matched with the keyword k, and the string matching algorithm is used to find whether there is a substring in the group name Gnm that is the same as the keyword k;

[0196] If the match is successful, that is, the group name Gnm contains the keyword k, then the group data object is added to a temporary screening result set, and the next group data object in Dst is traversed;

[0197] After traversing all group data objects in the ordered set Dst, the data objects in the temporary screening result set are sorted into a final screening set Dft, and the screening set Dft is used as the group data set corresponding to the keyword k that meets the screening condition.

[0198] According to a specific implementation of the embodiment of the present invention, the group name Gnm in the screening set Dft is searched for a group g that matches the keyword k, and then the group g is used <mark>After label wrapping, the highlighted set Dht is obtained, including:

[0199] Initialize an empty highlight set Dht to store the group data objects after highlighting processing. At the same time, set a counter to record the position of the currently processed group data object in the filter set Dft;

[0200] Traverse each group data object in the filter set Dft, and extract the group name Gnm attribute value for the currently traversed group data object;

[0201] Use the string search algorithm to search for a substring matching the keyword k in the group name Gnm, and record the starting and ending positions of the matching substring in the group name Gnm;

[0202] According to the starting and ending positions of the matching substring, the group name Gnm string is split into three parts: the part before the matching substring, the matching substring itself, and the part after the matching substring;

[0203] Will <mark>The tags are inserted before and after the matching substring to form a highlighted string, and the three parts after the segmentation are reassembled into a new highlighted group name string;

[0204] The group data object containing the highlighted group name is added to the highlight set Dht, the counter is updated, and the next group data object in the filter set Dft is traversed continuously until all objects in the filter set Dft are processed, and finally a complete highlight set Dht is obtained.

[0205] According to a specific implementation of an embodiment of the present invention, based on the group identifier gti, the identifier uid of the user U and the request function Fq, a request object R=Fq(git,uid) is generated, including:

[0206] When the user selects the target group gtt in the group list of the highlight set Dht, the event capture module of the front-end framework obtains the selection event and extracts the group identifier gti of the target group gtt and the identifier uid of the user U;

[0207] The extracted group identifier gti and user identifier uid are passed to the parameter assembly module of the request function Fq, which is responsible for sorting and assembling these parameters according to the requirements of the request function Fq;

[0208] The parameter assembly module of the request function Fq first creates a basic request object framework R, which contains the general information of the request, and adds the group identifier gti and the identifier uid of the user U as request parameters to the request object R;

[0209] Add request header information to the request object R. The request header information includes the user's authentication information and the data format of the request. Verify and encapsulate the request object R. Check whether all parameters and information of the request object R are complete and the format is correct. After confirmation, prepare the request object R and wait to send it to the target server.

[0210] According to a specific implementation of an embodiment of the present invention, the encoding operation is performed on the first token set TL stored in the local Cookies to obtain the second token set TBE, including:

[0211] Use the API provided by the browser to read the data in local Cookies, use the document.cookie property to obtain all Cookies information, and then use the string parsing method to extract the Cookie data storing the first token set TL;

[0212] Decoding the extracted Cookie data containing the first token set TL, and parsing the content of the first token set TL according to a predefined data format;

[0213] Select a preset encoding algorithm to encode the first token set TL, use the window.btoa() function to convert the binary data into printable ASCII characters, and store the verified and formatted encoded data as the second token set TBE back into local Cookies.

[0214] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a multi-dimensional real-time search and intelligent highlight group management device 30, comprising:

[0215] Acquisition module 301, when a client user U accesses the client system, a request is initiated to the backend through the front-end framework to obtain a group data set Dit related to the user U, and a sorting function is used to sort Dit according to the group name Gnm to obtain an ordered set Dst;

[0216] Determination module 302, when the user enters a keyword k in the search box, based on the feature value of the keyword k, determines the delay parameter t0 required by the screening function Fs for data screening of the keyword k, and based on the delay parameter t0 and the ordered set Dst, determines the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k;

[0217] The wrapping module 303 searches the filter set Dft for a group g in the group name Gnm that matches the keyword k, and then wraps the group g with <mark>The highlight set Dht is obtained by label wrapping, and the highlight set Dht is set as the only candidate list for the user to perform a group switching operation;

[0218] The generation module 304 obtains the information when the user U performs a group switching operation, determines the target group gtt and the group identifier gti of the target group gtt in the group list of the highlight set Dht, generates a request object R=Fq(git,uid) based on the group identifier gti, the identifier uid of the user U and the request function Fq, and after the request object is sent to the target server, receives the first token set TL returned by the target server, and stores the first token set TL in the local Cookies;

[0219] The display module 305 encodes the first token set TL stored in the local Cookies to obtain the second token set TBE, sets the effective time t1 for the second token set TBE, and when the user U logs in to the client system again within the effective time t1, the highlighted target group gtt corresponding to the keyword k entered by the user U last time in the client system is displayed.

[0220] See also Figure 4 The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:

[0221] at least one processor; and,

[0222] a memory communicatively connected to the at least one processor; wherein,

[0223] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the multi-dimensional real-time search and intelligent highlight group management method in the aforementioned method embodiment.

[0224] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the aforementioned method embodiment.

[0225] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the multi-dimensional real-time search and intelligent highlight group management method in the aforementioned method embodiment.

[0226] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 60 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0227] like Figure 4 As shown, the electronic device 60 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0228] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, a gage, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 60 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0229] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0230] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.< / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark> < / mark>

Claims

1. A method for managing multi-dimensional real-time search and intelligent highlight groups, characterized in that: include: When the client user U accesses the client system, a request is made to the backend through the front-end framework to obtain the group data set Dit related to the user U. The sorting function is used to sort Dit according to the group name Gnm to obtain the ordered set Dst. When the user enters a keyword k in the search box, based on the feature value of the keyword k, the delay parameter t0 required by the screening function Fs for screening data for the keyword k is determined, and based on the delay parameter t0 and the ordered set Dst, the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k is determined; Search the group name Gnm in the filter set Dft for the group g that matches the keyword k, and then use the group g <mark> The label is wrapped to obtain a highlight set Dht after highlighting, and the highlight set Dht is set as the only candidate list for the user to perform a group switching operation;< / mark> When user U performs a group switching operation, the target group gtt and the group identifier gti of the target group gtt are determined in the group list of the highlight set Dht. Based on the group identifier gti, the identifier uid of user U and the request function Fq, a request object R=Fq(git,uid) is generated. After the request object is sent to the target server, the first token set TL returned by the target server is received, and the first token set TL is stored in the local Cookies. Perform an encoding operation on the first token set TL stored in the local Cookies to obtain a second token set TBE, set an effective time t1 for the second token set TBE, and when the user U logs in to the client system again within the effective time t1, display the highlighted target group gtt corresponding to the keyword k entered by the user U last time in the client system; in The step of determining the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k includes: When the user enters keyword k in the search box, the input detection module of the front-end framework immediately captures the input event and passes the keyword k to the feature value analysis module; The feature value analysis module extracts features from the keyword k and stores the extracted feature value of the keyword k in a feature value object; Query the records matching the feature value object of the current keyword k from the pre-established feature value delay parameter mapping database. If a completely matching feature value combination is found in the mapping database, the corresponding delay parameter t0 is directly obtained. If no completely matching record is found, the interpolation algorithm is used to analyze and calculate the adjacent feature value combinations. By comparing the similarity of the feature values, linear interpolation is performed according to the delay parameter values ​​of the adjacent records to estimate the delay parameter t0 suitable for the current keyword k. The determined delay parameter t0 is passed to the configuration module of the screening function Fs.

2. The method according to claim 1, characterized in that: When the client user U accesses the client system, a request is initiated to the backend through the front-end framework to obtain the group data set Dit related to the user U, including: After the client system is initialized, user U opens the corresponding application or web page interface on the client device, triggering the system's access detection mechanism, which recognizes the access behavior of user U and passes control to the event processing module of the front-end framework; After receiving the access event, the event processing module of the front-end framework checks the login status of user U and verifies the locally stored user login credentials to confirm whether the user is logged in and has access rights; After confirming that user U has access rights, the front-end framework constructs a request object containing the user ID Uid according to the pre-defined API interface specification. The request object contains the target address of the request, the request method, and the request header information. The front-end framework uses the built-in network communication module to send the constructed request object to the back-end server. After receiving the request sent by the front-end framework, the back-end server parses and verifies the request and checks the legitimacy of the request, including whether the request header information is complete and whether the user authentication information is valid. If the request verification passes, the query operation is performed in the database according to the user identifier Uid in the request; The database query module of the backend server retrieves all group data records related to user U from the database table storing user-group association information based on the user identifier Uid, organizes these records into a data format that meets the expectations of the front-end framework, forms a group data set Dit, and returns it to the front-end framework.

3. The method according to claim 2, characterized in that The use of the sorting function to sort Dit according to the group name Gnm to obtain an ordered set Dst includes: After receiving the group data set Dit returned by the backend server, the front-end framework passes it to the data processing module; A sorting function is defined in the data processing module. The function accepts the Dit set as an input parameter. Inside the sorting function, each group data object in the Dit set is traversed, and the group name Gnm attribute value in each group data object is extracted and used as the basis for sorting. During the traversal process, the extracted group name Gnm values ​​are stored in a temporary array. At the same time, the original position of the group data object corresponding to each group name Gnm value in the Dit collection is recorded so that the complete group data object can be restored after sorting; Use the selected merge sort algorithm to sort the group name Gnm values ​​in the temporary array. During the sorting process, comparison and exchange operations are performed according to the lexicographical order rules of the string. According to the order of the group name Gnm values ​​in the sorted temporary array, the corresponding group data objects are extracted from the Dit set according to the position of the original records to form a new ordered set Dst.

4. The method according to claim 1, characterized in that: The determining of the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k based on the delay parameter t0 and the ordered set Dst comprises: After receiving the delay parameter t0 and the ordered set Dst, the initialization module of the screening function Fs initializes itself and sets the matching rules, matching algorithms and screening parameters of the screening; Start a timer and set the timer delay time to t0. Before the timer is triggered, the filter function Fs enters a waiting state and continues to monitor the user's input changes in the search box. If the user modifies the keyword k within t0, the delay parameter t0 is recalculated and the timer is reset. When the timer is triggered, the screening function Fs starts to screen the ordered set Dst, traverses each group data object in the ordered set Dst, and extracts the group name Gnm attribute value for each group data object; According to the preset matching rules and algorithms, the extracted group name Gnm value is matched with the keyword k, and the string matching algorithm is used to find whether there is a substring in the group name Gnm that is the same as the keyword k; If the match is successful, that is, the group name Gnm contains the keyword k, then the group data object is added to a temporary screening result set, and the next group data object in Dst is traversed; After traversing all group data objects in the ordered set Dst, the data objects in the temporary screening result set are sorted into a final screening set Dft, and the screening set Dft is used as the group data set corresponding to the keyword k that meets the screening condition.

5. The method according to claim 4, characterized in that The method searches the group name Gnm in the screening set Dft for a group g that matches the keyword k, and then uses the group g to <mark> After label wrapping, the highlighted set Dht is obtained, including:< / mark> Initialize an empty highlight set Dht to store the group data objects after highlighting processing. At the same time, set a counter to record the position of the currently processed group data object in the filter set Dft; Traverse each group data object in the filter set Dft, and extract the group name Gnm attribute value for the currently traversed group data object; Use the string search algorithm to search for a substring matching the keyword k in the group name Gnm, and record the starting and ending positions of the matching substring in the group name Gnm; According to the starting and ending positions of the matching substring, the group name Gnm string is split into three parts: the part before the matching substring, the matching substring itself, and the part after the matching substring; Will <mark> The tags are inserted before and after the matching substring to form a highlighted string, and the three parts after the segmentation are reassembled into a new highlighted group name string;< / mark> The group data object containing the highlighted group name is added to the highlight set Dht, the counter is updated, and the next group data object in the filter set Dft is traversed continuously until all objects in the filter set Dft are processed, and finally a complete highlight set Dht is obtained.

6. The method according to claim 5, characterized in that Based on the group identifier gti, the identifier uid of the user U and the request function Fq, a request object R=Fq(git,uid) is generated, including: When the user selects the target group gtt in the group list of the highlight set Dht, the event capture module of the front-end framework obtains the selection event and extracts the group identifier gti of the target group gtt and the identifier uid of the user U; The extracted group identifier gti and user identifier uid are passed to the parameter assembly module of the request function Fq, which is responsible for sorting and assembling these parameters according to the requirements of the request function Fq; The parameter assembly module of the request function Fq first creates a basic request object framework R, which contains the general information of the request, and adds the group identifier gti and the identifier uid of the user U as request parameters to the request object R; Add request header information to the request object R. The request header information includes the user's authentication information and the data format of the request. Verify and encapsulate the request object R. Check whether all parameters and information of the request object R are complete and the format is correct. After confirmation, prepare the request object R and wait to send it to the target server.

7. The method according to claim 6, characterized in that The encoding operation is performed on the first token set TL stored in the local Cookies to obtain the second token set TBE, including: Use the API provided by the browser to read the data in local Cookies, use the document.cookie property to obtain all Cookies information, and then use the string parsing method to extract the Cookie data storing the first token set TL; Decoding the extracted Cookie data containing the first token set TL, and parsing the content of the first token set TL according to a predefined data format; Select a preset encoding algorithm to encode the first token set TL, use the window.btoa() function to convert the binary data into printable ASCII characters, and store the verified and formatted encoded data as the second token set TBE back into local Cookies.

8. A device based on multi-dimensional real-time search and intelligent highlight group management, characterized in that: include: Acquisition module: when the client user U accesses the client system, a request is made to the backend through the front-end framework to obtain the group data set Dit related to the user U, and the sorting function is used to sort Dit according to the group name Gnm to obtain the ordered set Dst; A determination module, when a user enters a keyword k in the search box, determines the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k, and determines the screening set Dft=Fs(k, t0, Dst) corresponding to the keyword k based on the delay parameter t0 and the ordered set Dst; The package module searches for the group g in the group name Gnm that matches the keyword k in the filter set Dft, and then uses the group g <mark> The label is wrapped to obtain a highlight set Dht after highlighting, and the highlight set Dht is set as the only candidate list for the user to perform a group switching operation;< / mark> The generation module obtains the information that the user U performs a group switching operation, determines the target group gtt and the group identifier gti of the target group gtt in the group list of the highlight set Dht, generates a request object R=Fq(git,uid) based on the group identifier gti, the identifier uid of the user U and the request function Fq, and after the request object is sent to the target server, receives the first token set TL returned by the target server, and stores the first token set TL in the local Cookies; The display module performs an encoding operation on the first token set TL stored in the local Cookies to obtain a second token set TBE, sets an effective time t1 for the second token set TBE, and when the user U logs in to the client system again within the effective time t1, displays the highlighted target group gtt corresponding to the keyword k input by the user U last time in the client system; in The step of determining the delay parameter t0 required by the screening function Fs for screening data for the keyword k based on the feature value of the keyword k includes: When the user enters keyword k in the search box, the input detection module of the front-end framework immediately captures the input event and passes the keyword k to the feature value analysis module; The feature value analysis module extracts features from the keyword k and stores the extracted feature value of the keyword k in a feature value object; Query the records matching the feature value object of the current keyword k from the pre-established feature value delay parameter mapping database. If a completely matching feature value combination is found in the mapping database, the corresponding delay parameter t0 is directly obtained. If no completely matching record is found, the interpolation algorithm is used to analyze and calculate the adjacent feature value combinations. By comparing the similarity of the feature values, linear interpolation is performed according to the delay parameter values ​​of the adjacent records to estimate the delay parameter t0 suitable for the current keyword k. The determined delay parameter t0 is passed to the configuration module of the screening function Fs.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the multi-dimensional real-time search and intelligent highlight group management method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Search method and system for preventing search function from being triggered frequently

    CN113032121A

  • Group search method and device, terminal and storage medium

    CN113051485A