CN108304492B - Search list updating method, storage medium, device and system - Google Patents

Search list updating method, storage medium, device and system Download PDF

Info

Publication number
CN108304492B
CN108304492B CN201810019591.5A CN201810019591A CN108304492B CN 108304492 B CN108304492 B CN 108304492B CN 201810019591 A CN201810019591 A CN 201810019591A CN 108304492 B CN108304492 B CN 108304492B
Authority
CN
China
Prior art keywords
list
deleting
equipment
aggregation
sequencing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810019591.5A
Other languages
Chinese (zh)
Other versions
CN108304492A (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810019591.5A priority Critical patent/CN108304492B/en
Priority to PCT/CN2018/081282 priority patent/WO2019136839A1/en
Publication of CN108304492A publication Critical patent/CN108304492A/en
Application granted granted Critical
Publication of CN108304492B publication Critical patent/CN108304492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a storage medium, equipment and a system for updating a search list, which relate to the technical field of updating the search list, and the method comprises the following steps: creating an aggregation list, wherein the aggregation list is used for recording the equipment information in the current local area network and sequencing the equipment information of the aggregation list according to a preset priority; creating a device adding and deleting function used for adding and deleting the device information in the set list; meanwhile, when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered. The invention can dynamically update the search list without influencing the execution state of the whole application program, thereby improving the stability of the program.

Description

Search list updating method, storage medium, device and system
Technical Field
The invention relates to the technical field of search list updating, in particular to a search list updating method, a storage medium, equipment and a system.
Background
The device information in the local area network needs to be searched before screen projection in the screen projection item, only the devices in the local area network can perform screen projection processing, the device with the highest priority or the specific device is placed at the front end to be displayed, and other devices are sorted according to the searched sequence.
However, the discovery of devices is an asynchronous process, and each time a device is added or deleted, the device with the highest priority is ranked to the forefront by performing a re-ranking operation.
When the current sorting operation is in the arranging process and equipment information needs to be deleted, the array is out of range, and at the moment, the program is crashed.
Disclosure of Invention
In view of the defects in the prior art, an object of the present invention is to provide a method, a storage medium, a device, and a system for updating a search list, which can dynamically update a search list without affecting the execution state of the entire application program, and improve the stability of the program.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
a search listing update method, comprising the steps of:
creating an aggregation list, wherein the aggregation list is used for recording the equipment information in the current local area network and sequencing the equipment information of the aggregation list according to a preset priority;
creating a device adding and deleting function used for adding and deleting the device information in the set list;
creating a monitoring variable, wherein the monitoring variable is used for indicating whether the equipment adding and deleting function is in an executing state or not; at the same time, the user can select the desired position,
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
On the basis of the technical scheme, the search list updating method comprises the following steps:
the initial value of the monitoring variable is false, when the adding and deleting function of the equipment starts to execute, the value of the monitoring variable is changed into true, and after a set waiting time, the value of the monitoring variable is restored to false;
when the value of the monitoring variable is true, the collection list stops sorting, and when the value of the monitoring variable is changed from true to false, the collection list restarts sorting.
On the basis of the technical scheme, the search list updating method comprises the following steps:
and when the aggregation list receives the multiple calling equipment add-delete function requests, time sequencing is carried out on the multiple calling equipment add-delete function requests, and the aggregation list operates in sequence according to the time sequencing.
On the basis of the technical scheme, the search list updating method further comprises the following steps:
and after the execution of the adding and deleting functions of the equipment is finished and the equipment information in the collection list is ordered and updated, updating the UI of the collection list.
A storage medium having a computer program stored thereon, characterized in that: which when executed by a processor performs the steps of the search listing update method described above.
A search listing update apparatus comprising a memory, a processor, and a computer program stored on the memory and run on the processor, characterized in that: the processor implements the steps of the above-described search listing update method when executing the computer program.
A search listing update system, the system comprising:
the device aggregation unit is internally provided with an aggregation list, wherein the aggregation list is used for recording the device information in the current local area network and sequencing the device information of the aggregation list according to a preset priority;
the equipment adding and deleting unit is internally provided with an equipment adding and deleting function, and the equipment adding and deleting function is used for adding and deleting the equipment information in the set list;
the monitoring unit is internally provided with a monitoring variable, and the monitoring variable is used for indicating whether the equipment add-drop function is in an executing state or not;
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
On the basis of the above technical solution, the search list updating system further includes:
the synchronous set unit is used for caching a plurality of calling equipment adding and deleting function requests;
and when the aggregate list receives a plurality of calling equipment add-delete function requests, time sequencing is carried out on the calling equipment add-delete function requests, and the aggregate list operates in sequence according to the time sequencing.
Compared with the prior art, the invention has the advantages that:
(1) the method comprises the steps of recording equipment information in a current local area network by using a created aggregation list, sequencing the equipment information of the aggregation list according to a preset priority, and increasing and deleting functions of the created equipment, wherein the functions are used for increasing and deleting the equipment information in the aggregation list;
compared with the prior art, the method and the device can dynamically update the search list without influencing the execution state of the whole application program, and improve the stability of the program.
(2) The invention creates a monitoring variable for indicating whether the device add-delete function is in an executing state;
compared with the prior art, the monitoring variable established by the invention can restore the self value to the initial value after the addition and deletion function of the identification equipment starts to be executed, thereby providing convenience for the next search list updating work.
Drawings
FIG. 1 is a flow chart of a search listing update method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a search listing update apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of a search listing update system according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a search list updating method, including the following steps:
creating an aggregation list, wherein the aggregation list is used for recording the equipment information in the current local area network and sequencing the equipment information of the aggregation list according to a preset priority;
creating a device adding and deleting function used for adding and deleting the device information in the set list; at the same time, the user can select the desired position,
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
The aggregation list is used for recording and sequencing the equipment information in the current local area network, and the sequencing order of the equipment information is according to the preset priority;
the equipment adding and deleting function is used for adding and deleting the equipment information in the set list so as to update the equipment information in the set list;
the priority of each piece of equipment information in the set list is different, the set list needs to be sorted again after being updated, when the equipment adding and deleting functions are executed, the set list stops sorting, and after the equipment adding and deleting functions are executed, the set list is reordered, so that the phenomenon that the equipment information in the set list is added and deleted at the moment to cause the abnormal condition that the array in the set list is out of bounds when the set list is in the sorting process can be avoided.
When the set list sorts the equipment information, the stop and the start of the sorting work can be controlled according to the execution condition of the adding and deleting functions of the equipment, and the stability of data processing is improved.
The invention can dynamically update the search list without influencing the execution state of the whole application program, thereby improving the stability of the program.
In this embodiment, the method for updating the search list further includes the following steps:
creating a monitoring variable, wherein the monitoring variable is used for indicating whether the equipment add-delete function is in an executing state or not;
by monitoring the variable, the execution state of the equipment adding and deleting function can be known, and different values of the monitoring variable represent whether the equipment adding and deleting function is in the executing state or not;
specifically, the initial value of the monitoring variable is false, when the device add/delete function starts to execute, the value of the monitoring variable is changed to true, and after a set waiting time, the value of the monitoring variable is restored to false;
when the value of the monitoring variable is true, stopping sequencing of the set list, and when the value of the monitoring variable is changed from true to false, restarting sequencing of the set list;
the latency may be 100 milliseconds;
the monitoring variable can be a global boolean variable isHandling, the isHandling is initialized to false, the value of the isHandling is set to true each time the add-drop function is executed, and the value of the isHandling is set to false after a delay of 100 milliseconds after the add-drop function is executed;
it should be noted that the reason why the waiting time is set to 100 ms is to avoid that the sorting logic does not react yet due to the fast switching speed of the isHandling value, thereby causing an exception to the sorting logic;
the monitoring variable can restore the self value to the initial value, and convenience is provided for the next search list updating work.
In the embodiment, when the aggregation list receives a plurality of calling equipment add-delete function requests, the calling equipment add-delete function requests are subjected to time sequencing, and the aggregation list operates in sequence according to the time sequencing;
the technical scheme is mainly used for extremely extreme cases, namely the interval time between the arrival of data added and deleted by one device and the arrival of data added and deleted by the next device is short and shorter than the execution time of an adding and deleting function, or when an aggregation list is subjected to multi-thread operation, the aggregation list is automatically queued, when the processing of a first thread is completed, a second thread is arranged again for processing, namely a series of requests are cached, and then the requests are processed in sequence, so that the problem is avoided in the extreme cases, and the maintenance of the whole data can be free from any abnormality.
In this embodiment, the method for updating the search list further includes the following steps:
after the execution of the adding and deleting functions of the equipment is finished and the equipment information in the collection list is ordered and updated, UI (user interface) updating of the collection list is carried out;
in order to solve the problem in the traditional scheme, the add-delete callback function only performs cache operation on data, the add-delete process of the device is not embodied on the UI, and the UI of the collection list is updated only after the device information in the collection list is sequenced and updated; because only the addition and deletion of the equipment information do not involve any UI operation, the time-consuming operation in the whole operation process can be almost ignored, and the flow of the processing process is ensured.
It should be noted that the device add/delete function includes a device add function and a device delete function, where the device add function adds device information in the aggregation list, and the device delete function deletes device information in the aggregation list.
A storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned search listing updating method.
As shown in fig. 2, a search list updating apparatus includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of the search list updating method are implemented.
As shown in fig. 3, a search listing update system includes:
the device aggregation unit is internally provided with an aggregation list, and the aggregation list is used for recording the device information in the current local area network and sequencing the device information of the aggregation list according to the preset priority;
the equipment adding and deleting unit is internally provided with an equipment adding and deleting function, and the equipment adding and deleting function is used for adding and deleting the equipment information in the collection list;
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
In this embodiment, the search list updating system further includes:
the monitoring unit is internally provided with a monitoring variable, and the monitoring variable is used for indicating whether the equipment adding and deleting function is in an executing state or not;
specifically, the initial value of the monitoring variable is false, when the device add/delete function starts to execute, the value of the monitoring variable is changed to true, and after a set waiting time, the value of the monitoring variable is restored to false;
when the value of the monitoring variable is true, stopping sequencing of the set list, and when the value of the monitoring variable is changed from true to false, restarting sequencing of the set list;
the latency may be 100 milliseconds.
In this embodiment, the search list updating system further includes:
the synchronous set unit is used for caching a plurality of calling equipment adding and deleting function requests;
and when the aggregation list receives the multiple calling equipment add-delete function requests, time sequencing is carried out on the multiple calling equipment add-delete function requests, and the aggregation list is sequentially operated according to the time sequencing.
In this embodiment, in the search list updating system, after the device add/delete function is executed and the device information in the aggregation list is ordered and updated, the UI of the aggregation list is updated
It should be noted that: in the system provided in the foregoing embodiment, when the dynamic update operation of the search list is implemented, only the division of the functional modules is illustrated, and in practical application, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the system is divided into different functional modules, so as to complete all or part of the functions described above.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention.
Those not described in detail in this specification are within the skill of the art.

Claims (8)

1. A search listing update method, comprising the steps of:
creating an aggregation list, wherein the aggregation list is used for recording the equipment information in the current local area network and sequencing the equipment information of the aggregation list according to a preset priority;
creating a device adding and deleting function used for adding and deleting the device information in the set list;
creating a monitoring variable, wherein the monitoring variable is used for indicating whether the equipment adding and deleting function is in an executing state or not; at the same time, the user can select the desired position,
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
2. The search listing update method of claim 1, wherein:
the initial value of the monitoring variable is false, when the adding and deleting function of the equipment starts to execute, the value of the monitoring variable is changed into true, and after a set waiting time, the value of the monitoring variable is restored to false;
when the value of the monitoring variable is true, the collection list stops sorting, and when the value of the monitoring variable is changed from true to false, the collection list restarts sorting.
3. The search listing update method of claim 1, wherein:
and when the aggregation list receives the multiple calling equipment add-delete function requests, time sequencing is carried out on the multiple calling equipment add-delete function requests, and the aggregation list operates in sequence according to the time sequencing.
4. The search listing update method of claim 1, further comprising the steps of:
and after the execution of the adding and deleting functions of the equipment is finished and the equipment information in the collection list is ordered and updated, updating the UI of the collection list.
5. A storage medium having a computer program stored thereon, characterized in that: the computer program when executed by a processor implements the steps of the method of any of the preceding claims 1 to 4.
6. A search listing update apparatus comprising a memory, a processor, and a computer program stored on the memory and run on the processor, characterized in that: the processor, when executing the computer program, realizes the steps of the method of any of the preceding claims 1 to 4.
7. A search listing update system, the system comprising:
the device aggregation unit is internally provided with an aggregation list, wherein the aggregation list is used for recording the device information in the current local area network and sequencing the device information of the aggregation list according to a preset priority;
the equipment adding and deleting unit is internally provided with an equipment adding and deleting function, and the equipment adding and deleting function is used for adding and deleting the equipment information in the set list;
the monitoring unit is internally provided with a monitoring variable, and the monitoring variable is used for indicating whether the equipment add-drop function is in an executing state or not;
when the device adding and deleting functions are executed, the set list stops sequencing, and after the device adding and deleting functions are executed, the set list is reordered.
8. The search listing update system of claim 7, further comprising:
the synchronous set unit is used for caching a plurality of calling equipment adding and deleting function requests;
and when the aggregate list receives a plurality of calling equipment add-delete function requests, time sequencing is carried out on the calling equipment add-delete function requests, and the aggregate list operates in sequence according to the time sequencing.
CN201810019591.5A 2018-01-09 2018-01-09 Search list updating method, storage medium, device and system Active CN108304492B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810019591.5A CN108304492B (en) 2018-01-09 2018-01-09 Search list updating method, storage medium, device and system
PCT/CN2018/081282 WO2019136839A1 (en) 2018-01-09 2018-03-30 Search list updating method, storage medium, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810019591.5A CN108304492B (en) 2018-01-09 2018-01-09 Search list updating method, storage medium, device and system

Publications (2)

Publication Number Publication Date
CN108304492A CN108304492A (en) 2018-07-20
CN108304492B true CN108304492B (en) 2020-07-31

Family

ID=62868386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810019591.5A Active CN108304492B (en) 2018-01-09 2018-01-09 Search list updating method, storage medium, device and system

Country Status (2)

Country Link
CN (1) CN108304492B (en)
WO (1) WO2019136839A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101103342A (en) * 2005-12-28 2008-01-09 松下电工株式会社 Network equipment system
CN100492521C (en) * 2003-07-04 2009-05-27 佳能株式会社 Recording apparatus having playlist editing function
CN103098056A (en) * 2012-10-26 2013-05-08 华为技术有限公司 Ordering method, apparatus and terminal
CN103226517A (en) * 2012-01-31 2013-07-31 上海华虹集成电路有限责任公司 Method for dynamically ordering physical blocks of Nandflash according to quantity of invalid pages
CN105915973A (en) * 2016-04-18 2016-08-31 深圳Tcl数字技术有限公司 Intelligent television set and system and method for dynamic connection of intelligent television set with slave equipment
CN106682032A (en) * 2015-11-10 2017-05-17 北京国双科技有限公司 Method and device for processing operation records
CN106775474A (en) * 2016-12-16 2017-05-31 郑州云海信息技术有限公司 A kind of Nand Flash abrasion equilibrium methods, device and memory
CN106802825A (en) * 2016-12-09 2017-06-06 南京邮电大学 A kind of dynamic task scheduling method and system based on real-time system
CN107171759A (en) * 2017-07-12 2017-09-15 惠州Tcl移动通信有限公司 A kind of method for finding and search FM channels, mobile terminal and storage device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090223872A1 (en) * 2008-03-07 2009-09-10 Ronald Robbins System and method for sorting items

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100492521C (en) * 2003-07-04 2009-05-27 佳能株式会社 Recording apparatus having playlist editing function
CN101103342A (en) * 2005-12-28 2008-01-09 松下电工株式会社 Network equipment system
CN103226517A (en) * 2012-01-31 2013-07-31 上海华虹集成电路有限责任公司 Method for dynamically ordering physical blocks of Nandflash according to quantity of invalid pages
CN103098056A (en) * 2012-10-26 2013-05-08 华为技术有限公司 Ordering method, apparatus and terminal
CN106682032A (en) * 2015-11-10 2017-05-17 北京国双科技有限公司 Method and device for processing operation records
CN105915973A (en) * 2016-04-18 2016-08-31 深圳Tcl数字技术有限公司 Intelligent television set and system and method for dynamic connection of intelligent television set with slave equipment
CN106802825A (en) * 2016-12-09 2017-06-06 南京邮电大学 A kind of dynamic task scheduling method and system based on real-time system
CN106775474A (en) * 2016-12-16 2017-05-31 郑州云海信息技术有限公司 A kind of Nand Flash abrasion equilibrium methods, device and memory
CN107171759A (en) * 2017-07-12 2017-09-15 惠州Tcl移动通信有限公司 A kind of method for finding and search FM channels, mobile terminal and storage device

Also Published As

Publication number Publication date
WO2019136839A1 (en) 2019-07-18
CN108304492A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
US9959313B2 (en) Database management system and method capable of dynamically issuing inputs/outputs and executing operations in parallel
CN107450971B (en) Task processing method and device
CN107562851B (en) Data updating method and device and electronic equipment
CN107153643B (en) Data table connection method and device
CN110427386B (en) Data processing method, device and computer storage medium
CN110688382A (en) Data storage query method and device, computer equipment and storage medium
CN110888704A (en) High-concurrency interface processing method, device, equipment and storage medium
CN106468994A (en) A kind for the treatment of method and apparatus of application program
CN115150471A (en) Data processing method, device, equipment, storage medium and program product
CN108304492B (en) Search list updating method, storage medium, device and system
CN110764705B (en) Data reading and writing method, device, equipment and storage medium
CN116521573A (en) Automatic test method, device, equipment and storage medium
CN106569886B (en) Policy scheduling method and policy scheduling system
CN115525797A (en) Database data query method, device, equipment and storage medium
CN115981893A (en) Message queue task processing method and device, server and storage medium
US8615769B2 (en) Data processing system, data processing method, and data processing program
JPH05250187A (en) Task control system by ready space queue
CN114691781A (en) Data synchronization method, system, device, equipment and medium
CN115129438A (en) Method and device for task distributed scheduling
WO2014141476A1 (en) Programmable display unit and program for same
CN113297002B (en) Database working mode switching method and device
CN113220230B (en) Data export method and device, electronic equipment and storage medium
EP3797361B1 (en) Warming up index files
JPH06139082A (en) Task queue managing system
CN109710690B (en) Service driving calculation method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant