[go: up one dir, main page]

CN104252455B - A kind of data reordering method and device - Google Patents

A kind of data reordering method and device Download PDF

Info

Publication number
CN104252455B
CN104252455B CN201310256356.7A CN201310256356A CN104252455B CN 104252455 B CN104252455 B CN 104252455B CN 201310256356 A CN201310256356 A CN 201310256356A CN 104252455 B CN104252455 B CN 104252455B
Authority
CN
China
Prior art keywords
server
plug
data
user
information
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.)
Expired - Fee Related
Application number
CN201310256356.7A
Other languages
Chinese (zh)
Other versions
CN104252455A (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.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201310256356.7A priority Critical patent/CN104252455B/en
Publication of CN104252455A publication Critical patent/CN104252455A/en
Application granted granted Critical
Publication of CN104252455B publication Critical patent/CN104252455B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2149Restricted operating environment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种数据排序方法及装置,方法为:通过在客户端本地安装JS插件,该JS插件采用AJAX方法获取登录服务器的用户的权限信息,当确定该用户具备查看排序结果权限时,即采用AJAX方法获取服务器中的相应数据信息以及预设的排序规则,并按照该预设的排序规则对上述数据进行排序。采用本发明技术方案,无须对已有应用系统对应的服务器中的源代码进行修改,仅仅通过在客户端安装针对该应用系统编译的JS插件即可方便快捷地实现对已有应用系统中数据信息列表中数据的排序过程,无须耗费大量人力资源,有效避免了对已有应用系统增加新功能时系统维护成本高的问题,并且不影响原有应用系统的稳定性。

The invention discloses a data sorting method and device. The method is as follows: by locally installing a JS plug-in on a client, the JS plug-in uses the AJAX method to obtain the authority information of a user who logs in to the server, and when it is determined that the user has the authority to view the sorting results, That is, the AJAX method is used to obtain the corresponding data information and the preset sorting rules in the server, and the above data is sorted according to the preset sorting rules. By adopting the technical scheme of the present invention, it is not necessary to modify the source code in the server corresponding to the existing application system, and the data information in the existing application system can be realized conveniently and quickly only by installing the JS plug-in compiled for the application system on the client side. The sorting process of the data in the list does not need to consume a lot of human resources, effectively avoiding the problem of high system maintenance costs when adding new functions to the existing application system, and does not affect the stability of the original application system.

Description

一种数据排序方法及装置A data sorting method and device

技术领域technical field

本发明涉及数据处理领域,尤其涉及一种数据排序方法及装置。The invention relates to the field of data processing, in particular to a data sorting method and device.

背景技术Background technique

随着科学技术的飞速发展,计算机以其强大的功能,广泛应用于工作和生活领域。在日常工作中,往往需要通过各种应用系统实现不同的功能,如通过报业考核系统对该系统中的所有稿件进行评分、保存、刊登等操作。With the rapid development of science and technology, computers are widely used in the fields of work and life due to their powerful functions. In daily work, it is often necessary to realize different functions through various application systems, such as scoring, saving, and publishing all manuscripts in the system through the newspaper assessment system.

当用户登录应用系统进行相应操作,如对该操作系统中数据信息的查看时,可能要求在上述已经投入使用的应用系统中实现一些附加的功能,如在应用系统的操作界面中呈现对上述数据信息按照相应排序规则进行排序后的结果。例如,对于已有的报业考核系统,在优先级较高的用户对稿件评分的过程中可以在该报业考核系统的呈现界面中查看当前所有稿件的评分排序情况,即上述优先级较高的用户能够查看通过一轮评审后所有稿件按照评分由高到低的进行排序后的排序结果。When the user logs in to the application system to perform corresponding operations, such as viewing the data information in the operating system, it may be required to implement some additional functions in the above-mentioned application system that has been put into use, such as presenting the above-mentioned data in the operation interface of the application system The result of sorting the information according to the corresponding sorting rules. For example, for the existing newspaper evaluation system, users with higher priority can view the ranking of all current manuscripts in the presentation interface of the newspaper evaluation system during the process of grading manuscripts, that is, the above-mentioned priority is higher. Users can view the results of all manuscripts sorted from high to low after passing a round of review.

针对上述对已经投入使用的应用系统增加新功能的情况,通常采用修改应用系统源代码的方式实现上述应用系统新功能的添加。当应用系统所承载的业务逻辑本身较为复杂时,对该应用系统源代码的修改将存在一定难度,需要耗费一定的人力才能完成对应用系统新功能的实现;并且,采用对源代码修改的方法增加应用系统的新功能,需要在源代码中增加对应于上述新功能的代码,即相当于在原有源代码的基础上增加大量实现新功能的源代码,从而进一步增加了应用系统所承载的业务逻辑的复杂度,高复杂度的应用系统在运行过程中,需要消耗服务器更多的资源,并给服务器带来更大的计算压力,从而增加了系统维护的成本。此外,上述应用系统为已经经过测试并投入使用的系统,具备一定的稳定性,当修改该应用系统的源代码增加其他功能时,由于新修改的源代码可能存在一些细微的逻辑错误,从而导致应用系统存在一定的应用隐患,即该应用系统存在稳定性差的问题。In view of the above-mentioned situation of adding new functions to the application system that has been put into use, the addition of the above-mentioned new functions of the application system is usually implemented by modifying the source code of the application system. When the business logic itself carried by the application system is relatively complex, it will be difficult to modify the source code of the application system, and it will take a certain amount of manpower to complete the realization of the new functions of the application system; and, the method of modifying the source code is adopted Adding new functions of the application system requires adding code corresponding to the above new functions in the source code, which is equivalent to adding a large number of source codes to realize new functions on the basis of the original source code, thereby further increasing the business carried by the application system. The complexity of the logic, the high-complexity application system needs to consume more resources of the server during operation, and brings greater computing pressure to the server, thus increasing the cost of system maintenance. In addition, the above-mentioned application system is a system that has been tested and put into use, and has a certain degree of stability. When the source code of the application system is modified to add other functions, there may be some subtle logic errors in the newly modified source code, resulting in There are certain application hidden dangers in the application system, that is, the application system has poor stability.

由此可见,现有技术中,当需要在已经投入使用的应用系统中增加排序功能时,需要修改该应用系统的源代码,从而存在耗费人力,增加系统维护成本,使系统稳定性差的问题。It can be seen that, in the prior art, when it is necessary to add a sorting function to an application system that has already been put into use, the source code of the application system needs to be modified, thereby consuming manpower, increasing system maintenance costs, and making the system poor in stability.

发明内容Contents of the invention

本发明实施例提供一种数据排序方法及装置,用以解决现有技术中当需要在已经投入使用的应用系统中增加排序功能时,需要修改该应用系统的源代码,从而存在耗费人力,增加系统维护成本,使系统稳定性差的问题。The embodiment of the present invention provides a method and device for sorting data, which is used to solve the problem of modifying the source code of the application system in the prior art when the sorting function needs to be added to the application system that has been put into use, thereby consuming manpower and increasing The cost of system maintenance makes the system less stable.

本发明实施例提供的具体技术方案如下:The specific technical scheme that the embodiment of the present invention provides is as follows:

客户端接收用户发送的登录服务器指令后,判断本地是否安装Java脚本语言JS插件;After the client receives the login server instruction sent by the user, it determines whether the Java scripting language JS plug-in is installed locally;

当确定本地已安装所述JS插件时,所述JS插件获取所述服务器的标识信息,并根据所述标识信息调用所述服务器中的所述用户的权限信息;When it is determined that the JS plug-in has been installed locally, the JS plug-in obtains the identification information of the server, and invokes the permission information of the user in the server according to the identification information;

所述JS插件根据所述用户的权限信息,判定所述用户具备查看排序结果权限时,采用动态加载AJAX方法获取所述服务器中的数据信息列表以及排序规则;When the JS plug-in determines that the user has the authority to view the sorting results according to the authority information of the user, a dynamic loading AJAX method is used to obtain the data information list and the sorting rules in the server;

所述JS插件根据所述排序规则对所述数据信息列表中的数据进行排序,并将所述排序结果进行呈现。The JS plug-in sorts the data in the data information list according to the sorting rule, and presents the sorting result.

一种数据排序装置,包括:A data sorting device, comprising:

安装单元,用于接收用户发送的登录服务器指令后,判断本地是否安装Java脚本语言JS插件;The installation unit is used to determine whether the Java script language JS plug-in is installed locally after receiving the login server instruction sent by the user;

第一获取单元,用于当确定本地已安装所述JS插件时,所述JS插件获取所述服务器的标识信息,并根据所述标识信息调用所述服务器中的所述用户的权限信息;A first obtaining unit, configured to obtain the identification information of the server when it is determined that the JS plug-in has been installed locally, and invoke the authority information of the user in the server according to the identification information;

第二获取单元,用于根据所述用户的权限信息,判定所述用户具备查看排序结果权限时,采用动态加载AJAX方法获取所述服务器中的数据信息列表以及排序规则;The second acquiring unit is configured to use a dynamic loading AJAX method to acquire the data information list and sorting rules in the server when determining that the user has the authority to view the sorting results according to the authority information of the user;

排序单元,用于根据所述排序规则对所述数据信息列表中的数据进行排序,并将所述排序结果进行呈现。A sorting unit, configured to sort the data in the data information list according to the sorting rule, and present the sorting result.

本发明实施例中,通过在客户端本地安装JS插件,该JS插件采用AJAX方法获取登录服务器的用户的权限信息,当确定该用户具备查看排序结果权限时,即采用AJAX方法获取服务器中的相应数据信息以及预设的排序规则,并按照该预设的排序规则对上述数据进行排序。采用本发明技术方案,无须对已有应用系统对应的服务器中的源代码进行修改,仅仅通过在客户端安装针对该应用系统编译的JS插件即可方便快捷地实现对已有应用系统中数据信息列表中数据的排序过程,无须耗费大量人力资源,有效避免了对已有应用系统增加新功能时系统维护成本高的问题,并且不影响原有应用系统的稳定性。In the embodiment of the present invention, by locally installing the JS plug-in on the client, the JS plug-in uses the AJAX method to obtain the authority information of the user who logs in to the server. When it is determined that the user has the right to view the sorting results, the AJAX method is used to obtain the corresponding Data information and a preset sorting rule, and sort the above data according to the preset sorting rule. By adopting the technical scheme of the present invention, it is not necessary to modify the source code in the server corresponding to the existing application system, and the data information in the existing application system can be realized conveniently and quickly only by installing the JS plug-in compiled for the application system on the client side. The sorting process of the data in the list does not need to consume a lot of human resources, effectively avoiding the problem of high system maintenance costs when adding new functions to the existing application system, and does not affect the stability of the original application system.

附图说明Description of drawings

图1为本发明实施例中对服务器中数据进行排序的详细流程图;Fig. 1 is the detailed flowchart of sorting the data in the server in the embodiment of the present invention;

图2为本发明实施例中对服务器中数据排序时的逻辑示意图;Fig. 2 is a logical schematic diagram when sorting data in a server in an embodiment of the present invention;

图3为本发明实施例中具体应用场景下对服务器中数据进行排序的详细流程图;Fig. 3 is a detailed flow chart of sorting data in a server under a specific application scenario in an embodiment of the present invention;

图4为本发明实施例中数据排序装置的结构示意图。FIG. 4 is a schematic structural diagram of a data sorting device in an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例中,通过在客户端中安装JS(JavaScript,脚本语言)插件,该JS插件采用AJAX(Asynchronous JavaScript And XML,异步JavaScript及XML,或称为动态加载)方法获取登录服务器的用户的权限信息,当确定该用户具备查看排序结果权限时,即采用AJAX方法获取服务器中的相应数据信息以及预设的排序规则,并按照该预设的排序规则对上述数据进行排序。采用本发明技术方案,无须对已有应用系统对应的服务器中的源代码进行修改,仅仅通过在客户端安装针对该应用系统编译的JS插件即可方便快捷地实现对已有应用系统中数据信息列表中数据的排序过程,无须耗费大量人力资源,有效避免了对已有应用系统增加新功能时系统维护成本高的问题,并且不影响原有应用系统的稳定性。In the embodiment of the present invention, by installing a JS (JavaScript, scripting language) plug-in in the client, the JS plug-in uses the AJAX (Asynchronous JavaScript And XML, asynchronous JavaScript and XML, or called dynamic loading) method to obtain Authority information, when it is determined that the user has the authority to view the sorting results, the AJAX method is used to obtain the corresponding data information and the preset sorting rules in the server, and the above data is sorted according to the preset sorting rules. By adopting the technical scheme of the present invention, it is not necessary to modify the source code in the server corresponding to the existing application system, and the data information in the existing application system can be realized conveniently and quickly only by installing the JS plug-in compiled for the application system on the client side. The sorting process of the data in the list does not need to consume a lot of human resources, effectively avoiding the problem of high system maintenance costs when adding new functions to the existing application system, and does not affect the stability of the original application system.

下面结合附图对本发明优选的实施方式进行详细说明。Preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

参阅图1所示,本发明实施例中,对服务器中的数据进行排序的详细流程为:Referring to Fig. 1, in the embodiment of the present invention, the detailed process for sorting the data in the server is:

步骤100:客户端接收用户发送的登录服务器指令后,判断本地是否安装JS插件。Step 100: After receiving the login server instruction sent by the user, the client determines whether the JS plug-in is installed locally.

本发明实施例中,当服务器对应的应用系统中用户界面加载完成之后,即判断客户端本地是否安装有JS插件。In the embodiment of the present invention, after the user interface in the application system corresponding to the server is loaded, it is judged whether the JS plug-in is locally installed on the client.

步骤110:当确定本地已安装JS插件时,JS插件获取上述服务器的标识信息,并根据该标识信息调用上述服务器中的用户的权限信息。Step 110: When it is determined that the JS plug-in has been installed locally, the JS plug-in obtains the identification information of the above-mentioned server, and invokes the authority information of the user in the above-mentioned server according to the identification information.

当判定本地没有安装JS插件时,则在客户端本地安装JS插件。当存在用户登录该服务器时,JS插件检测到该当前用户后,即可采用AJAX方法获取该用户的权限信息。When it is determined that the JS plug-in is not installed locally, the JS plug-in is installed locally on the client. When there is a user logging into the server, after the JS plug-in detects the current user, the AJAX method can be used to obtain the user's permission information.

步骤120:JS插件根据上述用户的权限信息,判定该用户具备查看排序结果权限时,采用AJAX方法获取上述服务器中的数据信息列表以及排序规则。Step 120: When the JS plug-in determines that the user has the right to view the sorted results according to the authority information of the user, the AJAX method is used to obtain the data information list and the sorting rules in the server.

本发明实施例中,JS插件获取用户的权限信息后,即可根据该用户的权限信息判定是否在应用系统的数据信息呈现页面中显示排序功能键。其中,上述用户的权限信息包括用户查看排序结果权限,以及用户不具备查看排序结果权限。此时,若判定上述用户具备查看排序结果权限,则在数据信息呈现页面中显示是否进行排序提示信息供用户选择,例如,在数据信息呈现页面中显示排序功能键,或者弹出排序提示对话框,询问该用户是否对数据信息呈现界面中的数据进行排序;当用户单击排序功能键,或者在上述排序提示对话框中单击确认键时,即应用系统中的JS插件接收到用户指示确认进行排序时,采用AJAX方法获取保存在服务器中的数据信息列表以及排序规则。In the embodiment of the present invention, after the JS plug-in obtains the user's authority information, it can determine whether to display the sorting function key in the data information presentation page of the application system according to the user's authority information. Wherein, the permission information of the above user includes the user's permission to view the sorting results, and the user does not have the permission to view the sorting results. At this time, if it is determined that the above-mentioned user has the right to view the sorting results, then display a sorting prompt message on the data information presentation page for the user to choose, for example, display a sorting function key on the data information presentation page, or pop up a sorting prompt dialog box, Ask the user whether to sort the data in the data information presentation interface; when the user clicks the sort function button, or clicks the confirmation button in the above sort prompt dialog box, that is, the JS plug-in in the application system receives the user's instruction to confirm and proceed When sorting, use the AJAX method to obtain the data information list and sorting rules stored in the server.

较佳的,上述排序规则包含按照分数大小排序,按照最后一次评审时间先后顺序排序等。根据上述排序规则的不同,相应的,当判定用户具备查看排序结果权限时,在数据信息呈现页面中显示多个排序功能键供用户选择,或者在弹出的排序提示对话框中显示多个排序功能选择键供用户选择。Preferably, the above sorting rules include sorting by score, sorting by last review time, etc. According to the above sorting rules, correspondingly, when it is determined that the user has the right to view the sorting results, multiple sorting function keys are displayed on the data information presentation page for the user to choose, or multiple sorting functions are displayed in the pop-up sorting prompt dialog box The selection key is for the user to select.

步骤130:JS插件根据上述排序规则对上述数据信息列表中的数据进行排序,并将排序结果进行呈现。Step 130: The JS plug-in sorts the data in the above data information list according to the above sorting rules, and presents the sorting results.

本发明实施例中,JS插件根据获取的服务器中的排序规则对上述数据信息列表中的数据进行排序。In the embodiment of the present invention, the JS plug-in sorts the data in the above data information list according to the acquired sorting rules in the server.

进一步的,当完成对上述数据信息列表中的数据排序后,刷新数据信息呈现页面中的全部信息;或者,刷新数据信息呈现页面中发生变化的部分信息;并将刷新后的数据信息呈现页面进行呈现。当采用后一种方式显示排序后的数据信息呈现页面时,能够减少对数据的排序时间,更加快捷地获取数据排序结果。Further, after finishing sorting the data in the above data information list, refresh all the information in the data information presentation page; or refresh some information that has changed in the data information presentation page; and update the refreshed data information presentation page presented. When the latter method is used to display the sorted data information presentation page, the time for sorting the data can be reduced, and the data sorting result can be obtained more quickly.

特殊的,当JS插件检测到服务器中的数据信息列表发生变化(例如,增加或者删除一条数据信息,以及对某条或者多条数据信息进行修改)时,即可在数据信息呈现页面显示数据更新提示信息,例如,在页面中弹出对话框的形式提示用户数据信息列表发生更新,询问用户是否需要对更新后的数据信息列表进行重新排序;当JS插件接收到用户指示确认显示更新后数据信息呈现页面后,即呈现对更新后的数据列表进行排序后的结果,采用AJAX方法获取更新后的数据信息列表以及排序规则,并按照该排序规则对上述更新后的数据信息列表中的数据进行排序;然后,在上述数据信息呈现页面中呈现更新后的排序结果。In particular, when the JS plug-in detects that the list of data information in the server changes (for example, adding or deleting a piece of data information, and modifying one or more pieces of data information), it can display data updates on the data information presentation page Prompt information, for example, in the form of a pop-up dialog box on the page to prompt the user that the data information list has been updated, and ask the user whether to reorder the updated data information list; when the JS plug-in receives the user's instruction to confirm and display the updated data information is presented After the page is displayed, the result of sorting the updated data list is displayed, and the updated data information list and sorting rules are obtained by using the AJAX method, and the data in the above updated data information list are sorted according to the sorting rules; Then, the updated sorting result is presented on the above data information presentation page.

参阅图2所示为本发明实施例中对服务器中数据进行排序的逻辑示意图,其中,可以将服务器对应的操作系统划分为两部分,即呈现层(即用于显示上述数据信息,即为上述数据信息呈现页面),以及控制层(即用于保存数据信息列表和排序规则)。参阅上述逻辑示意图,本发明实施例中,在应用系统中安装JS插件,该JS插件向控制层发送信息,并获取有控制层保存的数据信息列表以及排序规则,JS插件根据该排序规则对上述数据信息列表进行排序。Referring to Fig. 2, it is a logical schematic diagram of sorting data in the server in an embodiment of the present invention, wherein the operating system corresponding to the server can be divided into two parts, that is, the presentation layer (that is, for displaying the above-mentioned data information, that is, the above-mentioned data information presentation page), and the control layer (that is, used to save the data information list and sorting rules). Referring to the above logical schematic diagram, in the embodiment of the present invention, a JS plug-in is installed in the application system, the JS plug-in sends information to the control layer, and obtains a list of data information and sorting rules saved by the control layer, and the JS plug-in performs the above-mentioned sorting rules according to the sorting rules. The list of data information is sorted.

由此可见,采用本发明技术方案,无须每次在对应用系统中的数据进行排序过程中,均通知服务器根据其本地保存的排序规则对数据信息列表中的数据进行排序,仅需要JS插件调用服务器中的排序顺序和数据信息列表即可完成数据排序过程,从而避免了服务器对数据排序过程中造成的系统负荷大的问题。It can be seen that, by adopting the technical scheme of the present invention, it is not necessary to notify the server to sort the data in the data information list according to the sorting rules stored locally every time in the process of sorting the data in the application system, and only need to call the JS plug-in The sorting sequence and data information list in the server can complete the data sorting process, thereby avoiding the problem of heavy system load caused by the server in the process of sorting data.

下面结合具体的应用场景详细介绍在应用系统中对数据的排序过程。The following describes the sorting process of data in the application system in detail in combination with specific application scenarios.

参阅图3所示,对服务器中数据进行排序的详细流程为:Referring to Figure 3, the detailed process of sorting data in the server is as follows:

步骤300:当存在登录用户,并判定本地没有安装JS插件时,在客户端本地安装JS插件。Step 300: When there is a logged-in user and it is determined that the JS plug-in is not installed locally, install the JS plug-in locally on the client.

步骤310:JS插件检测到存在登录用户时,获取当前登录用户的标识信息以及服务器的标识信息。Step 310: When the JS plug-in detects that there is a logged-in user, obtain the identification information of the currently logged-in user and the identification information of the server.

步骤320:JS插件根据上述服务器的标识信息,登录该服务器,并根据上述当前登录用户的标识信息,采用AJAX方法从服务器中调用该当前登录用户的标识信息对应的权限信息,根据该权限信息,判断该当前登录用户是否具备查看排序结果权限,若该当前登录用户不具备查看排序结果权限时,则执行步骤330;否则,执行步骤340。Step 320: The JS plug-in logs in to the server according to the identification information of the above-mentioned server, and uses the AJAX method to call the permission information corresponding to the identification information of the current login user from the server according to the above-mentioned identification information of the currently logged-in user. According to the permission information, It is judged whether the currently logged-in user has the right to view the sorted results, and if the currently logged-in user does not have the right to view the sorted results, perform step 330 ; otherwise, perform step 340 .

步骤330:不在数据信息呈现页面中显示排序功能键。Step 330: Do not display the sorting function key on the data information presentation page.

步骤340:在上述数据信息呈现页面中显示排序功能键。Step 340: Display the sorting function keys on the above data information presentation page.

步骤350:当JS插件检测到用户单击排序功能键,指示确认进行排序时,采用AJAX方法获取服务器中保存的数据信息列表以及排序规则,并按照上述获取的排序规则对上述数据信息列表中的数据进行排序。Step 350: When the JS plug-in detects that the user clicks the sorting function key and instructs to confirm the sorting, use the AJAX method to obtain the list of data information stored in the server and the sorting rules, and sort the items in the above data information list according to the sorting rules obtained above. The data is sorted.

步骤360:刷新上述数据信息呈现页面中发生变化的部分,并将刷新后的数据信息呈现页面进行呈现。Step 360: Refresh the changed part of the above data information presentation page, and present the refreshed data information presentation page.

基于上述技术方案,参阅图4所示,可以构建一种对应用系统中数据进行排序的装置,包括安装单元40,第一获取单元41,第二获取单元42,以及排序单元43,其中:Based on the above technical solution, as shown in FIG. 4, a device for sorting data in the application system can be constructed, including an installation unit 40, a first acquisition unit 41, a second acquisition unit 42, and a sorting unit 43, wherein:

安装单元40,用于接收用户发送的登录服务器指令后,判断本地是否安装Java脚本语言JS插件;The installation unit 40 is configured to determine whether the Java scripting language JS plug-in is installed locally after receiving the login server instruction sent by the user;

第一获取单元41,用于当确定本地已安装所述JS插件时,所述JS插件获取所述服务器的标识信息,并根据所述标识信息调用所述服务器中的所述用户的权限信息;The first obtaining unit 41 is configured to, when it is determined that the JS plug-in has been installed locally, the JS plug-in obtains the identification information of the server, and invokes the authority information of the user in the server according to the identification information;

第二获取单元42,用于根据上述用户的权限信息,判定该用户具备查看排序结果权限时,采用AJAX方法获取上述服务器中的数据信息列表以及排序规则;The second acquiring unit 42 is configured to use the AJAX method to acquire the data information list and sorting rules in the server when determining that the user has the authority to view the sorting results according to the authority information of the user;

排序单元43,用于根据上述排序规则对上述数据信息列表中的数据进行排序,并将所述排序结果进行呈现。The sorting unit 43 is configured to sort the data in the above-mentioned data information list according to the above-mentioned sorting rule, and present the sorting result.

综上所述,本发明实施例中,客户端接收用户发送的登录服务器指令后,判断本地是否安装JS插件,当确定本地已安装JS插件时,通过该JS插件获取当前用户的权限信息;根据该当前用户的权限信息,判定该当前用户具备查看排序结果权限时,采用AJAX方法获取数据信息列表以及排序规则;根据该排序规则对上述数据信息列表中的数据进行排序。采用本发明技术方案,无须对该应用系统中的源代码进行修改,仅仅通过在应用系统中安装JS插件并采用AJAX方法即可实现对已有应用系统中数据的排序过程,操作过程方便快捷,无须耗费大量人力资源,有效避免了对已有应用系统增加新功能时系统维护成本高的问题,并且不影响原有应用系统的稳定性。To sum up, in the embodiment of the present invention, after the client receives the login server instruction sent by the user, it judges whether the JS plug-in is installed locally. The authority information of the current user, when it is determined that the current user has the authority to view the sorting results, use the AJAX method to obtain the data information list and sorting rules; sort the data in the above data information list according to the sorting rules. By adopting the technical solution of the present invention, there is no need to modify the source code in the application system, and the sorting process of the data in the existing application system can be realized only by installing the JS plug-in in the application system and using the AJAX method, and the operation process is convenient and fast. It does not need to consume a lot of human resources, effectively avoids the problem of high system maintenance costs when adding new functions to existing application systems, and does not affect the stability of original application systems.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and combinations of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a Means for realizing the functions specified in one or more steps of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart flow or flows and/or block diagram block or blocks.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.

显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Apparently, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. In this way, if the modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (10)

  1. A kind of 1. data reordering method, it is characterised in that including:
    After client receives the login service device instruction that user sends, judge whether java script language JS plug-in units are locally installed;
    When determining locally to have installed the JS plug-in units, the JS plug-in units obtain the identification information of the server, according to described The identification information of server logs in the server, and according to the identification information using described in dynamic load AJAX method calls The authority information of the user in server;
    The JS plug-in units judge that the user possesses when checking ranking results authority, use according to the authority information of the user The AJAX methods are by sending data message list and sequence rule in server described in acquisition of information to the server Then;
    The JS plug-in units are ranked up the data in the data message list according to the ordering rule, and by the sequence As a result presented.
  2. 2. the method as described in claim 1, it is characterised in that the JS plug-in units obtain the identification information of the server, and Authority information according to the identification information using the user in server described in dynamic load AJAX method calls, specifically Including:
    The JS plug-in units are instructed according to the login service device, obtain the identification information of the server;
    The JS plug-in units are according to the identification information of the server, described in server described in the AJAX method calls The authority information of user.
  3. 3. method as claimed in claim 2, it is characterised in that the JS plug-in units judge that the user possesses and check ranking results During authority, data message list and ordering rule in the server are obtained using the AJAX methods, is specifically included:
    The JS plug-in units judge that the user possesses when checking ranking results authority, are displayed whether in the page is presented in data message It is ranked up prompt message;
    When the JS plug-in units, which receive the user, indicates that confirmation is ranked up, the clothes are taken using the AJAX methods Data message list and ordering rule in business device.
  4. 4. the method as described in claim 1, it is characterised in that the ranking results are presented in the JS plug-in units, specifically Including:
    The full detail in the page is presented in the JS plug-in units refresh data information;Alternatively, the JS plug-in units refresh data information is in Changed partial information in the existing page;
    Data message after refreshing is presented the page and is presented by the JS plug-in units.
  5. 5. such as claim 1-4 any one of them methods, it is characterised in that further comprise:
    When the data message list in the JS plug-in unit determining servers changes, the page is presented in data message and shows Show data update prompt message;
    When the JS plug-in units, which receive the user, indicates to confirm to show the data message presentation page after updating, using described After AJAX methods obtain data message list and ordering rule after renewal, and the use ordering rule is to the renewal Data in data message list are ranked up;
    The ranking results after renewal are presented the page in the data message to be presented.
  6. A kind of 6. data sorting device, it is characterised in that including:
    Installation unit, after the login service device instruction for receiving user's transmission, judges locally whether install java script language JS plug-in units;
    First acquisition unit, for when determining locally to have installed the JS plug-in units, the JS plug-in units to obtain the server Identification information, the server is logged according to the identification information of the server, and is added according to the identification information using dynamic Carry the authority information of the user in server described in AJAX method calls;
    Second acquisition unit, for the authority information according to the user, judges that the user possesses and checks ranking results authority When, using the AJAX methods by sent to the server data message list described in acquisition of information in server and Ordering rule;
    Sequencing unit, for being ranked up according to the ordering rule to the data in the data message list, and by described in Ranking results are presented.
  7. 7. device as claimed in claim 6, it is characterised in that the first acquisition unit, is specifically used for:
    Instructed according to the login service device, obtain the identification information of the server;According to the identification information of the server, Using the authority information of the user in server described in the AJAX method calls.
  8. 8. device as claimed in claim 7, it is characterised in that the second acquisition unit, is specifically used for:
    Judge that the user possesses when checking ranking results authority, display whether to be ranked up in the page is presented in data message and carry Show information;When receiving the user and indicating that confirmation is ranked up, taken using the AJAX methods in the server Data message list and ordering rule.
  9. 9. device as claimed in claim 6, it is characterised in that further include display unit, be used for:
    The full detail in the page is presented in refresh data information;Alternatively, changed portion in the page is presented in refresh data information Divide information;Data message after refreshing is presented the page to be presented.
  10. 10. such as claim 6-9 any one of them devices, it is characterised in that the display unit, is further used for:
    When judging that the data message list in the server changes, the renewal of page display data is presented in data message Prompt message;When the page is presented in the data message after receiving user's instruction confirmation display renewal, using the AJAX Method obtains data message list and ordering rule after renewal, and using the ordering rule to the data after the renewal Data in information list are ranked up;The ranking results after renewal are presented the page in the data message to be presented.
CN201310256356.7A 2013-06-25 2013-06-25 A kind of data reordering method and device Expired - Fee Related CN104252455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310256356.7A CN104252455B (en) 2013-06-25 2013-06-25 A kind of data reordering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310256356.7A CN104252455B (en) 2013-06-25 2013-06-25 A kind of data reordering method and device

Publications (2)

Publication Number Publication Date
CN104252455A CN104252455A (en) 2014-12-31
CN104252455B true CN104252455B (en) 2018-05-01

Family

ID=52187363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310256356.7A Expired - Fee Related CN104252455B (en) 2013-06-25 2013-06-25 A kind of data reordering method and device

Country Status (1)

Country Link
CN (1) CN104252455B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649396B (en) * 2015-11-03 2019-11-08 腾讯科技(深圳)有限公司 Sort method, system and the device of game ratings data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567307A (en) * 2003-06-25 2005-01-19 北京法海信息咨询有限公司 Data ordering display process
CN101324944A (en) * 2007-06-12 2008-12-17 黎家军 Method and system of dynamically ranking on-line information
CN101523398A (en) * 2006-09-15 2009-09-02 索尼达德克奥地利股份公司 Method and system for managing access to add-on data files
CN102681832A (en) * 2011-03-17 2012-09-19 新奥特(北京)视频技术有限公司 Extensible markup language (XML) based interaction method and interaction device
CN103098056A (en) * 2012-10-26 2013-05-08 华为技术有限公司 Ordering method, apparatus and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9626385B2 (en) * 2001-08-31 2017-04-18 Margaret Runchey Semantic model of everything recorded with ur-url combination identity-identifier-addressing-indexing method, means, and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567307A (en) * 2003-06-25 2005-01-19 北京法海信息咨询有限公司 Data ordering display process
CN101523398A (en) * 2006-09-15 2009-09-02 索尼达德克奥地利股份公司 Method and system for managing access to add-on data files
CN101324944A (en) * 2007-06-12 2008-12-17 黎家军 Method and system of dynamically ranking on-line information
CN102681832A (en) * 2011-03-17 2012-09-19 新奥特(北京)视频技术有限公司 Extensible markup language (XML) based interaction method and interaction device
CN103098056A (en) * 2012-10-26 2013-05-08 华为技术有限公司 Ordering method, apparatus and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"面向特殊主题的排序与检索算法研究";邱晓俊;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130315;论文正文第13页第7段-第16页第6段、第25页第16段-第33页第8段、第60页第1段-第64页第1段,附图2.8、2.9、6.3、6.4,表3.1 *

Also Published As

Publication number Publication date
CN104252455A (en) 2014-12-31

Similar Documents

Publication Publication Date Title
EP3188006B1 (en) Composite graphical interface with shareable data-objects
US10235160B2 (en) Controlled deployment of application feature
CN111190718A (en) Method, device and system for realizing task scheduling
US9471790B2 (en) Remediation of security vulnerabilities in computer software
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
GB2507815A (en) Obtaining Password Data
US9330184B2 (en) Methods and systems for machine learning to discover application compatibility status
EP3572995A1 (en) Case management by a state machine
WO2016160404A1 (en) Providing attachment control to manage attachments in conversation
CN105263590A (en) Method and system for game data collection
CN113495723A (en) Method and device for calling functional component and storage medium
US20200117443A1 (en) Selective application updates based on usage analytics
US10659567B2 (en) Dynamic discovery and management of page fragments
CN104252455B (en) A kind of data reordering method and device
US11972027B1 (en) Preserving web page functionality through dynamic analysis of host web pages
CN103902445A (en) Regression test object determination method and device
CN112631573B (en) Component adding method, device, equipment and computer readable storage medium
CN110765016B (en) Game test instruction processing method, game test instruction processing system, server and storage device
CN110716830B (en) Pressure measuring machine selection method and device, electronic equipment and storage medium
US20260032299A1 (en) Media presentation management
CN104063246B (en) A kind of method and device of loading tool bar
CN114489915B (en) Mobile equipment-based open screen picture display method, device, equipment and medium
US10274389B2 (en) Storage medium, material evaluating apparatus, and material evaluating method
CN104111782B (en) The method and browser that a kind of webpage slides
CN116431485A (en) A user behavior playback method, device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180501

Termination date: 20190625