Office intranet resource authorization method and device, equipment and storage medium
By constructing authorized structure data in the office intranet and utilizing the ES search engine and bitwise operations, combined with a multi-threaded mechanism to handle subscription tasks, the inefficiency and blocking problems of existing permission management systems are solved, achieving efficient permission management and fast authorization operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-14
Smart Images

Figure CN121864416A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an authorization method, apparatus, device, and storage medium for office intranet resources. Background Technology
[0002] In office intranet application scenarios, basic resources are typically authorized through an authorization management system (or platform), and the authorization information is then synchronized to different business application systems. This ensures that permissions across different business systems within the same authorization management system (or platform) are synchronized according to application-specific needs. Currently, authorization management systems offer two authorization methods: single-selection authorization and attribute-based authorization. In practical applications, single-selection authorization alone cannot adequately meet the needs of various business scenarios, including batch authorization, group authorization, and authorization based on attribute categories. Attribute-based authorization alone, when granting permissions to a large number of resources, can burden administrators. To ensure that business application systems can promptly detect permission changes when resource attributes are modified, a common solution is for the resource system to proactively check for changes in all resources, delete all previous permissions, generate full permissions based on the changed permission generation conditions, and then proactively push the necessary permissions to business applications. This approach consumes significant computing resources and is slow in generating permissions, failing to adequately meet the needs of scenarios with high real-time requirements.
[0003] In current technology, permission management systems within office intranets typically use single-choice authorization to subscribe to permissions from other business systems, implementing an ACL (Access Control List) model, followed by permission synchronization. However, relying solely on single-choice or attribute-based authorization cannot support multi-policy combinations, failing to meet the needs of complex application scenarios. Furthermore, the current authorization method is slow in generating permissions for complex attribute-based authorization scenarios. Additionally, the queuing of authorized messages leads to low subscription efficiency, slow message sending, and poor performance. In systems handling standardized protocol classes, this model is prone to blocking, requiring manual intervention to resolve such blocking.
[0004] As can be seen from the above, how to efficiently handle authorization operations under a large number of permission subscriptions is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for authorizing resources on an office intranet, capable of efficiently handling authorization operations under large-scale permission subscriptions. The specific solution is as follows:
[0006] Firstly, this application provides a method for authorizing resources on an office intranet, including:
[0007] Authorization structure data is constructed based on the target entities and entity dependencies related to authorization within the office intranet, and the resource data used for authorization in the office intranet is saved to the ES search engine; the target entities include user entities and business application entities;
[0008] A state control object is constructed in memory based on bitwise operations; the state control object is a control object used to record the state of all authorized processes.
[0009] Obtain the resource subscription requirements of each of the aforementioned business application entities, store the resource subscription requirements in a queue to be sent, use a multi-threaded mechanism to retrieve the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions.
[0010] If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources.
[0011] Optionally, the construction of authorization structure data based on the target entities and entity dependencies related to authorization within the office intranet includes:
[0012] The target entity is constructed based on the user entities and business application entities related to authorization on the office intranet, and the authorization structure data is constructed using the entity dependency relationship of the target entity and stored in memory.
[0013] The entity dependency relationship includes the organizational relationship of the user entity, resource information under each organization, target authorization strategy, authorization status and message status of each business application entity; the target authorization strategy includes single-selection authorization strategy and attribute authorization strategy; the single-selection authorization strategy is a strategy of selecting target resources for authorization; the attribute authorization strategy is a strategy of grouping authorization according to attribute conditions.
[0014] Optionally, constructing the state control object in memory based on bitwise operations includes:
[0015] Based on bitwise operations, the authorized process states are determined using a target number of bits, and a state control object is constructed based on the bits and the corresponding process states.
[0016] Optionally, the step of obtaining the resource subscription requirements of each of the business application entities, storing the resource subscription requirements in a queue to be sent, retrieving the resource subscription requirements from the queue to be sent using a multi-threaded mechanism, and determining the subscription task corresponding to the resource subscription requirements includes:
[0017] Obtain the resource subscription requirements of each of the aforementioned business application entities, and store the resource subscription requirements sequentially into the queue to be sent based on the order in which they were obtained;
[0018] The resource subscription request is obtained from the queue to be sent using a multi-threaded mechanism, and the target authorization structure data corresponding to the resource subscription request is obtained from the authorization structure data.
[0019] The target resource data corresponding to the resource subscription request is determined using the ES search engine. The resource subscription request, the target authorization structure data, and the target resource data are then integrated to obtain the subscription task corresponding to the resource subscription request.
[0020] Optionally, determining whether the subscription task meets preset conditions using the state control object includes:
[0021] Determine whether the value corresponding to the target number of bits in the state control object is the target value;
[0022] If the value corresponding to the target number of bits in the state control object is the target value, then the subscription task satisfies the preset condition.
[0023] Optionally, after determining whether the subscription task meets the preset conditions using the state control object, the method further includes:
[0024] If the subscription task does not meet the preset conditions, the resource subscription request corresponding to the subscription task is sent back to the queue to be sent, and then the process jumps to the step of obtaining the resource subscription request from the queue to be sent using a multi-threaded mechanism, until the subscription task meets the preset conditions.
[0025] Optionally, if the subscription task meets the preset conditions, an authorization message corresponding to the subscription task is sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources, including:
[0026] If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity, and the target bit used to record whether the authorization message has been sent will be updated using the status control object to complete the authorization operation of the office intranet resources.
[0027] Secondly, this application provides an authorization device for office intranet resources, including:
[0028] The resource data storage module is used to construct authorization structure data based on the target entities and entity dependencies related to authorization within the office intranet, and to save the resource data used for authorization in the office intranet to the ES search engine; the target entities include user entities and business application entities;
[0029] A control object construction module is used to construct a state control object in memory based on bitwise operations; the state control object is a control object used to record all authorized process states;
[0030] The subscription task judgment module is used to obtain the resource subscription requirements of each of the business application entities, store the resource subscription requirements in the queue to be sent, use a multi-threaded mechanism to obtain the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions.
[0031] The authorization message sending module is used to send an authorization message corresponding to the subscription task to the corresponding target business application entity if the subscription task meets the preset conditions, so as to complete the authorization operation of the office intranet resources.
[0032] Thirdly, this application provides an electronic device, comprising:
[0033] Memory, used to store computer programs;
[0034] A processor is used to execute the computer program to implement the aforementioned method for authorizing office intranet resources.
[0035] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned method for authorizing office intranet resources.
[0036] This application constructs authorization structure data based on target entities and entity dependencies related to authorization within the office intranet, and saves the resource data used for authorization in the office intranet to the Elasticsearch search engine. The target entities include user entities and business application entities. A state control object is constructed in memory based on bitwise operations. The state control object is a control object used to record all process states of authorization. The resource subscription requirements of each business application entity are obtained and stored in a queue to be sent. The resource subscription requirements are retrieved from the queue to be sent using a multi-threaded mechanism. The subscription task corresponding to the resource subscription requirement is determined. The state control object is used to determine whether the subscription task meets the preset conditions. If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task is sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources.
[0037] As shown above, this application constructs authorization structure data by including the target entities related to authorization and the dependencies between them, and stores the resource data used for authorization in the Elasticsearch (ES) search engine. The ES search engine supports rapid filtering based on complex conditions, solving the problem of slow searching for large amounts of resources. Bitwise operations are used to quickly determine subscription tasks and uniformly record the entire authorization process status. Then, a multi-threaded mechanism is used to process the resource subscription requests of business application entities, enabling batch processing. A queue mechanism ensures the sequential processing of requests, avoiding chaos. In this way, authorization messages are sent only to the business applications corresponding to subscription tasks that meet the conditions to complete the authorization, which can meet the needs of large-scale combined authorization. There is no need to repeatedly adjust the authorization strategy, and the efficiency of authorization management is greatly improved. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0039] Figure 1 This application discloses a flowchart of an authorization method for office intranet resources.
[0040] Figure 2 A schematic diagram of a resource processing flow provided in this application;
[0041] Figure 3 This application provides a schematic diagram of memory structure reconstruction.
[0042] Figure 4 This application provides a schematic diagram of permission generation and transmission based on multi-threading.
[0043] Figure 5 This is a schematic diagram of the structure of an authorization device for office intranet resources disclosed in this application;
[0044] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] Currently, permission management systems in office intranets typically use single-choice authorization to subscribe to permissions from other business systems, implementing an ACL model and then synchronizing permissions. However, relying solely on single-choice or attribute-based authorization cannot support multi-strategy combinations, failing to meet the needs of complex application scenarios. Furthermore, the current authorization method is slow in generating permissions for complex attribute-based authorization scenarios. Additionally, the queuing of authorized messages leads to low subscription efficiency, slow message sending, and poor performance. In systems handling standardized protocol classes, this model is prone to blocking, requiring manual intervention to resolve such blocking. Therefore, this application provides a method for authorizing resources within the office intranet that sends authorization messages only to the business applications corresponding to eligible subscription tasks to complete the authorization. This method can meet the needs of large-scale combined authorization, eliminating the need for repeated adjustments to authorization strategies and significantly improving authorization management efficiency.
[0047] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for authorizing resources on an office intranet, including:
[0048] Step S11: Construct authorization structure data based on the target entities and entity dependencies related to authorization within the office intranet, and save the resource data used for authorization in the office intranet to the ES search engine; the target entities include user entities and business application entities.
[0049] In this embodiment, a target entity is constructed based on user entities and business application entities related to authorization within the office intranet. The user entities are company employees and department members within the office intranet; the business application entities are systems / tools requiring authorization, such as attendance systems and financial systems. Authorization structure data is constructed based on the entity dependencies of the target entity. These dependencies include the organizational relationships of the user entities, resource information under each organization, target authorization policies for each business application entity, authorization status, and message status. The organizational relationships represent the hierarchical structure of the user entities, and the resource information under each organization includes user entities and business application entities within that organization. The authorization status includes authorized and revoked. Then, all authorizable resource data within the office intranet is stored in the Elasticsearch search engine. This resource data includes the resource name, its organization, and attribute tags. Storing it in the Elasticsearch search engine allows for quick resource retrieval, thereby increasing the efficiency of resource data search.
[0050] Specifically, the construction of authorization structure data based on target entities and entity dependencies related to authorization within the office intranet includes: constructing target entities based on user entities and business application entities related to authorization within the office intranet, constructing authorization structure data using the entity dependencies of the target entities, and storing the authorization structure data in memory; wherein, the entity dependencies include the organizational relationships of the user entities, resource information under each organization, target authorization strategies, authorization status, and message status of each business application entity; the target authorization strategies include single-selection authorization strategies and attribute authorization strategies; the single-selection authorization strategy is a strategy for selecting target resources for authorization; the attribute authorization strategy is a strategy for grouping authorization according to attribute conditions.
[0051] Step S12: Construct a state control object in memory based on bitwise operations; the state control object is a control object used to record all authorized process states.
[0052] In this embodiment, a state control object is established in memory, using eight bits to record all process states of authorization. For example, the first bit represents whether the authorization policy is effective; if the first bit is 0, it indicates that the authorization policy is not effective; if it is 1, it is effective. The second bit represents whether the authorization message has been sent; 0 indicates that it has not been sent, and 1 indicates that it has been sent. The third bit represents whether the permission has been revoked; 0 indicates that it has not been revoked, and 1 indicates that it has been revoked. Specifically, constructing the state control object in memory based on bitwise operations includes: determining each process state of authorization based on bitwise operations and using a target number of bits, and constructing the state control object based on the bits and the corresponding process states.
[0053] Step S13: Obtain the resource subscription requirements of each of the business application entities, store the resource subscription requirements in the queue to be sent, use a multi-threaded mechanism to obtain the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions.
[0054] In this embodiment, the authorization requests of each business application entity, i.e. resource subscription requests, are obtained. All resource subscription requests are stored in a queue to be sent in sequence. Then, a multi-threaded mechanism is used to retrieve the resource subscription requests from the queue to be sent. The target authorization structure data and target resource data corresponding to the resource subscription requests are determined. The resource subscription requests, the target authorization structure data and the target resource data are integrated to obtain the subscription task corresponding to the resource subscription requests. Specifically, the steps of obtaining the resource subscription requirements of each of the business application entities, storing the resource subscription requirements in a pending-send queue, retrieving the resource subscription requirements from the pending-send queue using a multi-threaded mechanism, and determining the subscription task corresponding to the resource subscription requirements include: obtaining the resource subscription requirements of each of the business application entities, storing the resource subscription requirements sequentially in a pending-send queue based on the order in which they were obtained; retrieving the resource subscription requirements from the pending-send queue using a multi-threaded mechanism, retrieving the target authorization structure data corresponding to the resource subscription requirements from the authorization structure data; determining the target resource data corresponding to the resource subscription requirements using the ES search engine, and integrating the resource subscription requirements, the target authorization structure data, and the target resource data to obtain the subscription task corresponding to the resource subscription requirements.
[0055] In one specific implementation, if the subscription task needs to meet the preset conditions of an authorization policy bit of 1, a message sending bit of 0, and a permission revocation bit of 0, then the subscription task meets the preset conditions. Specifically, determining whether the subscription task meets the preset conditions using the state control object includes: determining whether the value corresponding to the target number of bits in the state control object is the target value; if the value corresponding to the target number of bits in the state control object is the target value, then the subscription task meets the preset conditions. It is worth mentioning that the preset conditions can be set according to actual conditions.
[0056] Understandably, if the subscription task meets the preset conditions, the authorization message corresponding to the subscription task can be sent to the corresponding target business application entity. If the subscription task does not meet the preset conditions, the resource subscription request corresponding to the subscription task is sent back to the queue to be sent. Specifically, after determining whether the subscription task meets the preset conditions using the state control object, the process further includes: if the subscription task does not meet the preset conditions, the resource subscription request corresponding to the subscription task is sent back to the queue to be sent, and then the process jumps to the step of obtaining the resource subscription request from the queue to be sent using a multi-threaded mechanism, until the subscription task meets the preset conditions.
[0057] Step S14: If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources.
[0058] In this embodiment, if the subscription task meets the preset conditions, an authorization message corresponding to the subscription task is sent to the corresponding target business application entity so that the target business application entity can access the corresponding resources. Then, the target bit used to record whether the authorization message has been sent is updated, changing the original 0 to 1. Specifically, the step of sending an authorization message corresponding to the subscription task to the corresponding target business application entity to complete the authorization operation of office intranet resources if the subscription task meets the preset conditions includes: sending an authorization message corresponding to the subscription task to the corresponding target business application entity if the subscription task meets the preset conditions, and using the state control object to update the target bit used to record whether the authorization message has been sent to complete the authorization operation of office intranet resources.
[0059] As shown above, this application constructs authorization structure data by including the target entities related to authorization and the dependencies between them, and stores the resource data used for authorization in the Elasticsearch (ES) search engine. The ES search engine supports rapid filtering based on complex conditions, solving the problem of slow searching for large amounts of resources. Bitwise operations are used to quickly determine subscription tasks and uniformly record the entire authorization process status. Then, a multi-threaded mechanism is used to process the resource subscription requests of business application entities, enabling batch processing. A queue mechanism ensures the sequential processing of requests, avoiding chaos. In this way, authorization messages are sent only to the business applications corresponding to subscription tasks that meet the conditions to complete the authorization, which can meet the needs of large-scale combined authorization. There is no need to repeatedly adjust the authorization strategy, and the efficiency of authorization management is greatly improved.
[0060] As can be seen from the above embodiments, this application sends an authorization message to the business application corresponding to the subscription task that meets the preset conditions in order to complete the authorization operation. Therefore, the process of sending an authorization message to the business application corresponding to the subscription task that meets the preset conditions is described.
[0061] Combination Figures 2 to 4 This invention discloses a specific method for authorizing office intranet resources, including:
[0062] In this embodiment, Figure 2 This embodiment provides a schematic diagram of a resource processing flow. First, new resources on the office intranet are entered into the authorization system. The system checks whether the new resources meet the preset legality conditions of the office intranet. The preset legality conditions are that the new resources do not contain any illegal content and are within the preset authorization scope, thus preventing illegal resources from being authorized and ensuring data security. Then, the inherent relationships of the new resources are checked, such as which department the new resources belong to. The system matches the organizational relationships corresponding to the new resources and records the resource information corresponding to the new resources. The resource information includes the name, ownership, and verification result of the new resources. The resource information is stored in the ES search engine and delivered to the kernel module.
[0063] Understandable, Figure 3 This embodiment provides a schematic diagram of a memory structure reconstruction. A background thread is started to read the organizational relationships of the office intranet in batches and build a memory structure based on the organizational relationships. If the data is invalid, an exception is thrown. Then, resource data is read from the ES search engine, and the association and dependency relationships between the organizational relationships and resources are stored in memory. Then, a resource memory structure is built. If the data in the memory is invalid, an error is reported and an exception is thrown. A preset background time is executed, and all memory reconstruction processes are waited for to complete to ensure the integrity of the memory data of the organization and resources and avoid data loss during subsequent authorization.
[0064] Furthermore, a state control object based on bitwise operations is constructed in memory, using eight bits to record all authorized process states. Figure 4This embodiment provides a schematic diagram of permission generation and transmission based on multithreading. It obtains resource subscription requests from various business application entities, then stores subscription nodes including resource subscription requests in a pending-send queue. A thread group in the multithreading mechanism retrieves resource subscription requests from the pending-send queue for parallel processing to improve efficiency. Then, the state control object determines whether the subscription task meets preset conditions. If not, the subscription result is sent back to the pending-send queue. If it does, the subscription task is sent to the corresponding business application entity, and successfully sent subscription nodes are stored in a sent queue, recording the sent authorization messages to avoid duplicate sending. Then, the subscription node is retrieved from the sent queue, and its corresponding authorization message is checked to see if it has been sent. If it has been sent, the authorization operation for office intranet resources is completed.
[0065] As can be seen from the above, this application uses the Elasticsearch search engine to solve the problem of slow searching for large amounts of resources, uses bitwise operations to quickly determine subscription tasks, and uses a multi-threaded mechanism to handle the resource subscription requirements of business application entities. This not only allows for the processing of large batches of subscription requests but also avoids missed processing. Then, a state control object is used to determine whether the subscription task meets the preset conditions and to send an authorization message to the business application corresponding to the subscription task that meets the preset conditions, thereby completing the authorization. In this way, even in complex attribute authorization scenarios, the corresponding permissions can be quickly found, improving the efficiency of sending authorization messages.
[0066] Accordingly, see Figure 5 As shown, this application also provides an authorization device for office intranet resources, including:
[0067] The resource data storage module 11 is used to construct authorization structure data based on the target entities and entity dependencies related to authorization in the office intranet, and to save the resource data used for authorization in the office intranet to the ES search engine; the target entities include user entities and business application entities;
[0068] The control object construction module 12 is used to construct a state control object in memory based on bitwise operations; the state control object is a control object used to record all authorized process states;
[0069] The subscription task judgment module 13 is used to obtain the resource subscription requirements of each of the business application entities, store the resource subscription requirements in the queue to be sent, use a multi-threaded mechanism to obtain the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions.
[0070] The authorization message sending module 14 is used to send the authorization message corresponding to the subscription task to the corresponding target business application entity if the subscription task meets the preset conditions, so as to complete the authorization operation of the office intranet resources.
[0071] In some specific embodiments, the resource data storage module 11 may specifically include:
[0072] The structured data construction unit is used to construct target entities based on user entities and business application entities related to authorization within the office intranet, and to construct authorization structured data using the entity dependencies of the target entities, and then store the authorization structured data in memory.
[0073] In some specific embodiments, the control object construction module 12 may specifically include:
[0074] A control object construction unit is used to determine the authorized process states based on bit operations and using a target number of bits, and to construct a state control object based on the bits and the corresponding process states.
[0075] In some specific embodiments, the subscription task determination module 13 may specifically include:
[0076] The subscription request storage unit is used to obtain the resource subscription requests of each of the business application entities and store the resource subscription requests in the order of obtaining the resource subscription requests into the queue to be sent.
[0077] The target data acquisition unit is used to acquire the resource subscription requirement from the queue to be sent using a multi-threaded mechanism, and to acquire the target authorization structure data corresponding to the resource subscription requirement from the authorization structure data;
[0078] The data integration unit is used to determine the target resource data corresponding to the resource subscription request using the ES search engine, and to integrate the resource subscription request, the target authorization structure data and the target resource data to obtain the subscription task corresponding to the resource subscription request.
[0079] In some specific embodiments, the subscription task determination module 13 may specifically include:
[0080] The numerical judgment unit is used to determine whether the value corresponding to the target number of bits in the state control object is the target value;
[0081] The subscription task judgment unit is used to indicate that the subscription task satisfies the preset condition if the value corresponding to the target number of bits in the state control object is the target value.
[0082] In some specific embodiments, the authorization device for the office intranet resources may further include:
[0083] The request return unit is used to send the resource subscription request corresponding to the subscription task back to the waiting queue if the subscription task does not meet the preset conditions, and then jump to the step of obtaining the resource subscription request from the waiting queue using a multi-threaded mechanism until the subscription task meets the preset conditions.
[0084] In some specific embodiments, the authorization message sending module 14 may specifically include:
[0085] The bit update unit is used to send the authorization message corresponding to the subscription task to the corresponding target business application entity if the subscription task meets the preset conditions, and to update the target bit used to record whether the authorization message has been sent using the state control object, so as to complete the authorization operation of the office intranet resources.
[0086] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the authorization method for office intranet resources disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be a computer.
[0087] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0088] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0089] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the authorization method for office intranet resources executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0090] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for authorizing office intranet resources. The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0091] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0092] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0093] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0094] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0095] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for authorizing resources on an office intranet, characterized in that, include: Authorization structure data is constructed based on the target entities and entity dependencies related to authorization within the office intranet, and the resource data used for authorization in the office intranet is saved to the ES search engine; the target entities include user entities and business application entities; A state control object is constructed in memory based on bitwise operations; the state control object is a control object used to record the state of all authorized processes. Obtain the resource subscription requirements of each of the aforementioned business application entities, store the resource subscription requirements in a queue to be sent, use a multi-threaded mechanism to retrieve the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions. If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources.
2. The method for authorizing office intranet resources according to claim 1, characterized in that, The authorization structure data constructed based on the target entities and entity dependencies related to authorization within the office intranet includes: The target entity is constructed based on the user entities and business application entities related to authorization on the office intranet, and the authorization structure data is constructed using the entity dependency relationship of the target entity and stored in memory. The entity dependency relationship includes the organizational relationship of the user entity, resource information under each organization, target authorization strategy, authorization status and message status of each business application entity; the target authorization strategy includes single-selection authorization strategy and attribute authorization strategy; the single-selection authorization strategy is a strategy of selecting target resources for authorization; the attribute authorization strategy is a strategy of grouping authorization according to attribute conditions.
3. The method for authorizing office intranet resources according to claim 1, characterized in that, The construction of the state control object in memory based on bitwise operations includes: Based on bitwise operations, the authorized process states are determined using a target number of bits, and a state control object is constructed based on the bits and the corresponding process states.
4. The method for authorizing office intranet resources according to claim 1, characterized in that, The steps of obtaining the resource subscription requirements of each of the aforementioned business application entities, storing the resource subscription requirements in a queue to be sent, retrieving the resource subscription requirements from the queue using a multi-threaded mechanism, and determining the subscription task corresponding to the resource subscription requirements include: Obtain the resource subscription requirements of each of the aforementioned business application entities, and store the resource subscription requirements sequentially into the queue to be sent based on the order in which they were obtained; The resource subscription request is obtained from the queue to be sent using a multi-threaded mechanism, and the target authorization structure data corresponding to the resource subscription request is obtained from the authorization structure data. The target resource data corresponding to the resource subscription request is determined using the ES search engine. The resource subscription request, the target authorization structure data, and the target resource data are then integrated to obtain the subscription task corresponding to the resource subscription request.
5. The method for authorizing office intranet resources according to claim 3, characterized in that, The step of using the state control object to determine whether the subscription task meets the preset conditions includes: Determine whether the value corresponding to the target number of bits in the state control object is the target value; If the value corresponding to the target number of bits in the state control object is the target value, then the subscription task satisfies the preset condition.
6. The method for authorizing office intranet resources according to any one of claims 1 to 5, characterized in that, After determining whether the subscription task meets the preset conditions using the state control object, the method further includes: If the subscription task does not meet the preset conditions, the resource subscription request corresponding to the subscription task is sent back to the queue to be sent, and then the process jumps to the step of obtaining the resource subscription request from the queue to be sent using a multi-threaded mechanism, until the subscription task meets the preset conditions.
7. The method for authorizing office intranet resources according to claim 3, characterized in that, If the subscription task meets the preset conditions, then the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity to complete the authorization operation of the office intranet resources, including: If the subscription task meets the preset conditions, the authorization message corresponding to the subscription task will be sent to the corresponding target business application entity, and the target bit used to record whether the authorization message has been sent will be updated using the status control object to complete the authorization operation of the office intranet resources.
8. An authorization device for office intranet resources, characterized in that, include: The resource data storage module is used to construct authorization structure data based on the target entities and entity dependencies related to authorization within the office intranet, and to save the resource data used for authorization in the office intranet to the ES search engine; the target entities include user entities and business application entities; A control object construction module is used to construct a state control object in memory based on bitwise operations; the state control object is a control object used to record all authorized process states; The subscription task judgment module is used to obtain the resource subscription requirements of each of the business application entities, store the resource subscription requirements in the queue to be sent, use a multi-threaded mechanism to obtain the resource subscription requirements from the queue to be sent, determine the subscription task corresponding to the resource subscription requirements, and use the state control object to determine whether the subscription task meets the preset conditions. The authorization message sending module is used to send an authorization message corresponding to the subscription task to the corresponding target business application entity if the subscription task meets the preset conditions, so as to complete the authorization operation of the office intranet resources.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the authorization method for office intranet resources as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs, wherein the computer programs, when executed by a processor, implement the authorization method for office intranet resources as described in any one of claims 1 to 7.