A method, device and computer equipment for sorting a list

By creating index fields and frequency fields in the pending list and updating these fields based on the user's selected results, dynamically sorting the list options, the problem of inefficient adjustment of list options in the prior art is solved, and more efficient and flexible list sorting is achieved.

CN119415525BActive Publication Date: 2025-04-01ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the order adjustment of list options is inefficient, lacks flexibility, and cannot record user preferences, resulting in low efficiency when indexing in long lists.

Method used

Provide a list sorting method, by determining the options to be adjusted in the pending list, creating index fields and frequency fields, updating these fields based on the user's selected results, and dynamically sorting the options in the pending list to improve the user experience.

Benefits of technology

It automatically adjusts the order of the list options according to the actual usage preferences of users, improves the efficiency of adjusting the order of the list options and has high flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415525B_ABST
    Figure CN119415525B_ABST
Patent Text Reader

Abstract

The present application relates to a list sorting method, device and computer equipment. It includes: determining at least two options to be adjusted in a list to be processed, and establishing index fields and frequency fields corresponding to each option to be adjusted; after obtaining the selection result for the option to be adjusted, updating the frequency field of the corresponding option to be adjusted based on the selection result, updating the total number of selections in the list to be processed based on the selection result, and updating the index fields corresponding to all options to be adjusted based on the selection result and the total number of selections; based on the updated index field and frequency field, sorting the positions of the corresponding options to be adjusted in the list to be processed in descending order of the updated frequency field. The method can dynamically adjust the arrangement order of each option in the list according to the user's usage habits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security monitoring technology, and in particular to a list sorting method, device and computer equipment. Background Art

[0002] In the field of security monitoring, NVR is a backend device that often connects to a variety of different intelligent front-end devices. Intelligent functions include but are not limited to: face detection, face recognition, general behavior analysis, three-dimensional behavior analysis, motor vehicle detection, dynamic detection, people counting, license plate detection and other functions. The data generated by the front-end intelligent detection (such as pictures, logs, videos) has a corresponding functional interface on the NVR for data query and retrieval, and displays the result information. For NVR devices with powerful storage functions, hundreds of front-end cameras can be connected. The functions of cameras vary, and there are many functional subcategories under the same major function category. The NVR graphical user interface is generally designed according to the major functional categories. Because it is necessary to manage all connected front-ends, the page often sets the channel number option for users to switch channels, set the front-end configuration of a specific channel, or retrieve data. At the same time, on the event or intelligent function page, a list of subcategories under the major functional category is displayed in a drop-down list for users to choose.

[0003] The current implementation of the drop-down list in the NVR graphical user interface is that the list items are generally fixed. If they need to be added or modified, they are added to the list and basically not changed. The advantage of this implementation is that it is simple and fixed. However, when the list items are long, it will take a certain amount of time for users to index the list. The list does not record the user's preferences. No matter how many times the user selects, the list order will not change. This kind of list options has poor operability, low efficiency, and lack of flexibility.

[0004] In the prior art, the attribute values ​​of client control elements are mostly configured through a remote server. After configuration, the attribute values ​​of client control elements or the display of control elements will not be dynamically adjusted, and the interface is fixed. It is understandable that when the control elements change or the frequency of use of different control elements changes, reconfiguration is required. This method is relatively cumbersome and inefficient.

[0005] Currently, no effective solution has been proposed for the problem of low efficiency in adjusting the order of list options in the prior art. Summary of the invention

[0006] Based on this, it is necessary to provide a list sorting method, device and computer equipment to address the above technical problems.

[0007] In a first aspect, the present application provides a list sorting method. The method comprises:

[0008] Determine at least two to-be-adjusted options in the to-be-processed list, and establish an index field and a frequency field corresponding to each to-be-adjusted option;

[0009] After obtaining the selection result for the option to be adjusted, the frequency field of the corresponding option to be adjusted is updated based on the selection result, the total number of selections of the list to be processed is updated based on the selection result, and the index fields corresponding to all the options to be adjusted are updated based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0010] Based on the updated index field and frequency field, the positions of the corresponding options to be adjusted in the list to be processed are sorted in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0011] In some embodiments, before determining at least two options to be adjusted in the to-be-processed list, the method further includes:

[0012] Set a corresponding unique identifier for each pending list;

[0013] Managing the pending list based on the unique identifier, including obtaining setting information corresponding to the pending list;

[0014] A configuration field is established corresponding to the pending list based on the setting information.

[0015] In one embodiment, a configuration field is established corresponding to the to-be-processed list based on the setting information, including:

[0016] If it is detected that the configuration field indicates that the list to be processed includes at least two processing channels, a channel matrix corresponding to the list to be processed is established, wherein the channel matrix includes at least two channel sub-matrices, the channel sub-matrices correspond to the processing channels one-to-one, and each channel sub-matrix includes preset fields corresponding to the options to be adjusted one-to-one, and the preset fields include an index field and a frequency field;

[0017] If it is detected that the configuration field indicates that the list to be processed includes a processing channel, a channel matrix corresponding to the list to be processed is established, wherein the channel matrix includes a channel sub-matrix, the channel sub-matrix includes preset fields corresponding one by one to the options to be adjusted, and the preset fields include an index field and a frequency field.

[0018] In one embodiment, determining at least two options to be adjusted in a pending list includes:

[0019] Set the value of the index field corresponding to the option to be adjusted to 0, and set the value of the frequency field to 0;

[0020] Set the total number of selections to 0;

[0021] The order of arranging the various options to be adjusted in the pending list is set to be arranged in a preset default order.

[0022] In one embodiment, updating the frequency field of the corresponding option to be adjusted based on the selected result includes:

[0023] Get the preset frequency threshold;

[0024] The value of the frequency field is compared with the frequency threshold. If it is detected that the value of the frequency field is less than the frequency threshold, the value of the preset difference is set as the first parameter. After the selected result is obtained, the value of the frequency field is updated based on the selected result and the first parameter.

[0025] When it is detected that the value of the frequency field is greater than or equal to the frequency threshold, the preset difference value is set to the difference between the value of the frequency field and the frequency threshold. After the selected result is obtained, the value of the frequency field is updated based on the selected result, the difference between the value of the frequency field and the frequency threshold.

[0026] In one embodiment, the selection result includes a selection process of the option to be adjusted, and based on the selection result and the total number of selections, the index fields corresponding to all the options to be adjusted are updated, including:

[0027] If it is detected that the value of the index field of any target option to be adjusted among the options to be adjusted is equal to the preset maximum difference threshold, the value of the index field of the target option to be adjusted is maintained at the maximum difference threshold;

[0028] If it is detected that the value of the total number of selections is equal to the preset maximum count threshold when the current selected result is obtained, the total number of selections is set to 0, and the index field of the option to be adjusted corresponding to the current selected result is set to 0.

[0029] In one embodiment, the method further comprises:

[0030] When it is detected that the value of the total number of selections is an integer multiple of the number of items of the options to be adjusted, the frequency attenuation number corresponding to each option to be adjusted is calculated based on a preset attenuation function, the frequency field corresponding to each option to be adjusted, and the number of items of the options to be adjusted;

[0031] When it is detected that the value of the frequency field is greater than the frequency decay times, the difference between the value of the frequency field and the frequency decay times is calculated, and the difference is used as the updated value of the frequency field of the corresponding option to be adjusted;

[0032] When it is detected that the value of the frequency field is less than or equal to the frequency attenuation times, the value of the frequency field is set to a preset target frequency value.

[0033] In one embodiment, determining a to-be-processed list includes:

[0034] Obtain at least one initial list and determine a setting strategy corresponding to each initial list;

[0035] If it is detected that the setting policy is the default policy, the options in the initial list are arranged in a preset default order;

[0036] If it is detected that the setting strategy is a frequency strategy, the corresponding initial list is determined as a list to be processed;

[0037] If it is detected that the setting policy is a reset policy, the values ​​in the corresponding index field and frequency field in the initial list are reset.

[0038] In a second aspect, the present application also provides a list sorting device. The device comprises:

[0039] An acquisition module, used for determining at least two to-be-adjusted options in the to-be-processed list, and establishing an index field and a frequency field corresponding to each to-be-adjusted option;

[0040] A calculation module is used to obtain the selection result for the option to be adjusted, update the frequency field of the corresponding option to be adjusted based on the selection result, update the total number of selections of the list to be processed based on the selection result, and update the index field corresponding to all the options to be adjusted based on the selection result and the total number of selections, wherein the selection result includes at least one selection process of the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0041] A generation module is used to sort the positions of the corresponding options to be adjusted in the list to be processed in descending order of the updated frequency fields based on the updated index fields and frequency fields. When it is detected that there are at least two first options to be adjusted with the same updated frequency field values ​​in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0042] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0043] Determine at least two to-be-adjusted options in the to-be-processed list, and establish an index field and a frequency field corresponding to each to-be-adjusted option;

[0044] After obtaining the selection result for the option to be adjusted, the frequency field of the corresponding option to be adjusted is updated based on the selection result, the total number of selections of the list to be processed is updated based on the selection result, and the index fields corresponding to all the options to be adjusted are updated based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0045] Based on the updated index field and frequency field, the positions of the corresponding options to be adjusted in the list to be processed are sorted in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0046] The above-mentioned list sorting method, device, computer equipment and storage medium first determine multiple options to be adjusted in the list to be processed, and establish index fields and frequency fields corresponding to each option to be adjusted, and then after obtaining the selection result for the option to be adjusted, update the frequency field of the corresponding option to be adjusted based on the selection result, update the total number of selections of the list to be adjusted based on the selection result, and update the index fields corresponding to all options to be adjusted based on the selection result and the total number of selections; then based on the updated index field and frequency field, sort the positions of the corresponding options to be adjusted in the list to be processed in order from large to small after the updated frequency field, and after detecting that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, compare the updated index fields corresponding to the first option to be adjusted, and sort the positions of the corresponding first options to be adjusted in the list to be processed in order from small to large after the updated index fields. Through this application, the arrangement order of the options to be adjusted in the list to be processed can be automatically adjusted according to the actual usage preferences of the user, which effectively improves the adjustment efficiency of the list option order and has high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a flow chart of a list sorting method in one embodiment;

[0048] Figure 2 A schematic diagram of a process of list initialization in one embodiment;

[0049] Figure 3 A schematic diagram of an implementation of a configuration field including multiple processing channels in one embodiment;

[0050] Figure 4 A schematic diagram of an implementation of a configuration field including a processing channel in one embodiment;

[0051] Figure 5 A schematic diagram of a flow chart of a list sorting method in a preferred embodiment;

[0052] Figure 6 A structural block diagram of a sorting method device in an embodiment;

[0053] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] In one embodiment, Figure 1 As shown, a list sorting method is provided, comprising the following steps:

[0056] Step S110, determining at least two options to be adjusted in the to-be-processed list, and establishing an index field and a frequency field corresponding to each option to be adjusted.

[0057] Specifically, the above-mentioned pending list is a list that needs to adjust the order of options. In some preferred embodiments, this application is mostly used in NVR (Network Video Recorder) scenarios, so in actual applications, there are generally multiple lists on the NVR. Multiple json fields can be added as needed to represent multiple pending lists. The functions of different pending lists are generally different. For example, a list includes but is not limited to different options to be adjusted such as "parking detection", "fast movement", "people gathering", etc. The user can implement the corresponding function according to the selection of different options to be adjusted. Different pending lists are independent of each other, such as option B in list A is only compared with other options in list A to determine the order of arrangement.

[0058] After determining multiple options to be adjusted in the pending list, establish index fields and frequency fields corresponding to each option to be adjusted. The frequency field represents the user's selection frequency of the corresponding option to be adjusted. The index field represents the difference between the number of times the option was most recently selected and the total number of times the option was selected in the pending list. The total number of times selected is the sum of the number of times all options to be adjusted in a pending list are selected after obtaining at least one of the above-mentioned selection results. In summary, if the pending list includes multiple options to be adjusted, the total number of times all options to be adjusted are selected is 15 times. As of the current statistical update of the index field and the frequency field, the most recent time a certain option to be adjusted was selected was the 8th time. Therefore, the index field of the option to be adjusted is 15-8=7. Similarly, if the option to be adjusted is selected a total of 4 times in these 15 times, the value of the frequency field of the option to be adjusted is 4.

[0059] Step S120, after obtaining the selection result for the option to be adjusted, update the frequency field of the corresponding option to be adjusted based on the selection result, update the total number of selections of the list to be processed based on the selection result, and update the index fields corresponding to all options to be adjusted based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections.

[0060] Specifically, the user selects the option to be adjusted once and obtains a selection result, which indicates the option selected by the user. After obtaining at least one selection result, the frequency field of the corresponding option to be adjusted is updated according to the selection result, wherein this embodiment does not impose too many restrictions on the method of updating the frequency field, and the update method includes but is not limited to: if the option to be adjusted is selected once, the value of the frequency field corresponding to the option to be adjusted is increased by one; or, if it is detected that the frequency value of the option to be adjusted is too large, the probability of increasing its value is gradually attenuated by a preset algorithm, so that its value can be increased by 1 only after several visits, and so on. Further, after obtaining the selection result, the index field of the corresponding option to be adjusted is updated according to the selection result. Similarly, this embodiment does not impose too many restrictions on the update method of the index field, and the update method of the index field includes but is not limited to: in combination with the selection result, the difference between the number of times the option to be adjusted was most recently selected and the total number of times the list to be processed is selected is used as the value of the index field of the option to be adjusted. Furthermore, since the total number of selections is the sum of the number of selections of all the options to be adjusted in the pending list, after obtaining the selection result, the number of selection results is added to the previous total number of historical selections to obtain the updated total number of selections.

[0061] In some embodiments, the above-mentioned selection results only include the results of selecting a certain option to be adjusted once, that is, at this time, each time the user selects the option to be adjusted and obtains a selection result, the index field and frequency field of the corresponding option to be adjusted are updated, and the total number of selections is increased by 1, and then the next user selection is waited for; in other embodiments, the above-mentioned selection results include the results of multiple selections for one or more options to be adjusted, such as the selection result may be 10 times, that is, at this time, after detecting that the user has selected the option to be adjusted in the processing list for a total of 10 times, the index field and frequency field of the corresponding option to be adjusted are updated according to the 10 selection results, and the total number of selections is increased by 10, and then the next user selection is waited for.

[0062] Step S130, based on the updated index field and frequency field, the positions of the corresponding options to be adjusted in the list to be processed are sorted in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0063] Specifically, after the update of the index field and frequency field of the options to be adjusted based on the selection result, the updated options to be adjusted are re-sorted. First, the various options to be adjusted are sorted based on the value of the frequency field, and the corresponding options to be adjusted are sorted in the pending list in descending order based on the value of the frequency field, so that the options with higher selection frequency are ranked higher, and the user can quickly locate the commonly used options to be adjusted when using them. Furthermore, if there are multiple first options to be adjusted with the same updated frequency field value, the updated index fields corresponding to the first options to be adjusted are compared, and the corresponding first options to be adjusted are sorted in descending order based on the updated index fields. It can be understood that the smaller the value of the index field, the closer the corresponding option was selected, and the higher its timeliness.

[0064] Through steps S110 to S130, the index field and frequency field of each option to be adjusted are updated based on the selected result, and the options to be adjusted are reordered based on the updated frequency field and index field, so that the display strategy of the options to be adjusted can be adaptively adjusted according to the different usage habits of different users or the needs of a certain period of time, and adjustments can be made effectively and quickly based on user habits.

[0065] In some embodiments, the method further comprises:

[0066] Set a corresponding unique identifier for each pending list;

[0067] Managing the pending list based on the unique identifier, including obtaining setting information corresponding to the pending list;

[0068] A configuration field is established corresponding to the pending list based on the setting information.

[0069] Specifically, Figure 2 The figure is a flowchart of list initialization in one embodiment.

[0070] Step S210, setting a corresponding unique identifier for each to-be-processed list, wherein the unique identifier is usually a list name, and the unique identifiers of different lists are different, so that the management of the corresponding to-be-processed list can be completed based on the call of the unique identifier.

[0071] Step S220, determine the setting information of the list to be processed. The setting information includes, but is not limited to, setting strategies, the number of processing channels corresponding to the list, etc., wherein the setting strategy of the list to be processed is a frequency strategy, which means that the list needs to dynamically adjust the arrangement order according to the frequency value and index value of each option to be adjusted, and different processing channels correspond to different front-end devices connected.

[0072] Step S230, judging whether the list is device-level or channel-level according to the number of processing channels, if the list is a channel-level list, jumping to step S250, if the list is a device-level list, jumping to step S240. Among them, the device-level list includes only one processing channel, and the channel-level list includes multiple processing channels.

[0073] Step S240, if it is detected that the list is a device-level list, then a corresponding configuration field is established, which includes but is not limited to an index field, a frequency field, a device-level identifier device field (the device field indicates that the corresponding list includes only one processing channel at this time), a total number of selections, and the like.

[0074] Step S250, if it is detected that the list is a channel-level list, then the corresponding configuration fields are established, including but not limited to, index fields, frequency fields, channel-level channel fields (the dimension of the channel field is consistent with the number of processing channels, each dimension of the channel field corresponds to a processing channel one-to-one, and records the frequency data and index data of the list items under each processing channel), total number of selections, etc., and the channel-level channel field and the device-level identification device field are mutually exclusive.

[0075] In some embodiments, the method further comprises:

[0076] If it is detected that there are at least two processing channels, the corresponding relationship between the processing channels and the list to be processed is determined by configuring the field, and a first channel matrix corresponding to the list to be processed is established, wherein the first channel matrix includes at least two first channel sub-matrices, the first channel sub-matrices correspond to the processing channels one-to-one, and each first channel sub-matrix includes preset fields corresponding to the options to be adjusted one-to-one, and the preset fields include an index field and a frequency field;

[0077] If it is detected that there is a processing channel, the correspondence between the processing channel and the list to be processed is determined by configuring the field, and a second channel matrix corresponding to the list to be processed is established, wherein the second channel matrix includes a second channel sub-matrix, and the second channel sub-matrix includes preset fields corresponding one by one to the options to be adjusted, and the preset fields include an index field and a frequency field.

[0078] Specifically, the present application is mostly used in NVR scenarios. The above-mentioned configuration fields are mostly saved and used in Json format in NVR, and saved in the specified directory of the device in the form of encrypted files. Among them, the index field and frequency field in the configuration field can be saved as configuration files, and the frequency information and index information corresponding to each option to be adjusted in the pending list are saved in Json format.

[0079] For some NVR devices with powerful computing and storage functions, hundreds of front-end cameras can be connected, and the functions of the cameras are different. In addition, under the same category of functions, there are many functional subcategories. In actual applications, the NVR graphical user interface is generally designed according to the functional categories. Because it is necessary to manage all connected front-ends, the page often sets channel number options for users to switch channels. Different channels generally correspond to different front-end devices. In actual applications, the corresponding functions can be configured for the front-end devices of specific channels according to actual needs. At the same time, the corresponding list to be processed is displayed in the user's operation interface for users to choose. In this embodiment, for different application scenarios, the corresponding processing channels of the connected front-end devices are not the same. In some application scenarios, multiple front-end devices are connected, and it is necessary to count the processing channels corresponding to multiple front-end devices. In other scenarios, only one front-end device is connected, and it is only necessary to count the processing channels corresponding to one front-end device.

[0080] If multiple processing channels are detected, the corresponding relationship between the processing channels and the list to be processed can be determined through the configuration field. Figure 3It is a schematic diagram of the implementation of a configuration field that includes multiple processing channels in an embodiment. The left side of the figure is the Json print result, and the right side is the formatted result. The members of the list ivs_event_list are set in Json to represent the event list items of the general behavior function. The default field represents the default arrangement order of the options to be adjusted in the pending list and the content of the options to be adjusted, which corresponds to the list displayed when the user actually uses it. The options to be adjusted in the figure include tripwire intrusion, area detection, and items left behind, etc. The "all" displayed in the default field means that all the remaining nine options are selected. It can be understood that the "all" option is in a parallel relationship of the same level as the remaining nine options. The channel field is related to the processing channel, and the dimension of the channel field is consistent with the number of processing channels. Each dimension of the channel field corresponds to the processing channel one by one, and records the frequency data and index data of the list items under each processing channel. The array members in each dimension are consistent with the number of members under the default field, and record the number of visits and frequency data of each option to be adjusted. Figure 3 There are 10 options to be adjusted, so each processing channel needs to include ten values ​​to record the frequency data and index data of each option to be adjusted, and Figure 3 It includes 4 processing channels, so channel includes four-dimensional data. In practical applications, if the NVR device supports more channels, the channel field and last_index field dimensions can be added accordingly. Based on the content disclosed in this application, it can be understood by those skilled in the art that when the list to be processed is initialized before use, the dimension of channel is consistent with the number of front-end devices when the NVR is fully connected.

[0081] The last_index field is the total number of selections mentioned above, indicating the total number of times the corresponding pending list is selected. Each time any of the pending options in the pending list is selected, the corresponding last_index value increases by 1. The dimension of the last_index field is the same as the channel field. If multiple processing channels are included, the dimension of the last_index field is the same as the number of channels. If there is only one processing channel, the dimension is 1.

[0082] In summary, if multiple processing channels are detected, indicating channel-level list items, the corresponding relationship between the processing channel and the list to be processed is determined by the channel field in the configuration field, and a first channel matrix is ​​established, that is, the above-mentioned channel matrix. When multiple processing channels are included, the first channel matrix includes multiple first channel sub-matrices, each of which corresponds to a processing channel, that is, a row of sub-matrices in the channel field, and each first channel sub-matrix includes a preset field corresponding to the option to be adjusted, that is, the value in the channel field. Initially, the data in the channel field is 0, indicating that the option has not been selected, and each preset field is zero. Each preset field includes an index field and a frequency field, which records the index value and frequency value of the corresponding option to be adjusted.

[0083] Similarly, Figure 4 FIG. 1 is a schematic diagram of a configuration field implementation including a processing channel in an embodiment. If a processing channel is detected, the corresponding relationship between a processing channel and a list to be processed is determined through the configuration field, and a second channel matrix corresponding to the list to be processed is established. The second channel matrix is Figure 4 The device field in the default field can be added at the same level of the Json level as the default field to indicate that the corresponding list only includes one processing channel at this time, and only one frequency statistics information needs to be maintained. The array dimension under the device field is 1, that is, globally unique, indicating a device-level list item. The channel field and the device field are mutually exclusive, and there can only be one, that is, the first channel matrix and the second channel matrix are mutually exclusive. After the second channel matrix is ​​established, the second channel matrix only includes a second channel sub-matrix, that is, only one-dimensional data, and the second channel sub-matrix includes preset fields corresponding to the corresponding options to be adjusted one by one, and the preset fields also include index fields and frequency fields. In some preferred embodiments, whether it is a configuration field that only includes one processing channel or a configuration field that includes multiple processing channels, the storage form of the index field and the frequency field are the same, and each option record is represented by a 32-bit integer in the channel field / device field, wherein the lower 8 bits are used to represent the frequency field, and the upper 16 bits are used to represent the index field.

[0084] Furthermore, in practical applications Figure 3 and Figure 4Both include an order field, which is used to indicate the order in which the current list to be processed is displayed. The order field value can be set to "default" or "frequency", where default means that the current list to be processed displays the list items in the default order, and the position of the options to be adjusted in the list to be processed will not change with the user's choice; frequency means that the current list to be processed displays the list items by frequency, and the position of the options to be adjusted in the list to be processed will change based on the user's choice. Through this application, the corresponding configuration fields can be set according to actual needs, so that the frequency information and index information corresponding to each list to be processed and the options to be adjusted can be recorded more efficiently, thereby improving computing efficiency and reducing the waste of storage and computing resources.

[0085] In some embodiments, the method further comprises:

[0086] Set the value of the index field corresponding to the option to be adjusted to 0, and set the value of the frequency field to 0;

[0087] Set the total number of selections to 0;

[0088] The order of arranging the various options to be adjusted in the pending list is set to be arranged in a preset default order.

[0089] Specifically, in this embodiment, the options to be adjusted in the pending list need to be initialized. In actual applications, usually part of the pending list needs to be tracked and updated, while the other part does not need to be tracked and updated. For each list that needs to be tracked and updated, a table item name can be set to correspond to the frequency information and field information of the list item. If there are multiple lists on the same page of the NVR in actual applications that need to track usage information, different list names can be set for each different pending list. Preferably, for lists that need to track and update frequencies, initialization processing can be performed before use. For reference, Figure 3 or Figure 4The content in is used to initialize the configurations corresponding to different pending lists. If there is a pending list that needs to arrange the options to be adjusted according to the frequency information, the value of the "order" field needs to be modified to "frequency", that is, it is necessary to identify that the options to be adjusted in the pending list need to update the frequency and index value according to the selection result, and when displaying the list, the options to be adjusted are sorted and displayed according to the recorded frequency and index value. In this embodiment, each option to be adjusted in the list is specified by the above-mentioned default field, and the order of members in the default field is the default order of the options to be adjusted. Preferably, each option to be adjusted in the pending list is arranged in the default order, and the value of the index field corresponding to each option to be adjusted is set to 0, the value of the frequency field is set to 0, and the total number of selections in the pending list, that is, the Last_index field is set to 0. This embodiment can realize the initialization setting of the pending list before actual use.

[0090] In some embodiments, the method further comprises:

[0091] Get the preset frequency threshold;

[0092] The value of the frequency field is compared with the frequency threshold. If it is detected that the value of the frequency field is less than the frequency threshold, the value of the preset difference is set as the first parameter. After the selected result is obtained, the value of the frequency field is updated based on the selected result and the first parameter.

[0093] When it is detected that the value of the frequency field is greater than or equal to the frequency threshold, the preset difference value is set to the difference between the value of the frequency field and the frequency threshold. After the selected result is obtained, the value of the frequency field is updated based on the selected result, the difference between the value of the frequency field and the frequency threshold.

[0094] Specifically, the present embodiment further provides a method for updating the value of a frequency field. In actual applications, the method for updating the value of a frequency field is not limited to the method described in the present embodiment, and may further include taking the number of times the user selects the option to be adjusted as the value of the frequency field of the corresponding option; or, when it is detected that the value of the frequency field of the option to be adjusted is less than or equal to a preset first threshold (such as 30 times), if the option to be adjusted is selected once, the value of the frequency field of the option to be adjusted is increased by one accordingly; when it is detected that the value of the frequency field of the option to be adjusted is greater than the first threshold (such as 30 times), the value of the frequency field of the option to be adjusted is adjusted according to a preset probability value, such as after detecting that the option to be adjusted is selected once, there is a 70% probability that the value of the frequency field of the option to be adjusted is increased by one accordingly, and so on.

[0095] The method for updating the value of the frequency field provided in this embodiment is to first query the value record of the corresponding record of the pending list and the options to be adjusted therein according to the above-mentioned configuration field, that is, record = configuration record ["channel"][channel number][drop-down index number], wherein the channel number corresponds to a different processing channel, and each processing channel has a corresponding channel number to facilitate the sorting, calculation, calling and other operations of each processing channel, and the index number is the index number of the options to be adjusted in the pending list in the default arrangement order, and each option to be adjusted has its index number. Similarly, the index number also facilitates the sorting, calculation, calling and other operations of each option to be adjusted. After reading the current record value through the record value, update it: first obtain the value of the frequency field corresponding to each option to be adjusted, and check whether the value of the frequency field corresponding to each option to be adjusted is greater than or equal to 255. If so, return 255 directly; obtain the preset frequency threshold LFU_INIT_VAL, which can be 30. Compare the obtained value of the frequency field with the frequency threshold LFU_INIT_VAL. If it is detected that the value of the frequency field is less than the frequency threshold LFU_INIT_VAL, the value of the preset difference diff is set as the first parameter. The value of the preset difference diff is preferably set to 0. Similarly, if the detected value of the frequency field is greater than or equal to the frequency threshold LFU_INIT_VAL, the value of the preset difference diff is set to the difference between the value of the frequency field and the frequency threshold LFU_INIT_VAL.

[0096] After the comparison is completed, the value of p in p=1.0 / (diff×lfu_log_factor+1) is calculated, wherein lfu_log_factor is a counter growth factor, preferably, a typical value thereof is between 1 and 10, and is used to adjust the logarithmic value of the frequency counter in the frequency update algorithm. A lower value will cause the algorithm to update the frequency counter more frequently, and a larger value will result in a relatively slow increase in the frequency. In practical applications, considering that the operation of switching the option to be adjusted will not be very frequent, the value of the counter growth factor lfu_log_factor in this embodiment is preferably 1.0, which can achieve a faster increase in the frequency value. Combined with the above-mentioned calculation formula for the p value, and the selected result, the first parameter, or the difference between the value of the frequency field and the frequency threshold, the value of the frequency field is updated. It can be understood that if the value of the preset difference diff is 0, then p=1, and the value of the frequency field corresponding to the option to be adjusted at this time has a probability of increasing according to the selected result of 1, that is, the value of the frequency field corresponding to the option to be adjusted must increase at this time, otherwise p is a value less than 1, then the value of the frequency field corresponding to the option to be adjusted at this time has a probability of increasing according to the selected result of less than 1. In some embodiments, there are multiple algorithms for increasing the value of the frequency field corresponding to the option to be adjusted according to the selected result, and all algorithms that can update the value of the frequency field of the corresponding option to be adjusted based on the selected result should fall within the protection scope of this application. In some preferred embodiments, a random number r can be randomly generated, r is a decimal with a value of 0-1, and the value of r is compared with the value of p. If r<p, the value of the frequency field is increased according to the selected result. If the selected result indicates that the option to be adjusted is selected once, then the value of the frequency field of the option to be adjusted is correspondingly increased by one.

[0097] Considering that the selection of the list to be processed in this application is a manual operation, the frequency of selecting the option to be adjusted will not be particularly high. Therefore, through this embodiment, it can be achieved that when the value of the frequency field is too small, such as less than the frequency threshold LFU_INIT_VAL, once the corresponding option is selected, the probability of the value of its frequency field increasing is close to 100%. On the contrary, if the value of the frequency field is too large, such as greater than the frequency threshold LFU_INIT_VAL, the probability of the corresponding frequency field value increasing gradually decays, and it may take several visits to increase the value of its frequency field by one. Through the method for updating the value of the frequency field in this embodiment, the update of the value of the frequency field can be prevented from being too high, resulting in excessive changes and too fast changes in the ranking of the various options in the list to be processed, thereby effectively improving the user experience.

[0098] In some embodiments, the selection result includes a selection process of the option to be adjusted, and based on the selection result and the total number of selections, the index fields corresponding to all the options to be adjusted are updated, including:

[0099] If it is detected that the value of the index field of any target option to be adjusted among the options to be adjusted is equal to the preset maximum difference threshold, the value of the index field of the target option to be adjusted is maintained at the maximum difference threshold;

[0100] If it is detected that the value of the total number of selections is equal to the preset maximum count threshold when the current selected result is obtained, the total number of selections is set to 0, and the index field of the option to be adjusted corresponding to the current selected result is set to 0.

[0101] Specifically, according to the above, the value of the index field is the difference between the total number of selections in the pending list and the number of times the option was most recently selected. However, in actual applications, since there is a certain upper limit to the calculated value, it cannot be increased indefinitely, that is, there is a maximum count threshold, which is usually 65536. Therefore, when the value of the total number of selections is equal to 65536, the total number of selections will wrap around and be reset to 0. In this embodiment, preferably, the selection result is set to include only one selection process for the option to be adjusted, that is, each time the user switches the option to be adjusted, the index values ​​of all the options to be adjusted and the frequency values ​​of the corresponding options to be adjusted are updated once. After detecting that a certain option to be adjusted is selected in the current selection result through the selection result, the value of the index field of the option to be adjusted is set to 0, and the index fields of the remaining options in the pending list are added by one to the original value, which means that the difference between the remaining options and the total number of selections is added by 1 based on the operation of the current selection result. Considering the limitation of the number of bits when computers represent data in practical applications, if it is detected that the value of the index field of a target option to be adjusted in the options to be adjusted is equal to the preset maximum difference threshold (preferably 65535), it indicates that the target option to be adjusted has not been selected for a long time. In the subsequent selection process of the target option to be adjusted, the value of the index field of the target option to be adjusted will no longer change and will be fixed to the maximum difference threshold. In some preferred embodiments, if in the subsequent selection process, when it is detected through a certain selection result that the target option to be adjusted is selected again, the value of the index field of the target option to be adjusted is reset to 0. Further, if it is detected that the value of the total number of selections is equal to the preset maximum count threshold (preferably 65536) when the current selection result is obtained, the total number of selections is set to 0, that is, wrapping is performed. At this time, the value of the index field of the option to be adjusted corresponding to the current selection result also needs to be set to 0, and the values ​​of the index fields of the remaining options to be adjusted are still increased by 1. This embodiment can achieve that when the values ​​of the frequency fields of the options to be adjusted are the same, the options with smaller index field values, that is, the options whose selected time is closest to the current time, are ranked higher, which can better fit the user's usage habits. In addition, this embodiment takes into account the bit limit of computers in actual applications, and sets a corresponding update method for the index field, which effectively avoids counting confusion, counting errors, and other problems caused by bit limit in actual applications.

[0102] In some embodiments, the method further comprises:

[0103] When it is detected that the value of the total number of selections is an integer multiple of the number of items of the options to be adjusted, the frequency attenuation number corresponding to each option to be adjusted is calculated based on a preset attenuation function, the frequency field corresponding to each option to be adjusted, and the number of items of the options to be adjusted;

[0104] When it is detected that the value of the frequency field is greater than the frequency decay times, the difference between the value of the frequency field and the frequency decay times is calculated, and the difference is used as the updated value of the frequency field of the corresponding option to be adjusted;

[0105] When it is detected that the value of the frequency field is less than or equal to the frequency attenuation times, the value of the frequency field is set to a preset target frequency value.

[0106] Specifically, when it is detected that the total number of selections is an integer multiple of the number of items of the options to be adjusted, the value of the relevant frequency field is updated. In this embodiment, the index field value is divided by lfu_decay_value to obtain the frequency decay times corresponding to each option, where lfu_decay_value is the number of items in the current list.

[0107] If it is detected that the value of the frequency field is greater than the corresponding frequency attenuation times, the frequency field value is subtracted from the frequency field value, and the calculated result is used as the updated frequency field value; if it is detected that the value of the frequency field is less than or equal to the corresponding frequency attenuation times, the frequency field value is set to a preset target frequency value, preferably, the target frequency value is 0. It can be understood that the adjustment of the value of the frequency field in this embodiment is triggered when it is detected that the value of the total number of selections in the list is an integer multiple of the number of items. In practical applications, it is common that the access frequencies of the various options to be adjusted in the list are equivalent. Each time the frequency attenuation operation is triggered, the frequency field value of each option to be adjusted can be reduced by approximately 1 according to the probability expectation through this embodiment. At this time, if there are some options that were frequently accessed in the early stage but have a low access frequency recently, because the value of their index field is large, the attenuation times value is also large, and the frequency field value will decrease more. Therefore, at this time, the position of the option in the list to be processed will be rapidly reduced, so that it can better fit the user's usage habits.

[0108] In some embodiments, the method further comprises:

[0109] Obtain at least one initial list and determine a setting strategy corresponding to each initial list;

[0110] If it is detected that the setting policy is the default policy, the options in the initial list are arranged in a preset default order;

[0111] If it is detected that the setting strategy is a frequency strategy, the corresponding initial list is determined as a list to be processed;

[0112] If it is detected that the setting policy is a reset policy, the values ​​in the corresponding index field and frequency field in the initial list are reset.

[0113] Specifically, in actual applications, not every list to be adjusted needs to be sorted according to the frequency selected by the user, that is, some lists do not need to adjust the order of arrangement adaptively. Figure 3 or Figure 4 , setting the order field to "default" indicates that the setting policy corresponding to the list is the default policy, that is, the options in the list are arranged in a preset default order, without automatically adjusting the arrangement order according to the user's selection frequency. Setting the order field to "frequency" indicates that the setting policy corresponding to the list is a frequency policy, and the list is determined as the above-mentioned pending list, and the arrangement order of the options to be adjusted therein is dynamically updated according to the content specified in this application. When it is detected that the setting policy is a reset policy, the index value and frequency value of each option to be adjusted in the list are reset to 0, and the counting starts again. After the setting, when the list is operated for the first time, the options in the list are displayed in the preset default order. Preferably, the order field is set to "default".

[0114] In some embodiments, when there are only global settings, the above-mentioned default strategy / frequency strategy will take effect on all lists. If the default strategy is selected, each list will always be fixed in the preset default sort order until the user modifies the order setting. If there are global settings and local settings, if the local list option order setting is modified (such as adding options after the list for user settings), it will only take effect on this list, that is, only the order field corresponding to the list will be modified, and the display rules of other lists will not be affected. When the user selects the default strategy, the frequency and index item values ​​are not cleared to zero, so that when the user switches to the frequency strategy later, the previous frequency records, index records and other information can be reused. If the user chooses to reset the strategy, each record will be reset so that the frequency statistics can be restarted later.

[0115] In some embodiments, when a device corresponding to a processing channel goes offline, the frequency information and index information corresponding to the channel remain unchanged. When the processing channel device comes online again, the previous frequency information and index information can still be reused to display the page list.

[0116] In some embodiments, when a processing channel is deleted, all list frequency information corresponding to the channel is set to default values. If a new device is online on the channel, the list items are displayed in order as default values ​​before the user selects a list item.

[0117] In some embodiments, when a user modifies the front end corresponding to a processing channel, the user generally directly modifies the front end IP and replaces the front end. At this time, all list frequency information corresponding to the channel is set to the default value.

[0118] In summary, when the user selects item B in list A, the corresponding frequency and index information are updated. First, the order field under list A is taken out from the configuration field, and the value of the order field is read. If the value of the order field is "default", the frequency is not updated and the default sorting is directly returned. If the value of the order field is "frequency", the complete list configuration item is read into the memory and saved as the Json variable cfg. The list name corresponding to the user operation list is my_selected_list, that is, cfg["my_selected_list"]. The list configuration information is obtained. At this time, there are two situations for the list configuration:

[0119] a) If it is a channel-level list, that is, it includes multiple processing channels, then the channel field exists, and the table item cfg["my_selected_list"]["channel"] exists. Let the selected channel be ch_idx (that is, the channel number mentioned above), and the index of the selected list item in the default field be item_idx (that is, the index number of the option to be adjusted in the list to be processed). Then update the value of the cfg["my_selected_list"]["channel"][ch_idx][item_idx] field.

[0120] b) If it is a device-level list, that is, it only includes one processing channel, then there is a device field in the configuration field. Let the index of the list item in the default field be item_idx (that is, the index number of the option in the corresponding list). Then update the value of the cfg["my_selected_list"]["device"][0u][item_idx] field.

[0121] The present application also provides a preferred embodiment of a list sorting method. Figure 5 The figure is a flowchart of a list sorting method in a preferred embodiment.

[0122] Step S510, the device interface adds a selection box for sorting list items, allowing the user to choose whether to turn on the frequency list sorting function, that is, to determine the setting strategy configured by the user for each list. If the setting strategy is the default strategy, the options corresponding to each list are sorted in the default order. If the setting strategy is the frequency strategy, the list is determined as a pending list, and the order of each option to be adjusted is dynamically adjusted according to the actual selection result of the user. If the setting strategy is the reset strategy, the frequency statistics are reset and the frequency is recalculated, and the list is displayed according to the subsequent statistical frequency. The ordered list and the unordered list on the device can be managed separately, which is convenient for setting unified sorting rules for the two lists.

[0123] Step S520, for the above-mentioned to-be-processed list that needs frequency sorting optimization, a configuration table is maintained in the memory. If the list items do not need to be distinguished according to the processing channel, a global frequency table is recorded, and the table contains the frequency information of each to-be-adjusted list item being selected; if the list items need to be distinguished according to the processing channel, a frequency table is established for each processing channel. Among them, the options corresponding to the to-be-processed list such as face detection, face recognition, general behavior analysis, and motor vehicle detection pages are associated with channels. In actual applications, when entering the page, a drop-down list is displayed to the user according to the frequency of the selected channel. For the same function, the user can see different list item orders in different processing channels. When switching different processing channels, each channel will sort the to-be-adjusted options according to the corresponding user preferences.

[0124] Step S530, during use, after the user selects the option to be adjusted in the pending list, the selected option is recorded, and the option frequency and index data are updated according to the algorithm in this application, and before the next user selection, the position of each option to be adjusted in the list is updated according to the updated frequency data and index data. Specifically, there are many methods for updating frequency data and index data. The options to be adjusted that are about to be used can be assigned a large weight in the frequency calculation, and the weight of an early selection in the frequency calculation should be lower than the weight of a recent selection in the frequency calculation, that is, the algorithm for updating the frequency data needs to introduce the frequency decay characteristics over time (that is, equivalent to the number of times the user selects the list) to avoid the hot options in the past period of time being at the top of the list, while the recent hot options are always difficult to rise in the ranking of the pending list. For example, if an option was selected 20 times 10 days ago, and this option was also selected 20 times today, then the contribution of these two 20 times to the frequency of the option to be adjusted and the update of the index data should be different, and the impact of the 20 selections 10 days ago on the option should be much smaller than the impact of the 20 selections today on the option. It is understandable that if an option is accessed very infrequently and very few times, then the probability of this option being accessed again is also relatively low. Therefore, this application prioritizes raising the position of options that are accessed more frequently and lowering the position of options that are accessed less frequently. When the number of accesses is large enough, in order to save computing and storage space, the data with the longest access time can be eliminated.

[0125] Step S540, during the user's use, when it is detected that the total number of selections in the to-be-processed list is an integer multiple of the number of options to be adjusted, the values ​​of the frequency fields of all the options to be adjusted in the list are updated based on a preset attenuation function, thereby quickly reducing the values ​​of the frequency fields of early hot options and highlighting the values ​​of the frequency fields of recent hot options, thereby improving the position of recent hot options in the list.

[0126] Step S550: If it is detected that a new front-end device is online, the parameters corresponding to the options to be adjusted in each pending list are restored to the default values, and are re-updated and re-sorted according to the user's subsequent usage habits.

[0127] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0128] Based on the same inventive concept, the embodiment of the present application also provides a list sorting device for implementing the list sorting method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more list sorting device embodiments provided below can refer to the limitations of the list sorting method above, and will not be repeated here.

[0129] In one embodiment, Figure 6 As shown, a list sorting device is provided, including: an acquisition module 61, a calculation module 62 and a generation module 63, wherein:

[0130] The acquisition module 61 is used to determine at least two to-be-adjusted options in the to-be-processed list, and to establish an index field and a frequency field corresponding to each to-be-adjusted option;

[0131] The calculation module 62 is used to obtain the selection result for the option to be adjusted, update the frequency field of the corresponding option to be adjusted based on the selection result, update the total number of selections of the list to be processed based on the selection result, and update the index field corresponding to all the options to be adjusted based on the selection result and the total number of selections, wherein the selection result includes at least one selection process of the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0132] A generation module 63 is used to sort the positions of the corresponding options to be adjusted in the list to be processed in descending order of the updated frequency fields based on the updated index fields and frequency fields. When it is detected that there are at least two first options to be adjusted with the same updated frequency field values ​​in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0133] Specifically, the acquisition module 61 determines multiple options to be adjusted in the list to be processed, and establishes index fields and frequency fields corresponding to each option to be adjusted; the calculation module 62 obtains the selection results for the options to be adjusted, updates the frequency fields of the corresponding options to be adjusted based on the selection results, updates the total number of selections in the list to be processed based on the selection results, and updates the index fields corresponding to all options to be adjusted based on the selection results and the total number of selections; the generation module 63, based on the updated index fields and frequency fields, sorts the positions of the corresponding options to be adjusted in the list to be processed in descending order of the updated frequency fields, and if it is detected that there are at least two first options to be adjusted with the same updated frequency field values ​​in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in descending order of the updated index fields.

[0134] Each module in the above-mentioned list sorting device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0135] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store list sorting related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a list sorting method is implemented.

[0136] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0137] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0138] Determine at least two to-be-adjusted options in the to-be-processed list, and establish an index field and a frequency field corresponding to each to-be-adjusted option;

[0139] After obtaining the selection result for the option to be adjusted, the frequency field of the corresponding option to be adjusted is updated based on the selection result, the total number of selections of the list to be processed is updated based on the selection result, and the index fields corresponding to all the options to be adjusted are updated based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0140] Based on the updated index field and frequency field, the positions of the corresponding options to be adjusted in the list to be processed are sorted in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0141] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0142] Determine at least two to-be-adjusted options in the to-be-processed list, and establish an index field and a frequency field corresponding to each to-be-adjusted option;

[0143] After obtaining the selection result for the option to be adjusted, the frequency field of the corresponding option to be adjusted is updated based on the selection result, the total number of selections of the list to be processed is updated based on the selection result, and the index fields corresponding to all the options to be adjusted are updated based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections;

[0144] Based on the updated index field and frequency field, the positions of the corresponding options to be adjusted in the list to be processed are sorted in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the positions of the corresponding first options to be adjusted in the list to be processed are sorted in ascending order of the updated index fields.

[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0147] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0148] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A list sorting method, characterized in that: The method comprises: Determine at least two to-be-adjusted options in the to-be-processed list, and establish an index field and a frequency field corresponding to each of the to-be-adjusted options; After obtaining the selection result for the option to be adjusted, the frequency field of the corresponding option to be adjusted is updated based on the selection result, the total number of selections of the list to be processed is updated based on the selection result, and the index field corresponding to all the options to be adjusted is updated based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections; Based on the updated index field and the frequency field, the corresponding options to be adjusted are sorted in the position of the list to be processed in descending order of the updated frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the corresponding first options to be adjusted are sorted in the position of the list to be processed in descending order of the updated index fields.

2. The method according to claim 1, characterized in that Before determining at least two to-be-adjusted options in the to-be-processed list, the method further includes: Setting a corresponding unique identifier for each of the to-be-processed lists; Managing the to-be-processed list based on the unique identifier includes obtaining setting information corresponding to the to-be-processed list; A configuration field is established corresponding to the to-be-processed list based on the setting information.

3. The method according to claim 2, characterized in that The establishing of a configuration field corresponding to the to-be-processed list based on the setting information includes: If it is detected that there are at least two processing channels, the corresponding relationship between the processing channels and the to-be-processed list is determined through the configuration field, and a first channel matrix corresponding to the to-be-processed list is established, wherein the first channel matrix includes at least two first channel sub-matrices, the first channel sub-matrices correspond to the processing channels one-to-one, each of the first channel sub-matrices includes preset fields corresponding one-to-one to the options to be adjusted, and the preset fields include the index field and the frequency field; If it is detected that there is a processing channel, the correspondence between the processing channel and the list to be processed is determined through the configuration field, and a second channel matrix corresponding to the list to be processed is established, wherein the second channel matrix includes a second channel sub-matrix, and the second channel sub-matrix includes the preset fields corresponding one by one to the options to be adjusted, and the preset fields include the index field and the frequency field.

4. The method according to claim 1, characterized in that: The step of determining at least two items to be adjusted in the pending list includes: Set the value of the index field corresponding to the option to be adjusted to 0, and set the value of the frequency field to 0; Set the total number of selections to 0; The arrangement order of each of the to-be-adjusted options in the to-be-processed list is set to be arranged in a preset default order.

5. The method according to claim 1, characterized in that The updating of the frequency field of the corresponding option to be adjusted based on the selection result includes: Get the preset frequency threshold; Comparing the value of the frequency field with the frequency threshold, if it is detected that the value of the frequency field is less than the frequency threshold, setting the value of the preset difference as the first parameter, and after obtaining the selection result, updating the value of the frequency field based on the selection result and the first parameter; When it is detected that the value of the frequency field is greater than or equal to the frequency threshold, the value of the preset difference is set to the difference between the value of the frequency field and the frequency threshold, and after obtaining the selection result, the value of the frequency field is updated based on the selection result, the difference between the value of the frequency field and the frequency threshold.

6. The method according to claim 1, characterized in that The selection result includes a selection process of the option to be adjusted once, and the updating of the index fields corresponding to all the options to be adjusted based on the selection result and the total number of selections includes: If it is detected that the value of the index field of any target option to be adjusted among the options to be adjusted is equal to the preset maximum difference threshold, the value of the index field of the target option to be adjusted is maintained at the maximum difference threshold; If it is detected that the value of the total number of selections is equal to the preset maximum count threshold when the current selection result is obtained, the total number of selections is set to 0, and the index field of the option to be adjusted corresponding to the current selection result is set to 0.

7. The method according to claim 1, characterized in that The method further comprises: When it is detected that the value of the total number of selections is an integer multiple of the number of items of the options to be adjusted, the frequency attenuation number corresponding to each of the options to be adjusted is calculated based on a preset attenuation function, the frequency field corresponding to each of the options to be adjusted, and the number of items of the options to be adjusted; When it is detected that the value of the frequency field is greater than the frequency attenuation times, a difference between the value of the frequency field and the frequency attenuation times is calculated, and the difference is used as the updated value of the frequency field of the corresponding option to be adjusted; When it is detected that the value of the frequency field is less than or equal to the frequency attenuation times, the value of the frequency field is set to a preset target frequency value.

8. The method according to any one of claims 1 to 7, characterized in that: The step of determining the list to be processed includes: Obtain at least one initial list, and determine a setting strategy corresponding to each of the initial lists; If it is detected that the setting policy is a default policy, the options in the initial list are arranged in a preset default order; If it is detected that the setting strategy is a frequency strategy, the corresponding initial list is determined as the list to be processed; If it is detected that the setting policy is a reset policy, the values ​​in the corresponding index field and the frequency field in the initial list are reset.

9. A list sorting device, characterized in that: The device comprises: An acquisition module, used for determining at least two to-be-adjusted options in the to-be-processed list, and establishing an index field and a frequency field corresponding to each of the to-be-adjusted options; a calculation module, configured to obtain a selection result for the option to be adjusted, update the frequency field of the corresponding option to be adjusted based on the selection result, update the total number of selections of the list to be processed based on the selection result, and update the index field corresponding to all the options to be adjusted based on the selection result and the total number of selections, wherein the selection result includes at least one selection process for the option to be adjusted; and the index field is the difference between the number of times the corresponding option to be adjusted was most recently selected and the total number of selections; A generation module is used to sort the corresponding options to be adjusted in the position of the list to be processed in descending order of the updated frequency field based on the updated index field and the frequency field. When it is detected that there are at least two first options to be adjusted with the same updated frequency field value in the options to be adjusted, the updated index fields corresponding to the first options to be adjusted are compared, and the corresponding first options to be adjusted in the position of the list to be processed are sorted in descending order of the updated index fields.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Query statement processing method and device, computer equipment, readable storage medium and program product

    CN119106068A

  • System and program for automatic practice

    JP2010157199A